I am taking in CSV files from Nasdaq and am using Apache Commons CSV to parse it. For some reason I am getting a NullPointerException and I can't seem to figure out why.  These are my lines where I create the reader and parser  data = new URL("http://www.nasdaq.com/screening/companies-by-industry.aspx?industry=Health%20Care&render=download"); Reader dataReader= new InputStreamReader(new BOMInputStream(data.openStream()), "UTF-8"); CSVParser dataParse= new CSVParser(dataReader, CSVFormat.EXCEL.withHeader());   I am then adding to an ArrayList to store the values:  for (final CSVRecord record : dataParse) {     myArrayList.add(new MyClass(record.get("Symbol"),              record.get("Industry"))); }   It seems to me like the CSV file is fine, so not sure why this would be happening. Thanks

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?


The Windows command line uses start programname and start filename.ext to process the file as if the user had double-clicked it in the GUI shells we all know and love. MacOS's command line does the same with open. That is useful for those of us who don't know the exact program and location for opening unusual file types.   On Linux, ./filename.ext is to run scripts, and start filename.ext responds with an error because it's expecting a "job". So...  What is the standard CLI command to open a non-script file under whatever the registered type-handler under Linux? If it's not standard, what does Red Hat use?

Coming from Mac OS X, you can type:  $ open yourfilehere.txt   and your file will open just as if you had opened it from Finder.  On Windows, one can type:  > start yourfilehere.txt   and it will open just as if you had opened it from Explorer.  On Ubuntu, I'd like to be able to open files in the same manner in GNOME. What's the command?


I'm learning the :before and :after pseudo-elements but I don't understand why it's not centering.  what I have:   my code :  jsfiddle down here     If I remove display: inline-block; the :before element would transition from the left of the page, But I want it from the left of the .title main element.  In short I want to achieve the same effect of transition but I want the text to be centered horizontally.  I want the .title class to be centered horizontally and the .title:before also to be centered horizontally.

How can I horizontally center a
 within another
 using CSS?

Foo foo


I'm working on a geographic information system project, whose products form shapefile. I am using java language, and PostGIS database. Is there a way to generate a shp file from PostGIS or kml using java language?

My data is in a PostGIS database. I would like to generate a shapefile from a query. How can I do that?


Is it possible to use the algorithmicx package and modify the command blocks somehow that I get vertical lines for the indentation? Should this be probably done with TikZ? (The package algorithm2e can do this but I do not use it!)  A simple example I came up with is this one here:  How is it possible to remove the end tags and still have the vertical lines As soon as I add \algnotext{EndIf} the TikZ is obviously no more drawn and there is no end tag as required?  \documentclass{article}  \usepackage{algpseudocode}% http://ctan.org/pkg/algorithmicx \usepackage{algorithm}% http://ctan.org/pkg/algorithm  \usepackage{tikz}  \begin{document}  \newcommand{\keyword}[1]{\textbf{\textsf{#1}}} \newcounter{scopeCounter} \newcommand{\decScopeCounter}{\addtocounter{scopeCounter}{-1}} \newcommand{\incScopeCounter}{\addtocounter{scopeCounter}{1}}  % if blocks \algblockdefx{If}{EndIf}%   [1]{%   \incScopeCounter%   \tikz[remember picture,baseline=-0.5ex] \coordinate (b\thescopeCounter);%   \keyword{if} #1\hspace{0.5mm}\keyword{:}%   }%   {%   \tikz[remember picture,baseline=-0.5ex] \coordinate (e\thescopeCounter);%   \begin{tikzpicture}[remember picture,overlay]%     \draw[-,very thick]  (b\thescopeCounter) -- (e\thescopeCounter);%   \end{tikzpicture}%   \algorithmicend%   }  \algcblockdefx{If}{Else}{EndIf}%   {%   \tikz[remember picture,baseline=-0.5ex] \coordinate (e\thescopeCounter);%   \begin{tikzpicture}[remember picture,overlay]%     \draw[-,very thick]  (b\thescopeCounter) -- (e\thescopeCounter);%   \end{tikzpicture}%   \tikz[remember picture,baseline=-0.5ex] \coordinate (b\thescopeCounter);%   \keyword{else:}%   }%   {%   \tikz[remember picture,baseline=-0.5ex] \coordinate (e\thescopeCounter);%   \begin{tikzpicture}[remember picture,overlay]%     \draw[-,very thick]  (b\thescopeCounter) -- (e\thescopeCounter);%   \end{tikzpicture}%   \algorithmicend%   \decScopeCounter   }%  \algcblockdefx{If}{Elif}{EndIf}%   [1]{%   \tikz[remember picture,baseline=-0.5ex] \coordinate (e\thescopeCounter);%   \begin{tikzpicture}[remember picture,overlay]%     \draw[-,very thick]  (b\thescopeCounter) -- (e\thescopeCounter);%   \end{tikzpicture}%   \tikz[remember picture,baseline=-0.5ex] \coordinate (b\thescopeCounter);%   \keyword{elif} #1\hspace{0.5mm}\keyword{:}   }%   {%   \tikz[remember picture,baseline=-0.5ex] \coordinate (e\thescopeCounter);%   \begin{tikzpicture}[remember picture,overlay]%     \draw[-,very thick]  (b\thescopeCounter) -- (e\thescopeCounter);%   \end{tikzpicture}%   \algorithmicend%   \decScopeCounter   }%   %\algnotext{EndIf}  %%% UNCOMMENT THIS LINE TO REMOVE end TAGS  \begin{algorithm} \caption{Euclid’s algorithm}\label{euclid} \begin{algorithmic}[1] \If{$i\geq maxval$}     \State $i\gets 0$ \Else     \If{$i+k\leq maxval$}         \State $i\gets i+k$     \EndIf \EndIf \end{algorithmic} \end{algorithm}    \end{document}     Thanks a lot for the help!

I am using the algorithmic package to typeset an algorithm. I would like to have connecting lines between the beginning and end of a loop or conditional like in the algorithm2e package. Is there an easy way to accomplish this, or am I better off switching to algorithm2e?


In the comics, have the Fantastic Four, specifically Johnny Storm, ever mentioned or met the original android Human Torch?

In Captain America: The First Avenger, we see in the Stark Expo a reference to 'Phineas T. Horton's Synthetic Man'.  In Marvel comics, this was the original Human Torch.    Does Marvel actually have the rights to this character, or was this kind of a cheeky nod to Chris Evans playing a Human Torch?


It seems that there is a sequence of events that happens when you leave Windows 7 inactivated. First, you get tooltips in the tray that say "This copy of Windows is not genuine, click here to activate now."  If you ignore the warnings, eventually you get a watermark on your desktop:    Then, after another few days, Microsoft tries to make you afraid of the dark by turning the desktop background to solid black:    Eventually another tool tip will say "Activation period has expired, click here to activate now."  I know that to prevent all these things from happening, I should just activate. But my question is merely one of curiosity:  Is there anything further that Windows 7 does to try to convince you to activate? Do certain services get shut down or functionality lost? What can I expect to happen if I don't activate?

I have had Windows 7 Ultimate installed for about two weeks, with a couple more weeks left to activate.  If you ignore the warnings, eventually you get a watermark on your desktop:    Then, after another few days, the desktop background will turn solid black:    What happens after the trial period has ended without activation?


I am trying to debug a few slow responses served by an app deployed on Tomcat. Right now I am focussing on SecureRandom and /dev/random (some of the other probable causes have been investigated and ruled out). The pattern is as follows:   The first call takes exactly 30.0xy seconds after Tomcat restart (even if the request arrives 4 minutes after the Startup) Later, some calls take exactly 15.0pq seconds (there was no specific pattern that I could establish, pq being the time approximate time taken in TP99)   The service call involves encryption and decryption (AES/ECB/PKCS5Padding).  Is it possible that SecureRandom init/repopulating is leading to this?  (Although, there is a log written in catalina.log that says "Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [28,760] milliseconds.")  Also, in order to check whether /dev/random or /dev/urandom is being used, I used the test from . To my surprise, I didn't see reads from either of them unlike the way it happens in the linked question. These are the last few lines from the strace log:  3561  lstat("/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/jsse.jar", {st_mode=S_IFREG|0644, st_size=258525, ...}) = 0 3561  open("/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/jsse.jar", O_RDONLY) = 6 3561  stat("/dev/random", {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 8), ...}) = 0 3561  stat("/dev/urandom", {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 9), ...}) = 0 3561  open("/dev/random", O_RDONLY)     = 7 3561  open("/dev/urandom", O_RDONLY)    = 8 3561  unlink("/tmp/hsperfdata_xxxx/3560") = 0   What is then being used for seeding SecureRandom?  fyi, java -version  java version "1.6.0_32" OpenJDK Runtime Environment (IcedTea6 1.13.4) (rhel-7.1.13.4.el6_5-x86_64) OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)

If you want a cryptographically strong random numbers in Java, you use SecureRandom. Unfortunately, SecureRandom can be very slow. If it uses /dev/random on Linux, it can block waiting for sufficient entropy to build up. How do you avoid the performance penalty?  Has anyone used  as a solution to this problem?  Can anybody confirm that this performance problem has been solved in JDK 6?


