I am traveling from the UK to Mexico via USA, do I need to apply for a visa waiver program (ESTA)

In Europe usually you don't need to go through immigration to change planes (unless you are entering/exiting Schengen). Is it the case in the US as well? May I catch a connecting flight on one of the US airports if I don't have US visa?


I've recently fallen upon a problem with biblatex formatting of headers/footers: by default it prints on the even page the word ‘bibliography’ in the left part of the even page header, followed by the page number, and also ‘bibliography’ in the left part of the even page footer. So far so good, even if I don't how to change it.  What is more troublesome is that the same word appears in the rest of my text (index, index of notations, &c.). If I want to get rid of it, I have to use the emptyor plain styles – but not any customised page style (I do that with titleps).  I couldn't find in biblatex where the pagestyle for bibliographies is coded. Any help is very welcome!

I am using titleps to get custom headers, and biblatex for the bibliography. The headers look all right except when it comes to the bibliography, where a "REFERENCES" label appears in the header and footer. Here is a MWE:  \documentclass{article} \usepackage{lipsum} \usepackage{titleps} \newpagestyle{fancy}{  \headrule \sethead[\normalsize \thepage][][] {Author}{Document}{\normalsize \thepage} \setfoot[][][]{}{}{} } \usepackage{filecontents} \begin{filecontents}{\jobname.bib} @article{A2013, author = {Author, A}, title = {A nice paper}, journal = {Journal}, year = {2013}, volume = {1}, pages = {1--2}, } \end{filecontents}  \usepackage[style=numeric,backend=biber]{biblatex} \addbibresource{\jobname.bib}  \begin{document} \pagestyle{fancy}  \lipsum[1] \cite{A2013}    \clearpage  \printbibliography  \end{document}   And here is the output:   The left page is ok but not the right page. Where does the "REFERENCES" label come from?  Note that this does not happen if I use bibtex instead of biblatex for the bibliography, or fancyhdr instead of titleps to customize the headers. For instance, replacing lines 3-9 in the example with  \usepackage{fancyhdr} \pagestyle{fancy} \fancyhead{Document} \fancyhead[L]{Author} \fancyhead[R]{\normalsize \thepage} \fancyfoot{} \fancyfoot[C]{} \renewcommand{\headrulewidth}{0.5pt} \renewcommand{\footrulewidth}{0pt}   gives the expected output:   How can I obtain the same result with titleps and biblatex?


I'm trying to use  for responsive image in the wordpress blog. For that I have to add the data-src attribute in the place of src in the  tag.  Or I have to get the url from the image in the post and need to bind my new  tag near the old  tag and wrap that old  tag in  tag. I don't have any idea how to do it.  Basically it must looks like this:

I have a Wordpress blog and am trying to implement the  image script. In short, I need to target all post images, swap out the src, width, & height attributes with data-src, data-width, & data-height attributes. I then need to duplicate the image line and wrap it in  tags. This is the structure I'm trying to have Wordpress generate/create:            I have searched the Wordpress codex and the best possible route I can find are to use filters (ie. 'get_image_tag' & 'image_tag') for modifying the html that Wordpress outputs for each image. I'm thinking that one of these options should work, or that I can do some pattern matching with regex (I know, not ideal), throw in a preg_replace and then inject this back into the_content filter.  I have tried some of these options but cannot get any to work. Could someone please offer some help? Found one suggestion , but can't even get it to work!  'get_image_tag' attempt:  Found this particular one on the web, but it would need modified to fit my logic (see above structure)...can't make sense of what the preg_replace array is doing on my own.  <?php function image_tag($html, $id, $alt, $title) {     return preg_replace(array(         '/'.str_replace('//','\/\/',get_bloginfo('url')).'/i',         '/\s+width="\d+"/i',         '/\s+height="\d+"/i',         '/alt=""/i'     ),     array(         '',         '',         '',         alt='"' . $title . '"'     ),     $html); } add_filter('get_image_tag', 'image_tag', 0, 4); ?>   Another 'get_image_tag' attempt:  <?php function get_image_tag($id, $alt, $title, $align, $size='full') {     list($width, $height, $type, $attr) = getimagesize($img_src);     $hwstring = image_hwstring($width, $height);      $class = 'align' . esc_attr($align) . ' size-' . esc_attr($size) . ' wp-image-' . $id;     $class = apply_filters('get_image_tag_class', $class, $id, $align, $size);      $html = '';     $html = apply_filters( 'get_image_tag', $html, $id, $alt, $title, $align, $size);      return $html; } ?>   Pattern-matching attempt:  Tried creating my own regex on this one, but not sure if it's correct.  <?php function restructure_imgs($content) {     global $post;     $pattern = "//i";      list($width, $height, $type, $attr) = getimagesize($2$3.$4$5);     $hwstring = image_hwstring($width, $height);      $replacement = 'post_title.'" data-width="'.$width.'" data-height="'.$height.'" class="fs-img"$6>';     $content = preg_replace($pattern, $replacement, $content);     return $content; } add_filter('the_content', 'restructure_imgs'); ?>   Unfortunately can't get any of these examples to work. Any help or sharing your pre-written scripts/functions would be much appreciated! Thanks for helping a student learn!!


I installed selinux first, I set SELINUX=enforcing instead of its original value, SELINUX=permissive in /etc/selinux/config, then I reboot my computer.  I waited for some time, but it stopped, I rebooted again and it can not go into the system anymore so I restored the setting.  I tried to run seinfo command in a terminal, but it output some errors below:   ERROR: policydb version 26 does not match my version range 15-24 ERROR: Unable to open policy /etc/selinux/ubuntu/policy/policy.26. ERROR: Input/output error   It seems that there is a little difference on how to start up selinux between CentOS and Ubuntu, can you help me configure selinux in Ubuntu?

My corporate policy says that Linux boxes must be secured with SELinux (so that a security auditor can check the 'yes, we're extremely secure!' checkbox for each server).  I had hoped to take advantage of Ubuntu's awesome default AppArmor security.  Is it unwise to run both Apparmor and SELinux?  (If so, can this bad idea be mitigated with some apparmor and/or selinux tweaks?)


Distances in our world (classically at least) can be defined by considering our world to be a model for the Euclidean normed three dimensional space. But how can we set the notion of time on a firm footing? What are the first principles here?  Because almost everywhere in physics, we want to see how a system evolves with “time”. But when I think about it, I can’t find a clear understanding of what time is.  I’m not talking of “the arrow of time”, just time.  Before relativity also, physicists worked with time rates. But how can we be sure that a ticking device is measuring time linearly? As far as I can see, there must be a guaranteed (local, for relativity) existence at every place in the universe of some time keeping mechanism which is infinitely accurate and can be accessed by the observer to read off the time differences between events he observes.  What guarantees such existence?  Basically what I’m asking is against what the rate of time flow is measured. Or asking it is nonsense?  Is there some different way to firmly define this notion?    This is NOT the same question as the marked question, .  Here, I ask how do we assure that a time keeping device ticks at “equal” intervals? How do we measure these “equal intervals” with? We surely can’t rely on our perception for it.  It is much like (to me) the problem of defining temperature in classical thermodynamics. We have to resort to statistical theory for a firm definition of it. We just can’t say that temperature is proportional to the height of mercury column in a thermometer. Because we’ll, it just isn’t...

This is an attempt to gather together the various questions about time that have been asked on this site and provide a single set of hopefully authoritative answers. Specifically we attempt to address issues such as:   What do physicists mean by time? How does time flow? Why is there an arrow of time?


I need to prove if G/N is cyclic, then G is abelian. I was given no other information on the groups. I know that a cyclic group is abelian and that N is a normal subgroup in G. I tried looking up this problem, but the only solutions I could find were answering problems such as "If G/Z(G) is cyclic, then G is abelian" or "Factor group of a center of a abelian group is cyclic" when the person was really asking how to prove "if the factor by the center is cyclic, then the group is abelian." All of these involve the center of the group, but my question prompt has no mention of the center in it. How can I go about solving it without having the use of the center to help me commute?

Continuing my work through Dummit & Foote's "Abstract Algebra", 3.1.36 asks the following (which is exactly the same as exercise 5 in ):     Prove that if $G/Z(G)$ is cyclic, then $G$ is abelian. [If $G/Z(G)$ is cyclic with generator $xZ(G)$, show that every element of $G$ can be written in the form $x^az$ for some $a \in \mathbb{Z}$ and some element $z \in Z(G)$]      The hint is actually the hardest part for me, as the quotient groups are somewhat abstract. But once I have the hint, I can write:  $g, h \in G$ implies that $g = x^{a_1}z_1$ and $h = x^{a_2}z_2$, so \begin{align*}gh &= (x^{a_1}z_1)(x^{a_2}z_2)\\\  &= x^{a_1}x^{a_2}z_1z_2\\\ & = x^{a_1 + a_2}z_2z_1\\\ &= \ldots = (x^{a_2}z_2)(x^{a_1}z_1) = hg. \end{align*} Therefore, $G$ is abelian.  1) Is this right so far?  2) How can I prove the "hint"?


When a user writes a comment to reply to another user using @username then this user gets a notification. However, what happen if after few seconds the commenter edits his comment and deletes @username or changes the reply to another user. Does the notification sent to the user get deleted if he hasn't read it yet?

I always wondered if users get notified about comments were their name was edited in afterwards.  Example:  I write a comment     See this link here   then I edit it to     @someuser: See this link here   Does the user get notified now?


Well , Ive been in a train for 15 minutes and everytime I try to catch a pokemon They Run away Please Help !

I can't do anything now. Can't catch Pokemon, can't get items. Does anyone have the same problem?


I felt like I fully answered a question somebody had, but I still got down-voted.  I think it's because what they asked was not a recommended practice, but I don't understand why my answer was down-voted.  After one comment, I put a disclaimer saying it's not best practice, hoping to improve the answer, but am still getting down-voted. I'm trying to give back to SO for all the help it has given me, and want to do well. Please help me be a better answer-maker. :-)  The Question in question:

I wrote a question about blocking certain characters in passwords. It became tremendously unpopular, and it seemed like everyone wanted to rain on my parade every day.  Eventually, I "got it," agreed completely with what people were saying to me, and just wanted to withdraw my question so that my reputation didn't slide even further downhill.  Unfortunately, the system is designed such that I can't withdraw my question or redeem myself. Instead, I just get daily reputation attacks. That's a terrible system, and it needs to be changed.


I have a strange class that has a interface object as attribute. What does it mean? public interface Acceptor{     public void accept(Thing thing);     public boolean hasSpace(); }  public class Box{     private final Acceptor acceptor;     public Box(Acceptor acceptor){         this.acceptor = acceptor;      }       public void acceptor(Thing thing){          acceptor.accept(thing);     }         public void hasSpace(){          return acceptor.hasSpace();     } }  Say I want to create an instance of Box, how?

