How do people find out about new questions?

When I ask a question (usually on Stack Overflow) I often get answers or comments very quickly. How do people know my question has been asked? Along the same lines, if I'm interested in helping to answer a question about a certain topic, how do I hear about new questions on that topic?   Is it possible to subscribe to a tag and be notified when a new question that uses that tag is posted? That would seem like the best solution, but I don't see a way to subscribe to tags.


How do I add an image on my computer to a folder while using terminal?

Hi I'm learning how to use terminal and I've created and image folder through terminal and now I'm wondering how I add an image that I already have saved on my computer by using terminal. I'm wondering if I can add an image to the folder without having to go through finder...


What does "deleted" / "undeleted" mean in a question about DNS on Web Applications? Is this related to a migration rejection?

was migrated to Super User but then it was returned to Web Applications. Then it shows that it was "deleted" by a diamond moderator but later was undeleted by a now-former employee. I assume that the question was migrated for a second time but the migration was rejected because the diamond moderator mentioned that he didn't know why the question history shows that he deleted the question. While the question  on Meta Web Applications there wasn't any explanation of the last "undeletion".  This is the current body of the referred question  When I try to access  with DNS through 1.1.1.1, it doesn't work.  Why? % dig +nocmd +nocomments @one.one.one.one archive.is ;archive.is.                    IN      A archive.is.             49050   IN      A       127.0.0.3 ;; Query time: 139 msec ;; SERVER: 1.1.1.1#53(1.1.1.1) ;; WHEN: Thu Oct  3 17:12:50 2019 ;; MSG SIZE  rcvd: 44  %


Minimum connections needed between stm32 MCU and the st-link programmer?

My MCU is stm32L432kc. I've concluded that we need a minimum of 4 connections: SWCLK, SWIO, vcc and gnd. Can someone from here confirm that?   And another question is I'm confused how to connect the Vdda/Vref+ pin 5 and the NRST pin4. Do I have to connect them? I have the schematic of nucleo board for my MCU attached. Should I just connect them the same way?


Suppose $\{a_k\}$ ,$\{b_k\}$ and $\{\xi_k\}$ are non negative, and for all $k\ge 0$ , we have $$a_{k+1}^2\le(a_k+b_k)^2-\xi_k^2$$   Prove   1.$$\sum_{i=1}^{k}\xi_i^2\le(a_1+\sum_{i=0}^kb_i)^2$$   2. If $\{b_k\}$ also satisfy $\sum_{k=0}^{\infty}b_k^2\lt+\infty $, then $$\lim_{k\to\infty}\frac{1}{k}\sum_{i=1}^k\xi_i^2=0$$   After doing this transformation:$$\xi_k^2\le(a_k+b_k)^2-a_{k+1}^2$$ $\Rightarrow$ $$\sum_{i=1}^{k}\xi_k^2\le(a_1+b_1-a_2)(a_1+b_1+a_2)+(a_2+b_2-a_3)(a_2+b_2+a_3)+\cdots(a_k+b_k-a_{k+1})(a_k+b_k+a_{k+1})$$ then I can't move forward any more.


I've recently started work on my first indoor scene for Blender, and I've been using many Blender Guru tutorials to get the lighting to match the vibe that I'm going for. However, it seems to have these weird "blotches" on them, the likes of which I've never seen while using Blender. I'd love if somebody could help, ty!


Balancing long table inside multicol in LaTeX

I would like to put some longer tabular data inside the multicols environment while maintaining its balancing abilities. I have tried supertabular with the trick to redefine \newpage as columnbreak. This isn't good though, because the columns aren't properly balanced. Finally I ended up using \halign:  \documentclass[11pt, a4paper]{article} \usepackage[margin=3cm]{geometry} \usepackage{supertabular} \usepackage{multicol}  \def\shortlipsum{\par Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque.\par}  \newcounter{entryno} \setcounter{entryno}{1} \def\tabline{Test & \the\value{entryno} & Description\addtocounter{entryno}{1}\\} \def\tablines{\tabline\tabline\tabline\tabline\tabline} \def\mybreak{\hrule width \columnwidth height 0pt \columnbreak}  \begin{document} \begin{multicols}{2} \shortlipsum \medskip  % % This doesn't balance the columns. Whole table ends up in the left column (it fits) % \begingroup\let\newpage\mybreak % \noindent\begin{supertabular*}{\columnwidth}{@{\indent}l l l} % \tablines\tablines\tablines\tablines\tablines\tablines % \end{supertabular*} % \endgroup  \begingroup\let\\\cr \noindent\halign{\indent#\quad&#\quad&#\hfil\cr \tablines\tablines\tablines\tablines\tablines\tablines} \endgroup  \medskip \shortlipsum \end{multicols} \shortlipsum \end{document}     I was wondering if I'm the only one using \halign to achieve this result. On the other hand supertabular leaves me with an undesired almost empty right column. How would you approach this problem?


I am kind of new to Ubuntu. I have an i7-7700 with z270 motherboard and hd630 graphics. I have 2 LG 24mp68vq displays. I have connected one of them with a VGA cable and when I try to connect the second one with HDMI, neither of them shows any picture.


Preparing screenshots for use in a print document

I would like to feature screenshots of websites taken on my phone, tablet and laptop in a print document.  The print document is 300 ppi and the screenshots are 72 ppi. Importing the screenshots directly into the printed document obviously gives poor quality images.  How do I prepare the screenshots for print use and get a professional finish?


Time complexity function in terms of theta notation

sum = 0;  for (i = 0; i < n; i++)    for (j = 1; j < n^3; j = 3*j)                  sum++;   what is the time complexity (in $\Theta$-notation) in terms of $n$?  so far, this is what i've done: The running time is $\Theta(N^4)$  Because the for loop’s condition is depend on $n$ and is incremented by $1$, and  then inside running time is $\mathcal{O}(1)$. i feel i'm wrong here. any help would be appreciated.


Critical Dimension of Bosonic Strings and Regularization of $\sum_{n=1}^\infty n$

If $D$ is critical dimension of Bosonic strings, a particular derivation goes like the following, where we arrive finally at  $$ \frac{D-2}{2}\sum_{n=1}^\infty n + 1 = 0. $$ Now mathematically this is clearly a divergent series, but using zeta function regularization here we are taking  $$ \sum_{n=1}^\infty n = \zeta(-1) = -\frac{1}{12}. $$ And obtain $ D = 26 $ where $\zeta $ is the analytic continuation of the zeta function we know. But it makes no sense in putting $ s = -1 $ in the formulae $$ \zeta(s) = \sum_{n=1}^\infty \frac{1}{n^s}. $$ As the above is only valid for $ Re(s) > 1 $. So what is going on in here? Can anyone give me a reasonable explanation about obtaining $ -1/12 $?


How do I show the hard drive on the desktop

My hard drive used to display on the desktop. It's gone missing, how do I get it back?


I've seen this question asked a few times, but none that relate to my particular scenario. I'm working on a large, complex UI that involves many user types. For this screen, there are 4 types of users:  1) Those wanting to just "view" the details of a Fund.  2) Those wanting to edit only 2-3 fields.  3) Those wanting to edit "sections" (in this case, "Static Data").  4) Those wanting to edit many elements, thus wants to have the entire page be "editable" at once.    The attached is just a rough wireframe, but my feeling is that having an "Edit Profile" (top right), "Edit Static Data" (right, inside the box), and "Edit Inline" function is overkill. Is there a better way to achieve this without adding too much complexity?  My gut tells me I should definitely keep the global "Edit Profile" function, plus either the "Edit Section" OR "Edit Inline"... what are your thoughts?  Most of these pages are very, very long, and they have many fields and sections. The current UI has this entire screen in "edit mode" all the time (they're not all "form fields" either - there are Tables, large text areas, etc...). I find the whole page very distracting, especially for users who are simply "looking" at the data.  Another little wrench in all this: some users can be making changes to the same field/section/page at the same time. So I need to somehow account for that fact - not that we want that element to be "non-editable", but that we'll need to save the most current instances somehow, or indicate that "This is currently being edited by xxx".  Any suggestions or best practices? And what about "Saving"? Where would that fit in the picture when editing an entire page vs a section? Placed at the bottom and lost, or kept with the top icons, as it is currently?


I'm having more difficulty to translate a simple filter builder to my users, with the conditionals:   "and", "or" and "(" , ")"  With based in this, I created this version:     I would like to create anyone that were simpler.  But in this model, I didn't create this conditional:   Process is equal X   AND     (             Status is equal  Canceled         OR             Status is equal Working     )  Could anyone help me?


In my LaTeX report I want to include a dotted signature line and my name below that line. As in the image. Can someone help me with the LaTeX code for that?


According to Karl Popper's theory of demarcation, science should be falsifiable but string theory is yet to be tested experimentally as It will require at least 19 TeV of energy to prove it which is not possible at this moment of time so Is string theory really a science?


DirectorySearcher not searching entire directory

I'm using System.DirectoryServices.DirectorySearcher for traversing Active Directory for users. In most cases, this works fine. The code is pretty much as follows:  Ldapconnection conn = CreateConnection(...); System.DirectoryServices.DirectorySearcher searcher = new System.DirectoryServices.DirectorySearcher(); searcher.SearchScope = System.DirectoryServices.SearchScope.Subtree;  foreach (System.DirectoryServices.SearchResult result in searcher.FindAll()) { }   For some reason, this doesn't always traverse the tree completely. If I specify the searchroot to point at a missing subtree, it does import that subtree.  Am I missing something?


Why is `Hello`, `Thanks` etc. are not allowed?

Every time I open a question, I open the message with "Hello", and end with "Thanks".  Too many times my messages get edited, and these lines are removed.  I've always wanted to know: why these words are not allowed?


Commutators and associators of positive integer exponents

There is a pair $(2, 4)$ for which $2 ^ 4 = 4 ^ 2$. I wonder if there is another such pair $$(n, m): n ^ m = m ^ n$$ It almost obvious that is not. But I failed to prove it.  The question is: does one studied a commutator and associator of ^ operation? Where can I read about it? Is there another such pair? pairs?


I need help with a CONCATENATE formula that has quotes. I need it to add this to the cell.  appcmd set site /site.name:"YOURWEBSITE.COM" /-bindings.[protocol='https',bindingInformation='*:443:XYZXYZ']   However I need XYZXYZ to be the value found in cell A2. How can I do this?


Prevent wireless from turning off when lid goes down

I frequently leave my laptop idle and close the lid when i do so. Problem is that the wireless turns off if i do so and my downloads can't happen.  Is there anyway to prevent that from happening?  I am using 10.04.   P.S. I have already disabled suspend from happening on default


Why is such a huge difference between answering a question and flagging?

I started the question  but I was not satisfied with the result.  BASIC IDEA:    There is a huge number of new questions each day, part of them unclear, off-topic, duplicate or asked without effort of finding the answer.   AS A RESULT   There is a huge number of duplicate answers, or answers to bad questions just to get reputation   Shouldn't some modification be made to encourage flagging and the quality of the site?


Why does “dungeon” mean the places adventurers go to kill stuff?

Why does ‘dungeon’, in the context of roleplaying games and D&D in particular, mean the places adventurers go to kill stuff?  I’m asking because ‘dungeon’ usually means a kind of prison, and I can’t see how it evolved into “hunting ground”, or however it’s used in D&D.


How does a non contact voltage tester work?

How does a non contact voltage tester pen detect voltages and/or currents? Are they limited to voltages of a certain range or type (AC or DC)?  Here's some experiments I have conducted that lead to this question: Using a cheap pen I bought for a couple bucks, I can detect the usual 120V AC in an American outlet, but I also have been able to detect voltage in a USB cable connecting a switching power supply to a smartphone (this setup is usually referred to as charging one's phone). Here, of course, the voltage in question is DC with a negligible ripple. I also noticed that while the detector can detect the 5V of a phone charger cable, it cannot detect the voltage in a USB keyboard cable. The only difference between these two scenarios is the current level and perhaps some minor signaling differences.  A final question: In what voltage/current scenario would you have to use a current clamp sensor and not a non contact voltage detector for merely detecting the presence of power non-intrusively?


