The code below compiles and works as expected. On line 11, when I change std::istringstream iss(temp) to std::istringstream iss() , it stops working. An error occurs on line 18, iss.str(temp): expression must have class type but it has type "std::istringstream (*)()" Why would a change to the constructor make a difference? I checked the , it shouldn't make a difference, but I must be missing something. Any thoughts? #include <vector> #include <iostream> #include <string> #include <sstream>  int main() {      int n, m;     std::string temp;     std::vector<int> ranked, player;     std::istringstream iss();      // Get the Input      std::getline(std::cin, temp);     n = std::stoi(temp);     std::getline(std::cin, temp);     iss.str(temp);     while(!iss.eof()) {         std::getline(iss, temp, ' ');         ranked.push_back(std::stoi(temp));     }      return 0; }

Is there any good reason that an empty set of round brackets (parentheses) isn't valid for calling the default constructor in C++?  MyObject  object;  // ok - default ctor MyObject  object(blah); // ok  MyObject  object();  // error   I seem to type "()" automatically everytime. Is there a good reason this isn't allowed?


I stuck in the login loop ubuntu 18.10 and after I enter ctrl+alt+f3 I can not log in to my user account 'jake' but I can log in to 'root' then I can not see any xauthority in the file system. what should I do with root to fix the login loop

My Ubuntu is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and soon after that the login screen comes back.   I've read that the problem might be caused by an error depending on the graphics, here's my graphics card: ATI Radeon 7670M


I am writing in TexStudio and it builds PdfLatex if I don't include the printbibliography command. But when I include it, it shows printbibliography as an unrecognized command and I don't get Bibliography page into my pdf output.  I have also tried compiling the .bib file (as it was working few days ago) with just one citation, before I actually use the mentioned citation into my .tex file but it does not compile (see the image of an error). I think as I can't compile  .bib file, I'm not getting bibliography into the pdf  output. Any suggestion?   \usepackage[ backend=biber,  style=numeric, sortlocale=de_DE,  natbib=true,  url=true,  doi=true,  eprint=false ]  {biblatex}  \addbibresource{literatur.bib} % Biblatex Kompatibilität  \usepackage{csquotes}   \begin{document} \include{inhalt/01-Introduction}  \include{inhalt/02-CHP_systems}   \listoftables  \printbibliography   \begin{appendix}  \include{Appendix}  \end{appendix}      \end{document}

Could anybody give me some help on this problem I've come over?  \documentclass{article} \usepackage{natbib} \begin{document}     \bibliographystyle{ormsv080}     \bibliography{MST_TBS}     \printbibliography \end{document}   when compiling, I got the error:   ! undefined control sequence 1.13 \printbibliography