I have seen this mentioned a few times and I am not clear on what it means. When and why would you do this?   I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly.   Is it just so if you were to do:  IInterface classRef = new ObjectWhatever()   You could use any class that implements IInterface? When would you need to do that? The only thing I can think of is if you have a method and you are unsure of what object will be passed except for it implementing IInterface. I cannot think how often you would need to do that.   Also, how could you write a method that takes in an object that implements an interface? Is that possible?


I am booting 18.10 on USB. I want to protect the the account with a password that is not default by creating an account when I boot Ubuntu.

When I boot Ubuntu 10.04.3 from a live CD, it asks me to enter a username and password. I have not booted before, and I haven't created an account.


I'm wondering the following: I know that $a \equiv b \textrm{ mod } m \implies ac \equiv bc \textrm{ mod } m$ for $a,b,c,m \in \mathbb{Z}$ and $m \neq 0$. I'm wondering that if we know that $\gcd(c,m) = 1$ and that $ac \equiv bc \textrm{ mod } m$, is $a \equiv b \textrm{ mod } m$? If it is true, how would we prove it?

How would you show that if $ac≡bc$ $\mod m$ and $\gcd(c,m)=d$, then  $a≡b$ $\mod \frac{m}{d}$?  Any help would be much appreciated!


Please take a look at this screenshot:    I have been using this desktop for a week but till now I can not find where "logout" option is in the Applications menu. So my question is:  (1) Is this gnome shell, to be more specific, gnome 2's shell? Or is it called unity because the tip says "Get help with Unity"?  (2) Is there any "logout" menu item in the Applications menu (or any part of the screen) of this shell? If yes, where is it, or how to make it appear in the Applications menu?  Thanks a lot.  PS: This shell is obtained by the following commands:  metacity & gnome-settings-daemon & gnome-panel &

I faced with a problem after update,   I missed 2 buttons from above panel, System menu (including shutdown, suspend & …) and User (including log out & …)  how can I restore them !?...


The chart shows the percentage of usage of most common means,WHICH ARE   DESKTOP COMPUTER, LAPTOP AND MOBILE PHONE, of access to buy tickets   USED by people from Australia, the UK and Malaysia.   I have many trouble when it comes to use relative clause in order to give complete information.Here I would like to say what the means are and people who used these means are from Australia, the UK and Malaysia.But I am not sure if I can write "the means" just before the word of and when I used the word "used" after tickets, it sounds like I am talking about the tickets but not "the means"..in other way, I want "the means" to be my relative pronoun when I add the word "used" after tickets..  How can we place relative clauses ?

I would like to write an essay which gives information about the charts but because I am not native English speaker, when I started to write down my essay I came across the similar problems that I do sometimes.  Here my sentence:  Figure 1 and figure 2 show the percentage of people, WHOSE age is between 25-44 and over 65, WHO purchased concert, cinema and theater tickets online over the first three months of 2006 in three countries, WHICH are Australia, the UK, Malaysia.  Here is my questions:  1.How can I give the information of age and of what do people buy in one sentence?  2.Such vital and important information on the figures can be used as indefinite relative clause?


Does a russian citizen holding european residence permit need a visa to go to Ireland?  I found that there are special conditions for family members of Union citizens, so would like to know if it applies to the described above situation.

I am Indian passport holder living in Hungary for 4 years and I have been issued a Temporary residence permit (EU Schengen).  Can I go to visit Dublin without any visa, or do I need to apply for a UK visa? I know Ireland still in Schengen but part of United Kingdom.


I still have a question about the sentence "from whose known good sense he fully expected to have just such resolute measures advised as he meant to see finally adopted" from the novel "Persuasion" that was written by Jane Austen.       Mr Shepherd, a civil, cautious lawyer, who, whatever might be his hold or his views on Sir Walter, would rather have the disagreeable prompted by anybody else, excused himself from offering the slightest hint, and only begged leave to recommend an implicit reference to the excellent judgement of Lady Russell, from whose known good sense he fully expected to have just such resolute measures advised as he meant to see finally adopted.   Below is the sentence about which I still have a question.     from whose known good sense he fully expected to have just such resolute measures advised as he meant to see finally adopted    Does "from whose known good sense he fully expected to have just such resolute measures advised" mean "he fully expected to have just such resolute measures advised from Lady Russell's well-known good sense"? Which meaning of the word "measure" is used in the highlighted sentence? Which meaning of the word "as" is used in the sentence "as he meant to see finally adopted"?   Thanks a lot for everyone's help in advance.

I don't understand the structure of the bold part of the sentence below. It's from  by Jane Austen.     Mr Shepherd, a civil, cautious lawyer, who, whatever might be his hold   or his views on Sir Walter, would rather have the disagreeable   prompted by anybody else, excused himself from offering the slightest   hint, and only begged leave to recommend an implicit reference to the   excellent judgement of Lady Russell, from whose known good sense he   fully expected to have just such resolute measures advised as he meant   to see finally adopted.   Might I have an explanation.


Question :    The equation $x^7+x^5+x^3+1=0$ is given.  Prove that this equation has only one solution on $\mathbb R$.    Note 1 : You should use Rolle's theorem in your proof.   That's what the question wants ! its not optional !!!    Note 2 : The question is taken from "Real Analysis : A first course " : Russel Gordon  Note 2 : I don't have any idea... I've never proved something like that ! Any help would be great !

Prove that the equation $x^7+x^5+x^3+1=0$ has exactly one real solution. You should use Rolle’s Theorem at some point in the proof.    Since $f(x) = x^7+x^5+x^3+1$ is a polynomial then it is continuous over all the real numbers, $(-\infty,\infty)$. Since $f(x)$ is continuous on $(-\infty,\infty)$ then it is certainly continuous on $[-1,0]$ and the Intermediate Value Theorem (IVT) applies. The IVT states that since $f(x)$ is continuous on $[-1,0]$ we can let $C$ be any number between $f(-1)=-2$ and $f(0)=1$, namely $C=0$, then there exists a number $c$ with $-1 < c < 0$ such that $f(c)=C=0$. Since $f(x)$ is continuous on $[-1,0]$ and differentiable on $(-1,0)$ then Rolle’s Theorem applies. Rolle’s Theorem states that if a function $f\colon [a,b] \to \mathbf{R}$ is continuous on $[a,b]$ and differentiable on $(a,b)$ then if $f(a)=f(b)$, there exists a point $c \in (a,b)$ such that $f'(c)=0$. We assume that there is more than one real solution for this equation, namely $f(a)=0=f(b)$. If there exists more than one real solution for $f(x)=0$ then $f(a)=0=f(b)\implies a=b$, and thus there is only one real solution to the equation, as desired.   But I feel  I am missing something, and I'm not sure how to show that the equation is differentiable on the interval and that Rolle's Theorem applies.


I am currently attempting this practice question in my tutorial and while I am able to reduce the circuit below to     I do not know whether the 6/6/6/6 pane is connected in series or parallel, it should not be parallal else R(Total) = 3+3+3 and Vo will be 2/3 * 12 = 4  The answer im expecting is 4/3V so my current attempt is wrong. I also doubt it is a Wye-Delta transformation. Can anyone explain how the resistors are connected and why? Much thanks in advance.

How anyone know how to do the question? I know how to reduce it to a window pane of 6/6/6/6 with a 3 in series but i have no idea how to do it.  Well i did manage to reduce the right side of the circuit to a pane of 6/6/6/6 and am unable to determine if its a Wye-Delta transformation (probably not) and I do not know which of the resistors are in parallel and which are in series.  Answer should be 4/3V   (The website which the answer was hosted initially no longer exists)


I've installed Ubuntu on several other machines but cant get it to run on my new build.  I'v created a bootable USB drive using the official 15.10 iso from ubuntu using pendrive linux. Secure boot is disabled, fast boot is disabled and IOMMU is enabled. When booting from USB the I get the list where I select "Install Ubuntu." The Ubuntu Logo screen appears and then I get this error screen:    Here is my BIOS Info:    System info:   Gigabyte GA 970 Gaming AMD FX 8320 GTX 960 4gb SSC 16gb Crucial Ram Kingston 120gm SSD (Reserved for Linux install) M2 SSD (Running Windows OS) WD 1TB HDD (Windows Storage)    Any ideas on how to get past this?

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


What the title says, what method would I use to calculate the above. To give an example, imagine I wanted to pick the queen of hearts, that specific card, out of a deck of 52 cards. How would I calculate the probability after, say, 20 draws? (without replacement)

We had this question arise in class today and I still don't understand the answer given. We were to assume that drawing cards are independent events. We were asked what the probability that the second card drawn is a queen if we take two from the deck. The answer given was 4/52, which seems counter-intuitive to me. How is the probability still 4/52 if there was a card drawn before it? What if the first card drawn was a queen?


My Ubuntu is 14.04, which has Python 2.7.6 by default.  The latest Python 2.x is 2.7.9. I am thinking whether to install 2.7.9 from its official site, just in case that something is available in 2.7.9 but not in 2.7.6?  If I install python 2.7.9, is it a goo uninstall my 2.7.6?  Does Ubuntu 14.04 depend on python 2.7.6 specifically?   So I can't uninstall 2.7.6,right?  How can I avoid overwriting my default 2.7.6 when I install 2.7.9 from its source? If I install 2.7.9, will I have to call it explicitly to distinguish from calling 2.7.6? How can I make it the default one for my use (i.e. the command python will be 2.7.9), while letting the system using 2.7.6 as its default one?

I'm using Ubuntu 11.10.  The python 2.7.2 provided has a bug that has been corrected in the latest 2.7.2 sources from the python repository.  What is the recommended way to replace the ubuntu provided python with the python from source? Or put another way, how do I "update" the ubuntu-provided one?  Ideally, I would just be able to create new .deb(s) that "update" the python2.7/python2.7-dev provided by Ubuntu.


My goal is to color a row as lightgray, but instead of coloring a row it just prints green string in the row. What my be the reason for this and how can I fix it? I am using following example with additional packages such as , which contains \usepackage{listings, xcolor} on its first line. Example is take : \documentclass[10pt,journal,compsoc]{IEEEtran}  \input{solidity-highlighting.tex}   \usepackage[table]{xcolor} \usepackage{booktabs}  \usepackage{siunitx} \sisetup{    detect-mode,    detect-family,    detect-inline-family=math, }  \usepackage{tikz}  \begin{document}  \begin{tabular}{ | l | l | l | }   \rowcolor{green}   A & B & C \\   \rowcolor{red}   D & E & F \\   G & H & I \\   \rowcolor{blue}   J & K & L \end{tabular}  \end{document}