How do you do a dry run of rm to see what files will be deleted?

I want to see what files will be deleted when performing an rm in linux.  Most commands seem to have a dry run option to show just such information, but I can't seem to find such an option for rm.  Is this even possible?


First number needs to be rounded to nearest second number. There are many ways of doing this, but whats the best and shortest algorithm? Anyone up for a challenge :-)   1244->1200  1254->1300 123->100 178->200 1576->1600 1449->1400 123456->123500 654321->654300 23->00 83->100


Is there a difference between "disc" and "disk" for naming digital storage media?

I thought that a disc was a disc, and it is sometimes spelled disk. I now have got an indication that those two are not the same thing.  In  on , I wrote floppy disc in the answer.   I got a comment from someone that it should be floppy disk. He stated that      Disk is a magnetic storage media, while disc is an optical one.   Is this correct?


Why isn't there a "comment needs conversion to answer" flag option and diamond moderator option?

Like many SO users, I check the unanswered queue periodically to find ... well, questions that need answers.  However, roughly a tenth of the "unanswered" questions I view aren't unanswered at all: they have an answer, but it's in the comments.  These questions sit perpetually in the unanswered queue because no one wants to answer an already-answered question (and you kinda look like a jerk if you steal the answer someone else posted as a comment and put it in answer form).  Now the real solution here would be to let lower-power users just convert these comments in to  answers.  The unanswered queue would clear so much faster, and there would be rejoicing through the land.  But apparently (judging by related questions) that idea is hated here.  However, a similar compromise was reached in the other direction, with converting answers to comments, by making it a diamond-only activity.  Why not make that an option for these cases?  Then, given that only "diamond" moderators would be able to convert comments, shouldn't there be some way in the site for non-diamond users to do something to get these "already answered unanswered questions" out of the queue?  If you magically know (or came here and read that) diamond mods can do the conversion, then you might flag the question and put a custom message in requesting a conversion.  But if you don't know that you're out of luck.  So what I'm thinking is, why not add another "flagging option":   it needs ♦ moderator attention   very low quality answered in comments other  it doesn't belong here, or it is a duplicate it is spam it is not welcome in our community   This way any user could solve the "answered unanswered question" problem, or at least contribute to the solution, and the site would naturally guide them towards that (when appropriate).  Alternatively, converting comments to answers could be handled more flagging to close.  In other words, leave diamond users out of the process entirely, just add the new flagging option, and then if X people flag a comment as an answer it gets converted?


Package Dependencies cannot be resolved!! Please Help!

When I try to download something, in this case it was Wine, from the Ubuntu Software Center, I get this...  wine1.4: PreDepends: dpkg (>= 1.15.7.2~) but 1.16.1.2ubuntu7.1 will be installed          Depends: libc6 (>= 2.14) but 2.15-0ubuntu10.3 will be installed          Depends: wine1.4-amd64 (= 1.4-0ubuntu4) but 1.4-0ubuntu4 will be installed          Depends: wine1.4-i386 (= 1.4-0ubuntu4) but is a virtual package   I'm a recent Ubuntu user so, i don't get any of this x:


A question about Latent Dirichlet Allocation model

when I used LDA model in my project, the result topic terms vary with the random seed. how to solve this problem ? thanks


Will I get bonus reputation when downvotes or other actions cause reputation to fall below 1, and then reversed?

I know that reputation never turns zero or negative, i.e. below +1.  Think about this situation: When I got 4 reputation, then got downvoted and -10 reputation, and later the downvotes are reversed. How my new reputation be calculated?    4 - 3 + 4 = 4 (hit floor, reversed with 0 bonus) 4 - 3 + 10 = 11 (hit floor, reversed with 7 bonus)


Can we please relax the unhelpful "quality standards" test?

I just spent ten minutes adjusting  trying to discover why it was triggering "This question does not meet our quality standards."  It turned out to be the title, which I had to make longer first and then edit back to what I wanted.  I've come across this a lot lately. The "fixes" turned out to be silly things such as making the question longer.   There error message gave me no hint as to what to fix. The title is fine. It doesn't need fixing. The quality checker is too strict. If I can get around it by making silly "fixes", there is no point.   Let's remove this until it works. At a minimum the error message should describe the problem.  (I know some people here wouldn't classify this as a "bug" but there is no "utterly broken" tag.)  Here is a constructive idea: dubious questions should be put to humans to approve, much as edits are for new users.


Suppose that a sequence $a_n$ of positive numbers converges to $a$. Show that $$\lim_{n\rightarrow \infty}\left(\prod_{i=1}^{n}a_i\right)^{1/n}=a$$ This seems to be simple using that $x=e^{\log x}$, but I can't go any further after using that.   PS. I'm almost sure that this post is a duplicate, but I wasn't able to find it here. I'm sorry if that's the case.


Python: How to read stdout of subprocess in a nonblocking way

I am trying to make a simple python script that starts a subprocess and monitors its standard output. Here is a snippet from the code:  process = subprocess.Popen([path_to_exe, os.path.join(temp_dir,temp_file)], stdout=subprocess.PIPE) while True:        output=process.stdout.readline()     print "test"   The problem is that the script hangs on output=process.stdout.readline() and that the line print "test" only executes after the subprocess is terminated.  Is there a way to read standard output and print it without having to wait for the subprocess to terminate?  The subprocess which I am starting is a Windows binary for which I do not have the source code.  I have found several similar questions, but the answers are only applicable on Linux or in case I have the source of the suprocess I am starting.


I have an issue with my code where if I press q or Q, the program doesn't terminate. The code I put for quitting is near the bottom. Could you please tell me how to fix it? Thank you  Here is my code:  import java.util.*;  public class Stuff     {         static // Hash Map Function         Map<String, String> myMap = new LinkedHashMap<String, String>();  public Stuff()     {         //Functions to split out the code.         fillMapInformation();         drawMap();     }  private void fillMapInformation()     {            // -A0 and -A1 put an indent so to not clash with the numbers indicating the rows.         // myMap is used to draw the table, not using the 2D array.                 // row , column         myMap.put("-A0", " ");         myMap.put("A0", " A");         myMap.put("B0", "B");         myMap.put("C0", "C");         myMap.put("D0", "D");         myMap.put("-A1", "1:");         myMap.put("A1", "-");         myMap.put("B1", "-");         myMap.put("C1", "-");         myMap.put("D1", "-");         myMap.put("-A2", "2:");         myMap.put("A2", "-");         myMap.put("B2", "-");         myMap.put("C2", "-");         myMap.put("D2", "-");         myMap.put("-A3", "3:");         myMap.put("A3", "-");         myMap.put("B3", "-");         myMap.put("C3", "-");         myMap.put("D3", "-");     }  private static void drawMap()     {         for (Map.Entry<String, String> entry : myMap.entrySet())              {                 String key = entry.getKey();    // Function to see what is entered into the myMap row.                 String value = entry.getValue();    // Function to see what is entered into the myMap column.                  if(key.contains("-"))                     {                         TextIO.putln(" ");                     }                 TextIO.put(value + "\t");             }     }  public static void main(String[] args)      {                Stuff stuff = new Stuff();         int userMoves = 1;         boolean quitGame = false;         boolean validMove = false;          TextIO.putln(" ");         // intstructions         TextIO.putln("nmjhju ");                      TextIO.putln(" ");         TextIO.putln("Where do you want to place your knight? ");         String Knight = TextIO.getlnString();         Knight = Knight.toUpperCase();          String KnightMoves = Integer.toString(userMoves);         myMap.put(Knight, KnightMoves);          userMoves ++;            do              {                 drawMap();                 TextIO.putln(" ");                 TextIO.putln("Where do you want to put your next move? Or press 'q' to quit.");                  Knight = TextIO.getlnString();                 Knight = Knight.toUpperCase();                  KnightMoves = Integer.toString(userMoves);                  if (myMap.get(Knight) != "-")                 {                     TextIO.putln("Invalid move!");                 }                 else                 {                     validMove = true;                 }                  if (validMove == true)                 {                     myMap.put(Knight, KnightMoves);                     userMoves ++;                        if (Knight == "Q")                     {                         quitGame = true;                     }                     validMove = false;                  }              }         // Problem, Knight is not recognising Q so it is not quitting, but userMoves != 13 is working.         while (quitGame == false && userMoves != 13);          drawMap();         TextIO.putln("Game over!");          if (userMoves == 13)         {             TextIO.putln("Congratulations you have completed the game!");         }     }   }


On several occations I have read instructions like "run Latex on your file, then run Bibtex, and afterwards run Latex again..." . I am using TeXstudio as editor and when compiling any tex-code I simply press the compile-button. What happens behind this did not matter to me as the pdf I wanted was created anyway. Now that I am using .bib files for referencing, I am having a problem where the solution to this was the same as above. But how do I do it? I only know the compile-button. How can I run Latex individually from Bibtex and Bibtex individually from Latex? And which of both is running when simply pressing "compile"?


So I'm an aspiring author and I can't wrap my head around how to write multiple peoples names in one sentence but I wrote it as... "...while I went over Kyle, Jenny, and Marcos’s homework they were supposed to do yesterday." Like did I write it out correctly? I am genuinely confused.


Zombie account was somehow created, and I am unable to submit a merge form (profiles already linked)