How to change the label of title field bydefault its showing Title I need to change it to "Custom-title" of node edit form programatically.  I tried    function mymodule_form_alter(&$form, FormStateInterface $form_state, $form_id) { if ($form_id =="slices_slices_cta_5_edit_form") {     kint($form[title][widget][0]['#title']);     dpm($form[title][widget][0]['#title']->jsonSerialize());    $form[title][widget][0]['#title']->jsonSerialize()==t("Custom-title");      //dpm($form[title][widget][0]['#title']->getArguments());  }     I just want to change [string] property of class TranslatableMarkup's object of above screen shot.  How to access the value of a Drupal\Core\StringTranslation\TranslatableMarkup object within a form  I want to do something like below example:  $form[title][widget][0]['#title']->string = t('New-title');   Not working above solution.

The property 'string' is protected as I can see here   but I need to change word "- Any -" in my exposed filter form to my string "All terms"?  I cannot do this cause I do not know how to use this class and how to change output.  This hook says: cannot get value of protected property.  function MYtheme_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {   if ( ( $form['#attributes']['class'][0] == 'views-exposed-form' ) &&          ( $form['#info']['filter-field_color_target_id']['operator'] == 'field_color_target_id_op' ) )   {       dpm($form['color']['#options']['All']->string);       //$form['color']['#options']['All']->string = t('All terms');   } }


What is the fundamental difference(s) between Ehrenfest dynamics and Born-Oppenheimer MD? Also, in what situation(s) or case(s) one is preferred than the other one?

I am new to the world of Molecular Dynamics, and am curious to know exactly what is considered to be an ab initio Molecular Dynamics (AIMD) method, and how do they work? The seminal work by Roberto Car and Michele Parrinello, titled "" was published 35 years ago!  I have recently come across the following "types" of MD methods while reading some research papers:  Born-Oppenheimer Molecular Dynamics Car-Parinello Molecular Dynamics  2nd generation CPMD Approximate Car-Parrinello-like Langevin Born-Oppenheimer Molecular Dynamics Many-body Molecular Dynamics    If I am missing methods, which I am sure I am, please feel free to add them through an answer! Also, it would be appreciated if one method is explained per answer, and is summarized in 2-3 paragraphs.


BACKGROUND I'm an electrical engineering graduate student.  I submitted and abstract to a conference and it was accepted.  This happened about 3-4 months ago.  Since then, I have mainly focused on other unrelated work.    CURRENT The paper deadline approached and I submitted the paper.  About 10 days later, I realized there were a few errors.  These errors include plots which were left in the paper that I intended to replace with updated accurate plots.   So I submitted the paper with errors.    QUESTIONS What do you recommend I do? Will this negatively effect my reputation with the conference?  How big of a problem is this?  My advisor was not happy with me for barely submitting this on time - so this mistake further complicates my problems.    Thanks

I am an engineering MS student (maybe going for PhD).  I submitted a conference paper on some research I was working on last week.  Before I submitted a conference paper, I regenerated all the plots (for a better consistent format).  I realized today that I used an inaccurate, older code to regenerate a few plots in one section.  This means that some of the plots are based on a code that had a theoretical error.  Not good.  Questions:  What do you recommend I do?  Is it ok to send the accurate plots a week later?  Have I damaged my reputation with this forum?  Are there ethical issues here - technically I sent innacurate plots but it was a small technical mistake?


int main(void) { char *temp = "ABCDE"; temp[2] = 'X'; printf("%s", temp); return 0; }   In gdb I could see that temp[2] = 'X' is causing the crash. But why? Could some answer please?

The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.


I'm having trouble inputting random generated passwords into some scripts.  I generate the password, and paste it between "". But sometimes it contains characters that sends the whole thing crashing down, like " # or whatever.  EDIT: I have been pointed to Quoting for a solution  There are several options for Quoting ( using \ , " " and ' ' ) but each require checking the string for special characters, like single quotes in a single quote block. Is there a way to really paste a string without needing to check it or is doing that check always necessary when your random string can contain the ' character at least.

I want to enter the following folder in the terminal:  Milano, Torino (Jan)-Compressed   How should I write the command cd to enter this directory?  Spaces and several other special characters like \, *, ), ( and ? cause problems when I try to use them in the command line or scripts, e.g.:    $ cd space dir bash: cd: space: No such file or directory  $ cat space file cat: space: No such file or directory cat: file: No such file or directory  $ cat ( bash: syntax error near unexpected token `newline'  $ echo content >\ > ^C  $ ls ? (  )  *  ?  \   How do I enter file or directory names that contain special characters in the terminal in general?


I want to build a shell script that accepts multiple optional parameters. However, I'm somehow stuck when getting the parameters. I want the script to be called in multiple ways  scriptname test -gm git@remote.com  This would create a folder test, init a git and add the remote with the given URL  scriptname test -gm git@remote.com -ig  This would do the same as above but also install grunt/a gruntfile for the user  scriptname test -ig  This would create a folder test, and install grunt without doing anything with git  However, it seems like only my -gm parameter is used in the script  while [[ $# > 2 ]] do key="$2" case $key in     -gm|--gitremote)     GITREMOTE="$3"     shift     ;;     -ig|--installgrunt)     echo 'test'     shift     ;;     *)             # unknown option     ;; esac shift done   Test never gets outputted. Does it have something to do with key=$2" ? I don't really know how to have optional multiple parameters

Say, I have a script that gets called with this line: ./myscript -vfd ./foo/bar/someFile -o /fizz/someOtherFile  or this one: ./myscript -v -f -d -o /fizz/someOtherFile ./foo/bar/someFile   What's the accepted way of parsing this such that in each case (or some combination of the two) $v, $f, and  $d will all be set to true and $outFile will be equal to /fizz/someOtherFile?


Someone stole my MacBook. How can I find it if it’s offline. I have its serial number if it helps. Please if someone knows, tell me. I have really important stuff on it and I can’t get it back. Thank you so much.

I have used "Find my Mac" to find our Macbook Pro. It was pretty accurate and was able to place the computer within 10 feet of its actual location. I started thinking about how it actually works, since the MBP doesn't have a GPS. How does "Find my Mac" work?


Is there an elementary explanation of why the row-rank of a matrix equals its column-rank (without using adjoint maps, resp. lots of technical computations)? What is the geometric intuition behind this?

I am auditing a Linear Algebra class, and today we were taught about the rank of a matrix. The definition was given from the row point of view:      "The rank of a matrix A is the number   of non-zero rows in the reduced   row-echelon form of A".   The lecturer then explained that if the matrix $A$ has size $m  \times n$, then $rank(A) \leq m$ and $rank(A) \leq n$.   The way I had been taught about rank was that it was the smallest of    the number of rows bringing new information the number of columns bringing new information.    I don't see how that would change if we transposed the matrix, so I said in the lecture:  "then the rank of a matrix is the same of its transpose, right?"   And the lecturer said:   "oh, not so fast! Hang on, I have to think about it".   As the class has about 100 students and the lecturer was just substituting for the "normal" lecturer, he was probably a bit nervous, so he just went on with the lecture.  I have tested "my theory" with one matrix and it works, but even if I tried with 100 matrices and it worked, I wouldn't have proven that it always works because there might be a case where it doesn't.  So my question is first whether I am right, that is, whether the rank of a matrix is the same as the rank of its transpose, and second, if that is true, how can I prove it?  Thanks  :)


The bug :   Click the upper line of the legend in other to make it go away, chart is zoomed not only down but also left. Notice the red line disappearing from the zoomed chart. Notice yaxis going crazy.   Click the upper line of the legend again in order to make it come back, chart tries to go back to the initial zoom, maybe accomplishes that, I don't know, but lines alignment have changed. Notice yaxis not going completely normal.  Either the first chart or the third chart are wrong data. This is Opera 62.0.3331.119. Can reproduce using Firefox Quantum 68.0.2 and Chromium 47.0.2503.0. This is macOS 10.14.6.  How this is different from  (even likely related to, root cause might be the same but manifestations are different). If I double click lines in legend, this happens. Dis-adjustment seem to be larger than in my initial report. Notice yaxis acts weirdly in a very similar way to my initial report. Double click on the legend line corresponding to the blue line when it is enabled.  Double click on the legend line corresponding to the green line when it is enabled.   As a notable difference, what I report causes a JS console red message. Contrary wise,  not (that one doesn't log anything at all when being reproduced): highcharts.js?v=61b1d1bf4167:12 Error: <path> attribute d: Expected moveto path command ('M' or 'm'), "0". Corresponding stack:  r @ highcharts.js?v=61b1d1bf4167:12  attr @ highcharts.js?v=61b1d1bf4167:297  c.<computed> @ highcharts.js?v=61b1d1bf4167:258  X.h @ jquery.min.js:3  X @ jquery.min.js:3  n.Animation.n.extend.tweeners.* @ jquery.min.js:4  nb @ jquery.min.js:4  map @ jquery.min.js:2  qb @ jquery.min.js:4  g @ jquery.min.js:4  dequeue @ jquery.min.js:3  (anonymous) @ jquery.min.js:3  each @ jquery.min.js:2  each @ jquery.min.js:2  queue @ jquery.min.js:3  animate @ jquery.min.js:4  ec @ highcharts.js?v=61b1d1bf4167:257  animate @ highcharts.js?v=61b1d1bf4167:291  render @ highcharts.js?v=61b1d1bf4167:72  (anonymous) @ highcharts.js?v=61b1d1bf4167:61  o @ highcharts.js?v=61b1d1bf4167:254  m @ highcharts.js?v=61b1d1bf4167:61  redraw @ highcharts.js?v=61b1d1bf4167:101  (anonymous) @ highcharts.js?v=61b1d1bf4167:157  o @ highcharts.js?v=61b1d1bf4167:254  h @ highcharts.js?v=61b1d1bf4167:155  setVisible @ highcharts.js?v=61b1d1bf4167:561  a @ highcharts.js?v=61b1d1bf4167:190  Z @ highcharts.js?v=61b1d1bf4167:257  (anonymous) @ highcharts.js?v=61b1d1bf4167:190

On the , when you either double-click on the legend or click quickly1, the graph lines seem sketched out by this, and move to the left, away from the action (also, they don't always all move the same distance, the one you're clicking on seems to become misaligned from the rest):    I can make this happen on:   Chrome 58, Windows (also in an incognito tab, also confirmed on OS X) Firefox 53, Windows IE 11, Windows Chrome Whatever, Android   Also, while the graph lines' trust can be earned back by clicking slowly (whereupon they will return to calmly grazing on the legend's grassy field), as Laurel noticed in , some of the X axis labels are far more timid, and e.g. 2013 and earlier simply run away entirely.    1 Say "click quickly" five times fast. I could barely type it.


I have a number with an exponent and an uncertainty that I want to display in an S-column in a table. When I just put it in, the spacing is terrible, and if I tell the column how much space to reserve for the number, the brackets around the value and the uncertainty disappear, making the expression faulty.  It looks something like this:  \documentclass{article}  \usepackage[separate-uncertainty]{siunitx}  \begin{document}  \begin{tabular}{| S | S[table-format=1.2(2)e-1] |}     {not reserved}  &   {reserved}  \\     1,72(53)e-3 &   1,72(53)e-3 \\ \end{tabular}  \end{document}     How can I aovoid this but still have a nicely spaced table?

I would like to format the space reserved for a number shown in a table with separated uncertainty. It seems that when I use the table-format option the brackets around the mantissa disappear. This is illustrated in the example below:  \documentclass{article}     \usepackage{siunitx}  \begin{document}     \begin{table}   \begin{tabular}{                   S[separate-uncertainty = true]                   S[table-format=1.1(1)e1,                   separate-uncertainty = true]                   }     {Header} & {Header}\\     1.0(2)e2 & 1.0(2)e2\\   \end{tabular} \end{table}     \end{document}     I have also tried to use the bracket-numbers and multi-part-units = brackets without solving this issue. Is there any workaround to center the number and keep the brackets like in the first column of the example?


I'm thinking about buying a new car.    I'm thinking of buying a new car.   Do we use "about" or ‘of" in sentences above?

Could someone help me to understand when I should use think of and when think about in sentences?  What is the difference between using one or the other?


Can someone explain why i got this strange "artifact". I'm following a tutorial.

While rendering a mesh with smooth shading on, I get a dark region/shadow on certain faces. The effect is more evident when smooth shading is applied to a mesh containing ngons, with the ngons turning black when rendered.   The blackening effect is visible in the viewport too.  How can I solve this problem?


Subject says it all. I'm sure I've seen this somewhere, so if someone can link me to a wiki page or post that explains, that works for me.

A little bird told me that if $2^n+1$ is prime, then $n$ is a power of $2$. I tend not to trust talking birds, so I'm trying to verify that statement independently.  Suppose $n$ is not a power of $2$. Then $n = a \cdot 2^m$ for some $a$ not a power of $2$ and some integer $m$. This gives $2^n+1 = 2^{a \cdot 2^m}+1$. Now I suspect there's a way to factor that, but I don't see how. Can someone give me a hint?


I have a Class RequestHelper where I store methods for http-Requests to initiate Requests from different Activities.  E.g. there is this one:   class RequestHelper {     static void loginUser(String email, String password, final Context activityContext) {     // do request stuff     } }   Is there any difference if I put a public in front of it like in the following example or is it just nonsense to do so?  class RequestHelper {     public static void loginUser(String email, String password, final Context activityContext) {     // do request stuff     } }   Both versions do work as planned, so is there any difference at all?

In Java, are there clear rules on when to use each of access modifiers, namely the default (package private), public, protected and private, while making class and interface and dealing with inheritance?


Situation: unconfigured network interface eth1. As root, I give command dhclient eth1, and get an IP. Now I want to change this IP from client side, force DHCP client to get a new address.  Answers of  only have command to release and re-aquire the lease, but I get the same IP every time, so it does not answer the question.  I am looking for a generic Linux solution, not dependent on this exact environment, but just for reference, this is my current environment:   OS: Ubuntu 14.04 running as a VirtualBox quest DHCP server: VirtualBox host-only network   Also I am aware of following solutions which would work with above: use the VM to set a new MAC address, so it would probably get a new IP too, or simply manually configure another IP for the host-only network. But I am specifically asking how to force a new DHCP IP from client side without rebooting, if such a thing is possible with DHCP at all.  Alternatively, if someone can confirm that DHCP does not support client wanting an IP address change, preferably with a reference, that would be valid answer, too.

How to request a specific IP address from DHCP server?  This question also touches the topic of DHCP address reservation in a router.  Background: My home routers DHCP table only allows to create an IP address reservation of an assigned IP. It does not let me edit the table and manually assign the device an arbitrary IP for the next renew.


I know how to unpack a tar.gz file but am clueless when it comes to the next procedure as I opened file install and it opened up in gedit as a installation script, now the question is how do I run it??? What is the next step??? Thanks in advance for your help... Vektron

I have downloaded tar.gz files. But I don't know how to install it. How do I install this kind of file?


Here is an example of what I am trying to do:      #!/bin/bash Update=$1  if [$Update == Value]  then     NewValue= $Update     vi %s/Value/$NewValue/g > Updatedfile fi exit 0   Is there a way to utilize vi commands within a script? My thoughts are that some type of piping would do this?

Replacing strings in files based on certain search criteria is a very common task. How can I    replace string foo with bar in all files in the current directory? do the same recursively for sub directories? replace only if the file name matches another string? replace only if the string is found in a certain context? replace if the string is on a certain line number? replace multiple strings with the same replacement replace multiple strings with different replacements


I have a problem in my code in android studio, I created it to say "Hello" when the person "abc" writes but that didn't work . can u plz help me. here is my codes  final Button butt=(Button)findViewById(R.id.butt);  butt.setOnClickListener(new View.OnClickListener() {     @Override     public void onClick(View view) {           final EditText frag =(EditText)findViewById(R.id.frag); final TextView hello=(TextView)findViewById(R.id.hello);       String verb =frag.getText().toString(); if (verb=="abc"){             hello.setText("Hello");

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I am currently running 20.04 (development branch).  Will this upgrade automatically to 20.04 LTS when it's released or is there some action I'll have to take to move to the LTS version?

I installed an Ubuntu alpha or beta and have been keeping it up to date.   So, Should I presume that my system has automatically updated to the next alpha or beta, and will be running the official release when it's finished?


my script:  #!/bin/sh PATH=$PATH:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin if pgrep -x  "firefox" >/dev/null then     return else     firefox & fi   my crontab:  * * * * * /home/jesuscrew77/sc.sh   It runs manually but doesn't start with crontab. what is wrong?

I want to write a crontab that opens Firefox every minute (just to test it, I know it doesn't make any sense). My problem is that even though crontab is active nothing happens. This is how my crontab looks like:  SHELL=/bin/bash PATH=~/bin:/usr/bin:bin * * * * * export DISPLAY=:0.0 xhost localuser /usr/bin/firefox   Any idea why it isn't working?


How do I upgrade my iPhone 4 to run iOS 9.0? Can this be done without a computer? I need it to download Facebook, YouTube and WhatsApp.

I have an iPhone 4 and I need to upgrade from 7.1.2 to iOS 8 or 9. I would like to ask how I can get iOS 8.


I recently updated to 16.04 (64 bit) and I'd really love to be able to make my laptop hibernate on closing the lid. I'm able to successfully hibernate by typing sudo pm-hibernate into terminal but I tend to forget to do this when tossing my laptop in my bag and then I pull out a dead computer.  I've followed the directions here:  with no luck. Are there any other options I can try to get my computer to automatically hibernate?   EDIT: following the instructions at the above link, I've used dconf Editor to set hibernate on lid closed and also set /etc/systemd/logind.conf to hibernate on lid switch

I would like to use the hybrid suspend method instead of suspend when closing the lid or selecting "Suspend" from the menu.  I can imagine to change the pm-suspend script to do so automatically, but there might be a more maintainable / easier way.


I got the idea that expansion of the universe is not to somewhere, it is just getting stretched of spacetime since a point of singularity. And I know that universe was calculated as flat (which means sum of angles of a triangle is exactly π ignoring local instrinsic curvatures caused by celestial masses) with a very small error rate. But still universe is possible to be hyperbolical or elliptical. If it is elliptical, when you travel on a straight route, you will eventually arrive at your starting point (we assume expansion of the universe is frozen). So, can we say that in that travel I am actually circumnavigating on the surface of a higher dimensional sphere and that means spacetime has an extrinsic curvature beside its intrinsic curvature.

General relativity tells us that the universe is bent by gravity, but this curvature is intrinsic to the universe (the universe bends, but not in a fourth spatial dimension, the universe having only three bent spatial dimensions).  How could we know the difference between the intrinsic curvature of a 3D spatial universe, and a the extrinsic curvature of a 3D shape in a 4D universe?    Obviously, there is a similar question about our curved 4D spacetime inside a 5D spacetime.


Ok so I saw at work a script which is on OpenVMS using the DCL scripting language that they have a way to do a catch all for warnings or errors etc...  There is a page about it here.  basically its ON warning THEN GOTO sendfailemail or something like that. I was wondering without using a bunch of if statements is there a way to do such a thing in bash?  I am looking for something that can do a trap not just based on ERR but return code. What is nice about vms is that you can do on warning which on vms is exit status 0 vs error which is exit status 2. So I know I can do trap ... ERR but I wanted something that could trap exit status 1 or 2 specifically.

What is your favorite method to handle errors in Bash?  The best example of handling errors I have found on the web was written by William Shotts, Jr at .   He suggests using the following function for error handling in Bash:  #!/bin/bash  # A slicker error handling routine  # I put a variable in my scripts named PROGNAME which # holds the name of the program being run.  You can get this # value from the first item on the command line ($0).  # Reference: This was copied from <http://www.linuxcommand.org/wss0150.php>  PROGNAME=$(basename $0)  function error_exit {  #   ---------------------------------------------------------------- #   Function for exit due to fatal program error #       Accepts 1 argument: #           string containing descriptive error message #   ----------------------------------------------------------------       echo "${PROGNAME}: ${1:-"Unknown Error"}" 1>&2     exit 1 }  # Example call of the error_exit function.  Note the inclusion # of the LINENO environment variable.  It contains the current # line number.  echo "Example of error with line number and message" error_exit "$LINENO: An error has occurred."   Do you have a better error handling routine that you use in Bash scripts?


I have walk through many questions and answers here which are not cleared.and getting Error: Invalid child of messaging:emailTemplate. Only messaging components are allowed as children of messaging:emailTemplate. <apex:repeat value="{!attachments}" var="attachment">     <messaging:attachment renderas="{!attachments[0].ContentType}" filename="{!attachments[0].Name}">     </messaging:attachment>     </apex:repeat>  ERROR like: Error: Invalid child of messaging:emailTemplate. Only messaging components are allowed as children of messaging:emailTemplate.

I'm creating a UI that feeds into an email template via visualforce. One of the features I want to add is the user should be able to click  checkboxes and add attachments to an email template.  When the user clicks a button to get to the constructed email template, those attachments are added.  From the UI part, I have the attachment ID's, but i don't know how to get those multiple attachments added to the email template.  Also, you can't do      <apex:repeat> on <messaging:attachment>  A couple of constraints -  1- The attachments could be any type - .gif, .pdf, .csv 2- I'd like the attachments to have their actual names  3- what ever the file type is, i'd like it to stay that way  4- I'd prefer not to do a batch apex  There is a related q here:


Show by a counter-example that if U+W =U+X for subspaces U,W,X of V, then W need not be equal to X.

Let $V$ be a vector space and $U,W$ and $Z$ subspaces of $V$.  Does $V = W \oplus Z$ and $V = U \oplus Z$ necessarily means that $W = U$?  Thanks!


Why are data that are one and a half times the interquartile range (1.5IQR) or more, measured from the first and third quartiles, classed as outliers. Why 1.5?

I was looking at the outlier detection formula which uses the IQR and I wonder why it should be multiplied by 1.5? Can the constant be increased i.e 3 or 6 to be more "acid" if so under what criteria?


I can't see why this has to be the case.  I've computed the vertices, given the constraint inequalities and equations.  So, now all that's left is to plug in these vertices into the function to find my maximal value.  Can someone explain why I was essentially done with the problem (finding the max) as soon as I found the vertices?

I'm in high-school and I'm told that the maximum/minimum of a linear programming occurs at the vertex.For more info see the chapter . For convinience I'm putting relevant excerpt here:     Now, we see that every point in the feasible region satisfies all the constraints, and since there are infinitely many points, it is not evident how   we should go about finding a point that gives a maximum value of the objective function. To handle this situation, we use the following theorems which are fundamental in solving linear programming problems. The proofs of these theorems   are beyond the scope of the book.      Theorem 1 Let R be the feasible region (convex polygon) for a linear programming   problem and let Z = ax + by be the objective function. When Z has an optimal value   (maximum or minimum), where the variables x and y are subject to constraints described   by linear inequalities, this optimal value must occur at a corner point (vertex) of the   feasible region.      Theorem 2 Let R be the feasible region for a linear programming problem, and let   Z = ax + by be the objective function. If R is bounded, then the objective function   Z has both a maximum and a minimum value on R and each of these occurs at a   corner point (vertex) of R   I searched wikipedia  to get under Optimal vertices (and rays) of polyhedra:     "..then the optimum value is always attained on ... This principle underlies the simplex algorithm for solving linear programs.."   But I couldn't understand it. Can someone explain?It might be helful to add that I have studied basic Calculus.


only have dev/sd1 with full disk space how can I resize it to get some unallocated space for installing another os?

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


there is a discrepancy between the viewport hair ( how I intend it to be) and the render in Cycles  What's the reason for this difference

I made the eyelashes for my mesh and though it will be fine as it looks in the picture     Particle Edit Object mode but after I render the eyelashes look very messy like this  What I am doing wrong? Here my Hair settings  Thanks in advance


Let $p$ be a prime number. Prove that for any field $K$ and any $a \in K$, the   polynomial $x^p−a$ is either irreducible, or has a root.   it doesn't seem hard, but i have no idea.  any hint is welcomed!  thank you

Let $K$ be an arbitrary field, $p$ a prime and $a\in K$. Show $f=x^p-a$ is either irreducible in   $K[x]$ or has a root in $K$.   My strategy was to split this up into a case for each characteristic.   The characteristic $p$ case is easy. Assume $f$ is reducible $=gh$ both smaller degree $g$ irreducible, with $\alpha$ a root of $g$. Then in $K(\alpha)[x]$, $f=(x-\alpha)^p$. So $g=(x-\alpha)^k$, and all the other factors of $f$ are of the same form. Hence they are all equal to the $minpoly(\alpha)$ and the degree of $minpoly(\alpha)|p$ so it is $1$ or $p$ and we are done.  The characteristic $0$ case  and characteristic $q\ne p$ I get stuck on. If $K$ contains a primitive $p$th root of unity $\zeta$, then over $K(\alpha)$, $f$ splits into linear factors. So the degree of the field extension for any root of $f$ is the same, so the degree of such a root is either $1$ or $p$. If $K$ does not have a primitive $p$th root of unity, then simply adjoin one. We know $[K(\zeta):K]|p-1$ and by the previous step either $f$ is irreducible over $K(\zeta)$ or splits into linear factors. If it is irreducible we are done, if not we have it splits into linear factors of the form $x-\zeta^ia^{1/p}$, but I am unsure what to do from here. The characteristic $q$ case seems similar to the characteristic $0$ case but again I am stuck trying to finish the proof.   Some googling has lead me to believe that this problem is generally approached using the field norm and if an accessible online reference exists I would love to see it, but I feel that in the context I have seen it should be entirely possible that this is done without needing the norm. As I have not seen the field norm before, I would like to know if there is a possible way to prove this without using it and hopefully that follows in the same vein my attempt at a proof did.


If a helicopter flies linearly in the upward direction from a point A on the earth stays in the air at the same position for a long time and then linearly comes down , will it land at the same point A or at a different point since the earth is rotating ?

Suppose we have a helicopter that is able to stay stationary in flight for extended periods of time.  If such a helicopter stayed at point A in the sky for 12 hours straight, would it reach the other side of the globe?


Draw a 5x5 square. In 16 of 25 squares draw diagonals in such a way that no diagonal ends touch. How can I do this?

I have  and I have to fill 16 little squares with a diagonal  Rules   You cannot place more than 1 diagonal in each square The diagonals cannot touch each other (example bellow)       But what I seek here is a mathematical solution for this puzzle, I don't even know where to start looking for information.  Can someone explain how do I solve this puzzle using equations?


I installed ubuntu on a Windows Vista laptop last year, didn't use it much and now am trying to update to newer version and run other updates that it lists, but it asks for my password and I have no idea what it is.  I do not have any files to save as I just used it for internet access so would like to just completely start over, install latest version and not setup passwords, any guidance for someone that is really just savy enough to install a printer driver.

I'm working on a Ubuntu system, and my client has completely forgotten his administrative password. He doesn't even remember entering one; however it is there.  I've tried the suggestions on the website, and I have been unsuccessful in deleting the password so that I can download applets required for running some files. Is there a solution?


I have a directed multigraph with no self-loops:    What's the most efficient way to mark nodes 1, 2 and 3 as being members of a cycle?  My first thought would be to   Perform a depth-first search starting from an arbitrary node Push all nodes I've seen in a given branch into a "seen" array. Also, mark each node as "checked". For each new node, check if any of its children are in the seen array If it is, mark each node in the array between the seen node and its previous occurrence as seen While traveling down the DFS, make sure to skip any children who have been seen Repeat 1-5 with the next node that hasn't been marked as "checked" yet (since I may have disconnected regions of the graph)   This seems like it might work, but wonder if it's the most efficient way, give that I've got to maintain an array of "seen" nodes, and, since this has to be called recursively, I think I may be doing a lot of array modification (e.g. at one point in my algorithm I'll have [0,1,2,3,1] and another point I'll have [0,1,2,3,4], for the graph above, so it's not just "build once"). I also have to go through the list an additional time at the start to removed the "checked" mark that may have been left over from a previous test.

What is the most efficient algorithm for detecting all cycles within a directed graph?  I have a directed graph representing a schedule of jobs that need to be executed, a job being a node and a dependency being an edge. I need to detect the error case of a cycle within this graph leading to cyclic dependencies.


Suppose two sets of 2 elements each, $X = \{x_1, x_2\}$ and $Y = \{y_1, y_2\}$ are uniformly and independently chosen from the set of positive integers ${1, . . . , r}$. What is the probability that the sets $X$ and $Y$ are disjoint?

Suppose two sets of $2$ elements, $\{X_1, X_2\}$ and $\{Y_1, Y_2\}$ are uniformly and independently chosen from the set of two element subsets of the integers $\{1, 2, \dots, r\}$, where $r \geq 1$.   What is the probability that the two sets are disjoint? What is the probability that the two sets are the same? What is the expected size of the intersection of the two sets?   I've tried to attempt these questions, but I'm completely wrong. It would be nice if you guys can help me out. Thanks


I have 2 machine setup of rhel7 , one is in terminal mode and the other is in grahical mode , when I run 'who' command on both the machines why do I get 'tty' in 2nd column output for the machine in terminal mode and 'pts' for machine in graphical mode

Possible Duplicate:          I always see pts and tty when I use the who command but I never understand how they are different? Can somebody please explain me this?


I wanted to install Clementine and noticed 2 of them in the Ubuntu Software Center, as shown in the image:    Is there a difference between the two? Are they both different versions? Or is something more shady going on?

When I search for Chromium in Ubuntu Software on Ubuntu 16.04, There are 2 options.    Which one should I select?    The same can be observed with , ,  etc.


How can I calculate the duration my solar battery will last after charging to full? I want to know how to calculate the battery back up time.

How do I calculate how long a battery operated product will run?  Here's what I've got:   2 AA, 1.5V, 2700mAH batteries Voltage Regulator with a Iq of 25 uA Voltage Regulator Eff = 80% Active Current = 50mA  Sleep Current = 1uA  Duty Cycle = 99.9% (only active 0.1% of the time)  Active Voltage is 3.3V   I've gone the current route and got an answer.  I went the power route and got a TOTALLY different answer (days vs years different).  How do you do this?


I'm dual-booting Windows 8.1 and Ubuntu 14.04. While installing, I gave Ubuntu 50GB of my disk space but now I'm finding that it is small for me. So is there any way I can decrease my Windows C: drive and increase the Ubuntu partition without affecting dual-boot. I've read posts saying how to do it but I'm afraid that I'll mess up my dual-boot and break my bootloader.  My GParted:    I want to take 50GB from from C: Drive(/dev/sda4) and give it to the Ubuntu drive(/dev/sda9). Please guide me through it.  UPDATE : I removed 50GB from my C: drive but I am now unable to add it to my /home directory. I can only make that 50GB into a new partition which is not what I need. Is there any way how I can add that 50GB to /dev/sda9.    The /dev/sda10 [50GB Volume] is the one I want to delete and add to /dev/sda9.

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


We know Hogsmeade is the only all-wizard town in Britain. So wouldn't some students' family live there? Not only is it a nice all-wizard place to live, but you would see your kids during Hogsmeade weekends. So why do we never hear about relatives living there?

Hogsmeade has a lot of individuals who live there, and it has the distinction of being the only non-muggle community in the UK. Are there any students at Hogwarts who live there during the summer?  I ask because  explicitly says that students must ride the train or not go to the school at all, which seems silly for someone who already lives at the destination.     Many pure-blood families were outraged at the idea of their children using Muggle transport, which they claimed was unsafe, insanitary and demeaning; however, as the Ministry decreed that students either rode the train or did not attend school, the objections were swiftly silenced.


My wife is a Chinese national residing in Belgium. We would like to do the following itinerary:  Belgium --> Hong Kong (<7 days) --> Mainland China (e.g. Chengdu) --> Belgium  I assume my wife does not need a permit to go to Hong Kong.  I assume she can return to Belgium from mainland China (no need to go back from Hong Kong)?  Can anyone confirm my assumptions ?

I and my girlfriend (a mainland Chinese citizen) are planning to visit Hong Kong from Malaysia (where we both have MSC working visas), and will also be returning to Malaysia. I have been surprised at all of the restrictions placed on mainland Chinese citizens; it seems that there is a lot of bureaucracy required before a mainland Chinese citizen can enter Hong Kong. I am trying to find out if there is some way that she can enter Hong Kong for 3-4 days with me (a British citizen) without having to go through the hassle of trying to get a visa. After a little while reading, I found :  Chinese passport holders who are in transit through Hong Kong from another country, region or territory may be granted a stay of 7 days without the prior need to obtain an entry permit, with the condition of possession of valid Chinese passport and confirmed onward air tickets for the overseas journey. If Chinese passport holders will go for mainland China or Macau via Hong Kong, onward air tickets are not compulsory.  It seems that this could be used to allow her visaless entry to Hong Kong, as we only plan to go for 3-4 days. So here are my questions based on that 7-day exemption clause:  Does the "onward air tickets" stipulation apply when flying from and returning to Malaysia, or would it only apply if we were flying on to another country entirely? If "onwards air tickets" may not apply in that situation, does flying back to Malaysia via Macao or mainland China permit her to enter without a visa? Does simply entering mainland China without flying (for example, using the Hong Kong–Shenzhen Western Corridor to drive there) also entitle her to this entry?  I have contacted the Chinese embassy in Malaysia about these questions, but they advised me that they do not know the answer to them (which I find a little surprising).


How does principal component analysis (PCA) model data of admittedly higher dimensionality with just a few principal components?

In today's pattern recognition class my professor talked about PCA, eigenvectors and eigenvalues.   I understood the mathematics of it. If I'm asked to find eigenvalues etc. I'll do it correctly like a machine. But I didn't understand it. I didn't get the purpose of it. I didn't get the feel of it.        I strongly believe in the following quote:     You do not really understand something unless you can explain it to your grandmother. -- Albert Einstein   Well, I can't explain these concepts to a layman or grandma.   Why PCA, eigenvectors & eigenvalues? What was the need for these concepts? How would you explain these to a layman?


Recently in some LaTeX documentation I noticed that there is a special LaTeX command for the symbol meaning "corresponds to", which is similar to an equal sign with a hat on top. \hat{=} or \widehat{=} both do not give satisfying results (my personal view). Unfortunately, I cannot remember which documentation it was! Does anyone know the command or the documentation where to find it?   The symbol I am looking for:    PS: I have already tried  but it didn't produce anything useful! Also, browsing  wasn't successful.

I want to use unicode character 2259 "estimates" in my document, but cannot find it in the symbols-a4 list or via .  It looks exactly like this: ≙  The closest I get is \triangleq: ≜, but it has a different meaning.


I'm trying to complete a simple program using multiple methods to compute the grade of a test, yet my method will not return any letters. The IDE says that my method must return a result of type String.  public static String getGrade1(int num1) {     if (num1 <= 100 && num1 >= 90) {         String a = "A";         return a;     } else if (num1 < 90 && num1 >= 80) {         String b = "B";         return b;     }else if (num1 < 80 && num1 >= 70) {         String c = "C";         return c;     }else if (num1 < 70 && num1 >= 60) {         String d = "D";         return d;     }else if (num1 < 60) {         String f = "F";         return f;     } }

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I recently made Ubuntu 12.0.4 bootable through my flashdrive. I've done this before, and have had no problems on previous flashdrives; the only problem I ran into then was I ran out of space, and now I reformatted my flashdrive to give me more space. The program I am trying to install is Wine 1.7, and the instructions given  aren't working for me this time. When I try and install it through terminal, I get this message every time:  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  wine1.7 : Depends: wine1.7-amd64 (= 1:1.7.12-0ubuntu1) but it is not going to be installed            Depends: wine1.7-i386 (= 1:1.7.12-0ubuntu1)            Recommends: fonts-droid but it is not installable            Recommends: ttf-mscorefonts-installer but it is not installable            Recommends: fonts-horai-umefont but it is not installable            Recommends: winetricks but it is not going to be installed E: Unable to correct problems, you have held broken packages.   If anyone knows what this means I'd appreciate it.

Occasionally, when I'm installing stuff, I get an error like the following:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


Which are the most secure password hash algorithm(s) in PHP?  Speed is irrelevant because I'm iterating the hash over a fixed time (rather than a fixed number of iterations). What I'm interested in is the mathematical strength.  My intuition tells me it's whirlpool, being the largest and slowest of the bunch. That or SHA-512. Which is recommended by experts?  Are there any other algorithms which provide more than 512 bit hashes?

It is currently said that MD5 is partially unsafe. Taking this into consideration, I'd like to know which mechanism to use for password protection.  This question,   suggests that hashing multiple times may be a good idea, whereas  suggests using salt.  I'm using PHP. I want a safe and fast password encryption system. Hashing a password a million times may be safer, but also slower. How to achieve a good balance between speed and safety? Also, I'd prefer the result to have a constant number of characters.   The hashing mechanism must be available in PHP It must be safe It can use salt (in this case, are all salts equally good? Is there any way to generate good salts?)   Also, should I store two fields in the database (one using MD5 and another one using SHA, for example)? Would it make it safer or unsafer?  In case I wasn't clear enough, I want to know which hashing function(s) to use and how to pick a good salt in order to have a safe and fast password protection mechanism.  Related questions that don't quite cover my question:


I'm doing some test, and I created a local repos to version some files. I would like to restore all my files to their state at a previous commit. Is it possible ? I know that git checkout file restore a file to the current commit state. However I'm not sure if git checkout * do the same for all file, and even more here I'm not sure if it's possible to restore from more than just the latest commit.

I have made some changes to a file which has been committed a few times as part of a group of files, but now want to reset/revert the changes on it back to a previous version.   I have done a git log along with a git diff to find the revision I need, but just have no idea how to get the file back to its former state in the past.


I am new so bear with me. But I am getting a NullPointerException somewhere in here. Any ideas? Thanks!  private  void loadInstructors() {   // get all account numbers from database   try    {     //myResultSet = myStatement.executeQuery( "SELECT DISTINCT lastname FROM InstEval" );     myResultSet = myStatement.executeQuery( "SELECT DISTINCT TEAMNAME FROM APP.TEAMEVAL" );     // add account numbers to accountNumberJComboBox     while ( myResultSet.next() )     {       //instructorComboBox.addItem( myResultSet.getString( "lastname" ) );       TeamsComboBox.addItem( myResultSet.getString( "TEAMNAME" ) );     }     myResultSet.close(); // close myResultSet   } // end try   catch ( SQLException exception )   {     exception.printStackTrace();   } }

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?


Given: $\theta>0$, $X_1,...,X_n$ i.i.d. RV with     $p_{\theta}(x) = \frac{1}{\theta}, \text{where } 0 \leq x \leq \theta$   and      $p_{\theta}(x)=0, \text{else.}$   In the given exercise the MLE solution $L_X(\sigma)$ is      $L_X(\sigma)=\frac{1}{\sigma^n}1_{\{0\leq X_{(0)} \leq X_{(n)} \leq \sigma \}}$   with the order statistic, which I unterstand. But then they claim $\hat\theta = X_{(n)}$ if $\theta\geq X_{(n)}$ and zero else, without a lot of explanation. Can you explain me this solution?  I see that $\frac{1}{\sigma^n}$ is strictly decreasing for $\sigma>0$. But it seems to me that we cannot conclude without knowing if the maximum of the RV is $X_{(n)} < 1$ or $X_{(n)}\geq1$.

There is a classic problem:  Suppose that $X_1,\ldots,X_n$ form an i.i.d. sample from a uniform distribution on the interval $(0,\theta)$, where $\theta>0$ is unknown. I would like to find the MLE of $\theta$.  The pdf of each observation will have the form: $$ f(x\mid\theta) =  \begin{cases} 1/\theta\quad&\text{for }\, 0\leq x\leq \theta\\ 0 &\text{otherwise}. \end{cases} $$ The likelihood function therefore has the form: $$ L(\theta) = \begin{cases} 1/\theta^n \quad&\text{for }\; 0\leq x_i \leq \theta\;\; \text{for all }i,\\ 0 &\text{otherwise}. \end{cases} $$ The general solution is usually that the MLE of theta must be a value of $\theta$ for which $\theta \geq x_i$ and which maximizes $1/\theta^n$ among all such values.   The reasoning is that since $1/\theta^n$ is a decreasing function of $\theta$, the estimate will be the smallest possible value of $\theta$ such that $\theta\geq x_i$.  Therefore, the mle of $\theta$, $\hat{\theta}$, is $\max(X_1,\ldots,X_n)$.  Here, I do not understand why we cannot just differentiate the likelihood function with respect to theta and then set it equal to $0$?  Thanks!


I was just out and about looking for posts to help me secure the timelord hat and I found   If you notice at the first of the question it says Dear All.     If however, you click edit and look at the text the Dear All has vanished.    This feels like a remove salutation bug, or the reverse of that, edit being right, and the post being wrong.  EDIT: @gunr2171 has since edited the post and the Dear All goes away.

I edit a lot of posts every day. I often run across posts with 'Hi' and 'Thanks' on the top and the bottom of the post respectively. I also run across things like:     --User   Should these items be removed during the editing of the post by an editor?


When I start Octave, on the command window I see this:    However, after I run some commands, I can see they are in history and they do execute. I can see the text if I copy-paste it somewhere.   How can I make the command window text visible?

I've installed Octave 4.2.0 on Ubuntu 16.04:  wget ftp://ftp.gnu.org/gnu/octave/octave-4.2.0.tar.gz tar xf octave-4.2.0.tar.gz rm octave-4.2.0.tar.gz cd octave-4.2.0/ ./configure make -j8 sudo make install   However there is a graphical bug in my Octave terminal:    The rows in terminal are stupidly small to see the present code.  How can I get rid of this bug?


On Chrome's settings page, chrome://settings, when I go to Search Engine -> Manage search engines chrome://settings/searchEngines and edit stuff in "Other search engines", where are those settings stored? They're synced to my account, but can I download them and import them from another Chrome user/share them with other people?

I have created some search entries in Google Chrome using 'Edit search engines'.  How can I share some of these entries with my colleagues?


This is my .sql file, it's saved as "Split.sql" and is located in C:\  INSERT Employee (Name)     values ('Roland Eric Real') SELECT *  FROM Employee GO  select      Name,      -- instead of spaces you can use any delimiter that you have like a comma     -- We replace the delimiter with dot, which is used by the function PARSENAME     PARSENAME( REPLACE(Name, ' ','.') ,3) as LastName,      PARSENAME( REPLACE(Name, ' ','.') ,2) as FirstName,      PARSENAME( REPLACE(Name, ' ','.') ,1) as MiddleName from Employee GO  -- If you need to alter the table then -- Alter the table and add new columns ALTER TABLE Employee ADD LastName varchar(50),     FirstName varchar(50),     MiddleName varchar(50) GO  -- Moving the data from FullName to the new columns UPDATE Employee SET      LastName   = PARSENAME( REPLACE(Name, ' ','.') ,3),      FirstName  = PARSENAME( REPLACE(Name, ' ','.') ,2),      MiddleName = PARSENAME( REPLACE(Name, ' ','.') ,1) GO  SELECT *  FROM Employee GO  -- Now we can drop the old column ALTER TABLE Employee  DROP COLUMN Name GO  -- Reclaim space by rebuilt the table ALTER TABLE Employee REBUILD  GO  SELECT *  FROM Employee GO   I am using windows form in visual studio c#. Basically, when I press a button in windows form, I want it to run that code in sql. Any help would be appreciated, thank you. ^_^

I need to execute a large set of SQL statements (creating a bunch of tables, views and stored procedures) from within a C# program.  These statements need to be separated by GO statements, but SqlCommand.ExecuteNonQuery() does not like GO statements. My solution, which I suppose I'll post for reference, was to split the SQL string on GO lines, and execute each batch separately.  Is there an easier/better way?


My uncle is traveling from Dubai to Amsterdam and then to Quito. He is citizen of Ecuador and Pakistan, currently in Pakistan. He will arrive at 5 AM in Dubai from Lahore and leave Dubai at 11:55 PM on the same day.  I want to know how long he can stay in Dubai airport without visa. He will travel by KLM airlines from Dubai to Amsterdam and then from Amsterdam to Quito. Does he need a visa in Dubai?

Do I need a transit visa for a layover via airports in the UAE, such as Dubai International Airport or Abu Dhabi International Airport? If so, what are the requirements for such a visa? Can I get the transit visa on arrival?


I've got a string s, and I'm trying to map each letter in s to the number of times it appears in s, using the Stream API. For example, giraffe -> {1, 1, 1, 1, 2, 2, 1}. The code I've tried using is: String s = "giraffe"; int[] occurences = s.chars().map(c -> count(s, c)).toArray();  public int count(String text, char ch) {     return (int) text.chars().filter(c -> c == ch).count(); }  but I get incompatible types: possible lossy conversion from int to char on the line that starts with int[] occurences = ... I've tried some different variations but nothing has worked. Any ideas? Thanks

I have the string   a.b.c.d   I want to count the occurrences of '.' in an idiomatic way, preferably a one-liner.  (Previously I had expressed this constraint as "without a loop", in case you're wondering why everyone's trying to answer without using a loop).


I want to know if it's possible to write out the line \def\TEMP{ to a file, and then later write } to close the brace-pair in the written file? Essentially I'd like to do;  \documentclass{article} \newwrite\TEMP \immediate\openout\TEMP=Temp.tex \begin{document} \immediate\write\TEMP{    \def\writefoo{% I don't want to close this brace at this point     }% This is suppose to close the \write command, not the \writefoo{ brace \newcommand{\foo}{This is some text} \immediate\write\TEMP{\foo} \immediate\write\TEMP{    }% This is the closing brace to the original write-out.    } \end{document}   I know the problem with the above code is that the \def\writefood{ closes on the } that I want to be the closing brace on the \write command, thus the \write command doesn't actually get closed.  My question is, is there a way to trick latex into writing out the unbalanced brace to the file? Since it's being written out to a file it seems like this would be plausible (if you can convince latex to close the brace artificially everything else would compile fine).  I tried to use \begingroup and \endgroup but that, predictably, did not work correctly as the resulting \def\writefoo's contents don't persist correctly.  Edited to answer questions below thoroughly:  I currently have a complex series of macros that output randomized large blocks of text, containing complex macros as well. I have managed to write them out as they are selected/generated in sequence thanks to the unexpanded command, you can see more about the specifics .   However, (as it says at the bottom of that link) I want to be able to output more than one selection set. The best way that comes to mind is to define dynamically named macros that are just shells containing all the contents from a single large selection call. That way I can input the file and call the macros I want to use, and just not call the ones I want to regenerate.  The problem is, since the content is generated sequentially and randomly, the only way I can think to do this is to put a \def at the start, then generate and export all the content, then close the def. But that means writing out to the file unbalanced braces which LaTeX doesn't like.

How can the special characters { and } be written literally to an external file in LaTeX, without being balanced?  Obviously the following does not work:   \immediate\write\my@outfile{{}  \immediate\write\my@outfile{}}


I use 64bit Ubuntu 14.04. When I run sudo apt-get update it gives the following error.      Unable to find expected entry 'restricted/binary-amd64/Packages' in Release file W: Failed to fetch http://archive.ubuntukylin.com:10006/ubuntukylin/dists/trusty/Release   Unable to find expected entry 'restricted/binary-amd64/Packages' in Release file  (Wrong sources.list entry or malformed file)     E: Some index files failed to download. They have been ignored, or old ones used instead.   Could anyone tell me how to fix this  problem?

I have unistalled and reinstalled the Ubuntu Software Center as per info I found in a similar thread and I got the same response about line 91 or something like that.  I just tried to upload a screen shot but since I'm new it won't allow me to.  I also can not figure out how to cut and paste anything so I have to hand type what the error screen says, both when I attempt to open the software center and nothing happens, when I try to enter commands into the terminal to uninstall, reinstall, whatever I get the same following:  COULD NOT INTITIALIZE THE PACKAGE INFORMATION An unresolvable problem occured while initializing the package information Please report t:his bug against the 'update-manager' package and include the following error message: 'E: Malformed line 91 in source list/etc/apt/sources.list (dist parse)  E: The list of sources could not be read.,  E: The package list of status file could not be parsed or opened.   How do I report bugs?  What can be done about this.  I have searched and everything everyone says to do leads me back to the same line error message.  So, I don't know how to get to line 91 in the source list; to tell you what it says. Sorry, I'm really new to this. That is what I need is to find out how to get there and fix what it says. I would really like to NOT have to re partition my hard drive and start from scratch, so I'm really looking forward to getting this problem solved. I need to be able to install new software.


Is it possible with XeTeX to generate linearized PDF for Web streaming — showing pages sequentially as they are downloaded —, not for file size reduction?

Is it possible to create linearized PDFs (optimized for "fast web view") using TeX with free software? (I don't have Acrobat available.)


I've been using Ubuntu 12.10 for some time now, but I am very limited when it comes to installing some software such as wine that won't run on a 64bit. I want to know what are the biggest disadvantages/advantages of both the 32 and 64 bit. Will it be worth switching to a 32bit? If using a 32bit will my programs still work?   Will this command change completely the architecture from 64 to 32bit, or will it just add support to 32bit while keeping the 64bit?  sudo dpkg --add-architecture i386

What is the difference between 32-bit and 64-bit Ubuntu? I've heard the 64-bit platform performs better and can detect more than 4GB of RAM. Also, while some apps haven't ported to 64-bit yet, ia32-libs lets a 64-bit machine run them.  If so, why not promote 64-bit over 32-bit?


I read in a french book (corrected annals of centrale école) that   it's not hard to prove that   $\lim\limits \sqrt[n]{|\cos(n)|} = 1$  I wonder how to prove this.  Thanks for any ideas.

I heard this question from a professor a couple years ago. I still think about it...     Does the sequence $(a_n)_{n\in \mathbb N}$ with $$a_n=\sqrt[n]{|\sin(n)|}$$ converges ( to $1$ ) ?   I believe this question is related to rational approximation.


We are trying to send out a mass email for a client of ours through a third party sender and it is always being sent to the spam folder rather than the inbox. I have below the headers from the email.   Do you have any thoughts on why it might be being filtered as spam? Or how we might be able to fix it?  x-store-info:4r51+eLowCe79NzwdU2kRyU+pBy2R9QCr01wX+2TQb16V+IWYKH89OEXx2kXRCi0YCCbAc2czEzqYF2bH27mAPgHi3rzu7bpgBsHbtZAyLKnNk8fJmBxyu+VguRUNe13q5zZaaanxKw= Authentication-Results: hotmail.com; spf=softfail (sender IP is 64.250.95.18) smtp.mailfrom=almirall@cgdmcanada.com; dkim=none header.d=cgdmcanada.com; x-hmca=fail header.id=almirall@cgdmcanada.com X-SID-PRA: almirall@cgdmcanada.com X-AUTH-Result: FAIL X-SID-Result: FAIL X-Message-Status: n:n X-Message-Delivery: Vj0xLjE7dXM9MDtsPTA7YT0wO0Q9MjtHRD0yO1NDTD00 X-Message-Info: 11chDOWqoTky60iQsYaQEbDMsbZfaHn4uXeEdYJ+hJPs/IZZs8+jCAsGYVfWXZjOH0CIVQtMZgN6eci97N8hFZVMIRvFnbKffwelTwXTo1W1G4O4NpDJy0u1RYUR3/Eg8I879+IgZwjq8NUi6hFsCbgaJ4tlHCzI9/qIYnxslvFwe5kU9IzpYCxXwgvPEsGAo4ciKuRN7XjS74cqqwszN1kev1/vz0rc Received: from mx01.dmtel.ca ([64.250.95.18]) by SNT0-MC1-F52.Snt0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4900);         Thu, 14 Nov 2013 09:10:27 -0800 Received: from E1_NT (199.115.92-98.ip.mltn.standardbroadband.ca [199.115.92.98])         by mx01.dmtel.ca (8.14.4/8.14.4) with ESMTP id rAEHAQiA009774         for <EMAIL ADDRESS REMOVED>; Thu, 14 Nov 2013 12:10:26 -0500 Message-Id: <201311141710.rAEHAQiA009774@mx01.dmtel.ca> From: "Almirall Ltd." <almirall@cgdmcanada.com> Subject: Introducing NEW Tudorza Genuair To: EMAIL ADDRESS REMOVED Content-Type: multipart/related; boundary="wBS=_qJqKiL3XVShQgrlM1RROrtguDYnsT" MIME-Version: 1.0 Date: Thu, 14 Nov 2013 12:11:04 -0500 Return-Path: almirall@cgdmcanada.com X-OriginalArrivalTime: 14 Nov 2013 17:10:27.0926 (UTC) FILETIME=[6A6F8F60:01CEE15C]  This is a multi-part message in MIME format  --wBS=_qJqKiL3XVShQgrlM1RROrtguDYnsT Content-Type: multipart/alternative;         boundary="RxbxbbDQL=_vGDBlBk67MreVItV2mLXC41"  --RxbxbbDQL=_vGDBlBk67MreVItV2mLXC41 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline  Introducing NEW Tudorza Genuair  --RxbxbbDQL=_vGDBlBk67MreVItV2mLXC41 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline  <TITLE>New Page 1</TITLE> <META http-equiv=3DContent-Type content=3D"text/html; charset=3Dwindow= s-1252"> <META content=3DFrontPage.Editor.Document name=3DProgId>

<MAP name=3DFPMap0><AREA shape=3DRECT coord= s=3D459,27,799,51 href=3D"http://webprod5.hc-sc.gc.ca/dpd-bdpp/index-e= ng.jsp"></MAP>

This email was sent to&nbsp;you by Almirall Ltd.
= For&nbsp;removal please reply to this email with Unsubscribe in Subjec= t Line.
   --RxbxbbDQL=_vGDBlBk67MreVItV2mLXC41--  --wBS=_qJqKiL3XVShQgrlM1RROrtguDYnsT Content-Type: image/jpeg;         name="syn6692-1.jpg" Content-Transfer-Encoding: base64 Content-Disposition: inline;         filename="syn6692-1.jpg" Content-ID: <015522113@14112013-2880>

This is a  about how to handle email sent from your server being misclassified as spam.  For additional information you may find these similar questions helpful:                    Sometimes I want to send newsletters to my customers. The problem is, that some of the emails get caught as spam messages. Mostly by Outlook at the client (even in my own Outlook 2007).  Now I want to know what should be done to create "good" emails. I know about reverse lookup etc., but (for example), what about a unsubscribe link with an unique ID?  Does that increase a spam rating?


I'm attempting to create a fake shell program in C#, but I need to know how to display two different messages depending on whether or not the user puts 'cd' infront of their "command".  Here's a part of my code:  /* C:\Users dir */ users:  Console.Write("C://Users>"); string userValueFromUsers; userValueFromUsers = Console.ReadLine(); if (userValueFromUsers.Equals("exit")) {     goto end; } else if (userValueFromUsers.Equals("")) {     goto users; } else if (userValueFromUsers.Equals("cd..")) {     goto users; } else if (userValueFromUsers.Equals("cd " + random text)); {     Console.WriteLine("The system cannot find the path specified."); } else if (userValueFromUsers.Equals("cd..")) {     goto c; } else     Console.WriteLine("'" + userValueFromUsers + "' is not recognised as an internal or external command,"); Console.WriteLine("operable program or batch file.\n") goto users;   My problem is at the line that reads "if (userValueFromUsers.Equals("cd " + random text"));", with 'random text' being my current placeholder for 'anything the user says.'  To clarify, c, start, end and users are all just parts of my code, c being the C:\ directory, start being the start and end being how you exit.  Thanks in advance!

I want to check whether Value1 below contains "abc" within the first X characters. How would you check this with an if statement?  var Value1 = "ddabcgghh";  if (Value1.Contains("abc")) {     found = true; }   It could be within the first 3, 4 or 5 characters.


int* i = new int[4]; delete[] i;    While we call delete[], how does the program know "i" is 4 byte-length. Is 4 be stored in somewhere in memory? The implementation of delete[] depend on System or Compilers? Is there some System API to get the length of i?   As HadeS said, which will hold the information how much memory has been allocated? And where? It must be hold in memory, or maybe nearby the pointer i.

Foo* set = new Foo[100]; // ... delete [] set;   You don't pass the array's boundaries to delete[]. But where is that information stored? Is it standardised?


I've recently setup Geoserver with GDAL/ECW support. I can create a store in Geoserver which allows me to reference one .ecw file. I can serve this one file over WMS and it works great.  Now i need to serve all 1700 .ecw files as a single layer. I believe this is a function of the ImageMosaic option. However it only seems to allow me to attach one file.  Is there some preparation I need to do to the 1700 files to be able to use them as an ImageMosaic?

I have ortophotos of an area that I need to serve as a background map for my vectors. I got it as 2500 files (71,5MB each) in raw TIFF format with corresponding TFW word file - 180GB of data. Coordinate system is local and it matches with my vectors (there is no EPSG code for it but I named it as “32805” and put a proper definition).  For desktop use in MapInfo I converted them to ECW (with some tool that comes with MapInfo) and retile as much bigger to have only 71 file because opening 2500 tiff files is overkill. I just merged 49 TIFF’s (7x7) into one ECW - 35000x35000pixels – largest is around 200MB) It works great and its really fast in MapInfo.  Now I am quite confused - HOW to serve them in GeoServer ?  I have publish one TIFF and one ECW for comparison. ECW is much faster in browser preview (I am aware of ECW server licensing issue but that shouldn’t be a problem). I have found a presentation “GeoServer on steroids” and read about ImageMosaic, ImagePyramid, retiling, adding overview etc it was quite informative but still don’t know what to do.   My question is : how should I do it ? Mosaic or Pyramid, and if is one of the answers positive, I need your advice or some hints. I would really like to be ECW because of disk space so there will be no need to keep 180GB of tiff’s on a server.   Data will be served through LAN with maximum 20 users connected at peak hour.SQL server have not so huge amount of data. Sorry if I miss some other info, but I will send it if needed.       Geoserver 2.1.4,  Windows 7 32bit,  2GB System Memory,  (1.7.0_09   (Java HotSpot(TM) Server VM), Native JAI+Native JAI ImageIO = true     Original TIFF gdalinfo D:\75720-47970.tif Driver: GTiff/GeoTIFF Files: D:\75720-47970.tif        D:\75720-47970.tfw Size is 5000, 5000 Coordinate System is `' Origin = (7572000.000000000000000,4797500.000000000000000) Pixel Size = (0.100000000000000,-0.100000000000000) Metadata:   TIFFTAG_SOFTWARE=Adobe Photoshop 7.0   TIFFTAG_DATETIME=2006:10:09 13:02:57   TIFFTAG_XRESOLUTION=72   TIFFTAG_YRESOLUTION=72   TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch) Image Structure Metadata:   INTERLEAVE=PIXEL Corner Coordinates: Upper Left  ( 7572000.000, 4797500.000) Lower Left  ( 7572000.000, 4797000.000) Upper Right ( 7572500.000, 4797500.000) Lower Right ( 7572500.000, 4797000.000) Center      ( 7572250.000, 4797250.000) Band 1 Block=5000x1 Type=Byte, ColorInterp=Red Band 2 Block=5000x1 Type=Byte, ColorInterp=Green Band 3 Block=5000x1 Type=Byte, ColorInterp=Blue -------------  ECW file which is retiled from 7x7  original tiffs  gdalinfo D:\OF-45.ecw Driver: ECW/ERDAS Compressed Wavelets (SDK 3.x) Files: D:\OF-45.ecw Size is 35000, 35000 Coordinate System is: LOCAL_CS["LOCAL - (unsupported)",     UNIT["Meter",1]] Origin = (7571500.000000000000000,4798500.000000000000000) Pixel Size = (0.100000000000000,-0.100000000000000) Corner Coordinates: Upper Left  ( 7571500.000, 4798500.000) Lower Left  ( 7571500.000, 4795000.000) Upper Right ( 7575000.000, 4798500.000) Lower Right ( 7575000.000, 4795000.000) Center      ( 7573250.000, 4796750.000) Band 1 Block=35000x1 Type=Byte, ColorInterp=Red    Overviews: 17500x17500, 8750x8750, 4375x4375, 2187x2187, 1093x1093, 546x546, 273x273, 136x136 Band 2 Block=35000x1 Type=Byte, ColorInterp=Green   Overviews: 17500x17500, 8750x8750, 4375x4375, 2187x2187, 1093x1093, 546x546, 273x273, 136x136 Band 3 Block=35000x1 Type=Byte, ColorInterp=Blue   Overviews: 17500x17500, 8750x8750, 4375x4375, 2187x2187, 1093x1093, 546x546, 273x273, 136x136


I am one of the developers of Kubernetes.  We have an on-call rotation answering questions here, but we get rate-limited in our answers.  How can I, the owner of the product, answer more questions without this silly rule?

I noticed that I can only perform certain actions such as commenting a finite number of times in a given period of time. Obviously, rate limiting is in place to prevent accidental misuse or intentional abuse of certain features.  Where else is rate limiting applied on Stack Exchange sites, and what are the limits?


If those previous versions actually download and install previous Windows 10 builds anyway... What I want to do is upgrade a computer which has build 1511, but I don't want it to be upgraded to 1709 (or Fall Creators update, if you prefer) because that build appears to be riddled with bugs (from my experience, anyway), but 1703 (Creators update) is fine by me, so I want this one. I already found how to get any ISO for any build version, but I would need to boot the computer with this and I can't because I don't have physical access to it (I access it remotely through TeamViewer, that's how we usually manage our users' computers) and that sort of operation is beyond the capabilities of most of our users. I know the media creation tool is capable of upgrading Windows 10 from within Windows itself, so is there a way to obtain a Windows 10 media creation tool that would install 1703 instead of 1709? Currently, the one that's easily found on Microsoft's website will only install 1709 and I don't want it.

I need to repair my Windows 10 installation. Where can I get a clean ISO (with install.wim, no Install.ESD, so that I can run DISM against the WIM) of the specific Windows 10 build required for this?  In my case, I need the Anniversary update (Build 14393), Creators Update (Build 15063) or Fall Creators Update (Build 16299.15).


I just noticed that I've got a mysterious file simply called ~ in the root of my harddrive. I suspect that I've created it by accident while using terminal.  I know about using ~ as an alias to quickly get to the current user and I use it extensively, so there is a reasonable chance that I've been wanting to create a new file and possibly been in the process of writing something in the lines of touch ~/new_filebut changed my mind and accidentally pressed enter after touch ~?  But that does not explain the fact that the file is 3.1MB?  Furthermore, the file appears as a file in Finder, but if I try doing either cat ~ or vim ~on it in terminal I'm told that it is actually a directory. But doing an ls -l suggests something else:  -rw-------    1 root  wheel   3.0M Apr  3 13:37 ~   And have a look at the creation date ...today at 13:37 (ie. ).  I discovered that there are a couple of threads where people experience the same thing and the answer seems to be some application failing to write to the user directory, but the timestamp is what makes me suspicious (tin foil hat?).    Could this be something malicious? Can I log what or who wrote the file somehow? Can I figure out what's inside it? How can I make sure it is safe to delete this file/directory or whatever it is?   Edit: Regarding this question being marked as a duplicate, I explicitly mention that I've read the original thread and none of my four questions above have been answered in that thread, so please read the entire question before flagging.

Last night I discovered what looks like an unusual file named "~" (tilde) in the root of my "Macintosh HD" directory on my MacBook.    Finder reports the file is 2.2MB in size, of kind "TextEdit.app Document", and was created on 22nd January 2014 (so about a month ago).  I haven't noticed any operational issues with OS X or it's applications.   I haven't yet touched the file but would obviously like to remove it.  I am very conscious that '~' is a special alias to the user home directory and thus I would appreciate any recommendations in removing the file in a safe manner that isn't likely to nuke my home directory or screw up the operation of applications or OS X. I don't know whether to delete or rename and whether to use Finder or the command line.   It's entirely possible that I created the file by accident since I've recently been drafting and running various shell scripts that use the ~, user home alias.  MacBook Pro 15" (Retina, Mid 2012) Yosemite


I have two lists :  list1 = ['a', 'b', 'c', 'd', 'e'] list2 = [10, 20, 30, 40, 50]   I want to assign list2 values to list1 variables. Simply put forward I want end result like this :  final_list = ['a' = 10, 'b' = 20, 'c' = 30, 'd' = 40, 'e' = 50]   What is the way to do in python3?

Imagine that you have the following list. keys = ['name', 'age', 'food'] values = ['Monty', 42, 'spam']  What is the simplest way to produce the following dictionary? a_dict = {'name': 'Monty', 'age': 42, 'food': 'spam'}


Ok.  I have a 'Person' class with such properties: PersonId, Name and Age. So far I've added 3 different people and set the DataContext from a List. My validation rules are working ok.  What I want to know is, when I enter the second person's name in the first TextBox I want the second TextBox to show this person Age.  For example, let's say I have this DataContext:   John, 25 years old Paul, 30 years old George, 28 years old   As soon as I type 'Paul', the second TextBox should change it's value to '30'; If I type 'John', the second TextBox should change to '25' and so on.  Thanks in advance, Tiago

How do I use RelativeSource with WPF bindings and what are the different use-cases?


I am doing a kind of "class project" which consists on a Telegram Bot, in this case is a bot that will randomly give me the name of an OverWatch character to play (yes, it already exists but I do not know what else to do).  For now I have a method that when you use the command /start  loads the current roster form a  (that is the part that is giving me the NullPointerException).  Another one that adds any characters beyond this point in time and it puts that new entry into the same .txt file so next time I load the program it is already there.  I have changed some things based on the Internet info about common mistakes with NullPointerException. I changed the loop (while (reader.readLine() != null)) because I found I gives problems but no, it is something else and I cannot find why.   This is my bot class, if I understand correctly if I type /start it gives me the message at the bottom as well as load the heroe list.  private String setResponse(String originalMessage) throws IOException {         //Según el mensaje que recibes del usuario puedes devolver una respuesta u otra       if (originalMessage.equals("/WhatToPlay")) {         return "This is a test";     }      if (originalMessage.startsWith("/addHero")) {          HeroList.addHero(originalMessage.substring(9));         return "The hero has been succesfully added";      }      if (originalMessage.equals("/help")) {          HeroList.helper();      }              //heroList.loadHeroes();  --> If I take this the message bellow shows, if not it just gives me the exception,      return ("Hi there. What would you like me to do? Type /help to get avaliable commands.");  }   And this is all my methods code.      public class HeroList {      public static ArrayList<String> heroes;      public HeroList() {          heroes = new ArrayList<>();     }      public static void loadHeroes() throws IOException {          // A method that reads a file and adds to a list all the current heroes.          BufferedReader heroList = new BufferedReader(new FileReader("/home/INFORMATICA/alu20918309q/Escriptori/heroList.txt"));         String line = null;          while ((line = heroList.readLine()) != null) {               heroes.add(line); // --> here is where the exception points          }             heroList.close();      }     public static void addHero(String heroName) throws IOException {         // Adds any extra heroes.         heroes.add(heroName);          // Adds any new heroes to a preexisting file.          BufferedWriter updateHeroes = new BufferedWriter(new FileWriter("/home/INFORMATICA/alu20918309q/Escriptori/heroList.txt"));         updateHeroes.newLine();         updateHeroes.write(heroName);          updateHeroes.close();      }      public static void helper() {         // Just help messages.         System.out.println("Type /WhatToPlay to get a random hero to play. Let us hope it is someone you know how to use.");         System.out.println("Type /addHero to add a new hero, all heroes up untill Brigitte is added.");     } }   Right now it does not randomize my list of heroes (I will add that as soon as I figure this out), but the idea is that it should load from the file, and also add to the list as well as save into the file those heroes I type, but it gives me the null pointer and of course never adds the new entries.  Keep in mind I am learing, this code will be full of mistakes or dumb code. Thanks for the help.

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?


Looking to upgrade my Acer laptop, and from what I've researched, I can swap out a 1x2GB module with a max of 1x8 GB module of DDR3 running at 16000mhz. I've found a listing on Amazon for the exact some module but the product states it is a Desktop RAM  Is it okay to use Desktop RAM in laptop RAM?  If not, what should I be looking for in terms of RAM for a laptop?

The specifications of my system say it supports 400 MHz and 533 MHz DDR2 unbuffered SDRAM. I have a 1 GB DDR2 PC2-5300 laptop RAM module. Can I use this in my desktop? If not, what exactly is the difference between desktop RAM and laptop RAM?


Let’s say a device’s operating voltage is 5V and maximum current that it can draw is 5A.  Is it possible for a 5V power supply to have very low internal resistance such that a device that operates at 5V turns down its resistance in attempt to draw 5A from the power supply , but instead accidentally draws greater than > 5A due to the power supply having very low internal resistance or being “too powerful” ?  Of course this is assuming that the way a basic electronic device draws current is first, it assumes that it is being supplied the correct voltage, and 2nd, it lowers down its resistance at some constant number base on the current it needs to draw  Is this how regular devices such as servo motors draw current? Or can they actually monitor how much current a power supply can give and lowers its resistance base on that?  I know that it is possible to be at operating voltage and still not supply enough current, but could it be possible to be at operating voltage, and supply too much current for a load?    Wait Unless of course, as long as the voltage across the load is less than or equal to the operating voltage, it can never accidentally draw too much current. ( I think I answered my own question, not sure if this is right )

Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.


When calculating the sample covariance, why do we divide by $n-1$ instead of $n-2$? Don't we lose two degrees of freedom since we need to calculate two sample means? For example, when estimating the variance for a Bayes classifier, we divide by $n-K$ where $K$ is the number of classes since we use $K$ sample means in the calculation.  Could someone please explain this in terms of degrees of freedom?  UPDATE  The other answers on this site don't quite make sense to me. So for clarification, I would like to extend this question such that I believe it is sufficiently different to not be marked as a duplicate.  The definition of degrees of freedom as per my understanding is $df = n-p$, where $p$ is the number of parameters calculated en route to the current calculation. I guess the issue boils down to what a "parameter" is considered to be. Clearly in the case of covariance, the individual sample means are not each treated as a parameter, since $df=n-1$. Which leads me to hypthothesize the crude definition that $df=n-p$, where $p$ is the number of sequentially dependent parameters.  For example, in the case of covariance, both sample means can be calculated independently of each other. But in calculating residual standard error for simple regression, $df=n-2$ since the intercept term can only be calculated knowing the estimated gradient - or it is sequentially dependent on the estimated gradient.  Is this a valid definition? If so, does that mean that:  $f(X,Y)=\sum_{i=0}^n(X_{i}-\overline{X})^2+\sum_{i=0}^n(Y_{i}-\overline{Y})^2$ has $df=n-1$ also?  If not - with reference to both covariance and the above equation - why so?

The denominator of the (unbiased) variance estimator is $n-1$ as there are $n$ observations and only one parameter is being estimated.  $$ \mathbb{V}\left(X\right)=\frac{\sum_{i=1}^{n}\left(X_{i}-\overline{X}\right)^{2}}{n-1} $$  By the same token I wonder why shouldn't the denominator of covariance be $n-2$ when two parameters are being estimated?  $$ \mathbb{Cov}\left(X, Y\right)=\frac{\sum_{i=1}^{n}\left(X_{i}-\overline{X}\right)\left(Y_{i}-\overline{Y}\right)}{n-1} $$


Well, we want to add the description field on the attached media under the post edit page. I have attached an image for reference. Explanation: Under posts, after adding an attachment if we click on the edit button to edit the details of the attached media we didn't find any description fields as we want to show the "Description" and also want to add the same facility to update that "Description" the same way we update captions and alt text and other details. The procedure should be similar and should follow the same behavior as captions and alt text. We don't want to achieve the solution by playing around with the WP-core. So is there any Hook or way [NO WP-CORE] that can help us to achieve the solution for this problem Make sure that I am asking to add a description on a Pop-up page at the time of editing any media attached to the post. Thank you in advance.

I’m trying to add a custom field to image and gallery edit screen.  I’m aware there are similar questions here, although answers either don’t work with the current version or they add field only to upload screen while I need a field to be visible in all edit screens (see below).  For this, I believe, you’ll have to mess with backbone.js as attachment_fields_to_edit only adds to upload screen.  Adding field with attachment_fields_to_edit    ↑ This is upload image screeen. Here Style is added with attachment_fields_to_edit filter, and my_field is added with ACF plugin.   But they are missing in edit screen in the post    ↑ Click edit on the actual post    ↑ No style & my_field fields!  The question  How to add fields to still have them on the edit screen? Ideally answer will include adding fields to gallery edit screen if it’s a similar process  This question is really important for me so I’ll be adding a 100 rep bounty when it’s available.   Thanks!


I don't understand the ouptut of this code. When comparing two strings with same value (not assigned using new keyword), java returns true. But when I do it using new keyword and pass the value in the constructor, it prints false.  But when I use new keyword and instead of passing the value to the constructor I assign it in the next step. This time it returns true. Why?  class CheckStrings{ String s; }   public class EQCheckTest {   public static void main(String[] args) {     String a1 = "pune";     String a2 = "pune";     String a3 = new String("pune");     String a4 = new String();     a4 = "pune";     CheckStrings cs = new CheckStrings();     cs.s = "pune";      System.out.println(a1==a2);      System.out.println(a1==cs.s);     System.out.println(a1==a3);      System.out.println(a1==a4);   } }   OUTPUT:      true     true     false     true   Why a1==a3 false and a1==a4 true?

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I have the following method which serialises an object to a HTML tag. I only want to do this though if the type isn't Anonymous.  private void MergeTypeDataToTag(object typeData) {     if (typeData != null)     {         Type elementType = typeData.GetType();          if (/* elementType != AnonymousType */)         {             _tag.Attributes.Add("class", elementType.Name);             }          // do some more stuff     } }   Can somebody show me how to achieve this?  Thanks

Is there anything to use, to determine if a type is actually a anonymous type? For example an interface, etc?  The goal is to create something like the following...  //defined like... public static T Get<T>(this IAnonymous obj, string prop) {     return (T)obj.GetType().GetProperty(prop).GetValue(obj, null); } //...  //And then used like... var something = new { name = "John", age = 25 }; int age = something.Get<int>("age");   Or is that just the beauty of an anonymous type? Nothing to identify it self because it takes a new shape?  Note - I realize that you can write an extension method for the object class, but that seems like a little overkill, in my opinion.


I added 3/4 cup of oil instead of water to a quick bread mix. Can it be saved?

I screwed up and put 1 1/4 cup veg oil instead of water in my box cake recipe. Is there any way to fix this? Can I add flour or something? Or is it doomed for the trash can?


Our company has several conference room computers running Windows 10 that need the volume set to 25% when a user logs in.  Is there a registry setting to set the system volume at 25% so the sound isn't muted or to loud when a conference takes place?

Some keyboards have volume controls on them that can be pressed anytime to control the master volume.  My keyboard does not have that.  Is there a way that I can create a key macro that will work like the volume controls on those keyboards?  It should always allow me to control the volume, even if I'm playing a game.


Don't you think the explosion of the number of communities is fragmenting the space uselessly? Lately you don't even know if you need to send your question to , , or . Note: I agree with this:  Notably this fragmentation results in the creation of a lot of accounts, which thank god, is just one click away. But you end up with 101 reputation points everywhere. Also I'm not aware if search boxes do cross-community queries(?). Another thing is the more questions that can belong to multiple communities, the more you lose . I am not alone with this concern, and Robert Cartaino gives good hints about why fragmentation looks bad at first, but may have reasons to be accepted, in the article .

I see that Stack Overflow is very Linux specific. Doesn't Unix & Linux and Ask Ubuntu cover much of the same ground? I see that Unix & Linux and Server Fault also cater to many Linux server questions. Similarly, Ask Ubuntu and Super User seems to contain most like questions.


I want to check if the key (variable uuid) exists in a json object (variable response), as far as I know, JsonObject.get("key") should return the value if it exists, or null if it does not. Here is my code: URL url = new URL("The URL to send a request to"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET");                      StringBuilder response = new StringBuilder(); BufferedReader rd = new BufferedReader(new InputStreamReader(connection.getInputStream())); String line;  while ((line = rd.readLine()) != null) {      response.append(line); }                      JsonObject responseJson = new Gson().fromJson(response.toString(), JsonObject.class); JsonObject info = responseJson.get(uuid).getAsJsonObject();  // The code fails here  if (info != null) {  // If the key exists      // long code } else {      // Eclipse is giving me a warning that this here is dead code, I don't know why }  My IDE warns me about everything undes else {} being dead code, too. I don't know why I'm fairly new to Java (about a month). What am I doing wrong here? Edit: full list of my imports import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; import java.util.Collections; import java.util.List;  import com.google.gson.Gson; import com.google.gson.JsonObject;```

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?


1. Once in a while    OR     2. Once in awhile   Which is the correct phrase? I'm thinking it's the first one, but I'm unable to find out for certain.     and  were related but didn't answer the question

Is there a difference between "awhile" and "a while"? If there is, what is it? I've been wondering this for awhile, but now I actually need the answer.


On all SE sites users can post multiple answers to the same question. There is a warning dialog if you do that, reminding you that you can also edit your existing answer.  The only valid reasons for writing multiple answers I can think of are:   They are single-item answers to recommendation questions, which are discouraged anyway It's on meta, and they are about different approaches. Separating them allows the community to properly vote on them.   Invalid uses of that feature that I have encountered are self-deletion and reposting to get rid of downvotes as well as reposting moderator-deleted answers.  If you want to provide two fundamentally different approaches to the same question on the main site, I think a comprehensive answer discussing both is better than separating the answers. If you provide multiple approaches, an important part of the answer should be detailing the advantages and disadvantages of them. This can be done better in a single post than in multiple ones, in my opinion.  Multiple answers also don't play nice with the reputation system, they are often perceived by the community as a cheap reputation-grab. The availability of this feature can mislead users into using it inappropriately, as there are only few cases where it is actually useful.  So, does it make sense to allow multiple answers on the main site, or should this feature be disabled? To be clear, I want to keep it on the meta sites, as it is useful there.

When is it okay to post two answers to one question?


$\lim_{n \rightarrow \infty} (x^n/n!)=0$. prove. x is finite whereas n is infinite. But increasing n means also increasing $x^n$. It is understandable that if n is too large n! will exceed $x^n$. How it can be proved in a mathematically precise way?

Why is     $$\lim_{n \to \infty} \frac{2^n}{n!}=0\text{ ?}$$   Can we generalize it to any exponent $x \in \Bbb R$? This is to say, is     $$\lim_{n \to \infty} \frac{x^n}{n!}=0\text{ ?}$$     This is being repurposed in an effort to cut down on duplicates, see here: Coping with  duplicate questions.  and here: .


Let $n\in \mathbb{N}$. Can someone help me prove this by induction:  $$\sum _{i=0}^{n}{i} =\frac { n\left( n+1 \right)  }{ 2 } .$$

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