I am trying to create a table with specific cells coloured either green or red. As a trial, I used the following code to colour one cell green \documentclass[a4paper,12pt]{extarticle} %% Language and font encodings \usepackage[english]{babel} \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc}  %% Sets page size and margins \usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm,marginparwidth=1.75cm]{geometry}  \usepackage{amsmath} \usepackage{amsfonts}  \usepackage{amssymb} \usepackage{amsthm} \usepackage{mathtools} \usepackage{optidef}  \usepackage[framed,numbered,autolinebreaks,useliterate]{mcode} \usepackage[table]{xcolor}  \begin{document} \begin{table} \centering \begin{tabular}{ | l | l | l | }       \hline       A & B & C \\       \hline       D & E & \cellcolor{green}F \\       \hline       G & H & I \\       \hline \end{tabular} \end{table} \end{document}  Here I have used \usepackage[table]{xcolor}. This did not work, and the output generated is shown below  Is there a way to create a table with specific cell colours


I have a dataset where I'm trying to predict a student's percentage score on a school exam from some other collected IVs. I'm wondering how to correctly run this analysis in R.  A few related questions:  First, I've seen a number of questions on this topic (e.g. ) where the usual recommendation is to use logistic regression. I'm a bit confused about how logistic regression fits into this. I've never formally taken a class on logistic regression, and my understanding (from the machine learning world) is that the evaluation of the linear input through a logistic function is interpreted as the probability that this data point belongs to the majority (1) class. However, I don't have classes per se, so I'm confused about how a logistic model actually works in this case as I essentially have a continuous variable that is bounded by 0 and 100.   I've also seen Poisson regression being recommended in some places. However, that appears to predict integer values, and is likely not a good model for this?  Finally, what are the steps for running this in R? Would I convert my percentage DV to a logit, run the regular lm() function and interpret the coefficients (and their p values) like normal? Is the interpretation of the significance the same as linear regression (i.e. the IV is a significant predictor of the percentage DV when holding all other IVs constant)?  EDIT:  In the comments, it has been suggested that the answer can be found here:   The solution there, as proposed by Greg, is to use 2 columns, one specifying a proportion and another to specify the weight (number of total points). This won't work in my case.  In the dataset I only have access to the final percentage/proportion. The data comes from different classes and I have no way of knowing the number of points the individual received on the exam, nor the total number of points available for that exam (as it would likely be different for individuals in different classes)  Option #1 in Greg's post is also not possible because I don't have a binary/categorical response.

I am thinking of building a model predicting a ratio $a/b$, where $a \le b$ and $a > 0$ and $b > 0$. So, the ratio would be between $0$ and $1$.  I could use linear regression, although it doesn't naturally limit to 0..1.  I have no reason to believe the relationship is linear, but of course it is often used anyway, as a simple first model.  I could use a logistic regression, although it is normally used to predict the probability of a two-state outcome, not to predict a continuous value from the range 0..1.  Knowing nothing more, would you use linear regression, logistic regression, or hidden option c?


Can a bicycle with 26x1.95 tires on magnesium alloy wheels be upgraded? Say 26x2.10?

We often get questions on bicycles.stackexchange about fitting wider or narrower tires to bicycles. We have a large number of these with answers suiting the specific bike or style of bicycle in question, but I have been unable to find one that provides a generic answer covering off all things that need to be considered. For most bicycles, the answer is the same regardless of the specific style and sizes of tires in question.   This is intended as a canonical question that we can point closed questions to.


Few things to be achieved 1. Recursively get top 20 largest folders/files 2. Get their sizes in bytes as well as human readable format