Update 1: scifi mod tells me a CM contacted me this morning, I haven't received any e-mail (I checked the spam too). Not sure if it's related. Update 2: got a reply for the latest form submitted from here, it's currently being looked into by the developer team.  Not-dupe to : I filled the merge-request form but it said they are already merged, form cannot be sent. (Drop down view.) URL's of accounts in questions: A)  B)  (now shows same user name as A, but different URL, earlier it had my G+ pic and name!) (View from B.) I have no idea how B) was created, I filled the merge-request form but it said they are already merged. Issues being faced:  Reputation changes for A don't show in the notification I can't change profile settings for A (check below screen) I have no access to settings of B, so I can't submit delete request I can't access scifi-meta from A (needs logging-in despite being logged-in) No association bonus for A/B  (Point 2. above, I tried the password reset, no effect. Right now I have only one log-in method.) Earlier: account B had a hash-code kind of name, then it changed to my G+ name and picture, I was able to change that from my main parent account by saving settings to all. I hope that makes sense. Thanks a lot. P.S. During scifi account creation, an error message appeared that said SE was notified of the error.


A previous IT worker probably left some backdoors. How can I eliminate them?

I started working for a company that fired a previous IT worker for leaking data.  I can only say the following things:  We use a Firebird DB with an application written by another company, Proxmox, for virtualization of Windows Server 2008 R2, SQL Server, cloud core Mikrotik router, and a few other Mikrotik devices.  I am not 100% sure, but is there some quick way to check if there are some backdoors left, without interrupting internal processes and reformatting everything?  This previous guy was really good, having written software in C++ and C#. I also know that he did some assembler and cracked a few programs in ollydbg.


Sideways figure and caption to fit textwidth and no page break

I'm struggling with placing some plots in latex. I'm trying to include the plots (sideways, but not the heading) in an appendix, so the first plot needs to be placed at the same page as the appendix heading.  Also the plots, including the caption need to be placed inside the top/bottom/left/right margins.  When using sidewaysfigure  i get (1) a pagebreak, such that the heading and plot are placed at two different pages and (2) when the caption is long, it gets outside the margins.   Is there any way I can prevent the pagebreak? and how to prevent the plot and caption to break the margins? (is there any way to measure the total height of plot and caption, and scale the plot (graphic) so that it has width=textheight (inside margins?), and height=textwidth(inside margins?)-"captionheight"....  my preamble   \documentclass[pdftex,10pt,b5paper,twoside]{report} \usepackage[lmargin=25mm,rmargin=25mm,tmargin=27mm,bmargin=30mm]{geometry}   and  \begin{sidewaysfigure} \captionsetup{width=0.75\textwidth} \begin{center} \includegraphics[keepaspectratio=true, width=\textwidth]{./Figur/fundvar.png} \caption[Commercial crude oil inventories, SPX excess returns, S\&P GCSI excess return time series]{Commercial crude oil inventories calculated as the logarithm of the current value divided by the mean of same weekly values over the past 5 years, Log excess returns on the S\&P Goldman Sachs Commodity Index,  Log excess returns on the S\&P 500 index.} \label{fig:fundvar} \end{center} \end{sidewaysfigure}


How to Improve the accuracy of my Cancer Prediction Model?

I'm building a logistic regression model to predict if a patient has cancer based on 9 features. Having built learning curves and increasing my regularization parameter to reduce over fitting, which caused my accuracy to increase from 82% to 86%, I'm stuck on options of how to improve it further.  I'm using a training set of 69 samples, a validation set of 24 samples and a test set of 24 samples. (60%,20%,20% split) (I'm doing this on octave)  When I drew my initial learning curve, I saw that the validation error is actually lower than the training error. Then according to  , as the issue lies in overfitting, I increased the regularization parameter (lambda), which caused the learning curve to show characteristics of high bias, and the accuracy on the Test Set increased to 86%.   Learning curve code which causes validation error to be less than training error;  %costlogreg is a function to calculate logistic regression cost %linearRegcost is a function to calculate the training cost and validation cost %sigmoid2 is just a simple logistic function %listJ is a matrix of zeros  listJ = zeros(69,3);  for i = 1:69  initial_theta = zeros(size(Xadjust,2) + 1,1); %Xtrain, Ytrain is the training set Xtrain = Xadjust([1:i],:); Ytrain = Y([1:i],:);  %function handle for costlogreg costfunction = @(t)costlogreg(t,Xtrain,Ytrain,lambda);  %obtains theta depending on training set options = optimset('Gradobj','on','MaxIter',50); [theta] = fmincg(costfunction, initial_theta,options);  %calculates the cost on the training set and adds it to a list [Jtrain,~] = linearRegCost(theta,Xtrain,Ytrain); listJ(i,1) = i; listJ(i,2) = Jtrain;  %obtains Jcv using earlier found theta [Jval,~] = linearRegCost(theta,Xval,Yval); listJ(i,3) = Jval;  end   Code to choose the best lambda value which gives higher accuracy on test set  %lambda set is a set of regularization parameters to test %listlambda is a matrix of zeros to collect the accuracy on test set for each lambda used listlambda = zeros(size(lambdaset,2),4);  for i = 1:size(lambdaset,2)  initial_theta = zeros(size(Xadjust,2) + 1,1); costfunction = @(t)costlogreg(t,Xtrain,Ytrain,lambdaset(1,i)); options = optimset('Gradobj','on','MaxIter',50); [theta] = fmincg(costfunction, initial_theta,options); [Jtrain,~] = linearRegCost(theta,Xtrain,Ytrain); listlambda(i,1) = lambdaset(1,i); listlambda(i,2) = Jtrain; [Jval,~] = linearRegCost(theta,Xval,Yval); listlambda(i,3) = Jval; [h] = sigmoid2(Xtest,theta); list = zeros(size(h,1),1); idx = find(h >= 0.5); list(idx) = 1; accuracy = mean(double(list == Ytest)); listlambda(i,4) = accuracy; endfor  %figures the row with the highest accuracy on the test set [~,maxidx] = (max(listlambda(:,4))); bestlambda = listlambda(maxidx,1);


Anchor tag inside  or  inside anchor tag: which is better?

I am trying to use
 tags on my blog for the post title and came across one problem. Title is hyperlinked.  Case 1:
  xyz
   case 2:
 xyz
     Which one is better in terms of SEO?


*Well I have created a basic servlet program Where if user give their USN number correct it will fetch data from database else it will redirect to error.html Whenever I Enter USN number it shows NullPointerException .Since I am using Eclipse There was No sign of error. Note:I have Also Created a html file to enter the USN Number.  Code:  package com.abc.error; import java.io.IOException; import java.io.PrintWriter; import java.sql.*; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class GetResult extends HttpServlet {  /**  *   */  static final long serialVersionUID = 1L;  Connection con= null;  PreparedStatement pstmt=null;  ResultSet res=null;  public void init(){         try {             Class.forName("oracle.jdbc.OracleDriver");             con = DriverManager.getConnection("jdbc:oracle:thin:@//localhost:1521/XE","system","system");         } catch (ClassNotFoundException | SQLException e) {             e.printStackTrace();         }     }  @Override public void service(HttpServletRequest request, HttpServletResponse response) {     try     {            pstmt = con.prepareStatement("SELECT * FROM VTURESULT_AUG WHERE USN =?");         String key = request.getParameter("USN");         if(key.length()!=12){             response.sendRedirect("/ServletWithError/error.html");         }         else         {             pstmt.setString(1,key);             res =pstmt.executeQuery();             if(res.next())             {                 String usn = res.getString(1);                 String name = res.getString(2);                 int m1 = res.getInt(3);                 int m2 = res.getInt(4);                 int m3 = res.getInt(5);                 PrintWriter pw =response.getWriter();                 pw.println(usn+" "+name+" "+m1+" "+m2+" "+m3);             }         }     }     catch(SQLException | IOException e)     {         e.printStackTrace();     }   } }   Output:  java.lang.NullPointerException com.abc.error.GetResult.service(GetResult.java:36) javax.servlet.http.HttpServlet.service(HttpServlet.java:741) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)


how to start iPhone charging from sleeping MacBook

When I connect my iPhone 7 (iOS 12.4.1) to my MacBook Pro (Retina, 15-inch, Mid 2015) (macOS Mojave 10.14.6),   it seems like the iPhone doesn't start charging until after   the MacBook is unlocked (by waking it and inputting the password) the iPhone is unlocked (passcode/touchID entered).     Imagine my MacBook is lying, lid-closed, on the desk.  If I connect my iPhone to it via the USB cable, I want it to start charging.  I don't want to have to do anything else.  How can I configure my devices so that this is possible?


How to move hibernarnation file, separating it from swap partition/file?

My question is related to a problem that occurs with SSD drives: it's commonly known that these drives wear out quickly; they have a limited amount of write cycles. So writing a few Gigabytes large file to it every time the system is hibernating is not what I want.   A question that arises is - is it possible to force the system to write that file to a different drive?  For those in doubt I would like to know how to achieve this without moving the swap data to a different partition. I want the swap data to stay on SSD to benefit from the higher performance during runtime and move/set the hibernation data/file only to HDD to avoid writing to SSD when hibernating.


If we imagine a device like one shown on the picture above, why can't we say that it would work? Here is a cylinder somehow placed in the fluid by one of his sides (one in the box). Due to additional buoyant force on the right, we should have it rotating counterclockwise, but this doesn't happen. Why? Could you explain.


How do you pluralize a last name ending in y?

My last name is Mayberry and for years I have spelled it "Mayberries"on our Christmas cards because I like it that way. I realize that the normal rule of pluralizing nouns doesn't apply to proper names. I just figured since it was my last name then I should get to decide how I sign it or pluralize it. This wasn't an issue until a sister in law of mine decided to point out this year that I was spelling it wrong. So I took to the internet to see what it had to say. I found this  about the same thing but its a few years old.  Any thoughts on whether or not I should stop using it the way I like and go with the "correct" way of Mayberrys?


Shouldn't the OP of a question or answer be able to see the vote counts for it?

The OP of a post should be able to see the +1's and -1's of the post so that they can see if it is an overall accepted or 'hated' post, and what to do to fix it, even if they don't have 1000+ reputation.


I saw that the lower right bar shows the distance but in what direction do you walk?


Recently we had a baby and planning to buy a home. Is now a good time to buy a home? In my area houses are around 650K. I have the following questions.   Is it good time to buy a home? Interest rate mortgage companies are charging @ 5-5.25%. Is it high? Is it really worth it or stay in a rented home? Mortgage company asking us to put 72K down payment but we have only 20K. What should I do now?


How to book this complex multi carrier roundtrip flight I found on ITA?