I want to use the commentpackage with special german characters (umlauts), but it doesn't work. I get the following error message:  ERROR: Undefined control sequence.  --- TeX said --- \UseTextAccent ...up \@firstofone \let \@curr@enc                                                    \cf@encoding \@use@text@en... l.24   Deutsche Umlaute: äüö   Here is my example:   \documentclass{article}   \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}  \usepackage{ngerman} \usepackage{ascii}  \usepackage{comment} \specialcomment{testcomment}{\asciifamily}{\normalfont}  \begin{document}  Here is a comment which works.   \begin{testcomment}   Test \end{testcomment}  Here is a comment that doesn't work.  \begin{testcomment}    Deutsche Umlaute: äüö \end{testcomment}  \end{document}   Any idea, how to make this work?  Edit  Using   \renewcommand\ThisComment[1]{%   \immediate\write\CommentStream{\unexpanded{#1}}% }   after \usepackage{comment} solved the problem completely.

I noted that if I use comment.sty and a there is a block of text containing UTF8 characters inside a comment environment, the compilation aborts!  Minimal Example  \documentclass{article} \usepackage[T1]{fontenc} \RequirePackage[utf8]{inputenc}%this file is stored as UTF8 file! \RequirePackage{comment} \specialcomment{privateSolution}     {\begingroup\itshape\noindent\textbf{Solution}\\}     {\endgroup} %\excludecomment{privateSolution}%Use it to remove solutions!  \begin{document} \title{Comment.sty and UTF8 test file} \maketitle \section{UTF8 character test} In which alphabet characters àìùòè are common? \begin{privateSolution}     The Italian alphabet contains àìùòè. \end{privateSolution}  \begin{comment}     The Italian one! It contains àìùòè. \end{comment} \end{document}   Has anyone the same problem? Any workaround?  Thanks in advance.


In a simple physics experiment, we take the average a few readings to reduce the random errors. I apply  rules to these.  Say we round off at each step:  (8.0+9.0+10.0)/3 = 27.0/3 (addition keeps dp) = 9.00 (division keeps sf)  Say we choose to only round off at the end by taking the least precise of given readings:  (9.0+10.0+11.0)/3 = 30.0/3=10 (2sf because 9.0 is 2 sf  'common sense' tells us that in the first example, the decimal place should be kept at 9.0, and in the second, it should be 10.0, not 10.   Another example: Given the external (19.2) and internal (18.3) diameter of a pipe, calculate its thickness: (19.2-18.3)/2 =0.45 or 0.5 or 0.450?  All these significant figure rules seem to only work out in theory to me. Can someone explain?

I'm a little confused as to when to use  for my physics class. For example, I'm asked to find the average speed of a race car that travels around a circular track with a radius of $500~\mathrm{m}$ in $50~\mathrm{s}$.  Would I need to apply the rules of significant figures to this step of the problem? $$ C = 2\pi (1000~\mathrm{m}) = 6283.19 $$  Or do I just need to apply significant figures at this step? $$ \text{Average speed} = \frac{6283.19~\mathrm{m}}{50~\mathrm{s}} = 125.664~\mathrm{m}/\mathrm{s} $$  Should I round $125.664~\mathrm{m}/\mathrm{s}$  to  $130~\mathrm{m}/\mathrm{s}$ since the number with the least amount of significant figures is two?


I have the strangest case which challenges my understanding about the fundamental way Java works.    I have the following code which I step through using the debugger to the "return result == "OK" line, where I expect the execution for this method to finish. But it doesn't! If I continue stepping with the debugger, I see that it steps to the very last line (without throwing an exception) and returns false!  Can anyone shed any light on this?  protected Boolean doInBackground(Void... params) {      try     {         String json = buildJson();         String encryptedData = encrypt(json);         String base64Data = Base64.encode(encryptedData.getBytes(UTF8));         String url = webserviceUrl + "?data=" + base64Data;         String result = readUrl(url);          return (result == "OK");  // Debugger gets to here but doesn't return!     }     catch (UnsupportedEncodingException e) {         e.printStackTrace();     } catch (ClientProtocolException e) {         e.printStackTrace();     } catch (IOException e) {         e.printStackTrace();     }      return false;  // Debugger gets to here instead, and returns false! }

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?


Well, I've installed Ubuntu & so far I love it. But is it just me or did Wine not come with the installation as cited   I've used the previous version on the same machine with it included, up & running great. I understand it's in the software center & I can just download it from there. But, where is it on my newly installed OS? No searches of my system have found it?

Can someone please explain how I can install  in the following ways?   By using the package manager? By downloading and installing a pre-built package?


I have an issue saving a multi-dimensional array using update_post_meta.  Here's my code ($meta_key and $userID are set up above):      $read_notices = get_user_meta($userID, $meta_key);      if (null === $read_notices) {         $read_notices = array();     }      $read_notices[] = $postID;      update_user_meta($userID, $meta_key, $read_notices);   My problem is that the data is nesting every time so I end up with... Any ideas?  Array (     [0] => Array         (         [0] => Array             (                 [0] => Array                     (                         [0] => 1823                     )                  [1] => 1762             )          [1] => 1762     ) )

I am writing a function that adds an ID number to an array and puts the array in the usermeta. $_GET['auction'] is the post_id.  Below is the function:  $reminders = get_user_meta( $current_user->ID, "reminders" ); print_r( $reminders ); if( in_array( $_GET['auction'], $reminders ) ) {     echo "Failed: Auction already in list"; } else {     array_push( $reminders, intval( $_GET['auction'] ) );     if ( update_user_meta( $current_user->ID, "reminders", $reminders ) ) {         echo "Success";     } else {         echo "Failed: Could not update user meta";     } } print_r( $reminders );   Here is the output after adding one auction:  Array ( )  Success Array ( [0] => 7 )    Here is the output after adding two auctions:  Array ( [0] => Array ( [0] => 7 ) )  Success Array ( [0] => Array ( [0] => 7 ) [1] => 73 )   And here is the output after adding three auctions:  Array ( [0] => Array ( [0] => Array ( [0] => 7 ) [1] => 73 ) )  Success Array ( [0] => Array ( [0] => Array ( [0] => 7 ) [1] => 73 ) [1] => 0 )   Notice that adding a new element to the array using array_push works fine. But when the array is stored in the usermeta then retrieved again, the last element in the array has been put into an array of its own, creating an infinitely dimensional array. I'd prefer to keep this array one dimensional.  Is there a way I can run update_user_meta and get_user_meta without it changing the structure of my array?


When I was young I remember my mother bringing me a movie home from goodwill. The movie was in the 80s style if I remember correctly. I don't remember much about the movie other than a masked character who always wore a red suit, carried a rifle and rode an ostrich like creature. I think this character never spoke and died at some point in the movie. The front cover of the movie has this red cloaked character mounted on his ostrich like creature with his gun.  If I remember right, the movie's landscape was very bleak and apocalyptic and was inhabited with characters wearing the same cloak and riding the same beast as the character mentioned above only with a different color scheme.   Any help would be great appreciated.

I'm looking for a cartoon from the 70's (I believe) which is about a set of twins; one plump "fairy" and a skeletal "demon". The "fairy" has magic powers and ends up living a life of pleasure, while the "demon" flees and turns evil.  When the "demon" finds his new weapon in the ruins of the ancient world (roughly modern day) he plots to enslave the world; the weapon in question is a set of propaganda movies with Adolf Hitler.


In some languages, such as Italian, when addressing someone who is senior to you or at a higher level with respect to some social hierarchy, it is customary not to use the second-person singular pronoun but some other form to indicate deference. In Italian for example, the second-person plural feminine is used (e.g. "How are you" becomes "How is she"). The closest phenomenon in English that comes to my mind is the use of "sir" or "madam" but of course this does not work in the same way grammatically.  My question is: what is the technical English term for this grammatical construction?

From the top of my head, Danish "De" (practically never used), German "Sie", Chinese "您", French "vous", Spanish "usted" are a formal way of addressing someone, especially if one isn't familiar with the addressee. Did English ever have this? It sounds as though Proto-Indo-European might have had this (based on my 4 examples), but perhaps someone can enlighten me?


My default browser is Safari. I would like to open all Google Meet links (e.g. https://meet.google.com/xxx-xxxx-xxx) to open in Google Chrome. I open these links from a calendar event in Apple's Calendar app.  How can I make these kinds of links open in Chrome instead of Safari?

Is it possible to tell OS X to always open one site in Chrome, and always open another site in Safari?  In a nutshell, I want to set a default browser per domain rather than globally for the entire computer.  Here's why I ask:  Out of the box OS X does not come with Flash.  The Chrome browser has Flash bundled, however.  So I'd like to have domains that I know require Flash always open in Chrome, but everything else open in my preferred browser, which is Safari.  I'm okay with maintaining a "white list" of which sites need the "use chrome" exception, but right now I can't see any way to make it happen.  Any suggestions?


I am an very ameteur mathematician and physicst (If I can say mathematician and physicst to myself xD). I want to learn topics in physics. Like electromagnetism, mechanic, thermodinamics etc. But I don't want to drown in lots of maths (Lots of fantastic variables, constants that I haven't seen in my life). I just want to understand ideas, basic of equations like that.  Can you advice a book, method, website etc. that I can do what I had written above.

Every once in a while, we get a question asking for a book or other educational reference on a particular topic at a particular level. This is a meta-question that collects all those links together. If you're looking for book recommendations, this is probably the place to start.  All the questions linked below, as well as others which deal with more specialized books, can be found under the tag  (formerly ).  If you have a question to add, please edit it in. However, make sure of a few things first:   The question should be tagged  It should be of the form "What are good books to learn/study [subject] at [level]?" It shouldn't duplicate a topic and level that's already on the list   Related Meta:


I am using a flyback transformer to obtain 400 V DC from 120 V AC mains. I cannot find a transformer and switching controller available which give a higher output voltage, and do not want to deal with higher output voltages from this transformer either as it would require filter caps with larger voltage tolerances.  Therefore, I plan on using a voltage multiplier to quadruple this 400 V output. In order to do that, I need to oscillate this new input voltage to the voltage multiplier circuit (400 V) between 0 V and 400 V.  How can I go about making this oscillation circuit?  Frequency is not too important, 10 Hz to 100 kHz is in the range. Also, this 1.6 kV ouput will experience zero load under normal conditions, therefore a feedback control to stop the oscillation once the output is charged would be beneficial (as no switching power will be wasted).  I considered using a voltage divider, with an N MOSFET replacing the low side resistor, and driving the FET to oscillate the voltage, and it worked for lower voltages (12 V) but experienced some trouble when I tried the circuit with 400 V input.  I am considering a digital inverter type circuit driven by a 555 timer. Is this a good approach to follow? I have worked plenty with N FETs but am hesitant on how to drive the high side P FET given such a high voltage. I appreciate your suggestions.  This question should not be marked as a duplicate. The other question asks for different circuits to generate a high voltage. This question specifically focuses on how to create an AC voltage from a high DC voltage, sine, square, or otherwise.

Designing the power supply for an radiation detector, need to supply up to 1500V at 2 mA from mains (170 Vdc).  I've largely considered a flyback converter, but cannot find a flyback transformer with a gain of N=~16 (for a gain of 8 at 50% duty cycle) rated for 1500V at the output winding.  Looked into charge pumps/voltage multipliers some but not in depth yet.  Also just recently learned about CCFL inverter transformers, but still need some time to understand them better.  This project requires a small size and weight, so using a large transformer is not preferred.  What are other ways to step up voltage which I may look into?


I am testing out Expect to get a basic template working. I have created a demo bash script which asks a few questions and outputs the inputs to a file.  When I execute the .exp file directly or through "expect FILENAME", or even when using autoexpect, I get the errors below that suggests it was not interpreted correctly(expected .exp file?). What should I do to get Expect with a bash script working?   I am testing using Ubuntu through WSL as the OS and CMD(bash is executed to use WSL and normal bash commands usable so not sure if this has any effect.).   Expect file:  #!/usr/bin/expect -f  set timeout -1  spawn /bin/bash "./test-interactive.sh" # expect "*" expect "Please fill in each prompt." send -- "a\r" expect "*" send -- "b\r" expect "Please fill in each prompt." # expect "*" send -- "c\r" expect "*" send -- "d\r" expect eof   Bash shell file:  #!/bin/bash  _message="Please fill in each prompt."  echo $_message  read a read b  echo $_message  echo -n "$ " read x echo -n "$ " read y  echo "" echo "Accepting following inputs" echo $a echo $b echo $x echo $y echo ""  echo "a: $a b: $b x: $x y: $y" > output.txt  # read -p "Press enter to exit"   Output:  spawn /bin/bash ./test-interactive.sh ./test-interactive.sh: line 2: $'\r': command not found ./test-interactive.sh: line 4: $'\r': command not found Please fill in each prompt. a b ./test-interactive.sh: line 6: $'\r': command not found ': not a valid identifierne 7: read: `a ': not a valid identifierne 8: read: `b ./test-interactive.sh: line 9: $'\r': command not found Please fill in each prompt. c d ./test-interactive.sh: line 11: $'\r': command not found ': not a valid identifierne 13: read: `x ': not a valid identifierne 15: read: `y ./test-interactive.sh: line 16: $'\r': command not found  Accepting following inputs

I use Cygwin on my laptop (DOS). I have a collection of scripts from my colleagues, and my own. I am not an IT person, not knowledgeable in Unix. I am following my colleagues' syntax and able to manage a few simple things. The scripts worked well on my old laptop. I just changed laptop and installed Cygwin. When I run my scripts, they do not work. Here is one example of the error message I get: line 1: $':\r': command not found line 5: syntax error near unexpected token `$'\r'' line 5: `fi  Here are the top 5 lines of my script : iter=1 if [ -f iter.txt ]    then rm ./iter.txt  fi    Can someone please explain how I can get around this problem?


I am looking for a way to remove all the old kernels but keep 1 just in case.   dpkg --list | grep linux-image | awk '{ print $2 }' | sort -V | sed -n '/'`uname -r`'/q;p' | xargs sudo apt-get -y purge   This command has worked fairly well but removes all old kernels. Is it possible to leave a spare kernel?

Every time I install a new Linux kernel, it gets left in the grub_config, making the boot menu longer each time.    I know I can manually search through the installed packages and remove them.  Does Ubuntu provide any easier way to clean them up or keep them from showing in the boot list?


When I buld a nether portal and light it it wont light. The obsidian lights on fire but no portal please help me fix this.

How does one get to The Nether area in Minecraft?  I heard that portals would be used to teleport around the map, but in order to use the portals you have to go through The Nether area.


Answers sometimes become obsolete.  New solutions arise that were not technically feasible at the time that the question was originally posed.  People decide that the old way of doing things is no longer a good idea.  This goes for answers on main sites as well as on meta sites.  In , several suggestions were raised, but I don't find them satisfactory.   Deleting is not appropriate, I think, since it removes all trace of the answer, and even obsolete information is sometimes useful.  It leaves a void, and there is even a risk that the void could be filled by someone else writing a similarly obsolete answer.  I also believe that is is inappropriate to strip the original poster of reputation points that were rightfully earned in the past. Editing the answer to provide a new solution is an underhanded approach, since the practice of radically altering posts is prone to abuse.  Who is to say that all the voters who upvoted the original answer agree with whatever new advice is added?  It's even worse if someone other than the original author of the answer violates the author's intent.  Editing also fails to confer reputation commensurate with the effort, if the new answer is completely different.  Additionally, it might not be desirable to bump an old post onto the front page. Downvoting To counteract all of the upvotes, you would have to rally a downvote brigade, which is neither realistic nor desirable.  There's no need to hurt the original poster's reputation just because an answer is no longer relevant.  Furthermore, all previous upvotes are locked in unless the post is edited, so the concerns raised above about editing also apply. Commenting is insufficient, because it could be buried at the bottom of a long thread.  Also, comments on Stack Exchange are designed to be of a somewhat transient nature.  Comments also don't alter the order of presentation of answers. Locking is currently possible only for a "Content dispute" or for "Offtopic [sic] comments".  As the guidelines say, "posts should only be locked when something seriously bad is happening. A locked post cannot be changed in any way or voted on".  I don't think that obsolete information qualifies as "seriously bad", or that editing/voting should be prevented.   I think a feature enhancement is called for!

As the network ages and we have answers that are , we run into situations where changes in technology, etc. result in a once great answer becoming out-of-date, obsolete, or somewhat problematic.  We don’t want to , due to legacy applications that still need the code but we need to figure out the right way to handle them. This has been brought up and discussed , ,  times over the years, and the community seems to suggest the following steps to update these answers:  Comment to the OP suggesting that their answer is out-of date and needs to be updated Post a new answer with the updated information Edit or suggest an edit (if you don’t have privileges) to correct the answer  There are pros and cons to each one of these, and I’m going to outline a few of them here: Adding a Comment: What if the user is no longer active on the site? They won’t get the notification to update and then it’s up to someone else to potentially edit the answer. What if the user gets notification and disagrees that the answer is wrong, so they don’t edit it.  Now we have a conflict between the original author and another user on the validity of an answer, how do we proceed? Posting a New Answer: This is a great solution to the above problem when the original author doesn’t want to edit their obsolete answer, but we run into the “sorting problem” where the highly-upvoted, accepted answer appears above an up-to-date answer.  The hope is that eventually this new answer will gain enough upvotes to move up the list and will be easily visible to people with the same question. Editing or Suggesting an Edit This is where we have the biggest issue when it comes to improving out-of-date or obsolete answers.  Editing posts is  and it’s even a  that is earned. The help center explicitly states  When should I edit posts? .... to correct minor mistakes or add addendums / updates as the post ages  Users are advised to make these edits, yet this seems to be a stumbling block. Why, you ask, do I see it as a stumbling block? Several reasons... First, when a user doesn’t have full edit privileges it goes to the review queue where . If the edit is substantial enough, there is even a rejection reason provided:  This edit deviates from the original intent of the post. Even edits that must make drastic changes should strive to preserve the goals of the post's owner.  With the rejection we lose the proposed fix and are back at the start, with an answer that needs a bit of tending to. If a user has full edit privileges, they can make a sizable edit without review to bring it up-to-date but if there are  As you see, we have a disconnect. Users are told to edit and we have posts that need to be edited. But no one wants or is able to edit them, because they might alter code which is a big no-no when the answer is not a community-wiki. What do we do? What can we do to fix this? We’re taking a good hard look at how we should handle answers that were once great but need some gardening to keep them that way.  Lots of things have been suggested over the years, but so far nothing has been implemented:           Before we do anything we want some feedback and a discussion from the community on how we can encourage these edits to these answers (we ). Would you be more likely to edit them into something no longer obsolete, if they were made community wikis?  Should we add a post notice that it’s obsolete or out-of-date?  Figure out some way to give rep to the user who makes a substantial edit?  Something else that we haven’t thought of?


In The Tale of the Three Brothers, Death is said to have made the Elder Wand. Even Harry, who was accustomed to magic, found that idea ludicrous. Obviously, Death could not have made it... then who did?

I went through the last book, Harry Potter and the Deathly Hallows, yesterday and a question popped in my mind: Does Death, the supposed creator of the Deathly Hallows, really exist in the Harry Potter universe? Dumbledore thought otherwise and I am with the same school of thought.  By the way who created the deathly Hallows actually?  Update:  1) Why were the brothers so sure that the hooded figure was death(couldn't it be a more powerful wizard playing with them)  2) Couldn't, Beedle and the brothers create this story?


Let $x_1 > 0$ and $a > x_1 + x_1^2$. Recursively define $x_{n+1} = \frac a {1 + x_n}$ I want to prove that $x_n \xrightarrow{n \rightarrow \infty} \varepsilon \;$ where $\varepsilon + \varepsilon^2 = a \;$ ($\varepsilon$ is a root of $x + x^2 = a$) For this, I need to prove that $(x_{n+1} - x_n)(x_n - x_{n-1}) < 0 \;$ (which I've already done) and then I need to prove what's stated in the title: $\; |x_{n+1} - x_n| \le \theta |x_n - x_{n-1}|\;$ for some $0 < \theta < 1$ I'm getting stuck here. I tried proving it by IVT : Let $f(x) = \frac a {1+x}$. Then $$\begin{split} f(x_n) &- f(x_{n-1}) &= f'(c)(x_n -x_{n-1}) \\ x_{n+1} &- x_n &= f'(c)(x_n -x_{n-1}) \end{split} $$ Since $f'(x) = - \frac a {(1+x)^2}$ I have $|f'(c)| \le \max\left\{ \frac a {(1+x_n)^2}, \frac a {(1+x_{n-1})^2} \right\}$ So it would suffice to show $\frac a {(1+x_n)^2} < 1 \; \forall n \in \mathbb N$ I have tried but can't. It would suffice to show that the inequality is true for $x_1$ and that $x_n \ge x_1$ but it also escapes me

Prove that sequence $$ x_{(n+1)}= \frac {a}{1+x_n}$$ is convergent to positive root of $x^2+x-a=0,$where $a >0$ and $x_1 >0$  we have $$x_{(n+2)}-x_n=\frac{-a(x_{(n+1)}-x_{(n-1)})}{(1+x_{(n-1)})(1+x_{(n+1)})}$$  Hence from this we see behaviour of even terms subsequence and odd terms subsequence  is opposite. how to proceed from there. any hint please


Suppose that the random variables X1,..., Xn are independent, and each random variable Xi has a continuous c.d.f. Fi. Also, let the random variable Y be deﬁned by the relation   Y = −2∑(i=1~n) log Fi(Xi). Show that Y has the χ2 distribution with 2n degrees of freedom.  I don't see where this is heading. Is it possible to derive the χ2 distribution out of absolutely unknown CDFs?

If $X_1,X_2,\ldots,X_n$ be independent random variables each with distribution function $F_{X_i}$. Let $$Y:= -2\sum_{i=1}^n \ln F_{X_i}(X_i).$$  Prove that $Y$ have distribution $\chi^2(2n)$.  I'm trying solve this problem, but I can't. Any hints or tip? Thanks for your help.


I've got a 2x2 plot of subfigures that is too wide to fit within the margins of a page. Latex left aligns it and the right hand side goes off the page. I would like to center align the whole thing without making the width of the subplots any smaller.  .  Here is my code:  \documentclass{article}  \usepackage{graphicx} \usepackage{caption} \usepackage{subfig}   \captionsetup{width=.75\textwidth,skip=0.3cm,within=none}  \begin{document}    \begin{figure}%[!hbt]  \begin{center}  \subfloat[US]{\includegraphics[width=100mm]{Results/Fig/USslope.pdf}}  \subfloat[Japan]{\includegraphics[width=100mm]{Results/Fig/JPNslope.pdf}} \\  \noindent  \subfloat[UK]{\includegraphics[width=100mm]{Results/Fig/UKslope.pdf}} \subfloat[Italy]{\includegraphics[width=100mm]{Results/Fig/Itslope.pdf}}   \caption[caption]{Slope Components}  \end{center}  \end{figure} \end{document}      \end{document}

I have a figure that is wider than the \textwidth of my document. (I don't want to change the \textwidth.) As a result, the leftmost part of the figure is flush with the left margin, while the rightmost part spills into the right margin too much. I'd like to center the figure, so that it will exceed the \textwidth equally on both sides.


If $x, y \in \mathbb{N^{*}}$, such that $\frac{x}{y}+\frac{y}{x} \in \mathbb{N}$, show that $x=y$.  My try: If $x$ is a multiple of $y$, such that $x \neq y$, $\frac{x}{y}$ would be greater than $1$, and natural, while $\frac{y}{x}$ would be less than $1$, so not a natural number. Same if we swap $x$ with $y$. So, in those two cases, the given sum can't be natural.  I don't know how to continue it from here. Can you help me, please? Thanks!

Can sum of a rational number and its reciprocal be an integer?   My brother asked me this question and I was unable to answer it.   The only trivial solutions which I could think of are $1$ and $-1$.  As to what I tried, I am afraid not much. I have never tried to solve such a question, and if someone could point me in the right direction, maybe I could complete it on my own.  Please don't misunderstand my question.   I am looking for a rational number $r$ where $r + \frac{1}{r}$ is an integer.


Is it possible to import VLC Codex used in LinuxMint 17.3 Cinnamon to Ubuntu 14.04.1 ?  I tried to play my new DVD from Billy Blanks ( Taebo Boot Camp ) in VLC -  it wouldn't play.  Then I tried it again on a different System running with LinuxMint ( Rosa )17.3 Cinnamon.  The DVD played perfectly !!!  Can anyone tell me if I can import a Codex,  or should I rather install Cinnamon ?

My machine can't play encrypted DVDs on a fresh install.  How do I add this capability?  Another useful bit of information would be what programs are best for playing DVDs, once I'm able to do so.  See the .  Will I be able to play DVD movies from ?


I have a list or datatable that has several values.  In some way I have to scan the row and search for only capital letters (from 2 to 3) and then copy and paste into a new row.  It can be possible?  Some data:  T09 AT 98-67 Test T19 AYR 98-67 Demo   EDIT: I managed to get just capital letter index, but what if I want only when the they are AT and not T.  I mean, 2 or 3 capital letter together?  for (int w = 0; w < s.Length; w++) {     if (Char.IsLetter(s[w]) && Char.IsUpper(s[w]))     {         Console.WriteLine("INDEX: {0}", w);     } }

In C# is there a way to detect if a string is all caps?  Most of the strings will be short(ie under 100 characters)


Essentially, a link that can be made to reference another point in the same post, and clicking on that point leads the other way around.   However, you can only reference your own post, and not anywhere else on the page, and you will be notified if the anchors break before you submit an edit, so that you can fix them.

I admit this feature request is probably somewhat limited in useful scope, but I'm throwing it out there anyway. Inspired by , and because I want to use it on , I'm requesting that name be supported on a tags in posts.  On very long answers, such as the closing/migration guidance answer, this would allow direct linking to the specific closure reason. This would then allow us, when someone , to link directly to the appropriate reason and description thereof.  I recognize the limited scope of this, however, I have seen other long answers that could stand to have that kind of "deep" linking ability as well.  (The original incarnation of this post had either name or id, but preferenced name. Per Koper's answer, which I agree with, I took out the idea of supporting id, because Koper's right -- too dangerous.)


Which of the following is correct?  1.       What would you do if we found life on Mars?   OR     What would you do if we find life on Mars?     2.      He hasn't still find out the secret   OR     He hasn't still found out the secret   Please give some explanation with answers.

I am struggling on a sentence here. Let me show u what I come up with;  Would I fail if I won't study?   In this sentence I am trying to indicate a possibility but I am not sure if I use this part  correct : if I won't study  which tense should I be using there?


On opening a site feed, sorting options are available for questions.    These however, are not available after entering a search query.    It should be possible to sort search results just like in the site feed.  Version: 0.1.36

The issue is how can user sort questions for a particular search query?   For example, I would want to search questions for  and want to see newest questions first.  Right now If we write any query in Search Questions... input box then users are not able to select sorting options as search questions input box takes whole width of the screen and sorting options box gets hidden.  I have also tried to select sorting options first and then search for  but still its showing questions without considering sorting option I have selected.


From  question on SU;  Notice the u in chromium isn't italic, as it should be, given the situation. However, you can't do something like that (although the prettify box says you can), so do we need something like  *Ch*romi[blank]*u*[blank]m   to allow such a string to be posted?

There are tons of questions I could maybe post this as an answer to, but before choosing the best one, I'll just post this as an announcement question that can be linked elsewhere. The short story From now on, intra-word emphasis is possible in our Markdown version. That means you can now write  The "V" is for Model**View**Controller. That's un*fricking*believable.  and it renders like this:  The "V" is for ModelViewController. That's unfrickingbelievable.  This only works for asterisks, not for underscores. It works in posts and comments. The reasons There are two big reasons for this. For one thing, this is more or less the behavior of , which we eventually . "More or less" because CommonMark's emphasis behavior is still in flux, and supports a few things that we don't support yet, but at least with this change we're closer. The other reason is languages that don't even have the concept of "words separated by spaces". See  and  for two examples. This change allow posts in those languages to emphasize words without having to resort to HTML tags. To use an example from the first linked post,  **北京**和**上海**是直辖市。   now renders like this:  北京和上海是直辖市。  Possible issues In the 99% cases, this should only make things better; I've only found very few posts where this change causes unintended bolding/italicizing. And even in those cases, note that the rendered versions of questions and answers are not re-rendered until a post is edited, so this will not affect anything in posts retroactively. Unlike posts, comments are rendered , so this immediately applies to all comments. In most cases this doesn't change anything or actually fixes things. Should you discover a rare case where this breaks an important comment badly, we can always edit it to fix. There's one side effect that I'd like to mention: If you find a great quicksort implementation on GitHub that has a bug that causes a crash when sorting Windows versions, and the author doesn't want to fix it, you may be inclined to say  f**k this s**t   (i.e., "fork this sort"). With intraword emphasis, this would however look like this:  fk this st  So you would have to escape the asterisks (one of them would actually be enough). I'm not worried about this case too much, since if you must put censor-worthy words into a post, you might as well have to jump through a little hoop. Some details This being Meta, there are probably lots of people interested in a more detailed description of the new behavior (don't feel bad if you're not one of them; just skip this section). Here are the major rules regarding intraword-emphasis:  As mentioned, it only applies to asterisks, not underscores. Underscores  this restriction was in place at all; asterisks are much less of a problem.  If a single or double asterisk is supposed to be interpreted as intra-word emphasis, it cannot have punctuation on one side; it actually must be inside a word. An example of an edge case this solves is  It's a web*-based solution. *see Wikipedia for a definition of "web"  where the asterisks after "web" could cause unintended italicizing if there was a second asterisk in the same paragraph somewhere.  For italics, the "inside a word" part of rule 2 is even a bit stricter. For bolding, any word or digit character is allowed; for italics, digits don't work either. That's because the asterisk is often used as a multiplication symbol, so  The game worked in 320200 and 640480 resolution.  wouldn't look right without this restriction.  A minor addition that I made that's only tangentially related to intra-word emphasis is that a sequence of more than three underscores or more than three asterisks will no longer take part in any emphasis. This shouldn't really cause any problems, but fixes some (e.g. the underline in the second blockquote in , while not really visible, is a weird combination of bold and italic underscore characters; after this change, it would just be (more) underscore characters). This behavior also matches CommonMark.


I'm generating csv files based on the results of people answering a survey  on 2 different machines. The files will be on a shared folder.  Right now, it will assign each new file with a subject number by looking up the demographic file and see how many people completed the survey. Unfortunately, if we have two people start the program at the same time, they'll end up having the same subject id number. How can I fix this issue?

Summary: I'm developing a persistent Java web application, and I need to make sure that all resources I persist have globally unique identifiers to prevent duplicates.  The Fine Print:   I'm not using an RDBMS, so I don't have any fancy sequence generators (such as the one provided by Oracle) I'd like it to be fast, preferably all in memory - I'd rather not have to open up a file and increment some value It needs to be thread safe (I'm anticipating that only one JVM at a time will need to generate IDs) There needs to be consistency across instantiations of the JVM.  If the server shuts down and starts up, the ID generator shouldn't re-generate the same IDs it generated in previous instantiations (or at least the chance has to be really, really slim - I anticipate many millions of presisted resources) I have seen the examples in the EJB unique ID pattern article.  They won't work for me (I'd rather not rely solely on System.currentTimeMillis() because we'll be persisting multiple resources per millisecond). I have looked at the answers proposed in .  My concern about them is, what is the chance that I will get a duplicate ID over time?  I'm intrigued by the suggestion to use  for a , but again, the chances of a duplicate need to be infinitesimally small. I'm using JDK6


I want to ask a question of sentence usage.  Now assume there are two fruits in a basket, that is, one apple and one banana.  Here, I want to describe this scenario by the following sentence:  "There are an apple and a banana in the basket."  or  "There are an apple and banana in the basket" (That is to omit the article "a" before the word banana.)  Which sentence is correct?

How to describe two different objects: (Assume: one apple and one banana here)  "There are an apple and banana here." or "There are an apple and a banana here." ??


I can’t prove that a space having a countable basis and being sequentially compact is indeed compact. Can anyone help me with the prove? Thanks!

Let $X$ be a second countable topological space. Then $A \subset X$ is a compact subset of $X$ if and only if every sequence $\{x_{n}\}_{n \in \mathbb{N}} \subset A$ has a convergent sub-sequence with a limit point $x \in A$.  I can prove it when $X$ is a metrizable space, but I'm having trouble when $X$ is only second countable.  I'll appreciate any help. Thanks!


I selected all folders, right-clicked and picked Properties.  It shows me all files and they total up to 45.7 GB.    But then I look at My Computer and see that I should have 74.4 GB:   Where has all my space gone?  P.S.  As you can see from my first screenshot that I turned on every conceivable option to show everything, but here is the Options dialog.

My laptop has Windows 7 home premium. OS is installed on C drive. The C drive has some 155 GB but currently only 1.17 GB is free. I deleted contents of my download folder and moved the contents from my desktop and my documents. this freed some 50 GB. but within minutes it was full again. ran disk cleanup and gained some 2 GB. i checked size of all the folders ignored large sized windows and program files and program files (x86). Was baffled when users folder said 110 GB. went to my user folder and selected all files n checked properties it showed under 5 GB. So if i check my user folders properties it says 110 GB but if i check properties of its content its under 5 GB. BTW I am not using any anti virus program. Do you guys have any idea whats going on. Is my laptop possessed or something? :P Please help me out.


How to reset root password of fedora 20  Please explain it stepwise because I am having difficulties

I forgot my root password...actually I think I know what it is because it is the same password I have for pretty much everything but in the Terminal in tell me "Sorry, try again." Is there a way to reset the password? If so how?


So I have 3 scripts:   first for my player movementscript second for my speed powerup speedscript  third for my obstacle box script i   I'm trying to get the component of box script in speed script, to get the function 'added' (which is in box script) into speed script but it keeps giving me nullreferenceexception error  Here are those scripts:  public class box : MonoBehaviour {      [SerializeField]     GameObject effect;      public int damage = 1;     [SerializeField]     float Speed =10f;     [SerializeField]     GameObject audioexplosion;       void Update()     {          transform.Translate(Vector2.left * Speed* Time.deltaTime);      }        void  OnTriggerEnter2D(Collider2D col)     {         if(col.CompareTag("Player"))         {             Instantiate(audioexplosion, transform.position, Quaternion.identity);             Instantiate(effect, transform.position, Quaternion.identity);              movment tmp = col.GetComponent<movment>();                  tmp.health -= damage;             Destroy(gameObject);         }     }     public void added(float spd)     {         Speed += spd;     }   }   And here is my speed script.  public class speedscript : MonoBehaviour {     [SerializeField]     GameObject effect;     [SerializeField]     GameObject speedaudio;     //[SerializeField]    public float speed;     public float add_v = 5;     private float timeindue;     //[SerializeField]   //  public box io;      void Start()     {       //  io= GetComponent<box>();        // Debug.Log(io);     }       void Update()     {         transform.Translate(Vector2.left * speed * Time.deltaTime);     }       void OnTriggerEnter2D(Collider2D sp)     {         if (sp.CompareTag("Player"))         {             Instantiate(speedaudio, transform.position, Quaternion.identity);             Instantiate(effect, transform.position, Quaternion.identity);             box io = GetComponent<box>();                 Debug.Log(io);                 io.added(add_v);                  Destroy(gameObject);         }     } }

Since many users are facing the NullReferenceException: Object reference not set to an instance of an object error in Unity, I thought that it would be a good idea to gather from multiple source some explanation and ways to fix this error.  Symptoms I am getting the error below appearing in my console, what does it mean and how do I fix it?  NullReferenceException: Object reference not set to an instance of an object


I have crafted a Bash tool that runs on a server. This tool will block certain IP addresses for a certain time range (i.e. from 5 A.M. to 3:30 P.M.).  As of currently, the tool works fine, but I have to input IP addresses to certain websites manually into a text file and have the tool pull the IP address based on the nth line using the "head" and "tail" commands. I don't want to do this as I believe a single ping will be much more lightweight and portable. So if I do a ping for Google:  ping google.com -c 1 -s 16   The output will be:  Ubuntu@yokai:~# ping google.com -c 1 -s 16 PING google.com (173.194.66.138) 16(44) bytes of data. 24 bytes from qo-in-f138.1e100.net (173.194.66.138): icmp_seq=1 ttl=37 time=46.7 ms  --- google.com ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 46.748/46.748/46.748/0.000 ms   And the command I have narrowed this output down with is:  ping google.com -c 1 -s 16 | grep -o '([^ ]*' | tr -d '(44):\n'   Which gives me an output of:  173.19.66.113173.19.66.113ubuntu@yokai   As you can see, there is a duplicate of the same IP address. How can I remove the duplicate with sed so that I can store the single IP address into a variable and run the script as a cronjob, or am I on a better track using tr?  (EDIT)  I already know/knew how to resolve IP address from a host name or domain. That is not what I am asking here. This question is specifically about managing ping output using sed in order to keep the tool I have created more portable as ping comes default with almost any and all linux distros.  (UPDATE) Since some marked this question a duplicate of some other bullshit question that has nothing to do with this one, I will make it clear enough that retards with English comprehension troubles can understand:  How to parse the IP ADDRESS "ONLY" from ping OUTPUT when using ping on a domain name.  This is NOT asking to resolve a domain name and therefore is NOT A DUPLICATE!!!  (LATEST UPDATE) I have, since asking this question, learned proper POSIX regex to do what I needed and I need to make it clear that I was originally asking about the regular expressions for sed that would print a single instance of an IP from ping output. I have since refined my methods and do not use any of the answers here but I thank everyone for their attempts with helping here. I am now using a timer script that I created to configure iptables at certain times to block certain domain name resolutions. Again, thank you to everyone that tried to help.

What's the most concise way to resolve a hostname to an IP address in a Bash script? I'm using .


I would like to ask for an example (a lagrangian) both in classical and quantum level for which the action is maximaized (rather than minimized). What is special in these cases?

In  it is discussed why by Hamilton's principle the action integral must be stationary. Most examples deal with the case that the action integral is minimal: this makes sense - we all follow the path with the least resistance.  However, a stationary point can be a maximal or minimal extremum or even a point of inflexion (rising or falling). Can anybody give examples from theory or practice where the action integral takes on a maximal extremum or a point of inflexion?


This is an exercise from Atiyah-MacDonald: Show that when $M$ is finitely generated $A$-module, we have $\text{Supp}(M)=\mathbb{V}(\text{Ann}(M))$.  Can somebody give counterexamples when $M$ is not finitely generated?

Let $R$ be a ring and $M$ an $R$-module.  If we suppose $M$ finitely generated then (following Matsumura) if we write $M=Rm_1+\cdots+Rm_n$ we have:  $p\in\operatorname{Supp}M$ if and only if $M_p\neq0$ if and only if there exists an $i$ such that $m_i\neq0$ in $M_p$ if and only if there exists an $i$ such that $\operatorname{Ann}m_i\subset p$ if and only if $\operatorname{ann}M=\bigcap_{i=1}^n\operatorname{Ann}m_i\subset p$. And so $\operatorname{Supp}M=V(\operatorname{Ann}M)$.     If $M$ is not finitely generated where does this proof fail?    It seems to me that if we write $M=\langle m_i\rangle_{i\in I}$ nothing will change.      And if this proof fails could you give me an example of a module such that $\operatorname{Supp}M\neq V(\operatorname{Ann}M)$?


I'm wondering what would be a better design in regards to User Experience for a contact form. Currently the contact form on my website is an overlay that pops up that a user can fill out and submit, which is fine, but I'm wondering if it would be better for a user to navigate to a new page to fill out the contact form instead of just using the overlay. My thought behind this is basically that with an overlay there are essentially two call-to-action buttons-- the submit button and the close button.  Would navigating users to a dedicated page be a better option? Would using a modal distract from the purpose (i.e. filling out the form)?

In my application, I have pages that show lists of some objects, for example "People" or "Contracts".  From these pages, the user may create a new object.  Often these objects only have a handful of properties, maybe 4 or 5.  My question is about the best approach for the forms used for creation of new objects.  Sometimes I have used a separate page, especially when the number of properties is greater than 5-6.  Sometimes I have used a modal dialog.  I have even seen some applications that insert an empty row into a table and you fill-in the values.  (I will not be doing that!)  Any UX-preferences or suggestions for what approach to take?  Also- is it important to be consistent between different types of objects?  Or is a mix of approaches OK?  The technology of my application (Ember.js, single-page app) allows me to navigate to a different page instantly, so any timing difference between approaches is not a factor.  In fact, the animation of the Bootstrap dialog takes longer than the page transition.  The application is a back-office administrative system for insurance companies.


Find all positive integers $n$ for which $n^2$ divides $2^n+1$.

This was Problem 3 (first day) of the 1990 IMO. A full solution can be found      How many rationals of the form $\large \frac{2^n+1}{n^2},$ $(n \in \mathbb{N} )$ are integers?   The possible values of $n$ that i am able to  find is $n=1$ and $n=3$, so there are two solutions and this seems to be the answer to this problem.  But now we have to prove that no more of such $n$ exists, and thus the proof reduces to: Proving that $n^2$ does not divides $2^n+1$ for any $n \gt 3$.  Does anybody know how to prove this?


For $a_1, ... , a_2 > 0$,  I need to prove that $(  \sum_{i=1}^{n} a_i)( \sum_{i=1}^{n} \frac{1}{a_i})\geq n^2 $.  When do we have inequality?  Should I do it by induction? any hints

$\sum_{i=1}^n(a_i)\sum_{i=1}^n(\frac{1}{a_i})\ge n^2$ is what I want to prove, where $a_i>0$ and I need to showwhen equality holds.  I have tried using Cauchy-Schwarz, where inside the sums I multiply each value by 1 to do it but it doesn't work out.  I have also done  $\sum_{i=1}^n(a_i)\sum_{i=1}^n(\frac{1}{a_i})=\sum_{i=1}^n \sum_{i=1}^n(\frac{a_i}{a_i})=\sum_{i=1}^n\sum_{i=1}^n(1)=\sum_{i=1}^n(n)=n^2$, but this proves an equality.  Am I not allowed to do the first step I did in my work?


Background My code base currently has the following interfaces and classes: // Both DisplayValue _classes_ public class DisplayValue<T> {     public T Value { get; set; } } public class DisplayValue : DisplayValue<object> {}  // Both IValueWidget _interfaces_ public interface IValueWidget<T> {     DisplayValue<T> Value { get; set; } } public interface IValueWidget: IValueWidget<object> {     new DisplayValue Value { get; set; } }  // the BaseWidget all other widgets implement public interface IBaseWidget {     public string Name { get; set; } }  The code base also has a bunch of Widgets, all of which implement IBaseWidget. Some also implement IValueWidget or IValueWidget<T>, which leads me to my problem. Problem Say I have the following method: public T2 DoStuff<T2>(T2 widget) where T2 : IBaseWidget {     // this should check if the widget is the correct type     if (widget is IValueWidget)     {     } }  In that method, I would like to have the condition work with either IValueWidget or any generic version of IValueWidget. I don't care whatsoever what the type of T is, only that the given T2 can be treated as such. Also worth mentioning, literally no types other than the ones provided above are known at compile time. Everything must work at runtime. In Java, I could do something like this but obviously C# does not have wildcards. public T2 DoStuff<T2 extends IBaseWidget>(T2 widget) {     if (widget instanceof IValueWidget<?>) {     } }  Notes As far as I can tell, this is not actually a duplicate. Please don't flag it as such if you're referring to any of these, as they are similar but definitely not the same:

Assume the following type definitions:  public interface IFoo<T> : IBar<T> {} public class Foo<T> : IFoo<T> {}   How do I find out whether the type Foo implements the generic interface IBar<T> when only the mangled type is available?


I have 2 injective functions,$X:A \to B$ and $Y:B \to C$.      How do I show that $Y \circ X$ is injective.   In the form of a proof.

Consider $f:A \to B$ and $g: B \to C$. If I know that both $f$ and $g$ are injective, then can I state that $$g  \circ f:A \to C$$ is injective?


Fairly new to Ubuntu, but having some issues with Lazarus and FPC programming.  In the Lazarus IDE I keep finding things that do not work and the Lazarus Forum keep telling me that those functions work in Qt but not in GTK.   OK, I can live with changing, so how do I change from GTK (I think that is what I have in the standard 14.04) to Qt?  I have spent most of yesterday trying things I have found online and nothing so far completes, eventually doing nothing, or crashing with a variety of errors. Ranging from no login page to no booting. I have an Image back I keep restoring and thats getting tedious.  I first followed the "Ubuntu Official Documentation" instructions and on reboot, that got the equivalent of the windows BSOD, so I had to Restore. Then I began searching and trying things that sounded the person might know what they were writing about.  After something like six Restores I am here asking for help with something that is for the current and up-to-date 14.04 that will work.

I'm new to Ubuntu (and Linux in general).  Sometimes when looking at programs in the Ubuntu Software Center, I see things about the programs being 'for the GTK+ environment', or 'for GNOME', or a whole lot of other things.  All I know is that I've got Ubuntu 12.04 LTS, and what I'm seeing through my monitor appears to be the controversial Unity interface.  What are these other things I see mentioned in the descriptions of programs (such as KDE, GTK, QT, GNOME, GNOME 'shell', etc.)?  Are they Linux GUIs that are alternatives to Unity?  Are they dependencies that I need to have?    I've spent the last several months getting used to Ubuntu in its present form (though I confess, I have played around with Compiz, which is fun as hell).  Will these other things completely turn my world upside down if I use them?


If $f(x),g(x)$ are two differentiable functions such that $f'(x)=g(x)$, $|f(x)|<1$ and $f(0)^2+g(0)^2=9$, prove that there exists a $c\in(-3,3)$ such that $g(c)\cdot g''(c)<0$   $$f(0)^2+g(0)^2=9$$ Using the above equation, $g(0)\in (-3,-2\sqrt{2})\cup(2\sqrt{2},3)$  That's how much I was able to solve. I only have information about the value of functions at $x=0$.

$f(x)$ is a differentiable function and $g(x)$ is a double differentiable function such that $|f(x)|\leqslant 1$ and $f'(x)=g(x)$. If $$f(0)^2+g(0)^2=9$$ then prove that there exists some $c\in(-3,3)$ such that$ \ \ g(c) \cdot g''(c)<0$.  Attempt: Let us define a function $h(x) = g(x) g~'(x)$. Then $$h'(x) =  g(x)g''(x) + \left( g'(x) \right)^2 \tag 1$$ If we prove that for some $c \in (-3,3), h~'(c) < 0,$ then $$g(c)g''(c) <0 \tag 2$$ Also, $$\left|f(0)\right| < 1 \implies f'(0) \in (-3,-2\sqrt 2 ) \cup (2\sqrt 2,3) $$ Could someone please advise me how do I move forward from here. Thank you very much for your help in this regard.


I want to insert a flipping tables and some Emoji in a LaTeX document on ShareLaTeX. I did some research, and came up with the following.  First of all, XeLaTeX needs to be used for best Unicode support and support for TTF fonts. Then a font needs to be used that contains the relevant Unicode symbols. And this font needs to be uploaded to ShareLaTeX.  For the font I selected DejaVu, known for its broad Unicode support.  For the Emoji I used the Noto Emoji font, and created a text command for that.  \usepackage{fontspec}  \setromanfont{DejaVuSerif.ttf} \setsansfont{DejaVuSans.ttf} \setmonofont{DejaVuSansMono.ttf}  \newfontfamily\emoji{NotoColorEmoji.ttf}  \DeclareTextFontCommand{\textemoji}{\emoji}   Now I would like to be able to write something like  \title{foo \textemoji{🥔} bar(╯°□°)╯︵ ┻━┻}   But the flip between the flipper and the table renders as a tofu and the Emoji renders as two wide tofu's.  [update] As @ShreevatsaR pointed out, DejaVu does not contain the vertical bracket, nor does NotoEmoji seem to contain the potato emoji. I have added the Symbola font and made another text command  \title{foo \textemoji{\char"1F360} bar \textsymbola{(╯°□°)╯︵ ┻━┻}}   This renders the flipping tables correctly but not the potato. Roasted Sweet potato does work, so it really comes down to finding a font that has it. It appears NotoColorEmoji does contain it, but that fails to load.  So the question boils down to: How can I render color fonts? Or alternatively: Is there a font XeLaTeX supports that contains U+1F360?

Oh man, I don't even know where to put this... or how to begin. As a joke, I'm trying to get the ascii art of the guy flipping a table in a question on an exam. I've tried verbatim but it won't display the characters.  I know it might be a long shot, but does anyone have an idea how to get this little guy  (╯°□°）╯︵ ┻━┻   to display? I know I should provide a MWE, but... yeah, I don't even have that.  Thanks!


Why is the $\rho^0 \rightarrow \pi^0 + \pi^0$ decay not allowed? I have seen  but I am not satisfied with the answers. The $J^{PC}$ of the $\rho$ and $\pi$ are $1^{--}$ and  $0^{-+}$ respectively. Taking the orbital angular momentum of the final two pions state to be $1$ seems to conserve everything ($J$, $P$, $C$, etc.) but is apparently not allowed by the spin-statistics theorem. The answers I have seen say that $L=1$ for the pions gives an anti-symmetric wavefunction. Assuming this is true, I understand why this is not allowed under the spin-statistics theorem, but I don't understand why the wavefunction anti-symmetric; that is the main question.

Why is the decay of a neutral rho meson into two neutral pions forbidden? (Other modes of decay are possible though.) Is it something with conservation of isospin symmetry or something else? Please explain in a bit more detail.


i was unsuccessful for installing jdk8 and i want to delete the java folder in my usr/local.  cd /usr/local rm java error :rm: cannot remove ‘java’: Is a directory rmdir java error :rmdir: failed to remove ‘java’: Permission denied   what is the accurate cmd line?

How do I delete the following directory?  I typed:  rmdir lampp   This error comes up:  rmdir: failed to remove `lampp': Directory not empty   Is there a command to delete all the files in the directory and delete the directory folder?


I ran into  where something rotten happened:   A user posted a  After this, user Barmar posted correct answer After this, the first user edited their answer to be a copy of Barmar's answer, so looking at the answer time, it looks like they posted their answer BEFORE Barmar!   I flagged the answer, but looking into the user's history, they did it  and ! Shouldn't the user be banned or something?

Edit: This question isn't a duplicate of . The quote in the highest voted answer on that question is "Bottom line: if you want to get up-votes, WRITE A GREAT ANSWER." that works well in that question. But in this question the situation is that the potentially great answer could just be copied and made to look as if the author of the answer was the one who did the copying. This is not the same situation.  This isn't a huge issue, but it's something I've witnessed more than once now.  Take this question for example:   When I posted  about using jQuery's on change event listener there was one other answer which only said something along the lines of, "you can use AJAX for this", nothing more - not helpful at all, especially as AJAX wouldn't be used for this anyway.  After posting my answer I commented on the other answer saying that AJAX wouldn't be used and a few minutes later  was changed to also use the on change event.  The problem here is that as this edit was done so shortly after the answer was submitted, the original content doesn't appear in that answer's .  Anyone looking at the two answers would think hey, this guy [edited answer] posted the correct solution first so this answer should be accepted.  How would this be dealt with? What's in place to stop people making a really quick invalid answer then editing it as soon as somebody else has posted up a working solution to replicate that?


Question: Prove that $\left|\dfrac{z_1-z_2}{1-z_1\bar{z_2}}\right|\lt 1$ if $|z_1|\lt1$, $ |z_2|\lt 1$    My solution:  I had no idea how to go about this one so instead I started simplifying the inequality and my solution is as follows:-  $$\begin{equation} \left|\dfrac{z_1-z_2}{1-z_1\bar{z_2}}\right|\lt 1 \\ \implies \left|\dfrac{z_1-z_2}{1-z_1\bar{z_2}}\right|^2\lt 1 \\  \implies \left( \dfrac{z_1-z_2}{1-z_1\bar{z_2}}\right)\overline{\left({\dfrac{z_1-z_2}{1-z_1\bar{z_2}}}\right)} \lt 1 \\ \implies |z_1|^2+|z_2|^2 \lt 1 +|z_1|^2|z_2|^2 \\ \implies (|z_1|^2-1)(1-|z_2|^2) \lt 0 \end{equation}$$  Now as $|z_1| \lt 1$, so $(|z_1|^2-1) \lt 0$ and similarly $(1-|z_2|^2) \gt 0$, hence we can safely conclude that the above inequality holds.    Whats my question about:-  Now the book that I am solving from also gave the same solution it just further factored $(|z_1|^2-1)(1-|z_2|^2)$. This doesn't seem a good enough proof for me. If anyone can suggest a proof which doesn't simply verify the statement to be proved.    P.S.:- This question has also been asked , but I don't think I have the same query as the OP of that post.

This is the question I'm stumbling with:   When $|\alpha| < 1$ and $|\beta| < 1$, show that:  $$\left|\cfrac{\alpha - \beta}{1-\bar{\alpha}\beta}\right| < 1$$    The chapter that contains this question contains (among others) the triangle inequalities:   $$\left||z_1| - |z_2|\right| \le |z_1 + z_2| \le |z_1| + |z_2| $$  I've tried to use the triangle inequalities to increase the dividend and/or decrease the divisor:  $$\left|\cfrac{\alpha - \beta}{1-\bar{\alpha}\beta}\right| < \cfrac{|\alpha| +|\beta|}{\left|1-|\bar{\alpha}\beta|\right|}$$  But it's not clear if or why that would be smaller than one.  I've also tried to multiply the equation by the conjugated divisor $\cfrac{1-\alpha\bar{\beta}}{1-\alpha\bar{\beta}}$, which gives a real divisor, but the equation does not appear solvable.  Any hint would be much appreciated.


I'd like to do know how to do the following:     Blockquote A   blank line that's not part of either block, visually distinguishing two different blockquotes     Blockquote B   Experiments  Without adding a text in between it looks like:     Blockquote A      Blockquote B   I tried separating them by adding a line, like so:     Blockquote A            Blockquote B   But visually, I think this is misleading because it can imply that the quotes are from the same source (when they aren't per se). So I prefer to show a blank line between the blockquotes.   Research  I've found a related question: . But these answers don't address what I want to do,  I can't seem to find the way to do this seemingly simple trick. I've already looked into the , but I might be overlooking it. Any help is much appreciated!

I have a series of quotes which I want to display in two separate quote blocks.  > Are questions about Microsoft Word Online on-topic here? I don't > really see any posted here, but perhaps I am not searching correctly. > - mweiss >  > Yes, they are. We even have a specific tag: [tag:word-online]. -ale >  > Thanks! I'm sorry I missed that tag. -mweiss   When I try to add these to my post, they display as a single combined quote.     Are questions about Microsoft Word Online on-topic here? I don't   really see any posted here, but perhaps I am not searching correctly.   - mweiss      Yes, they are. We even have a specific tag: . -ale      Thanks! I'm sorry I missed that tag. -mweiss   How can I separate quotes so that they aren't combined into a single quote block?


SHOULD THERE BE A QUESTION MARK OR NOT? IT'S AN INDIRECT QUESTION BUT AN ANSWER WOULD BE EXPECTED.    There's a party later if you're interested.   There's a party later if you're interested?

For example, I found the following sentence written by a native English speaker (UK) so I'm going to assume that he knows how to put it the right way, although I wouldn't use this form.     I now have a bit more time to fix bugs   etc but I'm open to offers if anyone   wants to help maintain this module   with me?   Is it correct or is the question mark misused here?


I am a UX/UI designer and I have designed many mobile apps for iPhone and Android. Now I have to design a mobile app for Windows 8 but I don't know how many screen resolutions are available. i.e. for iPhone there are two resolutions (320x480 & 640x960).  If anybody knows then please let me know.

Twitter Bootstrap uses these break points for responsive design:  Large Display: 1200px Default: 980px Tablet: 768px Mobile: 480px  A client said they are using 1280px for their Large Display breakpoint.  Is there an industry standard for these or are they just made up as we go right now?


If it were $\mathbb{R}$ instead of $\mathbb{Z}$, I could figure it out: just construct $2$ bijections.  For example, map $\mathbb{R}$ to $(0,1)$ and then map $(0,1)$ to $\mathbb{R}$ in tangent function. However, when it comes to a set with discrete elements, this method doesn't work.  Is there any other ways?

I am looking for a beautiful way of showing the following basic result in elementary set theory:     If $A$ is a countable set then the set of finite subsets of $A$ is   countable.   I proved it as follows but my proof is somewhat fugly so I was wondering if there is a neat way of showing it:  Let $|A| \le \aleph_0$. If $A$ is finite then $P(A)$ is finite and hence countable. If $|A| = \aleph_0$ then there is a bijection $A \to \omega$ so that we may assume that we are talking about finite subsets of $\omega$ from now on. Define a map $\varphi: [A]^{<\aleph_0} \to (0,1) \cap \mathbb Q$ as $B \mapsto \sum_{n \in \omega} \frac{\chi_B (n)}{2^n}$. Then $\varphi$ is injective hence the claim follows. (The proof of which is what is the core-fugly part of the proof and I omit it.).


I want to install Kubuntu on a computer which already runs Windows 7. For this purpose, I have installed an additional empty hard drive (the drive containing Windows is fully partitioned and should remain unchanged).  I am unsure, if I can select "Automatically install Ubuntu next to Windows" in the installation menu: Will it use the empty hard drive or reformat empty space on the Windows drive? Will the bootloader be installed on the correct drive so that both systems can be booted from their specific hard drives?  Edit: I have successfully installed Ubuntu manually in the past. However, in this case I was not sure, if the bootloader will automatically recognise the second OS. The linked thread does not explain particularities when installing Ubuntu on a second drive next to another OS (just on the same drive or on a new drive by itself), where is the bootloader installed optimally? Will it automatically setup a boot option for the Windows drive without specifying it on installation?  Also, I am trying to understand by which logic the automatic installation will select the drives or partitions.

I'd like to see the full How-To on how to use manual partitioning during Ubuntu installation. The existing guides (at least those I found here) cover only automatic part and leave untouched the manual part (or extremely short and contain no pictures).  I'd like to cover such situations:     If your disk contains other systems:


I just installed JDK in Ubuntu. When I want to use the java command, I get this error:      /usr/bin/java: No such file or directory   but I declare the java home using update-alternatives:  update-alternatives --config java There is 1 choice for the alternative java (providing /usr/bin/java).  Selection    Path                                   Priority   Status     ------------------------------------------------------------         0            /usr/local/java/jdk1.8.0_111/bin/java   1         auto mode      * 1            /usr/local/java/jdk1.8.0_111/bin/java   1         manual mode      Press <enter> to keep the current choice[*], or type selection number:    Even when I run java in /usr/local/java/jdk1.8.0_111/bin/ directory, it doesn't recognize it. Thanks for any help.  I read  answer, but it didn't help me and I still have the same error.

I want to install Oracle's JRE and to update to the latest version with the Software Updater when they released. Is there a Ubuntu package that is provided by Canonical or Oracle?  Before release Java 7, I followed  to install Java 6.  But it doesn't work for Java 7. There is no package sun-java7-xxx. How can you install Java 7?


I'm writing a small software that must pass to bash one string. the problem is that bash can't handle characters ", ', `. I've do a bruteforce software force gpg (if i use only digits and letters, this work without problems), but when my software generate a string that contains one (or more) of these character, i receive some bash errors. then i need to escape every markquotes inside the string. so for example, if the software, generate the string a"bc'1, i need to pass this string to bash a\"bc\'1. but i don't know how to do.  this is the code  subprocess.call('gpg -d --output '+decripted+' --passphrase "'+password+'" '+target+' 2>/dev/null', shell=True)   Can i use sed? I don't know how to incorporate sed. I've also thinked to save the generated password to a file, and then read the string from file like this  cat fileWithPassword | gpg -d --output OUTPUT_FILE -- passphrase-fd 0 TARGET_FILE   i've noticed that in this way (from bash) works, but i think that is not really efficient save and read a file. is there any way to escape every markquote withoud save it on a file?

When using os.system() it's often necessary to escape filenames and other arguments passed as parameters to commands.  How can I do this?  Preferably something that would work on multiple operating systems/shells but in particular for bash.  I'm currently doing the following, but am sure there must be a library function for this, or at least a more elegant/robust/efficient option:  def sh_escape(s):    return s.replace("(","\\(").replace(")","\\)").replace(" ","\\ ")  os.system("cat %s | grep something | sort > %s"            % (sh_escape(in_filename),               sh_escape(out_filename)))   Edit: I've accepted the simple answer of using quotes, don't know why I didn't think of that; I guess because I came from Windows where ' and " behave a little differently.  Regarding security, I understand the concern, but, in this case, I'm interested in a quick and easy solution which os.system() provides, and the source of the strings is either not user-generated or at least entered by a trusted user (me).


I don't think my wolves would eat an ocelot but I've had one before and it disappeared. There was nowhere for it to leave my house and it was tame.

Will wolves attack and kill ocelots in Minecraft? I know they kill sheep. I just don't want my cats being eaten.


I'm making myself crazy trying to remember the name of a short story I read years ago. It was in a short story collection, and may have been by Arthur C. Clark or Robert Heinlein.  I think it was in one of the Science Fiction Book Club's own "Best Science Fiction of [year] series..some time during the 70's or early 80's.  It's about an alien race who visits earth, bringing all sorts of gifts. Most of the story is about the government busy looking at the technological gifts with a paranoid eye. However, they let the games the aliens brought go out to the public, thinking them harmless.   The last few paragraphs are about a family playing a game. It's a box, the door of the box opens and tiny figures come out.  It subliminally teaches passiveness, to prepare humans to let the invaders take over.  Does this sound familiar to anyone?

I am trying to identify a short story I once read in a science fiction anthology. It resolves around a father and his children playing a new board game. The originator of the board game is some country or alien race that was recently defeated in a war. The game is wildly popular and addictive, and everyone is playing it.  Apparently, the game is very simple to play, so no one bothers to read all the rules, including the father. You just launch into the game, where you acquire properties and businesses. The father is close to winning the game (he thinks) when his son, who has bothered to read the rules, informs him that the goal is to LOSE all of your businesses and die broke. The children are now brainwashed by the game. The defeated enemy crafted the game to destroy the economy of their conqueror, or something along those lines.


So why did the price tank all of a sudden and then came back to normal? What does it mean?

I was exploring various stocks this morning on Google Finance, and I came across some strange behavior for Home Depot (HD) in 1988. For the entire year, the stock traded incredibly low, and at incredibly high volume. I've seen large spikes in volume before, but never so consistent over an entire year. Is this a Google Finance bug? If not, does anyone know what caused this?  Here's a  on Google Finance.


I have installed Ubuntu 12.04 on my laptop. Since I hate Windows, I would also like to install Ubuntu on my desktop. It has two 1TB drives in ntfs (one drive is 1TB partition and other 1TB is C: 500GB partition for Windows XP and f: 500GB for data and programs) and I have searched the FAQ and did not come up with an answer if I would lose my data on ntfs drives or if they would mount.   I am a beginner to Ubuntu and do not know how to use the terminal, but I have been using Windows since early DOS. I am 63 and my memory is slipping. I just want Bill Gates out of my computers. I have a Windows tech charging me now to see why my copy of XP Pro is saying it may be counterfeit, and I know that it is not. $99.00 and he will likely tell me I will have to buy a new key at some price. "Love Ubuntu". Also is there any place that I can get a complete list of commands for use in the terminal for Ubuntu 12.04. Thanks for your kind understanding.

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


CloseableHttpClient httpclient = HttpClients.createDefault(); HttpGet httpget = new HttpGet("http://localhost/json");  ResponseHandler<MyJsonObject> rh = new ResponseHandler<MyJsonObject>() {      @Override     public JsonObject handleResponse(             final HttpResponse response) throws IOException {         StatusLine statusLine = response.getStatusLine();         HttpEntity entity = response.getEntity();         if (statusLine.getStatusCode() >= 300) {             throw new HttpResponseException(                     statusLine.getStatusCode(),                     statusLine.getReasonPhrase());         }         if (entity == null) {             throw new ClientProtocolException("Response contains no content");         }         Gson gson = new GsonBuilder().create();         ContentType contentType = ContentType.getOrDefault(entity);         Charset charset = contentType.getCharset();         Reader reader = new InputStreamReader(entity.getContent(), charset);         return gson.fromJson(reader, MyJsonObject.class);     } }; MyJsonObject myjson = client.execute(httpget, rh);   Apache gives the above example, but I've never seen that syntax. It looks like the definition of ResponseHandler() is being assigned to a variable; no idea what this means. Is all this code in a single method of a class?

What is the use of anonymous classes in Java? Can we say that usage of anonymous class is one of the advantages of Java?


I wanted to try out some different desktop environment other than Unity so I installed kubuntu-desktop using  sudo apt-get install kubuntu-desktop   then I didn't like it so much, so I removed it according to an answer to one of the questions here by executing  sudo apt-get purge kubuntu-desktop sudo apt-get autoremove   but apparently this did not completely remove it as I still noticed that I could still choose KDE Plasma from my login screen, some programs that were installed with this desktop environment are still installed, I still have my start up and shutdown screens in black and say kubuntu, etc.  I tried to re-install ubuntu-desktop using   sudo apt-get install --reinstall ubuntu-desktop   in a try to get my start up/shutdown screens back to be consistent with the currently installed desktop environment at the time (i.e., ubuntu-desktop), but this wasn't successful.  I then installed xubuntu-desktop using  sudo apt-get install xubuntu-desktop   and now I'm still having my start up/shutdown kubuntu black screens in addition to xubuntu login screen and I didn't see an option in the xubuntu login screen to get back to Unity if I wanted to though.  My questions now is,  in this situation, how to completely remove kubuntu-desktop and everything that is related and keep ubuntu-desktop and xubuntu-desktop installed?  Thank you!

I wanted to switch to Xfce (I had KDE and GNOME installed), and I did this :    sudo apt-get install xubuntu-desktop sudo apt-get remove kubuntu-desktop sudo apt-get remove ubuntu-desktop sudo apt-get autoremove   but to my surprise, I could still pick gnome, kde plasma, etc during the log in.  So, how do I completely remove KDE and GNOME desktops?


I am an Algerian national and I have been granted a Norway Schengen entry visa (single entry) valid for one month only because I will be getting a student residence permit once I'm in Norway.  The issue is that I am traveling from Algeria to Germany (stopover) and then to Norway on the same day (Lufthansa). Do I need a transit visa when I enter Germany?   My visa indicates that it is only for Norway (first line in the visa).  VISA TYPE: D  NON-DUPLICATE Explanation: My visa is valid only for Norway. It is not for the whole Schengen area. If it was for the whole Schengen are, then I would not need a transit visa because I already did it.

In case, if I get a multiple-entry Schengen visa in one of the embassies in Ukraine, Kyiv - should my first trip be to the country which issued the visa?  Any there any requirements of this sort? Does this condition vary depending on embassy which issued the visa?  What are the possible consequences on not visiting that country first? Does it somehow depend on country where the embassy is (i.e. non-Schengen and not EU members)?


$a=(float) 640.81; $b=(float) 636.85; $c=(float) 3.96;  $d= $a-$b-$c; echo $d;   Why  am getting -7.7271522513911E-14 this value? It should be 0 right.

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


I understand Lubuntu was designed to be run on slow (older) PC's - but are there disadvantages in using it on modern/fast PC's - eg. it not being able to take full advantage of modern/fast hardware?

I have a fast machine - let's say Intel Core i7, SSD drive, Nvidia GTX 560 card.  I don't need an eye-candy system. I still need to perform it properly, that meaning have latest drivers, use my hardware properly.   I think it's strange to say:      Well, this PC is so fast, let's install GNOME3 on it, it will handle,   so whatever.   Why wouldn't I install Lubuntu on it, just as I use it on my net-book? In other words is Lubuntu a good choice or not? I mean, does Lubuntu have any disadvantages to it when it comes to new hardware support, or whatever?   Note: This may look like an off-topic question leading only to a discussion, but bear with me for a second here. I don't mean to discuss which of the two is better or whatever, I'd rather hear facts.


I want to parse Datetime.Now into formatted string like      "2016-09-01T02:00:12.7011585Z"

Given:  DateTime.UtcNow   How do I get a string which represents the same value in an -compliant format?  Note that ISO 8601 defines a number of similar formats. The specific format I am looking for is:  yyyy-MM-ddTHH:mm:ssZ


I accidentally got rid of the menu/window at the right side of the screen which contains the modifiers button and the textures button (and a bunch of other stuff).  Now it's just the Outliner window over there.  How do I get the default one back?  I tried clicking on the little button that contains a bunch of different window types (Properties, 3D view, etc.) but none of them were the right one.

As you can see I accidentally closed my properties bar on the right hand side and I can't figure out how to open it again. Please help!    I mean the part I have boxed in red in this one I can't get that one reopened in my current project.


I want to apply for Ph.D at a good Western university (e.g., in the UK or US) in data science. I have a master's degree (no thesis) and only one publication in a local journal. Will I be competitive for such spots? If not, how can I improve my profile?

When applying to a PhD program in the US, how does the admissions process work? If an applicant is weak in a particular area, is it possible to offset that by being strong in a different area?  Note that this question originated from this . Please feel free to edit the question to improve it.


So I know that the difference between a signed int and unsigned int is that a bit is used to signify if the number if positive or negative, but how does this apply to a char? How can a character be positive or negative?

In C/C++, what an unsigned char is used for? How is it different from a regular char?


In the web application I use 10,000+ iterations for hashing passwords stored in database (random salt and all). Password-related operations are not frequent enough to create a noticeable performance hit. Signing authentication tokens is a different story. This happens on every token renewal which may happen on every request but in practice is configured to happen at least every X seconds. I cannot find any recommendation as to the number of iterations for generating HMAC for encrypted payload such as the token. What are the risks of using a very low number, let's say 10? I use 24 byte salts.

I'm developing a messenger application with encrypted chats.   In the first version of the app I've used PBKDF2 (10000 iterations, SHA1, random salt) to extend a short user password and generate keys to encrypt (AES256) and sign message (HMAC).  In the current version of the app I generate a random 130-bit key and use it instead of a user password. I think that using PBKDF2 with such a key has some overhead.   I see 2 possible ways to improve the current approach:   Keep using PBKDF2 and decrease iterations to 1 or 10. Don't use PBKDF2 and use HKDF instead.   What are the advantages and disadvantages of each approach? Are there any other options?


1) I have recently installed Ubuntu 20 LTS. I went to the Ubuntu Software app and clicked on installed. This section is completely blank. There is an error message that states that the app can't find the directory.  2) I downloaded the Ubuntu Studio software installer and installed all the software on top of regular Ubuntu. I want to remove some of this software but I am unable due to the problem above.  Any help?

Just upgraded to 20.04. At first the software center was working fine. I could scroll down and look at the categories. I could click on the installed tab and see the installed apps. A few hours after later the installed tab is just blank. Today, I can't scroll down to the categories. Is this just a bug that will get fixed soon or should I reinstall it? If so, how do I reinstall it?


So I am in the middle of a project and supposedly my code was fine for this part but I keep getting errors anyway. I'm not sure what my original problem was but I'm sure it's changed at some point during my changes. Despite it pointing to the the line with the problem, I just can't figure out the problem(s) is/are. What is causing the error?   Exception in thread "main" java.lang.NullPointerException      at Cafe.setName(Cafe.java:14)      at CubanCafe.main(CubanCafe.java:16)    import java.util.Scanner;  public class CubanCafe {  public static void main(String[] args) {     String stateName;      Scanner scan =  new Scanner(System.in);      System.out.print(" Enter state: ");     stateName = scan.nextLine();      Cafe cafeState = new Cafe(stateName);     cafeState.setName();     cafeState.setTaxRate();     System.out.println(cafeState);;     System.out.println(cafeState.getTaxRate());   } }   public class Cafe {     private String state, name;     private double taxRate;      public Cafe(String state){         state = state.toUpperCase( );            name = null;         taxRate = 0;      }      public void setName(){         if(state.equals("MD"))              name = "Parkville Cuban Cafe";         else if(state.equals("VA"))              name = "Alexandria Cuban Cafe";         else               name = null;     }         public void setTaxRate(){         if (state.equals("MD"))             taxRate = .06;         else if (state.equals("VA"))             taxRate = .04;         else             taxRate = 0;     }      public double getTaxRate(){         return taxRate;      }      public String toString(){          return (name);     }  }

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 wanted to copy many files in /var folder and it made me slow to use the console (because the owner is root) so I changed the owner of /var folder and all if its subfolder to my user.  After restarting my system, my system can't start and throw low graphic error and it said none of your devices can not be detected. So I go to terminal and try to install my graphic driver but while installing I got these error:  /usr/bin/mandb: can't chmod /var/cache/man/nl/CACHEDIR.TAG :operation not permitted   How should I solve this? I use sudo to install driver

I accidently ran  sudo chmod 755 -R /   instead of  sudo chmod 755 -R ./   I stopped it after few seconds, but now there is some problems such as  sudo: must be setuid root   How can I revert permissions back?


This is rather weird, and maybe I'm missing something (I almost hope I am, because then this question should be closed as too localized ;P).   I saw this question in the reopen queue and voted to reopen it, however, I noticed in the revision history that it places me as the first person to vote on the question, when in fact I had just cast the last vote.

Post Reopened by Tim Post ♦, waiwai933   On , right above Rev. 3.  How did that happen? How did a normal user vote to reopen after Tim cast a binding reopen vote?  Note that this happened 22 hours ago as of the time of this post, and Tim was and is a member of the community team with full moderator privileges.


I've noticed this bug on Stack Overflow but it may be a common issue on all Stack Exchange sites.  After editing question's tags 'tagged' section (seen in the right section) won't update after editing question's tags. Hitting F5 updates this info.  Steps to reproduce:   Edit question's tags.   Actual result:   Question tags below question text are updated. Question tags in the section 'tagged' to the right of question are not updated.   Expected result:   Tags in both sections are updated.

Currently when you edit a question and change tags, the tags list to the right doesn't become synchronized. At least on SO using FF10.  So only page reload updates the list. Please fix that.


what is the CMD command to delete the files which is two days older from a particular folder when we run a batch file?

I am looking for a way to delete all files older than 7 days in a batch file.  I've searched around the web, and found some examples with hundreds of lines of code, and others that required installing extra command line utilities to accomplish the task.  Similar things can be  in just a couple lines of code. It seems that something at least remotely easy could be done for batch files in Windows. I'm looking for a solution that works in a standard Windows command prompt, without any extra utilities. Please no PowerShell or Cygwin either.


I have installed Geary mail client 0.4.0 from software center. After I read there is a new version, 0.4.1, I added the PPA through terminal.  sudo add-apt-repository ppa:yorba/ppa sudo apt-get update   Still, I am stuck with 0.4.0.  Have I done something wrong?

I am wondering what sudo apt-get update does?  What does it update?