How do you sort du -sh /dir/* by size? I read one site that said use | sort -n but that's obviously not right. Here's an example that is wrong.  [~]# du -sh /var/* | sort -n 0       /var/mail 1.2M    /var/www 1.8M    /var/tmp 1.9G    /var/named 2.9M    /var/run 4.1G    /var/log 8.0K    /var/account 8.0K    /var/crash 8.0K    /var/cvs 8.0K    /var/games 8.0K    /var/local 8.0K    /var/nis 8.0K    /var/opt 8.0K    /var/preserve 8.0K    /var/racoon 12K     /var/aquota.user 12K     /var/portsentry 16K     /var/ftp 16K     /var/quota.user 20K     /var/yp 24K     /var/db 28K     /var/empty 32K     /var/lock 84K     /var/profiles 224M    /var/netenberg 235M    /var/cpanel 245M    /var/cache 620M    /var/lib 748K    /var/spool


I am using windows 7 in my machine.  My pendrive got corrupted while i was using it.  so i just removed the pen drive, then again when i inserted my pendrive it was showing as some other unrecognized format..  so i just started the formatting the pen drive.after few minutes it gave an error.  WINDOWS WAS UNABLE TO COMPLETE THE FORMAT  What should i do for this?

I have a 2 GB HP flash drive, when  I right click and select the format option , I get a warning dialogue that says       Windows was unable to complete the format   How do I format a flash drive?


I have read many articles on this confusion but i am still confused...   My simple question is -   What is $0^0$?   What is the present agreement to this?   I feel that it should be 1 as anything to the power zero is one....  I am currently a school student so i would like a more of a school based answer..  So incase it comes in my exam i should know what to write:)

Could someone provide me with a good explanation of why $0^0=1$?  My train of thought:  $x>0$  $0^x=0^{x-0}=0^x/0^0$, so  $0^0=0^x/0^x=\,?$  Possible answers:   $0^0\cdot0^x=1\cdot0^0$, so $0^0=1$ $0^0=0^x/0^x=0/0$, which is undefined   PS. I've read the  on mathforum.org, but it isn't clear to me.


I have some problem, I have an array like this  var obj = [{'person': {'name: 'foo', 'email': 'email.com'}, {'person': {'name: 'foo'}]  if i loop inside var obj, and want to get value email like this :  $.each(obj, function(index, value) {     console.log(value.person.email) }   if I do like that, it shows an error because cannot read the property email.  how I pass it when the person does not have email ? or is there a way to create conditions like isset on php

How do I check if an object has a specific property in JavaScript?  Consider:  x = {'key': 1}; if ( x.hasOwnProperty('key') ) {     //Do this }   Is that the best way to do it?


We know that Lily and Snape were great friends at a young age, and that Snape loved her dearly, so far as to match her Patronus and become a double agent after her death. However, we know of their falling out as well. Did she return his affections, at least before he called her a mudblood? (Please no answers from HP wiki/wikia, Lexicon, or movie quotes, however canon based examples, book quotes, JKR tweets, Pottermore and interviews are fine. If you have canon-based speculation please leave a comment! I love to read speculations!)

Is there any evidence that Severus Snape from J.K. Rowling's Harry Potter was ever loved romantically by a woman? If so, please provide evidence that he was loved - canon evidence only, please.


Today I saw that new top bar has been implemented in stackoverflow.  But it will fine if we get back the 10K tools and Review.  Currently there is only Review option where there is notification like before.  So here is my , of adding dropdown for Review option.  Which includes the options like 1. 10k Tools 2. Suggested Edits    Here is screenshot of my proposal.

Though I never quite understood what those numbers were and they were quite ugly, they were the only reason I ever visited the reviews page.   Can we have similar functionality back on the top bar please?


I want to clean user input before using it in database.  I'm using mysql_real_escape-string but it seems in some low versions of php its not working.  I want to use stripshlases. Will it work for me ? What should i do ?

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I'm having issues with npm in a Vagrant box I'm setting up. I noticed that the npm version is somewhat old, so I wanted to check the problem with the latest release.  It is my understanding that you should be able to update npm using npm install -g npm, but the command has no effect on the npm being used:  vagrant@box:~$ npm -v 1.3.10 vagrant@box:~$ sudo npm install -g npm npm http GET https://registry.npmjs.org/npm npm http 200 https://registry.npmjs.org/npm npm http GET https://registry.npmjs.org/npm/-/npm-2.1.12.tgz npm http 200 https://registry.npmjs.org/npm/-/npm-2.1.12.tgz /usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js npm@2.1.12 /usr/local/lib/node_modules/npm vagrant@box:~$ npm -v 1.3.10   I also tried using n (as suggested in ) to update, but it affects neither npm nor node:  vagrant@box:~$ node -v v0.10.25 vagrant@box:~$ vagrant@box:~$ sudo npm install -g n /usr/bin/n -> /usr/lib/node_modules/n/bin/n n@1.2.9 /usr/lib/node_modules/n vagrant@box:~$ sudo n stable       install : v0.10.33        mkdir : /usr/local/n/versions/0.10.33        fetch : http://nodejs.org/dist/v0.10.33/node-v0.10.33-linux-x64.tar.gz    installed : v0.10.33  vagrant@box:~$ node -v v0.10.25 vagrant@box:~$ npm -v 1.3.10   What do I have to do to update npm to the latest version?

I noticed over at the  website that node is currently at v 0.12.0.  Can someone let me know how to install the latest version of node together with npm (terminal commands please)?


I'm trying to install php-devel on an AWS EC2 server so I can compile a PHP extension. But I get an conflits error.     --> Processing Conflict: httpd24-2.4.10-1.59.amzn1.x86_64 conflicts httpd < 2.4.10   --> Processing Conflict: httpd24-tools-2.4.10-1.59.amzn1.x86_64 conflicts httpd-tools < 2.4.10   --> Finished Dependency Resolution   Error: httpd24-tools conflicts with httpd-tools-2.2.27-1.3.amzn1.x86_64   Error: httpd24 conflicts with httpd-2.2.27-1.3.amzn1.x86_64    You could try using --skip-broken to work around the problem    You could try running: rpm -Va --nofiles --nodigest   Looks like it want me to downgrade httpd24 to 2.2, but I had to change for 2.4 a few months ago in order to get SSL working...  I'm a noob at linux server admin, could anyone help me please ? Thanks  Versions OS : Amazon Linux 2013.3 PHP version : 5.4.26 httpd version : 2.4.10    Command : yum install --enablerepo=remi php-devel Remi repo being   PS : I found a file that seems to be ok at choon.net, but I don't really know if I can install it without any risk.

I have an ec2 instance and I'm trying to update all packages.  But the problem is when I execute "yum update" it shows the message:  Transaction Check Error:   file /usr/lib64/perl5/vendor_perl/Cwd.pm conflicts between attempted installs of perl-Cwd-2.21-1.2.el6.rf.x86_64 and perl-PathTools-3.40-3.4.amzn1.x86_64   file /usr/lib64/perl5/vendor_perl/auto/Cwd/Cwd.so conflicts between attempted installs of perl-Cwd-2.21-1.2.el6.rf.x86_64 and perl-PathTools-3.40-3.4.amzn1.x86_64   file /usr/share/man/man3/Cwd.3pm.gz conflicts between attempted installs of perl-Cwd-2.21-1.2.el6.rf.x86_64 and perl-PathTools-3.40-3.4.amzn1.x86_64   My Linux version is: 3.4.48-45.46.amzn1.x86_64 Red Hat 4.6.3-2  I tried to exclude "perl" from the updates, but the problem is that nginx need this perl update.  Any help how to handle this? Thanks in advance!


I know that the sizes are standardized to $1024$, $2048$ etc. but they actually provide different security than $128$, $256$... for example $\texttt{RSA-}2048$ is actually $112$ bits of security and $128$ bits would be $2304$, so how many bits of security is $\texttt{RSA-}3072$ actually providing?

§5.6.1 p.62–64 specifies a correspondence between RSA modulus size $n$ and expected security strength $s$ in bits:  Strength  RSA modulus size   80        1024  112        2048  128        3072  192        7680  256       15360   This works out to approximately $s \approx 4 n^{0.43}$ (but I have no idea whether my extrapolation means anything; strengths up to 112 are indexed on DES while strengths 128 and above are indexed on AES, i.e. the strength is the difficulty of brute-forcing the corresponding symmetric algorithm with the specified key size).  What are these numbers based on? Do they come from the expected complexity of the best known factorization methods? Or are they extrapolation from the amount of computation in specific factorization efforts such as for  (which “required more than $10^{20}$ operations”)?  (I'm asking for more precise information than .  has a nice history of RSA factorizations, but doesn't answer my question — is that what the strength estimates are based on?)


I'm trying to do a BMW car model, but I have a problem with the blueprints in the views.  This is the problem:      I expected that the two images were equal, but when I fix one of the views, with the cube cover all the top blueprint, the right view blueprint has problems, because the right view is not filled by the cube.

In  tutorial in the first couple of minutes it is explained how to set the dimensions of a cube and match the background images to this mesh. I have tried to get it right but till now I did not succeed. This is what the creator of the tutorial says in the comments:      I'm keeping only one mesh and just changing the x and y values of my   background images you can see me add at 3:00. We want all the   background images to match that one mesh.   Here are my images:     I think front and back images match to the mesh. But for the right, left and top view I only get one dimension matching. I don't see how you can match both dimensions matching without changing the mesh


so I've been scratching over why my code doesn't work. I have 2 classes, the first one is where I have my getters and setters:  public class ShopItems {   private String itemName;   private double price;    public double getPrice(){     return price;   }    public String getItemName(){     return itemName;   }    private void setPrice(p){     price = Math.abs(p);   }    public ShopItems(String i, double p){     itemName = i.toUpperCase();     setPrice(p);   } }   and here is my second class, where I make an ArrayList:  public class ShopLedger {   private ArrayList<ShopItems> shoppingList;    //I want to make a deep copy of the items in the parameter into shopping list.   public ShopLedger(ArrayList<ShopItems> s){     shoppingList = new ArrayList<ShopItems> (s);      for(int i=0;i<s.size();i++){       shoppingList.set(i,s.get(i));     }   }    //And here is where things go wrong. I want the method to return the price of the item   //in the parameter, and return null if the item name cannot be found.   public Double getPrice(String itemName) {   for(int i=0;i<shoppingList.size();i++){     if(shoppingList.get(i).getItemName() == itemName){       return shoppingList.get(i).getPrice();     }   }   return null;  } }   This is what I have now, and the code keeps giving me the error "java.lang.NullPointerException". My client class sets the shoppingList as:     Candy(2.3), Book(20.0), Pens(5.5), Tape(10.2) and itemName is Pens.  However, I've gone into debug mode and for some reason, this part of the getPrice method:  if(shoppingList.get(i).getItemName() == itemName){       return shoppingList.get(i).getPrice(); }   never executes. Please help!

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


I have two different tables, with two different labels: \label{lab1} and \label{lab2}. The tables were generated in the  site and I am using Overleaf. When I reference these two tables, \ref{lab1} and \ref{lab2}, the text exhibits the same number for both tables: Table x.y and Table x.y, instead of Table x.y and Table x.z.  Here are the codes:  \begin{table}[!ht] \label{lab1} \caption{Text1} \resizebox{\textwidth}{!}{% \begin{tabular}{ll} \rowcolor[HTML]{EFEFEF}  \multicolumn{1}{c}{\cellcolor[HTML]{EFEFEF}\textbf{Title 1}} & \multicolumn{1}{c}{\cellcolor[HTML]{EFEFEF}\textbf{Title 2}}             \\ \hline ACM Digital Library (5)           & Some Text1                                \\ \hline IEEE Xplore Digital Library (6)   & Some Text2        \\ \hline Scopus (61)                       & Some Text3 \\ \hline Springer Link (40)                & Some Text4    \\ \hline ScienceDirect (23)                & Some Text5                  \\ \hline Google Scholar (703)              & Some Text6                              \\ \hline \end{tabular}% } \end{table}  \begin{table}[!ht] \label{lab2} \caption{Text2} \resizebox{\textwidth}{!}{% \begin{tabular}{ll} \rowcolor[HTML]{EFEFEF}  \multicolumn{1}{c}{\cellcolor[HTML]{EFEFEF}\textbf{Title1}} & \multicolumn{1}{c}{\cellcolor[HTML]{EFEFEF}\textbf{Title2}}                                                                                \\ \hline Text1           & \begin{tabular}[c]{@{}l@{}}aaaaaaaa\end{tabular}                  \\ \hline Text2           & \begin{tabular}[c]{@{}l@{}}bbbbbbbbb\end{tabular}                         \\ \hline Text3           & ccccccccc                                                                                \\ \hline Text4           & \begin{tabular}[c]{@{}l@{}}ddddddddd\end{tabular} \\ \hline \end{tabular}% } \end{table}

\documentclass{article} \usepackage{algorithm}  \begin{document} \setcounter{section}{54} \section{A section with no label} \begin{algorithm} \label{myalg} \caption{An algorithm with the label `myalg'.} \end{algorithm} Reference to myalg: \ref{myalg}. \end{document}   With this code, the reference givens 55 (the section number); if I move the label after the caption command, I get the correct reference (1).  Why should this be the case? I find it confusing: when thinking about an algorithm as an environment, you expect to be able to label it right after you began it. At the very least I would expect some kind of error or "??" to appear, rather than the previous environment or reference-able entity being used.


When I refresh my feed in the stack exchange Android app, I'll get everytime a new blog post entry about stack overflows top navigation. That's annoying and I don't think it is how it should be.     App version: 1.0.89 Samsung Galaxy S5-mini Android: 5.1.1

I think the algorithms deciding what I should see in my feed have been changed recently. It used to work very well but for the last week or so I've been getting lots of duplicates (see screenshot attached). Please change it back!  Device: HTC 10  OS: Android 6.01


I wanted to create more space for Ubuntu on my hard disk taking it away from my Windows partition, so I booted the LiveCD and resized the NTFS partition. Then I wanted to resize my Ubuntu (ext4) partition to fill up the created unallocated space. Unfortunately I cannot add more space to the partition.  How should I proceed?

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


I am using this  Schematic:  Buck Converter Specifications :  Input Voltage - 18V to 32V Switching Frequency - 300kHz Output Voltage 9V Load Current - 0mA to 200mA Maximum.  When measuring the switching frequency using an oscilloscope, I am placing the probe directly on the TP1102 and also measuring the output voltage on the 47uF capacitor pad. I got the below waveforms : Input voltage of 14V:  However, with the same input voltage, I am just removing the probe which was placed at the switching frequency node. Now, I didn't observe the ringing. Input voltage of 14V without probing the switching frequency :  As you can see, the ringing vanished once I disconnected the probe. Can someone tell me how this ringing at the switching frequency node is happening even though I am probing at the TP1102 and how this is coupling at the other probes also? Please also provide a solution on how to avoid this ringing while measuring the values. Below is the ringing frequency:

As I was trying to validate our pcb design, I measured the impedance matching on the digital transmission lines, and got stuck with the oscilloscope not showing what I expected. We are using the PicoScope 4227, but I suspect that the strange measurement is not directly related to the specific oscilloscope but more to general on how to measure digital signals.  My setup is as follow: I measure the output-pin of an FPGA with both oscilloscope input A and B.  Input A (blue) is measured using the oscilloscope probe set to x10.  Input B (red) is measured using a 50-ohm coxial cable terminated at the scope input with 50-ohm.  As you can see, Input B seems correct, no reflection ect.  But Input A (the probe) has some overshoot, and ringing.  The probe should be calibrated and valid to 250MHz, so I don't get was is wrong. ?  I suspect that the small probe-clip adds some inductance, and therefore we see the ringing. But I really don't know.    EDIT After reading your answers, I walked got into our lab storage and started looking, and found a probe GND clip like the one showed in the answer below.   When I use that clip, I get the output below. Which is really a huge improvement.


I am translating a novel, and have reached a point where I am in doubt of how to translate it. The main character stands in a situation, where she has to make a tough decision. Which phrases could be used in English to express this? If, rather than a figure of speech, it could be a physical action, that would be preferred, but anything will do.

This has cropped up several times in the past couple of months, and I've been struggling to find  a fitting word to describe this phenomenon. I'll describe it:  You have two choices(no, it's not Hobson's choice). Both of them are desirable, yet both of them each have a tiny part which is most undesirable, such as a tough condition, or a demanding clause. You have difficulty deciding which one to pick.  Whenever something like that comes up, I think of the expression "Can't burn a candle at both ends", but I'm not looking for that.  I'm looking for an expression that describes a difficult choice. Any suggestions?  EDIT: It's idiomatic. I'm quite sure it is. It's an expression of some sort. And no, it isn't "dilemma"


On three sites:      my badges section shows no badges and instead tells me to "Take the Tour and earn your first badge". But even if I take the tour several times, that message doesn't change. Strangely, those are all "meta" sites, and the tours are for the main sites. Even stranger, I took the tours for the main sites long ago (e.g. Physics on July 29).  Update: Unix.Meta.SE was another site where I had this same problem. I just read some of the items there and upvoted one (not gratuitously), and a few minutes later I was awarded the Supporter badge, and now the "tour" problem has gone away. Strangely though, I was at the same time awarded the Yearling and Autobiographer as well. So this bug isn't simply a matter of annoyance, it's actually blocking the awarding of other badges.

I just joined Sports, and I decided to take a look on Sports Meta. I clicked on my profile there. This is part of what I saw:     Yet the profile shouldn't indicate that it is, in theory. . .  This seems to be a bug.


I just bought a new WiFi thermostat that requires me to add a C-Wire at the furnace. I have read the questions related to my issue but would like a suggestion on my particular (incredibly OLD) furnace. I have run 18/5 wire down to the furnace and just need to know where the C wire would go in my particular case.

How do I identify the C terminal on an HVAC, furnace, or boiler? If the terminals don't have a screw labeled C what should I look for on the wiring diagram? What steps should I take if a wiring diagram cannot be found or if it indicates that a C terminal doesn't exist?  Note: This is an extension to  which asks about running the wires through the wall. This question is about where to connect the wire at the HVAC.


The following packages have unmet dependencies:  cmake : Depends: libssl1.0.0 (>= 1.0.2~beta3) but it is not installable E: Unable to correct problems, you have held broken packages.  any way to fix this?

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


I work at my university's tech support center, and we frequently have customers who need their Windows OS's reinstalled. We use USB drives, DVDs, and CDs that contain the installation .iso file, since we can boot to them.    My question is, is there a way for us to install Windows from a centralized server? That is, could we boot to the NIC on the customers' computers and install Windows from there? The closest thing I have found is using  to do this, and while it works, the software is very picky because SERVA needs to have the client computer's NIC driver in order to work. Since we see hundreds of customers a day, we cannot guarantee to be able to load all drivers, and therefore we can't help everyone.

Is it possible to install Windows 7 (Current RTM Version) on a computer without using removable media like DVD or USB?  The first thing that comes to my mind is through the network, but I don't have experience of doing a fresh install of Windows 7 via the network.  How to install Windows 7 via the network without any removable media?  P.S. I know some may think that doing so, is just a waste of time and it's easier to do it with removable media, but in the current situation the target PC neither has CD/DVD Drive nor supports booting from USB. And in addition to that, the target computer is connected to the network via a wireless connection (I don't know if it will cause any problems with the installation).


I have a situation where I would have to do the following -      String.Format("{0}",{1},"Hi!")   (This is just a very simple version of what i am trying to achieve)  And the output I want is -  Hi!  The output I am getting is -  {1}  String.Format("{0}","{1} Atul {2}","Hi!", "Kumar") I want the output to be - Hi Atul Kumar

I want to add a comma in the thousands place for a number.     String.Format()?


Why det(A) = det(A transpose)? Can you give me the proof?

$$\det(A^T) = \det(A)$$ Using the geometric definition of the determinant as the area spanned by the columns, could someone give a geometric interpretation of the property?


Is there an $a$ with $1<a<2$ such that $y=a^x$ can be bounded (or eventually dominated) by a polynomial?

In other words, how to prove:  For all real constants $a$ and $b$ such that $a > 1$, $$\lim_{n\to\infty}\frac{n^b}{a^n} = 0$$  I know the definition of limit but I feel that it's not enough to prove this theorem.


I have some installation notes for installing the GLEW libraries for development purposes. They read:     Install everything with "glew" in its name.   This means I currently run:  sudo apt install glew-utils libglewmx-dev libglew-dbg libglewmx-dbg libglew-dev libglewmx1.10 libglew1.10   ...except that I'm sure some of these are prerequisites, and I don't need to include them in the list.  Given that I have a list of package names as above, how can I reduce it to install only the non-dependencies, without having inspect each package's dependencies individually in Synaptic Package Manager, aptitude or a similar tool?  I guess I'm looking for either a "Select a group of packages" option in a GUI program or  magic-debian-tool <LIST-OF-PACKAGES>

For a specific package, can I find out why it is installed?  So, can I see or it's manually installed, or that it is installed as a dependency of another package? Or that it is installed as part of the distro?


I received 4 upvote on an answer with accepted but I received 35 Reputation only.  It should be 55. Why I received only 35?  Any reason?

On Stack Exchange, users may gain a certain level of reputation.  What does reputation do? How can a user gain or lose reputation?   See also   in the Help Center  - Maximum amount of votes a user can use in a day and reputation requirements to vote.  - How to get an exact overview of the actions that got you your reputation.  - A full list of all privileges granted at each reputation level on all sites.


Say I have a table like this:  canModify | name | age  ------------------------     1     | John | 24     0     | Nick | 21   I want to grant update access to a specific user only where canModify=1  I know there is column level security, something like:  DENY UPDATE ON Table(column) TO user;   But I can't find anything like:  DENY UPDATE ON Table To user WHERE Table.canModify = 1   Is there a trigger or something I can set up to do this?

I have a table structured as so (Simplified)  Name, EMail, LastLoggedInAt   I have a user in SQL Server (RemoteUser) that should only be able to see data (Via a select query) where the LastLoggdInAt field is not null.   It looks like I can do this? Is it possible?


A star that begins very, very far away from a black hole (infinity) is brought in by the black hole's gravitational pull.   How do you calculate the kinetic energy of the star as it passes the point of the event horizon (/Schwarzschild radius)?  edit - I'm looking specifically on how to calculate the kinetic energy, not the velocity of an object (in this case, the star).

Most of you if not everybody will agree that the stronger the gravitational pull, the faster an object will fall. For example, on a planet with 50 times the gravity of Earth, any object will hit the ground on that planet much quicker than it would on Earth. So taking all of these into the equation, does it mean that at a blackhole, an object will fall at an infinite speed because of the infinitely strong gravitational pull of the blackhole?


I had to recreate my computer and have installed Ubuntu 13.04 as my main OS. As a printer I would like to install a Canon iSensys LBP 2900 printer. The printer-setup recognizes the device, but it won'T allow me to install the proper driver for this device - simply because there seems to be none available. Is that true?  I checked the various similar topics about this issue, but they are either outdated and the data-packages (drivers) are not available anymore or about older/ earlier Ubuntu versions.  Thank you for any advice or help or support.  Best wishes! Liam

I am trying very hard to install Canon LBP2900b Printer in Ubuntu 13.10.  I have searched and googled a lot for the solution over fortnight but none of the site / link gave me the simple solution for me. How can accomplish my goal?


I have a citation in which the document is from government and some state corporations. The problem I get is that in the reference list, the name gets rearranged and loses meaning. I am using the APA format. I do not know how to fix this. Would be glad to get assisted. Here is my .bib entry.  @article{gokmtp2,     title={Second Medium Term Plan (2013-2017)},     author={Republic of X},     journal={City: Government Printer},     year={2013}  }   On the reference list, I see this:     of X, R. (2013). Second medium term plan (2013-2017). City:   Government Printer.   Instead of;     Republic of X. (2013). Second medium term plan (2013-2017). City:   Government Printer.

I want to list a company name in the author field of a bibliographic entry:  @book{CUDA,   author    = {NVIDIA Corporation},   title     = {NVIDIA CUDA Compute Unified Device Architecture Programming Guide},   publisher = {NVIDIA Corporation},   year      = {2007} }   But the entry keeps showing up "N. Corporation".  Is there a way to get the full author name to show up?  I'm currently using the siam BibTEX style.


although it is possible to do it with a form and submit, I am trying to make the upload of files from javascript to php.  I have slightly modified a code I found on an example for the upload of files from a client (a php file using a javascript) to the server where a PHP file receives the file. This code works for the files that are present on the same folder of the client php file. I am testing this code with xampp so on the localhost folder.  Is there any possible way to allow also files from different folders (so that any client would upload files) to be uploaded? Here is the code I am using  client file php  // Getting a file through XMLHttpRequest as an arraybuffer and creating a Blob  var document = document.querySelector("#fileToUpload"); var file = document.getElementById("File1").files[0];  if (document) {       var xhr = new XMLHttpRequest(),         blob;     var file1=document.getElementById("fileToUpload").files[0].name;       xhr.open("POST", ""+file1, true);        xhr.responseType = "blob";      xhr.onreadystatechange = function () {         window.location.href = "testupload.php?w1=";         if (xhr.readyState === 4 && xhr.status === 200) {              /*                  Create a blob from the response                 Only needed if the responseType isn't already blob                 If it's "arraybuffer", do this:                  blob = new Blob([new Uint8Array(xhr.response)], {type: "image/png"});             */             blob = xhr.response;             var form = new FormData();             formData.append("file", file);             form.append("blobbie", blob);              var xhrForm = new XMLHttpRequest();             xhrForm.open("POST", "handle_file_upload.php");             xhrForm.send(form);              xhrForm.onreadystatechange = function () {                 if (xhrForm.readyState === 4) {                     console.log(xhrForm.response);                     rhino.src = xhrForm.response;                 }             };         }     };     // Send XHR     xhr.send(); }   };      thanks a lot for any possible advise or sample code you might have. Michele