I am trying to book a roundtrip ticket from Chicago O'hare (ORD) to Mumbai, India (BOM). Traveling on Aug 9th and returning on Aug 24th. Now, I've been looking for several days (almost 10days!) for ways to book this itinerary I found on ITA. All other websites like Expedia, Kayak, Travelocity, Momondo, RouteHappy, and even google flights are quoting around $1200 roundtrip cost, sometimes as low as $1150. But the ITA Matrix website shows me several options, the lowest is $916 roundtrip.      You can see there are several flights in the $900 range.     For the return trip there is only one option to get the low price.  Selecting the flights this is what I get:      I'm not sure how to use the fare codes the ITA website provides to purchase this itinerary.  These are some of the things I have tried to book the complex multi-carrier flight from ITA:  My first method was to try coding into HIPMUNK, using the multi-city option, my departure, connections, airlines flights number and dates. Following this method:     And the results page:    Here's what my code into HIPMUNK looks like:  ORD::LH9151 FRA LH756 for the first journey and   BOM::LX155 ZRH SN5104 BRU SN8803 for the return trip.  Don't think I'm making any mistakes in coding it, but there are two adjustments I also made which failed:   I used the dates of the first leg of the flight then tried using the other dates as well. So for example Aug 9th and Aug 10th. I used the codes for the operating carriers and when it didn't work, the marketing carrier leaving the flight number unchanged.   This always returned no results. Breaking up the itinerary to just the oneway from ORD to BOM worked but gave me a price of $624. For some reason the second return trip was creating problems. I tried breaking he return trip down into different segments but no luck. Anyone knows why the return trip is creating difficulties? Coding issues/ hipmunk doesn't have such a large database?   Then I tried method 2: Calling up the airlines  United was able to find all the segments, even price it correctly sometimes (sometimes not) and gave me a confirmation number. I was to call them in 12hrs to check if they were able to procure the seats but when I did call they were not able to get the seats for the SWISS flight from BOM to ZRH and/or from ZRH to BRU. I've tried this at least 5 times changing small things everytime, but the same result. It seems Lufthansa waits for SWISS to confirm the seats but SWISS doesn't respond in time and I'm not able to book.  I tried calling Lufthansa but they were not even able to find the segments and instead told me to look at booking online where I will be able to find it cheaper.  Any insights into the methods that failed or suggestions on how to book this itinerary at the $900 price will be much appreciated. Thanks in advance.


I try to solve the following sum:  $$\sum_{k=1}^{\infty}\sum_{n=1}^{\infty} \frac{1}{k^2n+2nk+n^2k}$$  I'm very curious about the possible approaching ways that lead us to solve it. I'm not experienced with these sums, and any hint, suggestion is very welcome. Thanks.


I've just looked at  with the StackExchange Android App. It looks like this:    When you look at "Original Solution", you can see a code block that has a very long line. Currently, there is no possibility to read this line. When I click on this block, it pops up, but I still can't read the whole line.  I think there should be horizontal scroll bars when the content can't be displayed. Or at least I should be able to "drag" the text so that I can read the rest.


I am trying to make my images to shuffle using the following code using jQuery, but I got stuck. const $images = [     { name: "dinosaurs", image: "../Images/dinosaurs.jpg"},     { name: "friends", image: "../Images/Friends.jpg" },     { name: "badguys", image: "../Images/bad_pack.jpg"} ];   const $random = () => {     for(let character of $images) {         console.log(character);         const $square = $("#draw-square");         $square.css("background", $images[Math.floor(Math.random() * 3)].image              )} }  Any suggestions, thanks


Can I declare a capital loss on a vehicle sale?

If I sell a car or boat at a profit, I assume I have to pay a capital gains tax.  Does it work in reverse as well? Can I declare a capital loss if lose money on the sale of a car or boat?


I've had this problem since my last build. I've got all new parts aside from my psu. I thought it was my gpu that was causing the issue but I swapped to an AMD temporarily and it still happens. My background will go black and I can get it back by restarting Windows Explorer, but that's a hassle for as often as it happens. It used to freeze in my old build but I haven't seen that happen yet, with this new GPU. Any ideas?


Evaluating, $\int_0^{\infty} \frac{x\sin(x)}{x^2 + 1}dx$

Evaluate,   $\int_0^{\infty} \frac{x\sin(x)}{x^2 + 1}dx$  using methods from complex analysis.   Is there a theorem related to this problem that someone can suggest and/or give a hint that would be helpful in evaluating this integral?


What is the keyboard shortcut for minimizing a normal window?


How do I change the default logon screen in 12.04

I'm wondering how I would go about changing the default logon screen (just the background) in Ubuntu 12.04. I can't seem to figure it out.


I am trying to prove: $A \subseteq B \implies B^\circ \subseteq A^\circ$   where $A^\circ$ is polar cone of $A$ ($A$ convex cone) and  $B^\circ$ is polar cone of $B$ ($B$ convex cone)


Main page of StackOverflow на Русском Meta gives error

The data for the tag search is still loading; please retry in a moment.


Understanding 74LVC245 datasheet and current source/sink

I'm using a SN74LVC245A () to shift 5V TTL down to 3.3V so I can read the signals with a Raspberry Pi.  However I am getting really weird results (a 60Hz input signal is picked up by the Pi at anything between 110Hz and 320Hz) and I'm really confused about how to read the datasheet to figure out whether I need pullup or pulldown resistors.  The datasheet says on page 4 the "high-level output current" is -24mA, and the "low-level output current" is 24mA.  So to me this means that when the device is outputting a high signal, it is able to sink 24mA of current (since outputting a negative amount of current suggests the current is going into the device instead.)  But then if you're outputting a positive voltage, isn't that sourcing current?  Why is the figure listed as a negative value?  Is anyone able to explain what these figures actually mean?  When I disconnect the 74LVC245 output from my GPIO pin, I still get weird signals from the floating input pin so I am assuming this means the 74LVC245 output is also floating in one state, but I don't know in which state it is (i.e. is it left floating on a high output signal or a low one?)  It doesn't really make sense to be floating on a high output signal since it's a level converter and the whole point is to maintain the correct 'high' voltage, so do I need pulldown resistors to handle the low output?  If so, why does the datasheet seem to suggest the chip can both source and sink current?  (In my mind, source current means the device can output a current with a positive voltage, while sinking current means the device takes in anything and connects it to GND, so perhaps that is where I am going wrong.)  Anyway I'm quite confused so any clarification would be much appreciated!


Creating 3D interactive model from lidar data using ArcGIS for Desktop?

I have a couple of las files for a city and I need to make a 3D model of the buildings, which should display info about the building when clicked on. I am pretty new to ArcGIS so I don't have the best idea to go about this. I have already downloaded LAStools and can use it to view the lidar data.   I have a point cloud set up but I am not sure how to make the model from this point. Would I need different software? (Sketchup, Meshlab, etc..)


do .. while java code wont work correctly