I would like to upload a file asynchronously with jQuery.     $(document).ready(function () {     $("#uploadbutton").click(function () {         var filename = $("#file").val();          $.ajax({             type: "POST",             url: "addFile.do",             enctype: 'multipart/form-data',             data: {                 file: filename             },             success: function () {                 alert("Data Uploaded: ");             }         });     }); });  File <input type="file" id="file" name="file" size="10"/> <input id="uploadbutton" type="button" value="Upload"/>     Instead of the file being uploaded, I am only getting the filename. What can I do to fix this problem?


For what values of $x_1, x_2, x_3, x_4$ is the matrix $A=\begin{pmatrix} 1 & 1 & 1 &1 \\  x_1 & x_2 & x_3 &x_4 \\   x_1^2& x_2^2 & x_3^2 & x_4^2\\   x_1^3& x_2^3 & x_3^3 &x_4^3  \end{pmatrix}$ is invertible  Do I need to calculate det 2x2, 3x3 and so on or?

A Vandermonde-matrix is a matrix of this form:  $$\begin{pmatrix}  x_0^0 & \cdots & x_0^n \\ \vdots & \ddots & \vdots \\  x_n^0 & \cdots & x_n^n \end{pmatrix} \in \mathbb{R}^{(n+1) \times (n+1)}$$.  condition ☀ : $\forall i, j\in \{0, \dots, n\}: i\neq j \Rightarrow x_i \neq x_j$  Why are Vandermonde-matrices with ☀ always invertible?  I have tried to find a short argument for that. I know some ways to show that in principle:   rank is equal to dimension all lines / rows are linear independence determinant is not zero find inverse   According to , the determinant is  $$\displaystyle V_n = \prod_{1 \le i < j \le n} \left({x_j - x_i}\right)$$  There are two proofs for this determinant, but I've wondered if there is a simpler way to show that such matrices are invertible.


Unlike the answer to this question () I want to be able to see content of files that haven't been created yet as or after they are created.  I don't know when they will be created or what they will be named.  That solution is for a specific file and actually mentions in the question title creating a "hook" to a specific file.  My question is different because I don't want to hook anything, and what I do want is not specific to a particular file.  My question's title specifies "..as they are created" which should be a clue that the files I am interested in do not exist yet.  I have an application that users use to submit information from a website.  My code creates output files when the user is finished.  I want to be able to see the content of these files as they are created, similar to the way tail -f works, but I don't know ahead of time what the filenames will be.  Is there a way to cat files as they are created or would I have to somehow create an endless loop that uses find with the -newermt flag  Something like this is the best I can come up with so far:  #!/bin/bash # news.sh  while true do   d=$(date +"%T Today")   sleep 10   find . -newermt "$d" -exec head {} + done   For clarification, I don't necessarily need to tail the files.  Once they are created and closed, they will not be re-opened.  Existing files will never change and get a new modification time, and so I am not interested in them.

I want a script to sleep unless a certain file is modifed/deleted (or a file created in a certain directory, or ...). Can this be achieved in some elegant way? The simplest thing that comes to my mind is a loop that sleeps for some time before checking the status again, but maybe there is a more elegant way?


For academic purposes I'm reinventing the wheel a bit and try to write a HAL library. Now in designing it I encountered a compiler error that I do not understand. template< class DRIVER, class PORT, class PIN > class Instance {         Instance(){}     public:           static void set(const bool val)        {          DRIVER::GPIOPeripheral<PORT, PIN>::set(val);        }       // ... };  The idea is that a driver class defines the 'how' and an GPIO class defines the, well, GPIO interface abstraction. The driver class looks something like this: class SOC_xyz  {     SOC_xyz(){};  public:     template<class PORT, class PIN>     class GPIOPeripheral     {         static void set(const bool val){ /* ... */ };     } };  The call in the actual code looks like this: typedef Instance<SOC_t, PORT0_t, PIN0_t> GPIO0_0; GPIO0_0::set(1);  Now the compiler gives me a  error: expected primary-expression before ',' token  for the Instance::set function where the DRIVER::GPIOPeripheral<PORT, PIN> gets called. From my understanding it tries to tell me that the class-template-member addressing part is wrong but this is beyond my C++ knowledge. Is that, what I try to do, even possible?

In templates, where and why do I have to put typename and template on dependent names? What exactly are dependent names anyway?    I have the following code:  template <typename T, typename Tail> // Tail will be a UnionNode too. struct UnionNode : public Tail {     // ...     template<typename U> struct inUnion {         // Q: where to add typename/template here?         typedef Tail::inUnion<U> dummy;      };     template< > struct inUnion<T> {     }; }; template <typename T> // For the last node Tn. struct UnionNode<T, void> {     // ...     template<typename U> struct inUnion {         char fail[ -2 + (sizeof(U)%2) ]; // Cannot be instantiated for any U     };     template< > struct inUnion<T> {     }; };   The problem I have is in the typedef Tail::inUnion<U> dummy line. I'm fairly certain that inUnion is a dependent name, and VC++ is quite right in choking on it. I also know that I should be able to add template somewhere to tell the compiler that inUnion is a template-id. But where exactly? And should it then assume that inUnion is a class template, i.e. inUnion<U> names a type and not a function?


Is there a way through which I can make the sudo command give me permissions for a longer period than its default time?  It can be a pain having to keep entering the sudo password, when requiring the installation of many packages, so it would be nice if there exists a command or configuration that can be done to affect it usage period.

I find that if I execute something using sudo that then if I execute something else soon after also using sudo, that it does not prompt me for my password, and although this can be inconvenient in some situations, it is a security risk in others, and a hassle to keep on coming back and executing the command to make it prompt your for the password on the next go. So I was wondering if and how I could get it to prompt me every time, or for it to at least only remember my password for a very short amount of time?


I have array like this:  Array (    [0] => Array ( [0] => Red [1] => Blue [2] => Black [3] => White [4] => Silver)   [1] => Array ( [0] => Yellow [1] => Green [2] => Pink [3] => Purple)   [2] => Array ( [0] => Orange [1] => Olive [2] => Lime) etc.. )   Expected array:  Array (     [0] => Red    [1] => Blue    [2] => Black    [3] => White    [4] => Silver    [5] => Yellow      [6] => Green    [7] => Pink    [8] => Purple    [9] => Orange    [10] => Olive    [11] => Lime    etc.. )    How to this refactoring? I can't understand  Thank you!

It's probably beginner question but I'm going through documentation for longer time already and I can't find any solution. I thought I could use implode for each dimension and then put those strings back together with str_split to make new simple array. However I never know if the join pattern isn't also in values and so after doing str_split my original values could break.  Is there something like combine($array1, $array2) for arrays inside of multi-dimensional array?


What is the Difference Between Process Builder And Flow .Any One Give Main Differnce.

I am learning process builder, I am getting confused then what is the difference between process builder and workflow. I mean when to use workflow and when to use process builder? If possible please explain me with examples.


I saw this below message on some page     We are no longer accepting answers from this account. See  to learn more   But http://goo.gl/C1Kwu is a just text. Stack Overflow is a big professional site, so can you change this text to URL (link button style) or this format below?     Sorry, we are no longer accepting questions from this account. See the  to learn more.

Related:    The helpcenter has . It still links to the  for further details. Besides that, the question ban message .  Now that we have the helpcenter, could the following changes be implemented?   Link to the help center instead of the meta post Remove the link to the meta post from the help center, and instead incorporate its contents into the helpcenter itself


I want to know if my girlfriend, who is in Germany, can provide me with an invitation letter and her bank statements, showing she's the one funding my trip and everything. Will it help me get the visa, even though she is studying and working at the same time?

I'm invited by my girlfriend in Germany and she is supporting me with everything. So I want to know if i will be granted the Schengen visa, if she is the one who write the affidavit for financial support?


I take the canned data that is used to demonstrate the coxph function in R, and then I look at the cumulative hazard.  require(survival) options(na.action=na.exclude) # retain NA in predictions fit <- coxph(Surv(time, status) ~ age + ph.ecog + strata(inst), lung) x <- basehaz(fit) p <- x[x$strata=='inst=1',]$hazard plot(p)   basehaz is reporting a cumulative hazard function that moves greater than 1.    How is this possible?

I keep running into problems in understanding hazard rates. I know, for example, that in a strict sense a hazard rate is not a probability and it is continually mentioned that because of this the hazard rate has no upper bound.   Am I right in understanding that hazard function values can be interpreted as instantaneous failure rates? Given this interpretation, I still have trouble seeing how this could exceed 1.  I've seen derivations of the constant hazard rate $\lambda$ for the exponential distribution, so I see that for $\lambda \geq 1$ my question seems to have an obvious answer. But even then, is $\lambda$ not techincally a rate? I know we often just simplify and say, for instance, $\lambda = 3$. But don't we really mean $\lambda = 3$ per 1000 or 3 per 100? And if that is the case, can we really say the hazard rate is exceeding 1 in this case?  If someone could provide alternative examples where $h(t)\geq 1$ or help me understand my misconception it would be much appreciated.


My dwellers don't seem to be able to carry more than 100 items in the wasteland. Does anyone know if that's only for show or does anyone know if that's all they'll bring back when they return?  Also it seems that any items found in the scrolling text aren't being added to the list of items below once they reach that limit.

Sending dwellers into the wastes to explore, and I find they stop finding items after 13. Is there a maximum capacity for explorers, and any way to get them to drop low-value items while they are out there?


Is there any function which can give you all the types of view modes available for specific node?  Also is there any direct(UI) way to check it ?  Is going to edit->manage_display the only way to get the view modes ?

I need to have a list of all available view modes for an entity type so I can use it as the #options in a select field.  Any ideas? Thanks


Transitive verbs take object directly. Source -     If "click" is a transitive verb, why do we say "click on the image" and not "click the image"?

In the context of computers or websites, when should one use click or click on?   Click (on) the right mouse button Click (on) the word 'Download' Click (on) the Start button Click (on) here for more information


Say that data is assumed to be exponentially distributed with mean $\zeta$. The likelihood function then incldues the factor $\exp{- \sum x_i/\zeta}$. For a big data set, this is potentially a really small value. How does one then deal with things like the likelihood ratio test, in which we need to take the ratio of such really small numbers?  I've tried R and it doesn't do it properly. It just returns NaN.

I currently have a likelihood function defined as the following:  $$  L=\prod_{i=1}^{N}\left[\prod_{s=1}^{S_i}L_{is}(y\space|\space \rho_A)\times\phi + \prod_{s=1}^{S_i}L_{is}(y\space|\space \rho_B)\times(1-\phi)\right] $$  Here, $y$ is an observation, $\rho_A$ and $\rho_B$ are defined to be a vector set of parameters, and $\phi$ is just a variable.   What makes this likelihood different than the usual likelihoods I have seen is that not only are there are $N$ observations, but each observation has sub-values up to $S_i$, for $i=1,...,N$.   My problem right now is that the $L_{is}(y\space|\space \rho_A)$ are small to begin with, with some values around $0.000000001$ or even $0$. Therefore, if I multiply many of these small values, I get an even smaller result that R or most other languages will just treat as zero. However, taking the logarithm of $L$ only converts the first product into a sum, which doesn't help at all.  I've also tried to take the exponential, and then the log of the product, but I still have values that go straight to zero. Would anyone know of a prudent transformation to use? I have tried to use the log-transform method where I find the maximum, then re-scale, as in here: . However, it appears that this would work for likelihood's with denominator's of zero. Thanks!


I saw this format in a paper. This is obviously not a picture. These numbers can be copied and pasted like other text. How is this done? Thanks.

I'm trying to put a nice square bracket over a complex text, it should look like an \overline but with ending like  \ulcorner and \urcorner. The presence of \overrightarrow and \overleftarrow makes me believe that is possible to decorate the end of the \overline bar.  I know the existence of \overbrace, but I need a square bracket; moreover, \overbrace takes too much vertical space


I've been deciding on whether to install Ubuntu and keep it as dual-boot, or to only use Windows, and I need to know how to uninstall Ubuntu and keep Windows alone, with all my Windows data left on the system.

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


I’m going through a tough time financially and decided to find someone who can give me money. Within 3 days of talking, this man paid me. He's asking me to send money to his daughter through Cash App and I’ve seen a lot of stories of people being scammed in that way. He does not have my banking information but he made me send a picture of my ID to make sure I wasn’t scamming. I did, but crossed out all personal info, leaving just my face and name. Should I trust him?