**Hey  I'm beginning to learn java ,  I wrote this code & when I write admin it keeps looping !  . . .**  import java.util.Scanner;  public class Don1 {      public static void main(String[] args) {          String in_user, in_pass;          do {              Scanner user = new Scanner(System.in);             System.out.println(" Please Login :\n Username :");             in_user = user.nextLine();              /*              * Scanner pass = new Scanner(System.in); System.out.println(              * " Please Login :\n Password :"); in_pass = pass.nextLine();              */         }          while (in_user != "admin");          System.out.println("1- Student Operation\n 2- Staff Operations \n 3- Admin Operations");         System.out.println(in_user);     }  }   and here is the console process :    Please Login :  Username : w  Please Login :  Username : admin  Please Login :  Username :    Don't know where is the error :(


There is a yellow tooltip stuck and it floats above all other windows. I do not know from what program it came.  How can I get rid of it without restarting my computer?  EDIT:


IDE compiler does not find dll in "obj" folder

I am getting the error "<somepath>\obj\x86\Debug\ucBrowser.dll" or one of its dependencies can't be found.  I have not fully investigated what the real problem is, but I really wonder why the IDE would try to find something in the "\obj\x86..." folder.  I would like to have everything placed in one folder, not something in "\obj\", something in "\obj\x86", something in "\bin\x86\Debug". etc-  Can I get this straight?


how to find User Input if exist in text (insensitive case) without using regular expression in python

I have a Python code that read text files and allow the user to enter a searched word where the system do the matching task.  what i want is to be able to find the entered word if exist in the text no matter how its written (upper, lower, capitalized), without using Regular expression.  i know that the code i wrote is not correct because the output is the hall text splited in a list.  where the result must be:    self.varStr  =  user-input  repeated as many as it exist in the text in any mentioned case.  example :   user-input = charl existing word: Charles,Charles   so what i did is :  textString contains the hall text.  Les hiboux  Charles Baudelaire   Cycle 3  *   POESIE   Sous les ifs noirs qui les abritent  Les hiboux se tiennent rangés  Ainsi que des dieux étrangers  Dardant leur œil rouge. Ils méditent.   Sans remuer ils se tiendront  Jusqu'à l'heure mélancolique  Où, poussant le soleil oblique,  Les ténèbres s'établiront.   Leur attitude au sage enseigne  Qu'il faut en ce monde qu'il craigne  Le tumulte et le mouvement ;   L'homme ivre d'une ombre qui passe  Porte toujours le châtiment  D'avoir voulu changer de place.    Les Fleurs du Mal  1857   Charles Pierre Baudelaire (1821 – 1867) est un poète français.  code:     x=self.lineEditSearch.text()             print(x)             textString=self.ReadingFileContent(Item)              #self.varStr =[c for c in textString if c.islower() or c.isupper() or c.capitalize()]                         self.varStr =[x for x in textString.split(" ") if x.islower() or x.isupper() or x.capitalize()]                          print(self.varStr)


I have $2$ similar questions :    Is  the following set $K$ a field:  $$K=\underset{i=even}{\bigcup} \mathbb{F}_{2^{i}}$$ where $\mathbb{F}_{2^{i}}$  values are all finite fields?   Is so, what is the characteristic of this field?   Is $K \cup \mathbb{F}_{2^{3}}$ a field?    My answer is: yes both $1$ and $2$ are infinite fields by subfield criterion of finite fields, but I am not sure!  And what about the characteristic? Is it $2,$ which is the base prime, or is it $0,$ since it is infinite?


Synchronising tracking data back to Salesforce from Marketing Cloud

The official documentation from Salesforce is to use Salesforce Data Extensions if you want to push tracking information from Marketing Cloud to Salesforce ().  This is what we've done but I've noticed that after creating data extensions in the data extensions folder, emails sent are still being tracked and tracking is still being sent to Salesforce.   My question is can I create data extensions anywhere and tracking will always be sent to sales cloud? what do i need to look out for to insure that tracking is being sent?


Q: Is the italicised verb form correct in this sentence?      Jane's pale face suggested she could be ill: her parents suggested   that she have a medical examination.      A: The sentence is grammatically correct. The subjunctive remains in   force even though it is likely the patient will follow the doctor's   advice. To actualize the blood test with "has" would be telling an   untruth. The subjunctive holds the notion of a suggestion in place.   Thus does grammar make its own modest contribution to truthful   speaking.   I don't see how this sentence can be grammatical. Please could you offer any comments.


PHP: I can't update my database through $_POST with a $var inside

I've been attempting to create a shop page where each item has a picture to it. Everything works well except when I upload an image, some of the information I want uploaded into my database will not actually be uploaded, I'm sure I've gotten something wrong for being new to this, after some research, trial and error I figure I should just ask!  In this line:  $qry = "INSERT INTO table_img (itemID, ext) VALUES  ('$_POST[$id]','$_POST[$fileActualExt]')";   The values of $id and $fileActualExt will not be updated in the database. I can't for the life of me figure out why, but I need these two in order to properly display any image I upload. Thanks in advance!  <?php  //This is from another table, used to link the two IDs together so the picture //and item will always be using the same ID. Right now I rely on auto_increment //due to my updating my table not working. $id = $row['item_ID'];   if (isset($_POST['submit'])) {     $file = $_FILES['file'];      $fileName = $file['name'];     $fileTmpName = $file['tmp_name'];     $fileSize = $file['size'];     $fileError = $file['error'];     $fileType = $file['type'];      $fileExt = explode('.', $fileName);     $fileActualExt = strtolower(end($fileExt));      $allowed = array('jpg', 'jpeg', 'png');      if (in_array($fileActualExt, $allowed)) {         if ($fileError === 0) {              if ($fileSize < 10000000) {                 echo "File successfully uploaded";                  $fileNameNew = "img".$id.".".$fileActualExt;                 $fileDestination = 'uploads/'.$fileNameNew;                  move_uploaded_file($fileTmpName, $fileDestination);                   $qry = "INSERT INTO table_img (itemID, ext) VALUES ('$_POST[$id]','$_POST[$fileActualExt]')";                  mysql_query($qry);                  echo "     $id, abc $fileActualExt";                } else {                 echo "Your file is too big.";             }          } else {             echo "There was an error uploading your file.";         }      } else {         echo "You cannot upload files of this type. Please use JPG, JPEG or PNG.";     } }?>


Where to buy cheap gadgets in Singapore?

In my next trip I have a long layover at Singapore. I'd like to make the most of my time there visiting cheap electronic gadgets shops (mainly chinese products). I've read that there is a building called Sim Lim Square where you can find electronic items, but everything I've read about it's refered to international trademarks (Nikon, Lenovo, Apple...) and (worst) the prices are equal than in Europe. To clarify, I'm looking for items like the ones you can find in webs like  or  when you search in the "electronics" tab.


Broken blog link on pages with lists of moderators

The page  has a link like this:  which doesn't seem to exist anymore. This is the same on  And also on


How to turn off data after a certain amount  Aim: To make my data turn off after it reaches a predefined amount of data to use. For example, I am using my portable hotspot to my computer with my phone. After the data used on my phone goes over 100 Mbs of used data the phones then turns the data switch off.   Problems: Since my phone is android gingerbread (2.3.6) I don't have the built in data counter that is available in the newer versions of android.  Is this possible with tasker or a play store app?  Any help would be appreciated     To anyone wanting an a step-by-step Instructions just leave a comment and I will post a link to a word document, pdf and a txt file (I would have to write them up first)


The question:   Let $a,b \in  \mathbb{Z}$ with $a$ and $b$ not both zero, and let $d = (a,b)$. Prove that $d$ is the least positive integer linear combination of $a$ and $b$; ie ,for all $c \in  \mathbb{Z}^{+}$, if $c$ is an integer linear combination of a $a$ and $b$, then $d \leq c$  I tried finding similar examples of this proof on stack exchange and google but found nothing.


I'm not sure why this code isn't compiling, it requires a non-static variable

class TheAnimal {      public class Animal {         void bark(){             System.out.println("Woof-Woof");         }      }      public static void main(String[] args){          Animal dog = new Animal();          dog.bark();     }  }   // Keeps saying on line 12 Animal dog = new Animal(); after compiling that it's a non-static variable and that it cannot be referenced from a static context.


If $p : E \to X$ is a covering map and $E$ is path connected, then all the fibers have the same cardinality.

Let $p:E \rightarrow X$ be a covering space.   It is well known that if $X$ is connected, then all the fibers have the same cardinality. This can be seen as a simple consequence of the fact that the cardinality of $p^{-1}(x)$ is a locally constant map.  My question is, assuming $E$ is path-connected, how can I prove that all the fibers have the same cardinality? Can somebody help me?  Thanks.  -- EDIT --  Idea : If $E$ is path connected, then $X$ is connected and we're done. To see that $X$ is connected, let $x,y\in X$ and let $x_{0}\in p^{-1}(x)$ and $y_{0}\in p^{-1}(y)$. Since $E$ is path connected, let $\sigma$ be a path connecting $x_{0}$ to $y_{0}$. Then, $p\circ\sigma$ is a path connecting $x$ to $y$. Thus, $X$ is path connected and hence, connected.


Why was a fox able to think about the hobbits on the road to Rivendell?

When Frodo, Pippin, and Sam were traveling to Rivendell, they slept under a tree the first night. Tolkien writes about a fox that wonders to himself why three hobbits were sleeping under a tree. Why can the fox think for himself? This isn't Narnia where animals can talk, but this is the only time I can think of where an animal thinks for itself in Lord of the Rings. Here is an excerpt from the book:     A fox passing through the wood on business of his own stopped several minutes and sniffed. "Hobbits!" he thought. "Well, what next? I have heard of strange doings in this land, but I have seldom heard of a hobbit sleeping out of doors under a tree. Three of them! There's something might queer behind this." He was quite right, but he never found out more about this.   -Fellowship of the Ring   What other strange thing could the fox have heard of and who or what did he hear them from?  Could the Great Eagles be considered a true animal according to this? They have no equivalent in the real world of the same size, so I don't count them.


Is it possible to install some cloud apps on Ubuntu?

Is it possible to install cloud apps like Dropbox or OneDrive or Google drive on Ubuntu 14.04?


I upgraded from 16.04 to 18.04. When I press Ctrl+Alt+F3 I get the terminal which prompts for the username. When I type my username and press Enter, it doesn't wait for my password (its as if I pressed Enter without entering anything). Even if I enter something, the text shown in plaintext and then it keeps on saying my password is wrong. After few times, the screen is cleared and it prompts for my username again and the same loop goes on.


Play/pause buttons launches iTunes instead of playing/pausing the Deezer app

I am using the Deezer app music. It worked well, I could use the media buttons to control play/pause/next track/previous track. But a few days ago, (after an macOS update?) now when I hit play/pause it launches iTunes instead of controlling the Deezer app that is already running and playing music. It was correctly functioning before, so I don't know where this change of behaviour is coming from. This is very annoying as it makes the Deezer almost unusable as I have to bring it to front to control it.


I have been looking in to alternating current and I am confused. If the voltage reverses doesn't the flow of electrons also reverse? I am aware of another fair answer on this site . That answer, however, confused me just a bit. I gathered that the electrons do not per se "flow." Is this true? How is the electrical current moving?


send money from US to India in parent's saving a/c

If I send money from US to India in my parent's saving account will I have to pay tax in India?


cubic equations which have exactly one real root

Question is to check :  For any real number $c$, the polynomial $x^3+x+c$ has exactly one real root .  the way in which i have proceeded is :  let $a$ be one real root for $x^3+x+c$ i.e., we have $a^3+a+c=0$  i have seen that $(x-a)(x^2+ax+(a^2+1))=x^3+x-a^3-a$  But, $a^3+a+c=0$. So, $-a^3-a=c$.  so, $(x-a)(x^2+ax+(a^2+1))=x^3+x-a^3-a=x^3+x+c$  i.e, $(x-a)(x^2+ax+(a^2+1))=x^3+x+c$  Now, determinant for quadratic $x^2+ax+(a^2+1)$ is $a^2-4(a^2+1)=-3a^2-4 <0$ for any real number $a$  Thus, quadratic has no real root and so is the cubic $x^3+x+c$  I would like to know if this justification is sufficient and if this can be generalized.  I mean, can i say $x^3+ax^2+bx+c$ for $a,b,c\in \mathbb{Z}$ have exactly one real root. (Conditions apply)  can this be generalized to any odd degree polynomial (at least for some special cases)


Too many blanks between summation symbol and its associated expression

I am actually new to latex, so this is very basic and ridiculous question. However, I cannot eliminate the blank between f(e) and the summation symbol. Besides, the equal sign is so far from the summation symbol. How can I solve these ?  Latex Code:   \sum_{e \, into \, node \, v} f(e) = \sum_{e \, out \, of \, node \, v} f(e)


From where should I start learning about layout & composition?

I am new to visual design and have already read dozens of articles about color, typography and other related things. But I can't understand how to use the elements and principles to create a professional and amazing looking layout. As I can't find anything useful which throws a light behind that layout. So, can you give some insight to it? It will be of huge help.


I want to write a little system of two equations with a left bracket over the two lines. Moreover I want to label each of these equations in order to refer to them.  I wrote this :    The system of the two equations \eqref{eq1} and \eqref{eq2} :    \begin{align}     \left\{     \label{eq1}     x+2y=8\\     \label{eq2}     x-y=3     \right.   \end{align}   However the compilation is failing. But this is working if I remove the \left\{ and \right. parts.


what is raw pointer in c++? How they differ from normal pointer?

Is there is any special meaning for raw pointer?  Is normal pointer variable and raw pointer are same?


list as parameter using template, throwing LNK2019 error

I have an LNK2019 error that has something to do with how I am setting up a function that takes a list& parameter with template.  Is there a proper way to set up a list as a parameter like this?  I thought this would be a neat way to reduce lines of code for multiple classes using the same functionality.  I'm sure this is a duplicate question so I apologize, I have not yet found an answer. Helpers.h: #pragma once #ifndef HELPERS_H #define HELPERS_H #include <list> #include <string>  void stringRemoveCommas(string& str); void stringToUpperAll(string& str); template<class T> bool doesItemExist(string& str, list<T>& lst); // POI #endif // !HELPERS_H  Helpers.cpp template<class T> bool doesItemExist(string& str, list<T>& lst) {     for (auto it = lst.begin(); it != lst.end(); ++it)     {         if (it->getName() == str)             return true;     }     return false; }  ObjectList.cpp: #include "ObjectList.h"           // includes "Helpers.h" bool addObject(string& str, list<Object>& lst) {     stringRemoveCommas(str);      // works fine     stringToUpperAll(str);        // works fine     if (!doesItemExist(str, lst)) // unresolved external symbol     {         Object obj(str);         lst.push_back(obj);         return true;     }     return false; }  result: error LNK2019: unresolved external symbol "bool __cdecl doesItemExist(class std::basic_string<char,struct std::char_traits,class std::allocator > &,class std::list<class Object,class std::allocator > &)" (??$doesItemExist@VObject@@@@YA_NAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAV?$list@VObject@@V?$allocator@VObject@@@std@@@1@@Z) referenced in function "bool __cdecl addObject(class std::basic_string<char,struct std::char_traits,class std::allocator > &,class std::list<class Object,class std::allocator > &)" (?addObject@@YA_NAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAV?$list@VObject@@V?$allocator@VObject@@@std@@@2@@Z) 1>D:\VS_Projects\Object Manager\Debug\Object Manager.exe : fatal error LNK1120: 1 unresolved externals


Why does shooting a handgun accelerate a bullet to deadly speed without injuring the gun user's hand?

Momentum is defined by the product of mass and velocity. Now a projectile out of a gun has to have high velocity to penetrate a human body, as its mass isn't significant. But to reach this velocity, due to inertia/the law of energy conservation, momentum on both sides is to be equal. As there is strong negative acceleration in the opposite direction of the bullet, it should result in a strong force in the opposite direction of the bullet ($F = m*a $).  Therefore I wonder why shooting a bullet with a handgun is not ripping your hand apart.


Minor edit of posts: allow typo correction for low-rep users

Related, but subtly different, proposals (they were created before the edit for the masses changes):       StackOverflow guidelines encourage users to correct typos, and I often do. However a new feature has now sprang up, which allow users who do not have sufficient reputation to edit on their own to propose an edit and have it reviewed. In order not to be spammy (I guess) there is also a restriction: they must at least edit 6 characters in the post.  This, however, prevent the correction of simple typography/spelling errors by those same low-reputation users (which I am on other stack exchange sites)... and the simple way to get around this is to pad the questions with whitespaces.  Now, this work-around is fair and all... but really unsatisfying: if the goal of the 6 characters limit is to prevent minor editions, then it fails utterly because of this "whitespace" bug.  My proposal is therefore:  Creating a new threshold for minor-edits of posts  The current edit treshold is at 2000 points; minor edits (those under that 6 characters count) could be allowed from as low as 500 points.   This would reduce the "noise" in the edits to approve. This would remove this annoying "warning" for users who only wish to improve things   Of course the user whose post has been edited should be notified as for a "regular" edit (unless it's community wiki ?)  I have no strong opinion as to bumping those minorly edited posts.


How Can Poisson Regression Predict a Count of Zero?

I am reading "Modelling Count Data" by Hilbe and I feel I am missing something fundamental about Poisson Regression.  $\hat{\mu} = \exp(\alpha + \sum\beta_ix_i)$  One of the requirements for using it is that the underlying distribution generating my data is capable of producing counts of zero.  What I don't understand: how can such a model predict a count of zero? If it can't, how is this a useful model of my data?  Example (in R)  library("ggplot2") library("COUNT")  # Simulation weights b0 = 1 b1 = 0.5 b2 = 0.01  # Simulation variables and observations obs.num = 10000 x1 = rnorm(obs.num) x2 = rnorm(obs.num) py = rpois(obs.num, exp(b0 + b1*x1 + b2*x2))  # Poisson Regression model.poisson = glm(py ~ x1 + x2, family=poisson)  # Inspect Results summary(model.poisson) ggplot() + aes(py) + geom_histogram(bins=120) ggplot() + aes(predict(model.poisson, type="response")) + geom_histogram(bins=120)   The summary looks good in-so-far as it gets the estimates:  Call: glm(formula = py ~ x1 + x2, family = poisson)  Deviance Residuals:      Min       1Q   Median       3Q      Max   -3.3435  -0.8094  -0.1061   0.5842   3.8852    Coefficients:             Estimate Std. Error z value Pr(>|z|)     (Intercept) 1.002306   0.006376 157.205   <2e-16 *** x1          0.501053   0.005659  88.535   <2e-16 *** x2          0.012516   0.005675   2.205   0.0274 *   --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  (Dispersion parameter for poisson family taken to be 1)      Null deviance: 18964  on 9999  degrees of freedom Residual deviance: 11070  on 9997  degrees of freedom AIC: 37494  Number of Fisher Scoring iterations: 5   But the plot of the predictions shows that no 0 predictions were made:


I was wondering if there is a way in unix (like) environments to connect groups of files and easily view those groups and select specific files from the group. Of course one way would be to put files in each group in its own directory but I am thinking about the following situation. I could have a directory of pdf papers. I write notes on individual papers and would like to connect or associate note1 and note7 with paper1, note 1 and note 3 with paper 2 and so on. Or at the same time I would like to associate paper 3 and paper 8 with note 2. With that association I would then like to be able to (for example) "select" paper1 and have note1 and note 7 identified as being connected and allow me to select one of them to view/edit OR I would like to be able to "select" note 2 and then the list containing paper3 and paper 8 would be identified from which I could choose to view/edit either file. I would like to have a terminal/command-line solution. Suggestions?


Favorited Tag Questions on the Stack Exchange Android app

It would be nice to show questions based on favorited tags on the Android App, just like the Web application.  The app doesn't handle it right now and this feature would be nice to have.


Why does the Ubuntu package manager install nodejs v4.2.6 by default?

Running Ubuntu 16.04 on 64bit in a VM.  To be clear, I'm wondering why that specific version of nodejs is the one in the repo. Is it because the developer of nodejs choose to make that the default or is it due to something else?


Optimising pagination with large dataset and offset

Suppose that I have 50 million record of user. And the business requirement is to allow the admin to select any pageNumber and any pageSize to retrieve the user record  Of course, it will not be a problem if admin key in page 1 with pageSize of 10. But let say admin key in page 1 million with pageSize of 10, the querying time is a problem.  Is there any solution to this as a simple offset and limit solution with indexing alone wouldn't solve the problem??? I am thinking that how could this be addressed without changing the business requirement.  Simplify:  - I need a stored proc that accept pageSize and pageNumber to get user record  - I have 50 million user record  - The user id in my database is guid (not incremental based on created date)  - Query result should be order by User Created datetime  - Expectation: Querying time of pageNumber 1 and pageNumber 1 million should not be much different, or at the very least it should be acceptable time to return result (eg: less than 5 seconds)  CREATE PROCEDURE [dbo].[usp_AdminGetUserList] (      @PageSize int = 10,      @PageNumber int = 1 ) AS BEGIN      SET NOCOUNT ON;      SELECT         *     FROM [dbo].[User]     ORDER BY [JoinDT]     OFFSET @PageSize * (@PageNumber - 1) ROWS     FETCH NEXT @PageSize ROWS ONLY OPTION (RECOMPILE);  END   Note:  I know that there is solution which use the last primary key (incremental userid) in this case instead of using offset, but such solution would not fit the business requirement as business requirement allow user to key in pageNumber(offset). In other word, solution like this will not work for my case.  SELECT user_id, name FROM users WHERE user_id > 51 234 123 ORDER BY user_id ASC LIMIT 10 000;


Find the equation of the line in standard form.

Find the equation of the line that passes through the points $(2, 9)$ and $(8, 6)$. Write the equation in standard form.


I using typeof to identify the type of an element.  Here is my code:  <script> alert("before = " + typeof test); function test(i) {} alert("after = " + typeof test); </script>   In output I am seeing as:  before = function after = function   When the page loads then the function is not yet defined, then the first alert should say undefined. So why it says function in my output?


How to control the font size in complex fractions?

I am writing an equation and for part of that, I have the following fraction:  \begin{eqnarray} \frac{u_{fe}\frac{\frac{u_{i,j,k}^n+u_{i,j,k}^{*}}{2}+     \frac{u_{i+1,j,k}^n+u_{i+1,j,k}^{*}}{2}}{2}- u_{fw}\frac{\frac{u_{i,j,k}^n+u_{i,j,k}^{*}}{2}+ \frac{u_{i-1,j,k}^n+u_{i-1,j,k}^{*}}{2}}{2}} {dx_i + dx_{i+1}} \end{eqnarray}     My problem is that the size of u in u_{fe} and u_{i,j,k} is different. I have also tried equation, gather and split but the problem is still there.  ` Any suggestion is appreciated.


When should I load assets for optimal performance?

I'm writing a game using LWJGL and Java, and was wondering if there were best practices for when to load resources.  I have seen examples that load all resources when initializing the game (XNA), ones that load the new resources needed for each level while referencing the already loaded assets again.


Latest version of Ubuntu not working properly

I installed Ubuntu 20.04 on my lapyop dell Inspiron 3558 and after restart it is not opening it's just black screen with one horizontal line at top left


In Harry Potter and the Chamber of Secrets, why is Dobby helping Harry Potter? What are his motives?


I'd like to learn the etymology of using the preposition with in the phrase in love with somebody. For me it doesn't make much sense because with seems to imply something that is shared by two people, something symmetrical wherein the phrase only states that one person has romantic feelings towards another. In Polish, we say być zakochanym w kimś which directly translates to be in love in somebody, which, at least to me, seems to make much more sense.  Why do we use/What is the etymology of using with in the phrase in love with somebody?


So I know from memory that a for loop that looks like:    for( int i = 0; i > N; i++)    Will have an O(N) and for every inner loop added you just multiply it by N -- assuming it's the same for loop with just a different initial. My question is,  for a loop like    for( int i = 0; i < N; i *= 2)     for( int j = 0; j < N; j++)    I know from memory that the first loop would be lnN and the second would be N so O(NlnN) is the answer. But I don't want to memorize these big O's, I want to know how to actually compute them by hand, iow how to trace it with a given N. Could someone please show me some process on how to do this? I've looked at slideshows from college lectures, but they usually do basic loops. Thanks for the help and guidance!    I can trace it and find the iterations, but when it comes to actually getting Big O is where I crash


header and footer of the first page of every chapter

It maby be weird, I want to make header and footer for every page including the first page of each chapter, how can I do this?


find the minimum value given constraints

From an entrance examination.  Let $z$ be a complex number such that $\dfrac{z-i}{z-1}$ is purely imaginary. Find the minimum value of $|z-(2+2i)|$.  $$$$ Attempt:$$$$Since $\dfrac{z-i}{z-1}$ is purely imaginary, $$$$$$\dfrac{z-i}{z-1}+\overline{\left(\dfrac{z-i}{z-1}\right)}=0$$ This reduces to $$|z|^2=\Re(z)+\Im(z)$$ This represents the locus of $z$ on the Argand Plane. The minimum value of $|z-(2+2i)|$ will be the shortest distance between any point $z$ lying on $|z|^2=\Re(z)+\Im(z)$ and the point $(2,2)$ on the Argand Plane. $$$$Unable to recognize the locus represented by $|z|^2=\Re(z)+\Im(z)$. How to identify locus represented by $|z|^2=\Re(z)+\Im(z)$  without reducing to Cartesian Coordinates?


Java server - processing of incoming sockets in multithreading mode

I have started writing the server in Java, based on sockets and I have some questions. When I have the incoming request then ServerSocket returns Socket to me. Then I create the separate thread and use this new socket there.  After some incoming requests, I have some separated threads and some sockets. All sockets use the same input address and port. Question -   How server understand to which thread he has to give input packet? Can  you please give some advice about books or links that I can read to  understand how the server works on low level?  How server (for example Apache tomcat) processing incoming sockets?  As I understand, server has one input queue for input packet.   Is this queue affects on the server's speed?  Where can I read about such low level algorithm of server working?


Label block quote like displayed equation

I would like to be able to add a tag to a block quote in a more or less identical manner as one would with a displayed question.  Ideally, I would also be able to use \label and \eqref (or \ref) as if they quote were actually an equation.  You might say that I would like to combine the functionality of the below two examples.  Is there a simple way to do this?  \documentclass{article}  \usepackage{csquotes} \usepackage{lipsum}   \begin{document}  This is a displayed quote. \begin{displayquote} \lipsum[1] \end{displayquote} That was a displayed quote.  \end{document}   and  \documentclass{article}  \usepackage{amsmath}  \begin{document}  This is how I would like to label my block quote. \begin{equation} \tag{A}3x^2+1=5. \end{equation}  \end{document}


Receiving the error: snapd.snap-repair.service is a disabled or a static unit, not starting it

I have recently upgraded my OS to Ubuntu 18.04 (fresh install via boot device). However, when trying the command:  sudo apt-get upgrade   It works fine until ~75% when it stops and says:  snapd.snap-repair.service is a disabled or a static unit, not starting it.   I'm not quite sure what this means and if I Crtl-Z to get out of it, any time I try to install anything I get:  E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?   and have to restart my computer to install anything.


Prove $(a_1+b_1)^{1/n}\cdots(a_n+b_n)^{1/n}\ge \left(a_1\cdots a_n\right)^{1/n}+\left(b_1\cdots b_n\right)^{1/n}$

consider positive numbers $a_1,a_2,a_3,\ldots,a_n$ and $b_1,b_2,\ldots,b_n$. does the following in-equality holds and if it does then how to prove it  $\left[(a_1+b_1)(a_2+b_2)\cdots(a_n+b_n)\right]^{1/n}\ge \left(a_1a_2\cdots a_n\right)^{1/n}+\left(b_1b_2\cdots b_n\right)^{1/n}$


Standard Name field required from standard page layout but not from Apex code

When the standard Name field of an object is set as Text, it shows a weird behavior if left empty. It is not possible to mark it as required or non-required, but when editing a record from its standard edit page, the field is required:    No problem so far: the field is required in any case. The problem arises when it comes to insertion from code. If we insert a record from code:  CustomObject__c r = new CustomObject__c(); insert r;   ... we get no error. Instead, the record is inserted with the short, 15-character Id copied into its Name field. What I would expect is an exception with the same error that we've got in the standard edit page.  This problem does not occur with custom fields: if a custom field is marked as required, it will be so both in the standard edit page and from code.  I did not find any mention to this on documentation. Is this behavior new in Spring'14? Has any of you found this same problem before?


Hey Im new in blender and I'm having what appears to be a simple problem, why cant I dissolve this edge? I made a plane and I loop cut it to make the hole in the middle I dissolved the other edges except for these two


Explicitly accept change for PPA 'Label'

When I run apt-get update on my ubuntu 17.10 I receive the following error:  E: Repository 'http://ppa.launchpad.net/ondrej/php/ubuntu artful InRelease' changed its 'Label' value from '***** The main PPA for PHP (5.6, 7.0, 7.1) with many PECL extensions *****' to '***** The main PPA for supported PHP versions with many PECL extensions *****' N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details."   The man page doesn't really point to a solution.  My question is, how do I explicitly accept the change?


How can I prove that the max error of the trapezoid rule for the integral $\int_{a}^{b}{f(x)\, \mathrm{d}x} $ is: $$\Delta=-\frac{1}{12n^2}f''(c)(b-a)^3 \text{for } c \in (a,b) \ ?$$  I know that to obtain that result first you have to prove that $$\exists \;c \in (a,b); \int_{a}^{b}f(x)\,dx = \frac{b - a}{2}\{f(a) + f(b)\} - \frac{1}{12}f''(c)(b-a)^3$$ But I'm stuck here, I tried using the mean value theorem but got nowhere. Anyone got any ideas?  If it helps: $\forall x_0 \in (a,b) \;\exists\;\xi_0 \in (a,b);\; f(x_0) - p(x_0) = f''(\xi_0)\frac{(x_0 - a)(x_0 - b)}{2}$, where p(x) is the linear function that interpolates f(x) in the points a and b ($p(x) = f(a) + \frac{f(b) - f(a)}{b-a}(x-a)$)


"Everybody else in our party {has/have} missions of their own."

Here is my passage:     Everybody else in our party [has/have] missions of their own.   Now, Everybody else in our party has a mission of their own sounds pretty straightforward. But as soon as I make mission plural, it doesn't sound right. Yet plurality should reflect Everybody else, shouldn't it?


How do I remove Windows Vista off my Ubuntu laptop?

I have Ubuntu 13.10 installed as a dual boot and I no longer want Windows Vista on my laptop. What is the easiest way to remove Vista from Ubuntu?


PCA on data having more dimensions than observations

I have a 73 by 426 matrix, where 73 is the number of my observations, and 426 is the number of my features/dimensions. When I perform the PCA, I expect to get a 73 by 426 score matrix; instead, I get a 73 by 72 matrix. I assume this is because I have more dimensions than observations. Is there a way to overcome this problem?   Here is my code in Matlab:  [coeff,score,~,~,explained] = pca(class1Sgn);


I am trying to add null to the ArrayList where as it is integer type. But i am getting NullPointerException.  Adding null to the ArrayList is a success, but while printing it exception is being raised.  Please let me know how to resolve this.  import java.util.Enumeration;  public enum Car {      lamborghini(123),tata(2),audi(50),fiat(15),honda(12);        private int price;        Car(int p) {           price = p;        }        int getPrice() {           return price;        }      }    import java.util.ArrayList;  public class Main {        public static void main(String args[]){           System.out.println("All car prices:");           for (Car c : Car.values())           System.out.println(c + " costs "            + c.getPrice() + " thousand dollars.");           ArrayList<Integer> al = new ArrayList();           al.add(null);           for (Car p : Car.values())              al.add(p.getPrice());           System.out.println("Size: "+al.size());       // Loop through elements.         for (int i = 0; i < al.size(); i++) {             **int value = al.get(i);**             System.out.println("Element: " + value);         }          //  switch (c)        }     }


I am working on a scene, and using CrazyBump to export Displacement and Normal maps; I want to tweak the textures, but currently I need to restart Blender before they update.  Is it possible to refresh them, without restarting Blender?


Why are these values not appending correctly when appended to the pipeline?

I have a bash script (seen ) that I'm using to sort a list of files in subdirectories by filename.  This script appends sorted files in hooks/pre-relevant/, then files named hooks/pre-relevant, then files named hooks/relevant, then sorted files in hooks/relevant/, using the append_hook function below:  hooks=()  # Run a hook script, if it's executable, with the input from this invocation append_hook () {   if [[ -f "$1" && -x "$1" ]]; then     hooks+=("$1")   fi }   I'm testing it with this directory structure:  testing-range/plugins/ |-- bar |   `-- hooks |       |-- irrelevant |       |-- only-one |       `-- relevant |-- dickory |   `-- hooks |       `-- pre-relevant |-- doc |   `-- hooks |       |-- perl-envsubst |       `-- relevant |           |-- 00 |           `-- 20 | |-- factory |   `-- hooks |       `-- relevant `-- hickory     `-- hooks         |-- pre-relevant         |   `-- 30         `-- relevant             `-- 10   When I use this multi-step array code to append the files:  append_numbered_hooks () {   # Gather every file into an array, prefixing each item with the   # filename of the script (its position in sort order)   local filelist=()   for hook in "$PLUSHU_ROOT"/plugins/*/hooks/"$hookname"/*; do     filelist+=("${hook##*/}/$hook")   done    # Sort the array numerically   printf '%s\0' "${filelist[@]}" | sort -nz | IFS= read -rd '' -a filelist    # Append each script in sorted order   for hookline in "${filelist[@]}"; do     append_hook "${hookline#*/}"   done }   I get almost the correct output:  hickory/hooks/pre-relevant/30 dickory/hooks/pre-relevant bar/hooks/relevant factory/hooks/relevant doc/hooks/relevant/00 doc/hooks/relevant/20 hickory/hooks/relevant/10   Yet, when I append the files using this simpler pipeline:  append_numbered_hooks () {   for hook in "$PLUSHU_ROOT"/plugins/*/hooks/"$1"/*; do     printf '%s\0' "${hook##*/}/$hook"   done | sort -nz | while IFS= read -rd '' hookline; do     append_hook "${hookline#*/}"   done }   The numbered files don't show up in a for "${hooks[@]}" loop:  dickory/hooks/pre-relevant bar/hooks/relevant factory/hooks/relevant   What's going on? The correct values should be:  hickory/hooks/pre-relevant/30 dickory/hooks/pre-relevant bar/hooks/relevant factory/hooks/relevant doc/hooks/relevant/00 hickory/hooks/relevant/10 doc/hooks/relevant/20


Public DNS conflicts with Networks internal DNS

we are focussed on building websites/webservices for quite a few years now and right now in discussions with the company which manages a companies network. I just can't believe what they are telling us so i would like to ask if this is true for all Microsoft AD networks.  Situation:   We own/control the public DNS record "example.com"  The company which manages the companies internal network named the domain controller also "example.com" So now whenever we need a subdomain e.g. staging.example.com we have to report that to the company which manages the network to make this subdomain available in the network   As far as i can see the company could have named their domain controller however they wanted. Would they have given the domain controller a name like managed-network-example.com all this conflicts wouldn't exist?  Throughout the discussions they blamed us that we didn't use www.example.com to reach the website instead we redirected to example.com in the browser. Then when we switched and redirected to www.example.com just to find out that this resulted in a 404 error because they had to point the www subdomain to our webservers IP. In the aftermath they told us thats absolutely normal that we have to inform them about every subdomain we wanna use so that it's reachable from within the network.   So is this the way you setup an internal network, making a public DNS record more or less irrelevant?  Thanks for your replies!


Do you have to give all parameters when firing a function in Javascript?

I'm building a little click game with HTML, css and Javascript and I don't think this question belongs in the Game Dev section but here.  I've a a function to put a title and a text in a message box then it shows it and when you click on continue it will hide the message. I've given it 4 parameters,  function messageUser(title, text, fire, funct){   The first 2 are strings for Title and text, third a boolean to ask if the user would like to fire a function after the user has clicked on the button and the fourth is a string for the function name you would like to fire after you've clicked continue.   This comes in handy if you'd like to show a message before you'd like to show a  character creation screen or something like that, but if  I don't want to fire a function after the message can I leave the parameters empty when calling for the function like messageUser("Bra","Foo"); ?


If I find similar questions on StackOverflow that haven't been updated in years (which likely include outdated information), is it better to ask a new question, or continue the conversation in the old thread?  Would commenting in the old thread even get any attention?


How to ask correctly for Android problems

I have seen so many Questions in SO and I really wanted to help these guys, but I was not able because something was missing or I could not really figure out what their problem was. So today I read the 1000th NetworkOnMainThreadException and NullPointerException question here and I decided to start this Thread.  How do I ask a android question in StackOverflow correctly:


How do I get Susie as a pardner? I wanted to know badly.  I can't seem to find the rifle. I don't know what to do.


I have beaten the Pokemon Y game, I have the Mega Stone upgrade and I've beaten my rival, but the hidden mega stones still aren't appearing between 8-9pm.   How do I get them?


Does anyone know how to include the admin bar in a page template where wp_head() and wp_footer() are not present? I'm developing a template other scripts and styles are just getting in the way. Rather than go through and dequeue all of the stuff I don't need, I've simple removed the two hooks altogether. All I want instead is the admin bar.  Thanks!


Java :: comparing ronded doubles doesn't work

I want to compare two numbers:    -3.123 -3.123456   I will use double to store them and I just want to consider the first 3 decimals, so:   import java.math.RoundingMode; import java.text.DecimalFormat;  public class DecimalComparator {     public static void main(String[] args) {         areEqualByThreeDecimalPlaces(-3.123, -3.123456);     }      public static boolean areEqualByThreeDecimalPlaces (double one, double two) {         boolean same = true;          DecimalFormat df = new DecimalFormat("#.###");         df.setRoundingMode(RoundingMode.FLOOR);         System.out.println(df.format(one));         System.out.println(df.format(two));          if (df.format(one).equals(df.format(two))) {             same = true;             System.out.println("true");         } else {             same = false;             System.out.println("false");         }         return same;     } }   The code is returning me:   -3.123 -3.124 false   why the second number is rounding to -3.124?


is full of supposed "secrets" that most everyone knows about flying.  But one thing it mentions is:  14. Tipping could go a long way. My girlfriend is a flight attendant. NO ONE tips flight attendants. If you give your FA a fiver with your first drink you’ll probably drink for free the rest of the flight.  Is tipping a flight attendant acceptable? Is it even permitted? (I know many businesses won't accept tips in the US, for instance, to avoid the legal obligation to report tip income to the IRS.)


If users could read items which they engaged when even they are offline, it would be a very useful experience. Suppose there is a user with limited time internet connectivity, so he can sync his stack exchange stuff to his phone while he is in the internet connection. Then he would be able to read them. After he wrote an answer it should be saved in his phone. Then once he connected to internet that answer should be published automatically.


How to solve $ \int \limits _0 ^{2\pi} \dfrac{dx}{(\alpha +\beta\cos x)^2} $

I am trying to solve this integral, I think that it could be solve using the complex.   $$ \int \limits _0 ^{2\pi} \dfrac{dx}{(\alpha +\beta\cos x)^2} $$


How to know the time of execution of previous commands

I know that using the history command I can view my past commands, but:    Is there a way to view the date and time of the execution of those commands?  Or is that kind of information not saved? And if that sort of information is not saved, is there any way to make it so that it does save it so that I can view it later?


How do I change the color of my bash commands (only) in a terminal?

I've played with  to jazz up my prompt, but is there a way to change the color of what I type after said prompt to make my commands a little more distinctive in the scrollback?  I can leave an open color code tag which sort-of works (not really); it bleeds up to the first colored bit in the output (which may or may not exist).


I have trouble installing skype in Ubuntu 13.10. Installing skype through the Software Center gives an error  Segmentation fault (core dumped)   and after removing skype by using sudo apt-get remove skype I tried to install skype with   sudo apt-get install skype   which gives an error   E: Package 'skype:i386' has no installation candidate   Any ideas how I can install skype?


Why is this not possible?  $(function() {      $('.link').on('click', function(e) {     alert('Works');     });      });  $(document).ready(function() { $('#link').html('Link'); });   HTML

   It works if i delete the DIV and manually write the HTML:  Link


How is it possible that multiple overtones can exist at the same time?

I was wondering how it is possible for overtones to co-exist at the same time. When one pulls a string, it starts to oscillate and forms a standing wave with frequency $$f_0 = f$$ Additionally, infinite overtones oscillate at integer multiples of the fundamental frequeny:$$f_n = (n + 1) * f$$ with n being the nth overtone. Since all overtones are essentially standing waves too and standing waves are formed due to reflection and interference, wouldn't the existence of multiple overtones disturb the wave?   And not only overtones but any disturbance like interfering waves from the environment, wouldn't they hinder the creating of standing waves? And lastly (from a physical standpoint) why has the fundamental frequency the greatest amplitude?


I would like to know whether there is a way to tell Android to install applications on the micro SD card by default instead of having to download applications to internal memory first and then having to move them to the SD card manually.  Thanks


Deleting my own answers or questions in mobile app

Although I am not asking to be able to vote for other's posts to be deleted, this question is related to .  NOTE - Answer, not question, so it is not an "exact duplicate of this question".  I currently use the Android version and so I don't know if this applies to iOS, but there seems to be no facility to delete your own questions or answers within the mobile app. Can we have that added please? If it is there, how do we do it?  As an example if I click "more" on this question,        I can open the question in my browser or flag it for deletion by moderators:


How can I suppress all output from a command using Bash?

I have a Bash script that runs a program with parameters.  That program outputs some status (doing this, doing that...). There isn't any option for this program to be quiet. How can I prevent the script from displaying anything?  I am looking for something like Windows' .


Adding content on Sequence Diagram / Tikz uml / pgf-umlsd

Given the MWE below from  (compiled version on the link) :   \documentclass{article} \usepackage{float} \usepackage{tikz} \usetikzlibrary{positioning, fit, calc, shapes, arrows} \usepackage[underline=false]{pgf-umlsd} \begin{document}  \begin{figure}[H]     \centering     \begin{sequencediagram}         \newinst{c}{Client}         \newinst[6]{s}{Server}          \mess[1]{c}{Longer label}{s}         \mess[1]{s}{label}{c}         \mess[1]{c}{label}{s}         \mess[1]{s}{Longer label}{c}     \end{sequencediagram}     \caption{Client-Server messaging} \end{figure} \end{document}   I would like to add some "processing contents" on the left of the left dotted vertical bar and on the right of the right dotted  vertical bar. (If possible to add some \newline inside of these "processing contents" also)    Text example "linearised"* :           Client          Server       c^2 | --------------->| init           |                 | f=f(c^2)    g=g(f) | <---------------| f         g | --------------->| check if h=g           | <---------------| OK     *What I mean is that I still want to use the above tex form, which has a nice rendering.  The only thing I would like to add are information on both sides at every start and end of an arrow. I am looking for a simple solution if it is possible.  Thank you in advance for any help you may provide.


Keep Bubblesort from sorting blank items in a list

I am writing a program that will take a disk file with an array of strings with a max size of 100 and do a few things to them. However, I am getting a console error due to my bubblesort method searching for and trying to sort 100 (the length of the array) items while the disk file may have, lets say, 15 items. The bubblesort method is returning a console error due to it searching for the remaining 85 items and trying to sort 85 blank items. I am totally lost on how to fix this problem. Is it possible to get the items in the disk file, pass them onto another array and then bubblesort that one so the 85 blank spots are eliminated? Or is adding a counter an option that will solve my problem? I am fairly new at java coding so any help would be greatly appreciated.  Here is the error i am getting:   Exception in thread "main" java.lang.NullPointerException at java.lang.String.compareTo(Unknown Source)     at Assignment7.bubbleSort(Assignment7.java:52)     at Assignment7.main(Assignment7.java:12)  here is my code:   import java.io.*;  import java.util.*;  public class Code3 {  public static void main(String[] args) throws IOException {       String[] list2, targets, list1;     list1 = getInput("C:\\Users\\Steave\\Desktop\\file14.txt");     list2 = bubbleSort(list1);                                                 targets = getInput("C:\\Users\\Steave\\Desktop\\upload6.txt");      double seqAvg = seqSearch(list1, targets);     double binAvg = binSearch(list2, targets);     System.out.println("Average number of searches for the seqeuntial search is " + seqAvg);     System.out.println("Average number of searches for the binary search is " + binAvg);  }//end of main method  public static String[] getInput(String filename) throws IOException {     String[] inputArr = new String[100];      Scanner in = new Scanner(new File(filename));     int count = 0;     while(in.hasNext()) {           if (count < 100){             inputArr[count++] = in.next();         } else {             break;         }          }            in.close();     return inputArr;  }// end getInput method     //This method will sort the array and pass it onto a list. public static String[]bubbleSort(String[] inputArr) {      String[] Array2 = inputArr.clone();      for (int i = 0; i<Array2.length; i++)     {       for (int j = 0; j<Array2.length-1; j++)       {           if (Array2[j].compareTo(Array2[j+1]) > 0)         //CONSOLE ERROR HERE           {             String temp = Array2[j];             Array2[j] = Array2[j+1];             Array2[j+1] = temp;           }        }     }       return Array2;  }// End of sort method.  //This method will do a sequential search on the list1 public static double seqSearch(String[] list1, String[] targets){       {           for (int j = 0; j < list1.length; j++)           {               for(String str:targets){               if(list1[j].equalsIgnoreCase(str)){                   return j;               }           }              {                 return j;              }          }          return -1;        }  }//end of sequentialSearch method       //This method will do a binary search on the list      public static int binSearch(String[] list1, String[] targets) {        int lo = 0;         int hi = list1.length - 1;         int mid = -1;          while( lo <= hi ) {           mid = (lo+hi)/2;            for(String str:targets){           if(list1[mid].equalsIgnoreCase(str)){               return mid;           }            hi = mid-1;             } for(String str:targets){           if(list1[mid].equalsIgnoreCase(str)){               return mid;           }       }              lo = mid+1;            {             return mid;           }         }         return mid;       }    }


I'm having troubles with BibTeX since the bibliography is eating all kind of (mostly Spanish) accents after compilation.  I'm using the  package and \bibliographystyle{utphys}  Does anyone have any idea why this happens?