I met a guy on a sugar daddy dating site and we talked, I told him my situation and he said he would help.   He asked for my bank account information and I told him you can use cash app or PayPal to go through. He said his account manager deals with his finances. So I set up an account with a bank that I don’t use so that my primary account isn’t used.  Eventually he was in the process of sending me money and we had agreed on a amount that wasn't crazy. But then he asked for my address and I asked why and he said just wondering. Then said he wanted to send me a surprise for being his baby. Which I didn’t give.  Then later on he sent the money and said he sent me a bonus and that I was supposed to use that to pay his mothers caregiver, which he didn’t mention until after.  I kept questioning him and he was saying that he works in construction and he’s trusting me to carry out the errand. Then he said don’t let him down and I asked him if he was threatening me and he kept saying I need this done but didn’t really answer my question.  Am I being scammed? I’m about to change my password but is this a scam?


If we roll a dice till getting the number 5 (or any other number) - how can I calculate the average number of dice rolls? Thanks

On average, how many times must I roll a dice until I get a $6$?  I got this question from a book called Fifty Challenging Problems in Probability.   The answer is $6$, and I understand the solution the book has given me. However, I want to know why the following logic does not work: The chance that we do not get a $6$ is $5/6$. In order to find the number of dice rolls needed, I want the probability of there being a $6$ in $n$ rolls being $1/2$ in order to find the average. So I solve the equation $(5/6)^n=1/2$, which gives me $n=3.8$-ish. That number makes sense to me intuitively, where the number $6$ does not make sense intuitively. I feel like on average, I would need to roll about $3$-$4$ times to get a $6$. Sometimes, I will have to roll less than $3$-$4$ times, and sometimes I will have to roll more than $3$-$4$ times.  Please note that I am not asking how to solve this question, but what is wrong with my logic above.  Thank you!


Let's assume I have a conductive rod with mass $m$ and with steady current $I$. I can make the current flow in such a direction and magnitude that the magnetic force will make it move up, thus something is doing work on the rod. But it can't be the magnetic field since it's perpendicular to the direction of motion.  I still don't understand; what is doing work on the rod?

I've seen some conflicted answers to this question in texts and on the web, in the case of a dipole, for example.   Do magnetic fields do work directly, or is it their induced electric fields that do work?


The review link, compared to the help dropdown, is not well aligned. Should probably align the 2 of them more properly.

It shows like this on Firefox 25 and Internet Explorer 11 (minus the red line of course):    Chrome seems to be fine.


How do you convert a pandas dataframe column from a date formatted as below to a number as shown below:         date  0 4/5/2010      1 9/26/2014      2 8/3/2010       To this         date newFormat 0 4/5/2010     40273 1 9/26/2014    41908 2 8/3/2010     40393  Where the second columns is the number of days since 1/1/1900.

If I have two dates (ex. '8/18/2008' and '9/26/2008'), what is the best way to get the number of days between these two dates?


For those who have tried it, Im thinking like the smokey flavor in Stone's 'Matts Burning Rosids'.

I'm only just getting started with homebrewing however I have a longer term goal of going all-grain and brewing a porter with a distinctly smokey flavour to it.  Something similar to the flavours found in Bombardier Satanic Mills.  What factors go in to achieving this flavour?


list all the equivanlance relations in the set A={1,2,3,4)  so there should be 15 right? so what I got so far  (1 1) (22) (33) (44) (12) (13) (14) (21) (23) (24) (31) (32) (34) (41) (42) (43) these are 16 what did i do wrong

How can I calculate how many equivalence relations can be defined on a given set?  For example:     How many possible equivalence relations can be defined on S =   {a,b,c,d}?


test 1:  update tb_chapters t set t.order_id = (SELECT COUNT(*) AS c FROM tb_chapters t2 WHERE t.bid = t2.bid AND t.id > t2.id)   error:  1093 - You can't specify target table 't' for update in FROM clause     test 2:  update tb_chapters t set t.order_id = (SELECT t2.c FROM (SELECT COUNT(t1.id) AS c FROM tb_chapters t1 WHERE t1.bid = t.bid AND t1.id < t.id) AS t2)   error: 1054 - Unknown column 't.bid' in 'where clause'     test 3:  update tb_chapters AS t JOIN (SELECT id, COUNT(id) AS c FROM tb_chapters t1 WHERE t1.bid = t.bid AND t1.id < t.id) AS t2 USING(id) set t.order_id = t2.c   error: 1054 - Unknown column 't.bid' in 'where clause'

I have a table story_category in my database with corrupt entries. The next query returns the corrupt entries:  SELECT *  FROM  story_category  WHERE category_id NOT IN (     SELECT DISTINCT category.id      FROM category INNER JOIN         story_category ON category_id=category.id);   I tried to delete them executing:  DELETE FROM story_category  WHERE category_id NOT IN (     SELECT DISTINCT category.id      FROM category        INNER JOIN story_category ON category_id=category.id);   But I get the next error:      #1093 - You can't specify target table 'story_category' for update in FROM clause    How can I overcome this?


When i was implementing my codes in jtable in swing, i realized from their tutorial website. They use[][] as the code shown below. Ive tried searching throughout to find the use case but i am unable to find. The only link i found was   String arr_a[][] = {{"HelloWorld 1"},{"HelloWord2"}};   Currently, i am working on creating an object array to place it insde data..  ArrayList<String> Arr = new ArrayList<String>();     Arr.add("Farid");     Arr.add("Farid_2");      Object[] DName = new MyData[Arr.size()];         for(int i = 0; i < DName.length;i++){             DName[i] = new MyData(Arr.get(i));             System.out.println(DName[i].toString());         }     //-- How do we implement DName in data[][]          String data[][];         ....         ....   For an example , it have to be in this form to display the values in jtable based on what is shown in the tutorial website  String data[][] = {{"test_1"}{"test_2")};   Thank you in advance

I have recently been thinking about the difference between the two ways of defining an array:   int[] array int array[]   Is there a difference?


I want to split up a very long equation. Here is my code:  \documentclass[11pt,a4paper,oneside,onecolumn,article]{memoir} \usepackage[latin1]{inputenc} \usepackage{mathtools} \usepackage{amsmath} \usepackage{amsfonts} \begin{document} \begin{equation} \text{RBE}(LET_d,D,(\alpha /\beta)_{phot}) = \frac{1}{2D}\cdot \left(\sqrt{\left(\frac{\alpha}{\beta}\right)_{phot}^2+4D\left(\frac{\alpha} {\beta}\right)_{phot}\left(p_0+\frac{p_1}{(\alpha/\beta)_{phot}}\cdot LET_D\right)+4D^2\left(p_2+p_3\sqrt{\left(frac{\alpha}{\beta}\right)_{phot}} \cdot LET_d\right)^2} -\left(\frac{\alpha}{\beta}\right)_{phot}\right) \end{equation} \end{document}   And it looks like this:   Thank you in advance!

I am having the following equation:  \begin{equation}   Q(\lambda,\hat{\lambda}) = -\frac{1}{2} P(O \mid \lambda ) \sum_s \sum_m \sum_t \gamma_m^{(s)} (t) \left( n \log(2 \pi ) + \log \left| C_m^{(s)} \right| + \left( \mathbf{o}_t - \hat{\mu}_m^{(s)} \right) ^T C_m^{(s)-1} \left(\mathbf{o}_t - \hat{\mu}_m^{(s)}\right) \right) \end{equation}   which does not very well fit on one line. How can I split this over two lines? What I have in mind is that I specify the splitting place, and that the first line is left aligned and the second line right aligned to make clear that it is still the same equation.  The linebreak \\ does not work.


I was trying to calculate the performance of my algorithm by first implementing it in Java and then calculating the processor time for different inputs. I used ThreadMXBean.getCurrentThreadCpuTime() to get the system time.  I profiled it first using the following code:  calculateProfile() {    for (int n = 10; n <= 200; n++) {    long time_beg = getCurrentThreadTime();    run_my_algorithm(n);    long time_end = getCurrentThreadTime();    System.out.println("Output = " + n + " " + (time_end - time_beg)); }   However, I was surprised to see that with an increase in the value of n, the time profile does not increase as expected. In some cases, the execution time actually decreased, although my algorithm has a time complexity of O(n).  To look into the problem, I changed this code to run my algorithm once on each execution, and manually checked the time profile for each execution instance. In this case, I find a linear increase in execution time with respect to n. So my question is: How are the two cases different? What is making this difference in profile patterns? And, how to best automate this profiling process in that case?

How do you write (and run) a correct micro-benchmark in Java?  I'm looking for some code samples and comments illustrating various things to think about.  Example: Should the benchmark measure time/iteration or iterations/time, and why?  Related:


Let $A$ and $B$ be $k\times k$ matrices such that $AB^k - B^kA = B$. I have to prove that $B$ is nilpotent. It is easy to see that $\text{trace}(B) = 0$. I do not have any idea how to proceed further.

Let matrix $A_{n\times n}$, be such that there exists a matrix $B$ for which $$AB-BA=A$$  Prove or disprove that there exists $m\in \mathbb N^{+}$such  $$A^m=0,$$  I know $$tr(A)=tr(AB)-tr(BA)=0$$ then I can't.Thank you


I'm using MS SQL Server 2005.  Is there a difference, to the SQL engine, between  SELECT * FROM MyTable;   and  SELECT ColA, ColB, ColC FROM MyTable;   When ColA, ColB, and ColC represent every column in the table?  If they are the same, is there a reason why you should use the 2nd one anyway? I have a project that's heavy on LINQ, and I'm not sure if the standard SELECT * it generates is a bad practice, or if I should always be a .Select() on it to specify which cols I want.  EDIT: Changed "When ColA, ColB, and ColC are all the columns to the table?" to "When ColA, ColB, and ColC represent every column in the table?" for clarity.

I've heard that SELECT * is generally bad practice to use when writing SQL commands because it is more efficient to SELECT columns you specifically need.  If I need to SELECT every column in a table, should I use   SELECT * FROM TABLE   or   SELECT column1, colum2, column3, etc. FROM TABLE   Does the efficiency really matter in this case? I'd think SELECT * would be more optimal internally if you really need all of the data, but I'm saying this with no real understanding of database.  I'm curious to know what the best practice is in this case.  UPDATE: I probably should specify that the only situation where I would really want to do a SELECT * is when I'm selecting data from one table where I know all columns will always need to be retrieved, even when new columns are added.   Given the responses I've seen however, this still seems like a bad idea and SELECT * should never be used for a lot more technical reasons that I ever though about.


I checked my data to know if they're normally distributed using SPSS.  However, I saw that KS test and SW test gives different significance values. They give conflicting significance values, KS test says that one is normally distributed while SW test says it not, and vice versa. Which test of normality will I follow?

I have been trying to establish whether I could model my data, a set of 90 observations, using the normal distribution. I have tried the Shapiro-Wilk and the Anderson-Darling tests but each came back with a different result.  Anderson-Darling normality test  data:  x A = 0.6994, p-value = 0.06555  Shapiro-Wilk normality test  data:  x W = 0.9645, p-value = 0.0154  If we are to use the strong 1% significance level, the null of normality cannot be rejected in either case. Using the 5% size, however, we see that the SW test rejects the null while the AD one narrowly accepts it.   The results are conflicting and I do not know on which to place my trust. If I knew the power of each test, I could make up my mind so is there perhaps a way to obtain the power functions in R? The Normal distribution is easy to work with and it would make sense in my case seeing that my observations are test scores but I do not want to make farfetched assumptions.  I also have to say that personally, I am not convinced that the underlying distribution is normal. Please take a look at the histogram below, upon which I have fitted a normal distribution with the same mean and standard deviation.    It does not seem to be a good match. Below is the normal qq plot:    There is a hint of linearity but there are also a lot of outliers. As far as I know, the Shapiro-Wilk test is based on order statistics and it does not support the normality hypothesis.  If we were to reject the normality of my data, then what would be an acceptable distribution here? Note that we are looking for a negatively skewed one.  All suggestions are welcome. Thank you.  EDIT: This is my vector of observations in ascending order, i.e. the 89 order statistics, in case anyone wants to test it further:      sort(x)   19 32 37 37 37 42 42 45 45 45 46 46 46 47 47 48 48 50 51 54 55 55 55 55 55  55 55 56 56 56 56 57 57 58 58 58 60 60 60 60 61 61 62 62 62 62 62 62 62 62  62 62 63 63 63 65 65 65 66 66 67 67 67 67 68 68 68 68 70 70 71 71 71 72 72  75 75 76 76 77 77 77 77 77 78 78 78 80 81


I would like to add a subscript to my equation. For example the following one: W(P_{r}, P_{q}) = \min_{G} \max_{D \in \mathcal{D}} \mathbb{E}_{x \sim P_{r}}[D(x)]  - \mathbb{E}_{\hat{x} \sim P_{g}}[log(1 - D(\hat{x}))]  However, as it is the subscript to \mathbb{E} does not work beneath, but in the right down corner. I would like to achieve sth like:  How can I do so?

How can I get an expectation symbol which behaves like $\sum$?  Specifically, I want the underscore to be like that of a summation.  At the moment I use   $$\mathbb{E}_{x\in A}$$    However, I do not like this.  It feels like I am writing a sum as   $$\Sigma_{x\in A}$$    Whereas the alternative  $$\sum_{x\in A}$$   is much nicer when in a centered equation.  (The underscore appears directly below the sigma, instead of slight infront and below.)  Is there a way to make an expectation symbol which behaves like $$\sum$$ rather then $$\Sigma$$?


The trigger is giving me an error      CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY . Maximum trigger depth exceeded.   Now this trigger is working f9 in after insert event but i want it after update. I can't understand where its going wrong.     trigger updatingsuffix on Account (after update) {     List<Account> acclst=new List<Account>();     Set<Id> accset=new Set<Id>();     if(trigger.IsInsert){         for(Account a:trigger.new){             accset.add(a.Id);         }          for(Account a:[select Id,Name,Gender__c from Account where Id=:accset]){             if(a.Gender__c=='Male'){                 a.Name='Mr. '+a.Name;                 acclst.add(a);             }             else if(a.Gender__c=='Female'){                 acclst.add(a);             }         }         if(acclst!=null){             update acclst;         }     } }

I added a new field on Opportunity table to keep a count of records, as well as track the updates made on that record.  This is needed for an external system we use. Opportinity table already has around 5000 records now. I would like to update the new field that I added with some sequence order initially. Say each record to have a unique sequence number like 1,2,3 etc(can't use the Id field for unique). The field "Identifier__c" was added for this purpose with data type number and unique contraint. For that I created a temporary class and trigger. But it is throwing the error.     Review all error messages below to correct your data. Apex trigger OpportunitySAPIdentifierHandler caused an unexpected exception,   contact your administrator: OpportunitySAPIdentifierHandler: execution   of BeforeUpdate caused by: System.DmlException: Update failed. First   exception on row 0 with id 006E00000038FPSIA2; first error:   CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, OpportunitySAPIdentifierHandler:   execution of BeforeUpdate caused by: System.DmlException: Update   failed. First exception on row 0 with id 006E00000038FPTIA2; first   error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY,   OpportunitySAPIdentifierHandler: execution of BeforeUpdate caused by:   System.DmlException: Update failed. First exception on row 0 with id   006E00000038FPSIA2; first error: SELF_REFERENCE_FROM_TRIGGER, Object   (id = 006E00000038FPS) is currently in trigger   OpportunitySAPIdentifierHandler, therefore it cannot recursively   update itself: [] Class.AutoNumber.OpportunityAutoNumber: line 76,   column 1 Trigger.OpportunitySAPIdentifierHandler: line 4, column 1: []   Class.AutoNumber.OpportunityAutoNumber: line 76, column 1   Trigger.OpportunitySAPIdentifierHandler: line 4, column 1: []:   Class.AutoNumber.OpportunityAutoNumber: line 76, column 1   Below is the trigger and class used.  trigger Opportuniwith sIdentifierHandler on Opportunity (before insert,before update) {          If(Trigger.isInsert || Trigger.isUpdate){             AutoNumber.OpportunityAutoNumber(Trigger.new);         }   }   The class is   public with sharing class AutoNumber {       public static void OpportunityAutoNumber (List<Opportunity> Opp) {          if(Trigger.isUpdate || Trigger.isInsert) {              for(Opportunity p: Opp) {                  List<Opportunity> oppList = new List<Opportunity>();                 oppList = [SELECT Id, createdDate, Identifier__c FROM Opportunity where Identifier__c = null and Id != :p.Id limit 100 FOR update];                 for (Opportunity oppL: oppList) {                      if(oppL.Identifier__c == null) {                          List<Opportunity> OpportunityList = new List<Opportunity>([select Identifier__c from Opportunity where Identifier__c != null order by Identifier__c desc limit 1]);                          if (!OpportunityList.isEmpty()) {                               Decimal maxval = OpportunityList.get(0).Identifier__c;                             oppL.Identifier__c = maxval + 1;                             update oppL;                         }                      }                     // integer currentCounter = Integer.valueOf(opp.Identifier__c);                     // oppr.Identifier__c = currentCounter + 1;                     // update oppr;                 }             }         }        }  }


I used the Stack Exchange API and received this error: [1] "{\"error_id\":502,\"error_message\":\"too many requests from this app/user pair, more requests available in 20189 seconds\",\"error_name\":\"throttle_violation\"}"  I follow the instruction here (), where they "consider > 30 request/sec per IP address to be very abusive and thus cut the requests off very harshly". Therefore, I only send one request every 1 second, and still receive the 502 error, not always but sometimes. What should be the optimal request frequency?

I am using the Stack Exchange API to get Stack Overflow data, but I am getting "too many request from this ip" after making only five requests. I got JSON content like this:  {u'error_id': 502, u'error_message': u'too many requests from this IP, more requests available in 68492 seconds', u'error_name': u'throttle_violation'}   I made the following requests to Stack Exchange without an access token:   "" ---> 2 times called this API "" --> 3 times called this API and on the 4th call I got an exception


I am writing my thesis in Overleaf and on compilation it gives me a warning, which says: Using fall-back BibTeX(8) backend: functionality may be reduced/unavailable. I understand it is because I am using BibTex as my backend instead of Biber. However, my problem is that after the file is complied, it only shows me one of my references and not the other one.  Example of my document is below:  \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[backend=bibtex,style=authoryear,natbib=true]{biblatex} \addbibresource{References.bib} \title{problem with references} \author{abc } \date{August 2019} \begin{document} \maketitle \section{Introduction} \printbibliography[heading=bibintoc,title={References}] \end{document}   Is there any way I can use to show all the references? Note: In particular, my file does not show any references with a template of @misc  Edit: I forgot to add the \addbibresource{} to my example here. But it is there in my file. I didn't have any resources cited in my main.tex file. When I compile the file, it generates one of the resources on its own. However, when I add \cite{Reference1} \cite{Reference2} at the end on my main file it prints both of my resources. But it prints both of my references twice. First with their whole description and then just their title. I'm not sure how can I solve it.

Is there any way to have BibTeX or biblatex insert a bibliography without having citations in the body of the document itself? Maybe a way to hide the in-text citations, so that BibTeX still sees them and includes them in the bibliography, but does not print them in the body?


Let $R$ be a discrete valuation ring on a fraction field $K$ of $R$.  If $x,y\in K$ such that $v(x)< v(y)$, prove that $v(x+y)=\min(v(x),v(y))$.    By definition of discrete valuation, we have that $v(x+y)\geq \min(v(x),v(y))$.    So, we must show the other direction, but I'm not sure how to do this.   I tried something like $v(x)<v(y)$ implies $v(x)-v(y)<0$ implies $-v(xy)<0$, but don't know how that helps.

Let $F$ be a field and $v:F\rightarrow G\cup\{\infty\}$ be a valuation on $F$ so $G$ is a totally ordered abelian group with $\infty$ having the properties $\infty+\infty=g+\infty=\infty+g=\infty$ and $\infty\leq\infty$ for all $g\in G$, $\infty \notin G$.     Show if $v(a)\neq v(b)$ then $v(a+b)=\min(v(a),v(b)$).   I must be missing some trick here on how to show this is true.  My approach has been to use that $G$ is a totally ordered group so I start by assuming $v(a)\neq v(b)$ and letting my first case be $v(a)<v(b)$ as trichotomy holds in $G$. By $v$ being a valuation on $F$, we then have that $v(a+b)\geq \min(v(a),v(b))=v(a)$. From here what I've tried doing doesn't seem to help much.  I've said lets assuming $v(a+b)>\min(v(a),v(b))=v(a)$ and we also have $$v(a+b)> v(a) \Rightarrow v(a+b)+v(a^{-1}) > 0 \Rightarrow v(1+ba^{-1}) > 0$$ and $$v(a)<v(b) \Rightarrow 0< v(b)+v(a^{-1}) \Rightarrow 0 < v(ba^{-1})$$ also $$v(1+ba^{-1})\geq\min(v(1),v(ba^{-1}))=\min(0,v(ba^{-1}))=0.$$  How does one solve this?


Is there some way to get rid of the 'user (home) icon' in the top-left corner of my Ubuntu 20.04 screen?  Clicking on it just duplicates what I get when opening the Files management application which I keep in the Dock since I use it so frequently. Having recently upgraded from Ubuntu 18.04, I don't mind the Trash icon near the top-left corner but this new icon seems redundant.  Is there some added advantage to it that I haven't discovered?

When I start Ubuntu I had my "home/user" in my Desktop. test is my User.   How do I make the folder not be on the desktop?