I'm aware of how to include specific lines from a file such as:  \lstinputlisting[firstnumber=3,firstline=3,lastline=6]{file.c}   but I was wondering if there is a way to insert tokens in my code that the listings package can find and determine the linerange from. This way if I add new lines of code to my file the section I want to include wont change.  For example, I would rather do something like  \lstinputlisting[token=$--$]{file.c}   and have file.c look like:  some code $--$the code I want$--$ other code   rather than writing:  \lstinputlisting[firstnumber=3,firstline=3,lastline=6]{file.c}   that way, if file.c changes to:  some code with more code added $--$the code I want$--$ other code   it still only displays:  the code I want

Is there a way to input particular sections of source code using \lstinputlisting (from the listings package) in a flexible way?  It's possible to use the firstline and lastline options to input particular line ranges, but this isn't robust to changes to the source file.  For example, suppose that the input source file is:  int square(int x) {   return x * x; }  int cube(int x) {   return x * x * x; }   In my LaTeX document, I can include the cube procedure using the command \lstinputlisting[firstline=5,lastline=7]{source.c}.  But suppose I later decide to rewrite the cube procedure.  The input source file becomes:  int square(int x) {   return x * x; }  int cube(int x) {   int x2;   x2 = square(x);   return x * x2; }   Now my LaTeX document will not show the final two lines of cube because the listing uses only lines 5-7.  I could manually update the line range, but this is tedious and error-prone.  Is there a way to mark sections of source code with some kind of label so that the listing will be robust to these sorts of changes?  For instance, perhaps the input source file would be something like  int square(int x) {   return x * x; }  /**\beginlabel{lst:cube} **/ int cube(int x) {   int x2;   x2 = square(x);   return x * x2; } /**\endlabel{lst:cube} **/   so that I could use something like \lstinputlisting[lines=lst:cube]{source.c} to include the section that I want and remain robust to changes.  I am open to using other packages for source code listings (e.g., minted) if helpful.


Need help reading float from console and maintaining decimal values. I am unable to find a good answer online. cout will print correct value but if I add a break point x reads the below given values. Below code for input 1.45 convert x to 1.4500005 and 10.45 to 10.4499998. #include <iostream> using namespace std;  int main() {     float x;         cin >> x;     cout << x;     return 0; }

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


I would like to know how should I write that the number a is not divisible with the number b.   b \not\mid a and I have found there is also another method to write it three vertical points cut by a line. How can I reproduce three vertical points cut by a line?  thanks!

I want to negate the symbol whose code is \models (this would be specific to Formal Logic). How can I do that? I tried a number of combination, but didn't find how this could be done. I tried \neqmodels, \nemodels, \notmodels, \nmodels  but all of them are wrong.  Is there a general way to negate symbols?


I realized that page number of Literature in Table of Contents is wrong, i.e. displays page number of last page of references instead of first page of references (clicking on this number leads to first page of ref.)  \documentclass{harvard-thesis} \usepackage{chngcntr} \usepackage{fancyhdr} \pagestyle{fancy} \fancyhead[LE]{} \fancyhead[RO]{} \fancyhead[RE]{} \fancyhead[LO]{} \fancyfoot[C]{} \rfoot{\thepage}  \fancypagestyle{plain}{% \fancyhf{} \rfoot{\thepage} }  \usepackage{indentfirst} \setlength\parindent{1cm} \usepackage{ragged2e} \justifying \linespread{1.3}  \usepackage[labelsep=period]{caption}  \begin{document} \pagestyle{plain}  \renewcommand{\bibname}{Literatura}  % the front matter \input{frontmatter/coverpage} \maketitle \copyrightpage \abstractpage \tableofcontents %\authorlist \listoffigures \dedicationpage \acknowledgments  \include{chapters/chapter1} \include{chapters/chapter2}  \clearpage \bibliography{literatura} \addcontentsline{toc}{chapter}{Literatura} \bibliographystyle{apalike-fr}   \end{document}   Any solutions?

Is it possible to create a list of all the figures at the end of a document (this I can do) and make it appear in the table of contents?  So in the the table of content there will be a line saying List of figures ... 19 for example?


this is my first time writing in here. so, sorry if i did something wrong. so here's my question, Is there a way to see HDD response rate(in ms) and Disk active rate like on windows 10? Im using Kubuntu 20.10.

How do I view my Disk Activity on Ubuntu? For example, How can I monitor what is being written and read from disk as well as the percentage of disk usage?  I am looking for an application similar to the Resource Monitor in Windows.


For a given fixed volume, can we find the minimum surface area of any shape? We kind of know the minimum surface area is a sphere(restrict our problem in 3 dim space). (correct me if the sphere is NOT a minimum surface area) How do we prove that the sphere is the minimum surface for a given volume?

Has the below question been answered here before?  Prove: For a given enclosed volume, a sphere has minimum surface area.  Please provide link or ways to solve it. I know it is a problem of Minima and involves finding derivative and second derivatives. However, how to to frame the leading equations which has to be differentiated?  I am looking for a way to solve only using High School level Calculus. I think there must be an answer.


I am using a dictionary to store a bunch of counters where each counter is counting the occurence of a file type (.wav, .mp3, etc).  filetypecounter = {}   When I come across a certain file type I want to be able to increase a counter in a pythonic way. So I am thinking...  filetypecounter[filetype] +=1   However, if the filetype is not in the dictionary I want to instantiate it to 1. So my logic is if filetype counter is there, add 1 to the counter value, else set it to one.  if filetype not in filetypecounter:     filetypecounter[filetype] = 1 else:      filetypecounter[filetype] +=1   Is there a more pythonic way?

Given a dictionary, how can I find out if a given key in that dictionary has already been set to a non-None value?  I.e., I want to do this:  my_dict = {}  if (my_dict[key] != None):   my_dict[key] = 1 else:   my_dict[key] += 1   I.e., I want to increment the value if there's already one there, or set it to 1 otherwise.


Sorry for being so simple but i'm finding it really difficult to work out how to split screens and then rejoin them.   so i grab the corner of a screen and drag it creates a new screen then i grab the corner again and sometimes it creates a new one and sometimes it merges them.   I'm a bit confused about the controls.  I looked on the 2.8 manual and I think its a bit out of date as it looks the same as 2.79.  Any help is greatly appreciated

I would like to close some view windows that I opened accidentally.  See the image below:    Edit: another note: I tried searching for the solution, but only found things like "Join Area", which don't seem to work in this situation.


Perhaps this has been answered before, but I've only found oblique references (, , ).  I often find that it makes perfect sense to try and notify two users (neither being the post owner) at once within a single comment; why is it that this practice is prohibited? Something about spam prevention?  The workaround of simply writing two comments seems silly. Why would this practice be allowed if double-pinging is discouraged?

Why does Stack Overflow only allow one @User per comment?  This restriction lead me to a non-comment like :     @MiMo - seem my previous comment (Only one @ user per comment)   Which left me wondering why Stack Overflow is blocking me from notifying two users of a response.  I am sure there is a reason for this, can some one share it with me?


When I go to certain addresses of PDF files, Chrome downloads the PDF instead of opening it using its built-in PDF viewer. The page is then blank white.  There is no problem with my Chrome settings: I try addresses of other PDF files, and Chrome behaves as expected (I have it set to use Chrome's built-in PDF viewer). But every time I try the same problematic address, Chrome downloads the PDF and then displays a blank page.  I am using Windows 10 and Chrome Version 63.0.3239.84 (Official Build) (64-bit).  My specific problematic URL this time is  (a Google search result).

My company moved our shared files from one instance of Microsoft Sharepoint to another instance. Strangely, when I try to open a PDF in the new instance, Chrome downloads the PDF, while in the old instance of Sharepoint, Chrome displays the PDF in its built-in viewer. How can I make Chrome use its PDF viewer for documents in the new Sharepoint? I searched around and most questions on this site and others is about preventing the Chrome viewer. I want to ensure that it is always used.


For $n \geq 2$, we want to prove that       $$ \prod_{k=0}^n {n \choose k} \leq \left( \dfrac{ 2^n - 2 }{n-1}  \right)^{n-1} $$   My first approach was to try and use induction on $n$. The base case is trivial $2 \leq 2$ and all boils down to prove that   $$ \left( \dfrac{ 2^n - 2 }{n-1}  \right)^{n-1} { n+1 \choose n} \leq \left( \dfrac{ 2^{n+1} - 2 }{n}  \right)^{n} $$  Which seems a bit cumbersome. Then I realize we can do the following. We have $n-1$ products of non 1's in both sides of the equation and thus if we can prove that   $$  {n \choose k} \leq \dfrac{ 2^n - 2}{n-1} $$  for $k = 1,...,n-1$ then we are basically done. This indeed seems as a more handeable inequality than the one arising from the induction hypothesis. Notice that ${n \choose k}$ is maximal when $k = [n/2]$ (floor function). But I dont see a way to do it analytically. But, we can also do this:  Rewrite it as   $$ \dfrac{ (n-1) {n \choose k } }{2^n - 2 } \leq 1 $$  Can we interpret the LHS as a probability? We see that the denominator is the size of same sample space. Since $2^n = \sum {n \choose k}$ counts all possible commitees then $2^n - 2$ is the size of the sample space of all possible committees of $n$ people where we donde consider the empty commitee and the commitee with all $n$ people (so that takes 2 out of $2^n$). Now the numerator might be the size of some event of sample space. Event: commitees of size $k$ out of $n$ people. Then the LHS is a $P(E)$ and we know $P(E) \leq 1$. An so this proves what we wanted. But, I am not 100 % whether this argument might work. Any guidance would be helpful!


If there is a company want to have two networks for the user  LAN which is very restricted ( proxy and whitelisting of hostnames and connected to servers) WIFI that is used for free accessing to any site ( Isolated from Network and servers)  The employee is using a laptop for both usage ( WIFI and LAN) What is the most convenient way for normal user for switching between two networks without adding extra cost and without having two networks accessible in same time

I quite often need to reset "Ethernet" connection as shown above. Currently I disable then enable it from the control panel but I wonder if I can create a script that I can simply double-click from my desktop or whatever? My preference would be a batch file simply as I'm most familiar, but I would imagine this is perhaps more suited to Powershell?


If I have a class:  class KlassWithSecret   def initialize     @secret = 99   end end   and run:  puts KlassWithSecret.new.instance_eval { @secret }   it prints 99, but if I run:  puts KlassWithSecret.new.instance_eval do   @secret end   It returns an error: `instance_eval': wrong number of arguments (0 for 1..3) (ArgumentError)  Why can't I use do/end blocks with instance_eval?  P.S. I am using Ruby 2.1.0.

I extracted simple example:  require 'pp' x = 1..3 pp x.map do |i| {:value => i, :double => (i*2)} end pp x.map { |i| {:value => i, :double => (i*2)} }  pp(x.map do |i| {:value => i, :double => (i*2)} end) pp(x.map { |i| {:value => i, :double => (i*2)} })   I am wondering why first pp produces:  [1, 2, 3]   While all the oders are giving:  [{:value=>1, :double=>2}, {:value=>2, :double=>4}, {:value=>3, :double=>6}]   I assume it has something to do with operator precedence. Where can I find good explanation?


In several questions, I read that there are additional validity restrictions for the passport if you visit a foreign country: e. g., a country requires that your passport is valid for at least 6 months after your planned departure.  This restriction seems to be imposed by many countries.  What is the background of this requirement? I mean, a valid passport is a valid passport. And as long as my passport is valid, it should be fine, shouldn't it?

Many countries require a passport to be valid for six months. Sometimes these six months are counted from the date of departure, or from the date of entrance. Even though some of these countries only legally allow you to stay for 30 days or three months. What is the reason such a requirement is in place in many countries?


Can anyone give the LaTeX code for the unusual symbol <<<, and perhaps provide some good examples of its use?  Does it mean "much much less than"?

$A < B$ means $A$ is smaller than $B$.  $A \ll B$ means $A$ is some orders of magnitude smaller than $B$ (see also  for a more in-depth discussion). In modelling, it may mean that $A$ can be neglected ($A + B \approx B$).  In the , section Binary relations, I found the symbols $\lll$ and $\ggg$, spelt as \lll and \ggg, respectively. What does $A \lll B$ mean? An order of magnitude of order of magnitudes smaller? Does it mean $A \cdot B \approx B$ even if $A \gg 1$? Like in this example?  $B=10^{10^{10}}$ and $A=10^{10}$, then $A \cdot B$ = $10^{10^{10}} \cdot 10^{10} \approx 10^{10^{10}+10} \approx 10^{10^{10}} \approx B$.  $\ldots$or does it mean something else?


If we have elements in the lie algebra $a, b \in \mathfrak{g}$, when is it true that $\exp(a) \exp(b) = \exp(b) \exp(a)$? Naively, I believe that if $a$ and $b$ are linearly independent, then their exponentials can commute. I'm not sure how to prove this, however. In the case of matrix groups, I believe the correct condition is that when $a$ and $b$ commute, then we have that $\exp(a) \exp(b) = \exp(b) \exp(a)$, since the matrices $a, b$ will behave just like real numbers. But this "feels wrong", since I am invoking the multiplicative structure of $a$ and $b$. But as elements of the lie algebra, all I have is the vector space structure! I suppose the way to correct this is to use the lie bracket structure, and state that if $[a, b] = 0$, then the exponentials commute? I am still looking for a proof, though. I know a "nuke proof" that . If $[X, Y] = 0$, then we can solve for $\exp(a) \exp(b) = exp(z)$, where: $$ z = a + b + \frac{1}{2}[a, b] + \dots \text{expressions involving }[X, Y] \\ z = a + b + 0 = a + b $$ So this gives me $\exp(a) \exp(b) = \exp(a + b) = \exp(b + a) = \exp(b) \exp(a)$. But this is way too much firepower to prove something that feels elementary; BCH is complicated. What is a simple proof of the above fact?

How to prove the following statement     Prove that $\exp(x)\exp(y)=\exp(y)\exp(x)$ if $x,y\in \mathfrak{g}$ and $[x,y]=0$.   by using the following results:   $\mathrm{ad} (x)\cdot y=[x,y]$; $\mathrm{Ad} (\exp(x))=\exp(\mathrm{ad}x)$.   where $\mathrm{Ad}:G\rightarrow \mathrm{Gl}(\mathfrak{g})$ and $\mathrm{ad}:=\mathrm{Ad}_{\ast}:~\mathfrak{g}\rightarrow \mathfrak{gl}(\mathfrak{g})$.  (Without using the Campbell-Hausdorff formula...)    Attempt:   If $[x,y]=0$, then $\mathrm{ad}(x)\mathrm{ad}(y)=\mathrm{ad}(y)\mathrm{ad}(x)$.  Also, we have $\mathrm{Ad}(\exp(xy))=1$. But I cannot move forward.


My son's passport expires within 5 month, he holds an israeli passport and we fly directly to Toronto from Israel. Is it a problem and I just must renew it? I'm asking because of the eTA issue, it has to be the same passport number. If Ill renew it I will receive a new passport number... I have a huge dilemma because of it. Do you know what should I do?

I am traveling from Boston to Canada by cruise ship. The first port of arrival is on July 30 and the last port in Canada is on August 4. Then I'm flying on August 5 from Montreal to California. My passport is valid until August 20th. Will I have a problem?


So I'm beginning to learn Python and I'm using powershell & Notepad++. The issue I'm having is I noticed when I'm making programs, I get a lot of indentation errors and then I have to go and convert all tabs to spaces, which solves the issue.  My question is, is there anyway to get around this? For instance when you hit tab, it just inserts 4 spaces instead? Because it's really annoying having to consistently do this. I have errors all the time when I have tabs instead of spaces.  Any help is appreciated, thanks guys!

How do I convert tabs to spaces in Notepad++?   I found  that suggests it's possible, but I couldn't find any information about how to do it.   I would like to be able to do that, because some web forms don't respect code with tabs in them.


How to write this Piecewise function using LaTeX?  I tried $ \begin{array}{cc}   \{ &      \begin{array}{cc}       0 & x\leq 0 \\       \frac{100-x}{100} & 0\leq x\leq 100 \\       0 & 100\leq x     \end{array} \end{array} $  but it didn't work perfectly, the bracket "{" looks small, see:


A lot of my tests actually do a bunch of mini tests. The logic kinda looks something like:  tests = [("input", "output"), ("input2", "output2")] for input, output in tests:     # do test stuff...   This works well for the most part. However, when one of the mini tests fails, it's tedious to fix because none of the mini tests after it get run.  How can I get the "mini tests" to behave like separate tests?  I'm using python3's built in unittest module. I've tried using TestSuite as  but it doesn't appear to work.

I have some kind of test data and want to create a unit test for each item. My first idea was to do it like this: import unittest  l = [["foo", "a", "a",], ["bar", "a", "b"], ["lee", "b", "b"]]  class TestSequence(unittest.TestCase):     def testsample(self):         for name, a,b in l:             print "test", name             self.assertEqual(a,b)  if __name__ == '__main__':     unittest.main()  The downside of this is that it handles all data in one test. I would like to generate one test for each item on the fly. Any suggestions?


I noticed that Nobita's marksheet has all the questions ticked, yet he still gets a 0.    Is this a cultural thing where you don't put crosses on a paper or a mistake on the part of the animators?

While watching anime, especially ones that focus on slice-of-life or high school, I often come across a test paper containing a character's score. However, it is interesting to note that the correct answers are circled while the wrong ones are ticked (checked?). As far as I know, ticks are for correct answers and circles are for incorrect answers (unless I've been living in a shell, which would be embarrassing).    The image is from The World God Only Knows OVA: Four Girls and an Idol, where Keima Katsuragi intentionally placed an incorrect answer for question #1. As you can see, it is checked while the rest are circled. Does this mirror how Japan marks the test papers of students? If so, why?


How to show that  $$\lim_{n\to\infty}\left[\sum^n_{k=1}\frac{1}{k}-\ln(n)\right]=0.5772\ldots$$  No clue at all. Need help!  Appreciated!

Problem Prove that the sequence $$x_n=1+\frac{1}{2}+\frac{1}{3}+\cdots+\frac{1}{n}-\ln n,~~~(n=1,2,\cdots)$$is convergent. One Proof This proof is based on the following inequality  $$\frac{1}{n+1}<\ln \left(1+\frac{1}{n}\right)<\frac{1}{n}$$  where $n=1,2,\cdots$, which will be used repeatedly. On one hand, we obtain that $$\ln 2-\ln 1<1,~~\ln 3-\ln 2<\frac{1}{2},~~\ln 4-\ln 3<\frac{1}{3},~~\cdots,~~\ln (n+1)-\ln n<\frac{1}{n}.$$ Adding up all of these，we have that $\ln(n+1)<1+\dfrac{1}{2}+\dfrac{1}{3}+\cdots+\dfrac{1}{n}.$ Hence,$$x_{n+1}=1+\frac{1}{2}+\frac{1}{3}+\cdots+\frac{1}{n}+\frac{1}{n+1}-\ln(n+1)>\frac{1}{n+1}>0.$$ This shows that $x_n$ is bounded below. On the other hand,$$x_n-x_{n+1}=-\frac{1}{n+1}+\ln(n+1)-\ln n=\ln \left(1+\frac{1}{n}\right)-\frac{1}{n+1}>0.$$ This shows that $x_n$ is decreasing. Combining the two aspects, according to Monotone Bounded Theorem, we can assert that $\lim\limits_{n \to \infty}x_n$ exists. Let $\gamma$ (so-called Euler–Mascheroni Constant) denote the limit, i.e. $$\gamma=\lim_{n \to \infty}\left(1+\frac{1}{2}+\frac{1}{3}+\cdots+\frac{1}{n}-\ln n\right),$$which equals $0.577216 \cdots$. We may also express that as $$1+\frac{1}{2}+\frac{1}{3}+\cdots+\frac{1}{n}=\gamma+\ln n+\varepsilon_n,$$where $\varepsilon_n$ represents an infinitesimal related to $n$ under the process $n \to \infty$.


In 2 ways I can show The article URL in my website: My Breadcrumbs website for a content to both of ways is this:  home>>computer>>hardware>>cpu>>this-is-an-article.html  The First way: LINK of article : example.com/computer/hardware/cpu/this-is-an-article.html catagory 1:       example.com/computer.html catagory 2:       example.com/computer/hardware.html catagory 3:       example.com/computer/hardware/cpu.html  THe second way: LINK of article : example.com/cpu/this-is-an-article.html catagory 1:       example.com/computer.html catagory 2:       example.com/hardware.html catagory 3:       example.com/cpu.html  which one is the best for serach engine specialy google?

I'm working for a website to convert the website URL to an SEO friendly URL. I plan to use this:  example.com/category-name/pageid-123-page-name  I looked at some similarly categorized, highly ranked websites. They have the same structure, except for one thing. In one case, the URL format was  example.com/category-name/pageid-123-page-name.html  Another was   example.com/category-name/pageid-123-page-name.php  Now I know the text in URLs help with SEO. Is it more helpful to have a file extension? If yes, which one is better?  Or if my current plan is okay, will it be better with a / at the end?


From a linguistic standpoint, "if and only if" kinda sounds like an angry mother overexaggerating the "if", but mathematically this is not the case. Of course, this is completely irrelevant, I'm just trying to be funny.   I was told that "only if" is different from "if and only if". Instead of opening a Mathematical Logic book and looking through the definitions and proofs, I decided to take the easy route and ask here. If $p$ holds "only if" $q$ holds, shouldn't that mean that if $p$ holds then $q$ also holds, thus making "only if" the same as "if and only if"? Are these the exact same thing but we just ended up using "if and only if" predominantly?

For some reason, be it some bad habit or something else, I can not understand why the statement "p only if q" would translate into p implies q. For instance, I have the statement "Samir will attend the party only if Kanti will be there." The way I interpret this is, "It is true that Samir will attend the party only if it is true that Kanti will be at the party;" which, in my mind, becomes "If Kanti will be at the party, then Samir will be there."   Can someone convince me of the right way?  EDIT:  I have read them carefully, and probably have done so for over a year. I understand what sufficient conditions and necessary conditions are. I understand the conditional relationship in almost all of its forms, except the form "q only if p." What I do not understand is, why is p the necessary condition and q the sufficient condition. I am not asking, what are the sufficient and necessary conditions, rather, I am asking why.


The answer should be good but it always gives output bad, I have tried everything Here is the code : import java.util.*; public class stringuses {     public static void main(String[] args)     {     Scanner sc=new Scanner(System.in);     String str=new String("i am ayush");     System.out.println("Who am i ?");      String ans=sc.nextLine();     if(str==ans)     {         System.out.println("good");     }     else     {         System.out.println("bad");     }        }  }

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


Is there a way for Oracle to read from SQL Server?  We are basically trying to read from a SQL Server table and update the information in Oracle. We used to have a database link in Oracle to another Oracle database.   Now the application is replaced by a new application that runs SQL Server, so we're trying to replicate the same process but now it's Oracle to SQL Server. Hope that makes sense.

I have two servers (both servers are on Windows OS):   Server_A running Oracle 12c Server_B running SQL Server 2014   I want these servers to be able to see each other, so I can SELECT anything I want in Server_A from Server_B and vice versa.  I only want the ability to run SELECT queries (not INSERT, UPDATE, DELETE or any DDL queries), and also if possible to EXECUTE procedures.  What options or technologies we have for achieving this issue and which one is better?    Tell me if any software I have to install or any configuration have to be set on each of servers. I appreciate explaining the instructions step by step.


If the LHC can accelerate a proton to within 3 to 4 m/s of the speed of light, as a point of curiosity, what would happen if the entire LHC loop itself were constructed on train tracks, such that the loop itself could travel at 5 m/s?    Could the proton effectively move, from a stationary earth reference frame, faster than light?

Let's say I fire a bus through space at (almost) the speed of light in vacuum. If I'm inside the bus (sitting on the back seat) and I run up the aisle of the bus toward the front, does that mean I'm traveling faster than the speed of light? (Relative to Earth that I just took off from.)


$$\lim_{n\to\infty}\sum\limits_{0\leqslant{k}\leqslant{2n}} {\frac{k}{k+n^{2}}}$$  I can't figure out the "right" function for this limit. The previous problem was very similar except there was $k^2$ in the denominator, and it wasn't difficult to recognize the Riemann sum for $f(x)=\frac{x}{x^2+1}$.   Given the limits, this integral sum can be written as $\sum{f(\frac{2k}{n})\cdot\frac{2}{n}}$.

I'm just beginning my journey with calculus, and this problem is giving me hard time.  $$\lim_{n \to \infty} \sum_{k=1}^n \frac{k}{{n^2+k}}$$  I calculated first three sums: $$\frac{1}{2}, \frac{16}{30}, \frac{117}{220}$$ From that I guessed that the limit is $$\frac{1}{2}$$. The hard part, though, is proving it.    I reckon that the squeeze theorem should be used here, but I can't seem to find anything useful. (The only sequences I was able to figure out give me limits of 1 and 0, so it's not something I can use)  Maybe you guys can give me some ideas or theorems that can be of use here? I know that this problem could be probably solved using some more advanced calculus techniques, but I'm not familiar with derivatives and integrals yet, and this problem is in the limits section of my problem book, so I'm not supposed to use anything more advanced.


I know one must not cross-post between SE sites. But am I allowed to post the same question, say, on AskDifferent and Apple Support Communities?

I made a question at Stack Overflow long ago and also posted the same question in a non-Stack Exchange website (Xtreme VB Talk). The question .  According to the answer, I shouldn't have cross-posted between Stack Overflow and XtremeVBTalk, because     it increases the probability that wires will get crossed and everyone will waste time.   But I'm not sure why is that wrong. You see, I simply see Stack Overflow and XtremeVBTalk as two different communities with different users. So posting the question in both sites would just give me more answers. And if I got the answer in one of them, I would report back to the other site and let everyone know (and perhaps someone else would be benefited as well). I really doubt it is a waste of time - the more input, the better. The fact that someone was a user in both websites is simply a coincidence.  I realize that Meta Stack Exchange question  exists, but apparently it involves cross-posting within Stack Exchange sites, but this is about external websites instead.  I also realize that I was told that as "advice" (since my question was not flagged or anything), but well, I am now curious: Why would anyone consider this a bad practice?


Blender v2.71  So working on a game in BGE, I can switch from main menu scene to game scene but how do I get the character to get near an object and that object switches to a new scene?  I tried using the near sensor and adding property: player > and controller > scene actuator/ mode: set scene/ scene: scene  But every time my character (property player: float) gets near the object nothing happens

None of the physics sensors in my game work, I'm trying to create an AI man that chases after a player, but for whatever reason, he just won't sense the player, I've tried copying and pasting the property name just to be sure, but that's not it.


What is the difference between .tar.gz and .tar.xz (is there more?)? I know that you can just open up Archive Manager and extract them. But what is the actual difference? Which should I use? What flags should I give tar to extract them in CLI? EDIT: What is the difference between the xz algorithim and the gz algorithim?

Could anyone tell me what is up with so many archives, and how are they differ?  There's at least five that I can think of, .tar.tz, .tar.gz, .tar.bz2, .tar.lz, .tar.z  Which is best for what applications? It just seems silly to make so many variations of the same file but I'm sure there's a reason.


When bitbanging I2C, rather than switching the LOW/HIGH states of the pin, switch between LOW/HiZ by simply altering the DDR/DIR registers.Why is it like this? Why can't we switch LOW/HIGH states of data pin? My controller is communicating with only one slave.

When bit-banging I2C using 2 PIO lines do these lines still need to be pulled high? Obviously using a dedicated I2C bus the lines must be pulled high as the pins are open-drain outputs but PIO pins aren't open-drain.


Sometimes I come across a question that interests me and I go forward and start writing my answer.  Occasionally I'll be finishing up my answer, and someone else has posted an equally lengthy & accurate answer. If the other persons answer not too far off from my own, I tend to abandon my answer, upvote the other persons answer, and leave a comment on their answer if anything minor was missed.  I would like to have a feature where I can view the active number of people answering the same question before I begin to write my answer. I can favorite the question and check back later once those answers have been provided and then asses if I should spend time adding my own alternate answer or commenting on the existing answers.    There is a duplicate here   This question can be closed, I couldn't find that one. However.  I don't agree with the accepted answer - I don't really care who is answering the question, I just want to know how many others are. I agree with the comments provided below that the algorithm to determine this would take some time to perfect.  How long till a user is considered inactive and no longer answering the question? How many characters need to be entered before an answer is considered "in progress" (obviously, more than the minimum character limit). These things add complexity, but add for a more richer experience and a feature that I would welcome. Implementing it? Not trivial in the least.

When a question is open, it would be nice to see that there are X people (or preferrably a list of the X people) who are in the process of writing an answer.  For simple questions, usually once I'm about to hit the "post your answer question" I get the "there are 3 new answers, click here to load them" nag.


I ran do-release-upgrade on one of my 14.04 LTS servers, got no errors and it runs, but I notice that it still has the 3.13.0-101 kernel (and only that version, all earlier kernels and all header files were deleted). A 16.04 LTS server instance on AWS has kernel version 4.4.0-47. Did something go wrong on my local server upgrade? How do I get the v4 kernel, or is that not a problem?

Yesterday I upgraded my Ubuntu Desktop from LTS 14.04 to LTS 16.04. I did it via Software Updater.  There were several errors during the upgrade (is there a place where these errors are listed in the system so I can post it here?). The last one of them was at the end, saying that the boot partition was full. Following a post, I deleted a few kernels which I thought were old.  Now when I do uname -r it tells me that the kernel version is 3.13.0-93-generic, but it should be 4.4 something right? Can it be that I deleted the correct kernel by mistake? If yes, how do I fix this?  But the command cat /etc/os-release shows:  NAME="Ubuntu" VERSION="16.04.1 LTS (Xenial Xerus)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 16.04.1 LTS" VERSION_ID="16.04" HOME_URL="http://www.ubuntu.com/" SUPPORT_URL="http://help.ubuntu.com/" BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/" UBUNTU_CODENAME=xenial   The system seems to think it is 16.04 but I have a feeling there are many other wrong things, I just don't know how to find these upgrade errors.  Is there an official ubuntu post upgrade script that checks if everything is ok?  I don't know if it adds anything, but two other errors that I remember were that the ubuntu software center did not work after the upgrade, I fixed following a post that said it had something to do with a language setting. The other error was that on boot it showed "Lvmetad is not active yet, using direct activation during sysinit" which I fixed by edditing the GRUB file.  Anyways, I just want to know if my system is ok and what is the meaning of this contradiction between the kernel and the system version (if 16.04 had the wrong kernel would it even boot?)  Thank you very much in advance for any help!!!  Edit: Here is what I have installed (output of dpkg -l | grep linux-image):  linux-image-3.11.0-19-generic                                                                linux-image-3.11.0-20-generic                                                                linux-image-3.11.0-22-generic                                                               linux-image-3.13.0-93-generic                                                               linux-image-extra-3.11.0-19-generic                                                           linux-image-extra-3.11.0-20-generic                                                           linux-image-extra-3.11.0-22-generic                                                        linux-image-extra-3.13.0-93-generic


The thing is, it seems to work, but I think it's ignoring the second half. Does it make sense to use this on an app like 7-Zip?

I figured that 2>NUL at the end of DOS commands was enough, but it seems some messages, some error, still get through. So how can I cut off all output whatsoever? Or should I just forget it and allow output through?


what is interface? when using interface?  In Salesforce Give Me Explination

I have a very simple doubt regarding this Interfaces in sales force, Actually what it says is "This class will have a method but the body will be empty. And body for this method will be provided in another class" My doubt is if we are writing a class and method again what is the use of empty method in interface class ?   See this is one interface class  public interface PurchaseOrder {      Double discount(); }   this is my class and empty method  Here i'm providing body to that empty method  public class CustomerPurchaseOrder implements PurchaseOrder {     public Double discount() {         return .05;  // Flat 5% discount     } }   this is my another class where i'm defining class name and same method name and i'm providing body.....how is it different from normal class and method ?


I am trying to install the File Checksum Integrity Verifier utility package on my Win 10. downloaded the folder and extracted it into C:\FCIV and now I have to add that to my system path. I went to control panel -> system -> advanced -> Environment Variables and added C:\FCIV to user variables for owner.   Then when I start up the command prompt and try to run fciv by typing fciv.exe/? as  says, I am getting the error telling me that  fciv.exe is not recognized.   But I can see that the folder FCIV has been added correctly since when I try cd %FCIV% from anywhere, I am able to cd into the folder. From there if I try fciv.exe/?, I can see that fciv is being recognized.   Am I doing something wrong here? Why is the system not recognizing fciv?

Questions about    setting environment variables the PATH   are very common here, and in most cases the answers are very similar to each other. In the future it would be nice to have a good Q/A for this.  So the question is: What are environment variables, like the executable PATH, and how can I change and use them on major operating systems?  A good answer would include a simple explanation of what environment variables and especially PATH mean to the OS, as well as simple guidelines on how to set and read them accordingly.


I'm using Windows dual booting with Ubuntu.  I have uninstalled, and at that time my disk was formated as MBR. After deleting all partitions of Ubuntu I choose to rebuild the MBR in my disk. That way I was sure not to loose the Windows boot loader.  Now I'm using a GPT disk. I want to delete Ubuntu but I'm scared I will loose my Windows boot loader.

I have installed Ubuntu alongside Windows 7 (no separate partitions, I selected inside windows option).   I want to uninstall Ubuntu but last time I tried it and the Ubuntu is released but the GRUB remains. How do I remove GRUB?


Hello everyone i am working on a employee attendance system and i have the following issue.  I want to get the shift based on entry time for example if the worker is starting work betwen 5am and 10 am to be the shift 1 if it enters betwen 11 am and 3pm to be the shift 2 and if it enters betwen 7pm and 11pm to be the shift 3.  Here is what i tryied but i get stuck on getting the current time  $shift= 1;         $stmp = time();         //if($PR_Come <= $5:00 && $PR_Come>= $8:00) { $shift=1;}         //if($PR_Come <= $11:00 && $PR_Come>= $16:00) { $shift=2;}         //if($PR_Come <= $19:00 && $PR_Come>= $23:00) { $shift=3;}         $PR_Come = date("Y-m-d H:i:s", $stmp);         $PR_Year = date("Y",$stmp);         $PR_Month = date("m",$stmp);         $PR_Day = date("d",$stmp);         $sqlcmd = "INSERT INTO $dbname.ppresence (PR_WorkerPTR, WORKER_Name, PR_Come, PR_Year, PR_Month, PR_Day, shift) VALUES "         ."('".ppaddslashes($workerrow["WORKER_ID"])."', '".ppaddslashes($workerrow["WORKER_Name"])."', '".ppaddslashes($PR_Come)."','".ppaddslashes($PR_Year)."','".ppaddslashes($PR_Month)."','".ppaddslashes($PR_Day)."','".$shift."')";         mysql_query($sqlcmd);   PS Sorry for my bad english. :)

Which PHP function can return the current date/time?


I want to declare the return type of a method as the intersection of a type variable and a static interface (say java.io.Serializable).  Ideally, I want to be able to do the following:  public class Main {      public static <I, T extends I & java.io.Serializable> T foo(I object) {         return null;     } }   However, this code gives the following compilation error:  Main.java:3: error: a type variable may not be followed by other bounds     public static <I, T extends I & java.io.Serializable> T foo(I object) {                                            ^ 1 error   According to , this should be possible.     The form of a bound is restricted (only the first element may be a   class or type variable, and only one type variable may appear in the   bound) to preclude certain awkward situations coming into existence.   The error seems clear, but yet no mention to such a restriction in the documentations. As far as I understand, if type variables cannot occur after the first place since an interface is required, and cannot be followed by any other bound as the error says, that would mean that type variables cannot be used in type intersection as such.  Oracle documentations seem to state the otherwise.  Thanks for the insights.

So, I understand that the following doesn't work, but why doesn't it work?  interface Adapter<E> {}  class Adaptulator<I> {     <E, A extends I & Adapter<E>> void add(Class<E> extl, Class<A> intl) {         addAdapterFactory(new AdapterFactory<E, A>(extl, intl));     } }   The add() method gives me a compile error, "Cannot specify any additional bound Adapter<E> when first bound is a type parameter" (in Eclipse), or "Type parameter cannot be followed by other bounds" (in IDEA), take your pick.  Clearly you're just Not Allowed to use the type parameter I there, before the &, and that's that. (And before you ask, it doesn't work if you switch 'em, because there's no guarantee that I isn't a concrete class.) But why not? I've looked through Angelika Langer's FAQ and can't find an answer.  Generally when some generics limitation seems arbitrary, it's because you've created a situation where the type system can't actually enforce correctness. But I don't see what case would break what I'm trying to do here. I'd say maybe it has something to do with method dispatch after type erasure, but there's only one add() method, so it's not like there's any ambiguity...  Can someone demonstrate the problem for me?


I've a bash script that scans php files to find rows like the followin  @include "\057var/\167ww/n\143v/ad\155inis\164rato\162/com\160onen\164s/co\155_spp\141gebu\151lder\057.9e7\064214f\056ico";   I need a way to decode unicode char codes into litteral chars. So I can find the fake icons created by an attacker.  What can I use in bash to decode unicode chars?

I have a list of Unicode codepoints, but I don't know of a "simple" way to convert these hex values into the actual characters they represent...    I've heard that zsh has echo -e '\u0965', but I use bash 4.1.  Is there something as simple as the zsh method, for bash?


When downloading QGIS you can download the Current Release or the LTR Version. But what are the main differences between them?  this question has been asked before but I don't really understand the answers. In the most voted answer the user wrote:  QGIS (long-term release) can be considered static (no new features added) but with cherry-picked patches that are back ported for stability, enhancement and security. QGIS (current release) is mainly different from the LTR, that in addition to back-ported patches, it'll get new features added (from master version) when they are considered stable enough with frequent releases (proposed every 3 months).  I understand that the Current Release has the advantage that it has more tools and features, but what are exactly the advantages of the LTR Version? Does it have better "back-ported patches"? What are back-ported patches practically?

I am after some advice with respect to the QGIS LTR schedule. Our IT managers have recently intervened in our use of QGIS (a State Government Authority) and are wanting to put in place a policy to only install and use the LTR release version, stating that the other releases are effectively 'Beta' versions. Their view is from a stability and security standpoint, not from training and process mapping (as that has nothing to do with them). I have seen and read this article -  Obviously the LTR has a slightly longer testing window so is less likely to have any major issues, but is their view that the other releases are 'Beta' version accurate or misled?


What I'm doing is getting user input with   var x = document.getElementById('id');    and the output is in whole numbers due to rounding errors, so 1.34 is 134 and I display it with  id.innerHTML = '$'.concat(amount / 100);   It is displaying "$1.32" correctly but I don't want "$1.3" for consistencies sake.  So my question is what would be the best way for detecting that "$2.6" for example needs a "0" at the end whereas "$2.53 doesn't? And how to I implement that?

I would like to format a price in JavaScript. I'd like a function which takes a float as an argument and returns a string formatted like this: "$ 2,500.00"  What's the best way to do this?


I'm a complete rookie with Ubuntu, I'm exploring it for hours.  My question is: I saw "AMD drivers are no longer supported on Ubuntu".  Is any possibility to run better graphics in my OS, or other similar?  Anyways, I'm searching for a possible solution.  Here is my benchmark:     Processor     : Intel(R) Core(TM) i5-3330 CPU @ 3.00GHz Memory        : 12223MB   (1986MB used) Machine Type        : Desktop Operating System      : Ubuntu   18.04.4 LTS      -Display- Resolution      : 1920x1080 pixels OpenGL Renderer      : Radeon RX 570 Series (POLARIS10, DRM 3.33.0, 5.3.0-41-generic, LLVM 9.0.1) X11   Vendor        : The X.Org Foundation      -Mother Board- Vendor     : ASUSTeK Computer INC. Version     : System Version   -BIOS- Date       : 01/08/2014 Vendor     : American Megatrends Inc.  Version     : 0904   Thank you in advance :)  PS: Any BIOS configuration recommendations?

I have 14.04.5/16.04 or newer and an AMD GPU. I'm not getting the performance I want, and some programs say they need things like OpenCL.  I've heard about fglrx, but if I try to install it on my machine, it breaks and I have no GUI.  Is there anything I can do to get my AMD card working to its full potential?


A year ago, .  Today, I checked in to see if the issue has been fixed (it hasn't), and I've found that at least one other site (Pro Webmasters) suffers this same dilemma.  The problem is the way that Stack Exchange chat one-boxes links to network sites.  If you post a link to the main site, it grabs that site's logo.  For example, when you paste meta.stackexchange.com into chat, you get a message that looks like this:    That gets one-boxed in place of the link. It's pretty nice.  But some of the network sites have white text (and possible even white logo) on a transparent background. So against the white background of chat, simply nothing at all appears.  For the original example of UX:    And here's a look at what Pro Webmasters looks like:    We can at least see the logo, but the white, borderless text is lost.  For comparison sake, here's the blue background when the person who sent the message is viewing it:    I'm not certain what the easiest solution would be, and I'm sure there are other network sites that probably suffer the same problem.  At a minimum, I would suggest that any future site designs keep this in mind and at least put a border around the text.  The growing list:

Oneboxing of site links is often not visible, especially on beta sites:        Many sites, like Ask Ubuntu and Sharepoint also have predominantly white logos in oneboxes.  These images should have a background colour, so that they are visible.   chat.stackoverflow.com has a slightly off-white background, so the white content is still slightly visible. chat.stackexchange has a pure-white background, white content is gone. the one-box for http://stackexchange.com is pure white, and looks like:        at least on chat.stackoverflow the white is visible:


Note: This is the exact same as a question asked 12 days ago but I do not understand the answer to that and I could not comment on the question so here we are.  is the link to that question. I think the answer is checking all the routes and the costs and then choosing the best one. Is that the best algorithm?  Assume that you are the CEO of a milk delivery company and want to deliver $k$ litres of milk to one of your customers. You can buy milk from another company. Then you should use an arbitrary path to reach your customer. These paths are given to you as a graph $G=(V,E)$. At first, you are at vertex $p$. The objective is to reach vertex $q$. But there are some rules.    Assume that $u$ and $v$ are two arbitrarily chosen vertices. When you go from vertex $u$ to $v$, You should pay $C_{uv} \gt 0$ per litre of milk. Also, for example if before going from $u$ to $v$, the amount of milk was $m$ litres, after going from $u$ to $v$, this amount becomes $m \times Y_{uv}$ such that $0 \lt y_{uv} \le 1$.    Assume that the cost of buying $1$ litre of milk is $\alpha$.    Notice that at the end, there should be $k$ litres of milk left that can be delivered to the customer.    Question:       Find an algorithm to deliver $k$ litres of milk to the customer, with   the minimum cost.   Note1 (The meaning of cost):    Assume that you want to go from vertex $a$ to vertex $b$, $\alpha=2$ and the amount of milk you want to deliver is $1$ litre. There are $2$ paths from $a$ to $b$: 1. Going directly from $a$ to $b$:    You should buy $1$ litre of milk, which costs $2$ units. Then you should go from $a$ to $b$, which costs $C_{ab}=10$. Also, if $Y_{ab}=1$, the amount of milk doesn't change. So, the  total cost becomes $2+10=12$.  2. Going from $a$ to $c$, and then from $c$ to $b$:    You should buy $3$ litres of milk, which costs $6$ units. Then, you should go from $a$ to $c$. If we assume that $Y_{ac}=0.5$, then the amount of milk becomes $1.5$ litres. Also, if $C_{ac}=5$, then we should pay $5 \times 3 = 15$ units for going from $a$ to $c$. Then we go from $c$ to $b$. When we reach $c$, there are $1.5$ litres of milk left. Also, If $C_{cb}=6$, then the price of going from $c$ to $b$ will be $6 \times 1.5 = 9$ units. Also, $Y_{cb}= \frac{2}{3}$. Thus, $1$ litre of milk remains at the end. So, the total cost will be $6+15+9=30$ units.

Assume that you are the CEO of a milk delivery company and want to deliver $k$ litres of milk to one of your customers. You can buy milk from another company. Then you should use an arbitrary path to reach your customer. These paths are given to you as a graph $G=(V,E)$. At first, you are at vertex $p$. The objective is to reach vertex $q$. But there are some rules.    Assume that $u$ and $v$ are to arbitrarily chosen vertices. When you go from vertex $u$ to $v$, You should pay $C_{uv} \gt 0$ per each litre of milk. Also, For example if before going from $u$ to $v$, the amount of milk was $m$ litres, after going from $u$ to $v$, this amount becomes $m \times Y_{uv}$ such that $0 \lt y_{uv} \le 1$.    Assume that the cost of buying $1$ litre of milk is $\alpha$.    Notice that at the end, there should be $k$ litres of milk remained that can be delivered to the customer.    Question:       Find an algorithm to deliver $k$ litres of milk to the customer, with   the minimum cost.   Note1 (The meaning of cost):    Assume that you want to go from vertex $a$ to vertex $b$, $\alpha=2$ and the amount of milk you want to deliver is $1$ litre. There are $2$ paths from $a$ to $b$: 1. Going directly from $a$ to $b$:    You should buy $1$ litre of milk, Which costs $2$ units. Then you should go from $a$ to $b$ which costs $C_{ab}=10$. Also, if $Y_{ab}=1$, The amount of milk doesn't change. So, the  total cost becomes $2+10=12$ 2. Going from $a$ to $c$, and then from $c$ to $b$:    You should buy $3$ litres of milk, Which costs $6$ units. Then, you should go from $a$ to $c$. If we assume that $Y_{ac}=0.5$, Then the amount of milk becomes $1.5$ litres. Also, If $C_{ac}=5$, then we should pay $5 \times 3 = 15$ units  for going from $a$ to $c$. Then we go from $c$ to $b$. When we reach $c$, there are $1.5$ litres of milk remained. Also, If $C_{cb}=6$, Then the price of going from $c$ to $b$ will be $6 \times 1.5 = 9$ units. Also, $Y_{cb}= \frac{2}{3}$. Thus, $1$ litre of milk remains at the end. So, the total cost will be $6+15+9=30$ units.    Note2 (What my problem is):    First, i thought of labeling the edges with their costs. I thought that Kruskal's algorithm would solve the problem. But, There is a huge difference here! We are not sure about the costs! They depend on the amount of milk remained after each choice of vertices! That's where i'm stuck! Its like finding a minimum spanning tree, In a graph with edges having dynamic weights!


Pridemore and Freilich analyzed homicide victimization rates by state for white non-hispanics. Here is the summarization of the regression model.   variable          Intercept RD    PS    YOUNG  DIV     UN    SOUTH beta               -5.230   0.109 1.758 18.293 5.710   5.710 0.257 stand.coef.                0.302 0.216  0.293 0.524   0.118 0.260 p.value            0.001    0.021 0.014 <0.001 <0.001  0.129 0.010          Where, RD is a measure of deprivation, PS is a measure of population structure, DIV is a divorce rate, UN is unemployment rate, SOUTH is a dummy variable that is 1 for a collection of 16 southern states.   The author tells from the summarization, "White non-hispanic rates remained significantly higher in the south when controlling for the covariates."   Now, the question is,  - How the authors reached this conclusion from this regression.  - Do I need to check any assumptions before accepting this conclusion as valid? If so, then what are those assumptions?  I appreciate if I would get a full explanation from this question.

What are the usual assumptions for linear regression?   Do they include:   a linear relationship between the independent and dependent variable independent errors normal distribution of errors homoscedasticity   Are there any others?


Our income is up %15.   What does it mean? Our income is just a little over &15? or is it below %15 but very close to %15

Such phrases describing growth rate as in the above examples are very common, but sometimes I'm confused about how to read them correctly. My understanding is:  If our 2019 sales are up 120% (or has increased 120%) from year 2018, it means, for instance, US$ 100 million in 2018, and US$ 120 million in 2019  If our 2019 sales are up by 120% (or has increased by 120%) from year 2018, it means, for instance, US$ 100 million in 2018, and US$ 220 million in 2019   If the above understanding is correct, then how should I interpret "..... is up 20% from last year"? Is it different from "up 120% from last year"? Or maybe those expressions include some ambiguities?


In Newtons Third Law, it states that for every action, there is an equal but opposite reaction. So that means tat for every action, there will be a reaction to cancel it out. So if that is the case then how can there ever be a resultant force?

Given Newton's third law, why is there motion at all? Should not all forces even themselves out, so nothing moves at all? When I push a table using my finger, the table applies the same force onto my finger like my finger does on the table just with an opposing direction, nothing happens except that I feel the opposing force. But why can I push a box on a table by applying force ($F=ma$) on one side, obviously outbalancing the force the box has on my finger and at the same time outbalancing the friction the box has on the table? I obviously have the greater mass and acceleration as for example the matchbox on the table and thusly I can move it, but shouldn't the third law prevent that from even happening? Shouldn't the matchbox just accommodate to said force and applying the same force to me in opposing direction?


How to adjust the drop shadow when the scene is illuminated by object with emit material

I created an object, and I wanted it to glow. I used to just place points of light around it, and parent them to it, but using the emit option in the materials seemed so much easier.  But when I gave it an a higher emit than 0, it went only a small distance before the light stopped. I turned it up to 200, and the object was white with light, but the light didn't go any farther. Oh and I changed the color, and nothing happened.


I have a csv file and I want to replace a line (remove it and add new information in its place) but I can't use sed. I don't know, my bash terminal doesn't support it. Let's say the csv file is like this:   a,b,c d,e,f   I want to remove the line d,e,f and add g,h,i, for example.

What's the simplest way to do a find and replace for a given input string, say abc, and replace with another string, say XYZ in file /tmp/file.txt?  I am writting an app and using IronPython to execute commands through SSH — but I don't know Unix that well and don't know what to look for.  I have heard that Bash, apart from being a command line interface, can be a very powerful scripting language. So, if this is true, I assume you can perform actions like these.  Can I do it with bash, and what's the simplest (one line) script to achieve my goal?


If an element is contained in a set, and this set is contained in another set, does the second set contain the element? In ordinary language I'd say yes, but my mathematical intuition says no. What's the right answers according to set theory?

I wonder if we can we say $x\in \{\{\{x\}\}\}$?    In one viewpoint the only element of $\{\{\{x\}\}\}$ is $\{\{x\}\}$. In the other viewpoint $x$ is in $\{\{\{x\}\}\}$, for example all people in Madrid are in Spain.


I used the AMD "Catalyst" program (from within Unity) to change to my dedicated graphics card, but now when I try to boot into Ubuntu, I get an error that the graphics driver has failed!  Following this, I am given various options, one of which is to boot into a "safe-graphics" mode, though this is actually not of use because Unity does not load (only the desktop does) and I cannot access Terminal once the window system loads (well, partially loads), even via the Control+Alt+T command.  I can however, use one of the options after Ubuntu whinges (see above) to boot to the old prompt-based setup (i.e. without a window manager loaded) which as I understand it, should allow me to enter Terminal commands directly, just as if I had loaded Unity and opened Terminal...  So in saying this, what command would I use to switch back to my embedded (Intel) graphics?

I've installed 11.10 and the proprietary ATI drivers using "additional drivers" The performance of my system is absolutely awful and it shouldn't be. I tried to remove the proprietary drivers using the Additional Drivers tool and it appears to remove them. However after I reboot I cant get back into my desktop properly (the panel and launcher go missing). This doesn't seem to be an isolated problem in 11.XX.  covers how to restore the desktop (panel and launcher), but the guide doesn't fix my problem though.   Whenever I do sudo unity --reset it runs through its normal processes until it hangs at setting update "run_key" and never gets past that. I must reinstall the proprietary drivers using jockey-text or jockey-gtk in order to get back to my proper desktop.   Interestingly enough the system performance seems improved while it is in its "broken" state (missing panel and launcher).  I think restoring the default drivers may solve my problems but I cant figure out how to do it.


Emplyoyee Information:  Name    Age   DOB ______  ___   _________ Jones   54    06/12/1998  Allen   50    06/09/1990   I want to see the above output in a table.

I am trying to generate and send html files by attaching to email body. I tried using awk for generating and sending one file. eg. the input file MARTINI has these records:  1554894,2015-04-16,00:21:52,processes.martini_gsicorptradeeventoutput.instancecount,0,1,UP 1554793,2015-04-15,22:03:52,processes.martini_gsicorptradeeventoutput.instancecount,2,0,DOWN    and I have this awk in a file named HTML:  awk 'BEGIN {     FS=","     print  "MIME-Version: 1.0"     print  "To:lijo@abc.com"     print  "From:lijo@abc.com"     print  "Subject: Health check"     print  "Content-Type: text/html"     print  "Content-Disposition: inline"     print  """
Ref_id	EOD	Time	Process	Desc	Instance	Status	"     }     {     printf "`<TR>`"     for(i=1;i<=NF;i++)     printf "`<TD>%s</TD>`", $i     print "`</TR>`"     } END {     print "`</TABLE></BODY></HTML>`" } ' /home/martini > /home/martini_html   Later I send this file through email cat MARTINI_HTML | /usr/sbin/sendmail -t . This works until here. But now I have 2 new tasks:  How to convert multiple files Say MARTINI1, MARTINI2 ... etc into html files and how to attach them in email body as separate table block and not as a single table? Some mail utilities such as mailx is not available.


I would like to achieve a result such as the one in the link:   I thought of doing some kind of gradient to the image, but the text still (logically) does not go over the image. And I have a background already, so I could not just use it as a background with gradient... Any tips?

I want to make this for my cover page, to write over an image. Any advice will be very well received.


Please help me to identify the difference between these two sentences   This building has always attracted many tourists. This building has been attracting many tourists.

I have studied "present perfect" and "present perfect continuous" for a week. I know forms, verb and helping verb I should use when I write them.  For me, they have nearly same definition because I can use them interchangeably in Thai language. (My native language)  For example, the sentences        I have learned English language in the past few weeks.    I have been learning English language in the past few weeks.       have no difference in meaning to me. They both mean "I began learning the English language in the past and I am still learning it"  Can I use them interchangeably in English? Or is there any difference between them? For example, when should I use present perfect but not present perfect continuous?


We have setup a server to run our rails 3 app.  Some of the webpages in our app have to process a lot of data and take a long time to complete, a few of them even take as much as 10 minutes to complete.  Our server is setup to only fulfill six requests at a time.  Occasionally, during peak usage, the server ends up getting bogged down for several minutes because the requests it is fulfilling are those that take a long time.  Almost every request that is capable of taking more than a handful of seconds has a route like domain/reports/some_thing.    So anyway, I was going through the , specifically sections 3.1.2 and 3.2, and was wondering if it was possible to configure the ApplicationPool to prefer some sessions over others when it is deciding what session to return to the RequestsHelper (primarily based on the request url being /reports/*)?  Probably only allowing 4 of the 6 processes to handle requests with a url like /reports/* would be ideal.  However, simply preferring all other requests above those with a url like /reports/* would probably be pretty practical.  P.S. I have only just started working with the server aspect of this application.  Let me know if there is an easier way, if you need more details, or very likely, if I'm asking about X...  P.P.S. I am going to be revisiting the pages that are slow in an effort to minimize the number of requests of this type that are made by implementing some things with a more client side approach and possibly by implementing a post/redirect/get structure for these pages as well, however, this will take time and will only make the issue less frequent...

I have a Rails application that unfortunately after a request to a controller, has to do some crunching that takes awhile.  What are the best practices in Rails for providing feedback or progress on a long running task or request?  These controller methods usually last 60+ seconds.    I'm not concerned with the client side... I was planning on having an Ajax request every second or so and displaying a progress indicator.  I'm just not sure on the Rails best practice, do I create an additional controller?  Is there something clever I can do?  I want answers to focus on the server side using Rails only.  Thanks in advance for your help.  Edit:  If it matters, the http request are for PDFs.  I then have Rails in conjunction with Ruport generate these PDFs.  The problem is, these PDFs are very large and contain a lot of data.  Does it still make sense to use a background task?  Let's assume an average PDF takes about one minute to two minutes, will this make my Rails application unresponsive to any other server request during this time?  Edit 2:  Ok, after further investigation, it seems my Rails application is indeed unresponsive to any other HTTP requests after a request comes in for a large PDF.  So, I guess the question now becomes: What is the best threading/background mechanism to use?  It must be stable and maintained.  I'm very surprised Rails doesn't have something like this built in.  Edit 3:  I have read this page: .  I would love to read about various experiences with these tools.  Edit 4:  I'm using Passenger Phusion "modrails", if it matters.  Edit 5:  I'm using Windows Vista 64 bit for my development machine; however, my production machine is Ubuntu 8.04 LTS.  Should I consider switching to Linux for my development machine?  Will the solutions presented work on both?


I want to get in to a graphic design course in university. I have alot of projects in mind, however i dont know if im allowed to use stock photos...would it be ok if they were in the final piece as well (such as in a magazine cover or a brochure). I also want to do photomanipulation, but i dont know if could use stock photos for that either. Thankyou so much

I am a relatively recent graphic design graduate. I have been working at a small printing house for about two years, but will soon be interviewing for a different position in another city.  My question is about what to include in my design portfolio. When I was in school, my professors all insisted that work included in a portfolio should be 100% original: my original photography, my original logos, my original layout, my original written content etc. However, at my current office, we rely heavily on client-supplied logos, type content, and photography—and stock photography (shutterstock, etc).  What do other designers include in their portfolios? Has anyone else had this issue and can I reasonable include these more recent projects in my portfolio if I label them appropriately (something like "layout design")?


1.How can I set the font and size of the TTYs?  The command:  dpkg-reconfigure console-setup   allows me to choose certain fonts/sizes that cannot be installed (an error message appears after the reconfig. process). Moreover, the values set in /etc/default/grub alter everything. Sometimes you are using a font, but after rebooting it is changed.  2.How can I know what font/size is the console using in a certain moment.  There is a how to in the community pages to set the TTY resolution but it has no description of its interaction with the font/size of the console during boot and after.

Is there a way to set a specific TTF font to be used on the console? (I believe you might have to convert it to a bitmap font?)  If it needs to be converted, what tools can I use to do the conversion? Otherwise, how do I pick Ubuntu Monospace for my console font?  (I already have the Ubuntu Monospace font installed from the beta PPA for it.)  Edit: I already set gnome-terminal to use Ubuntu Mono. Now I'm wanting to set the all-text screens I get when I press Ctrl+Alt+F1 to use the same font.


I'm using XeLaTeX with the dblfnote package for two columns of footnotes and a modified footnote command to use letters instead of numbers. Currently my footnotes seem to be in a paragraph format, but I want them all aligned where the first line of text starts (aligned with text, not with the footnote marker). This is what it does currently:    I'd like it to behave like this, with the same indent it currently has inititally:  a Sed at urna vitae libero pulvinar aliquam. In hac    habitasse platea dictumst. b Curabitur luctus leo in nunc tempus, eu fringilla quam    porttitor. c Vivamus semper rhoncus nisl, vitae tempus tellus tris-   tique vel.   Here is a MWE:  % !TEX TS-program = xelatex \documentclass[11pt]{article}  \usepackage{fontspec} \usepackage{libertine} \usepackage[margin=1.25in]{geometry} \usepackage{dblfnote}  \newcommand{\cv}[2]{\textsuperscript{#1:#2}}  \makeatletter \def\@makefnmark{\hbox{\@textsuperscript{\itshape\@thefnmark}}} \renewcommand{\thefootnote}{\alph{footnote}} \makeatother  \begin{document}  \begin{center} {\huge Title} \end{center}  Lorem ipsum dolor sit amet, consectetur adipiscing elit.\footnote{Sed at urna vitae libero pulvinar aliquam. In hac habitasse platea dictumst.} Integer a eros quis nibh pharetra pellentesque. Mauris molestie purus ut arcu ullamcorper, ut mollis ligula molestie. Ut auctor et augue ac ultrices.\footnote{Curabitur luctus leo in nunc tempus, eu fringilla quam porttitor.} Nulla aliquam quis nunc et aliquet. Nullam eu ligula at leo scelerisque euismod.\footnote{Vivamus semper rhoncus nisl, vitae tempus tellus tristique vel.} Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Proin at eros at leo sagittis viverra.  \end{document}

How can I have the following "footnote layout"?  Some Text Some Text Some Text Some Text² Some Text   2 FOOTNOTETEXT FOOTNOTETEXT FOOTNOTETEXT FOOTNOTETEXT FOOTNOTETEXT   FOOTNOTETEXT FOOTNOTETEXT FOOTNOTETEXT FOOTNOTETEXT FOOTNOTETEXT   My problem is that the footnote text starting with the second line is too far left.  \documentclass{article} \usepackage{blindtext}  \begin{document}     \blindtext\footnote{\blindtext} \end{document}


I understand the properties of logarithms. However I am curious if a calculator uses  complex power series, slide rule program, Taylor series, or a form of an algorithm to solve for log"base"n(x).

I would like to know how logarithms are calculated by computers. The GNU C library, for example, uses a call to the fyl2x() assembler instruction, which means that logarithms are calculated directly from the hardware. So the question is: what algorithm is used by computers to calculate logarithms?


I intend to prove that consecutive Fibonacci series terms are co-prime using only property of linear combinations, without recourse to $\gcd$ of the first two terms of the series being $1$, or any way to $\gcd$.  My analysis is based on simple fact that in a Fibonacci series, in general a term is reflected thrice, as shown below:  Let the Fibonacci series be having terms at each step of computation denoted by : $F_{n+1} = F_{n} + F_{n-1}$ with the terms being given in a sequence by:  $$ \begin{align} F_{n} =& \ F_{n-1}+ {\overbrace{F_{n-2}}^{\large last}} \\ F_{n-1} =& \ {\overbrace{F_{n-2}}^{\large middle}} + F_{n-3} \\ {\overbrace{F_{n-2}}^{\large first}} =& \ F_{n-3} + F_{n-4} \\ F_{n-3} =& \ F_{n-4} + F_{n-5} \\ & \ ... \\ F_2=& \ 2.F_1   \end{align} $$  Say, $F_{n-2}$ becomes first, middle and last terms in successive linear combinations. This means that an $even$ term will  lead to first time being a 'first term' (as a sum of two odd numbers); then as 'middle term' (as a sum of itself, and $F_{n-3}$, an odd term), with sum on l.h.s., $ F_{n-1}$ being an odd number (as sum of even & odd) ; then finally as a 'last term' with the sum $F_{n}$ being again an odd number, as $F_{n} = 2.F_{n-2} (even) + F_{n-3} (odd)$.  Definitely, odd and even terms are co-prime, but if some more polished explanation is offered by the property of linear combinations.

Prove that any two consecutive terms of the Fibonacci sequence are relatively prime.   My attempt:    We have $f_1 = 1, f_2 = 1, f_3 = 2, \dots$, so obviously $\gcd(f_1, f_2) = 1$. Suppose that $\gcd(f_n, f_{n+1}) = 1$; we will show that $\gcd(f_{n+1}, f_{n+2}) = 1$. Consider $\gcd(f_{n+1}, f_{n+2}) = \gcd(f_{n+1}, f_{n+1} + f_n)$ because $f_{n+2} = f_{n+1} + f_n.$ Then $\gcd(f_{n+1}, f_{n+1} + f_n) = \gcd(f_{n+1}, f_{n}) = 1$ (gcd property).  Hence, $\gcd(f_n, f_{n+1}) = 1$ for all $n > 0$.  Am I on the right track? Any feedback would be greatly appreciated.  Thanks,


How to prevent double form submission in drupal when i create basic page and click submit 10 times.. then node create 10 times of same content  please suggest me, how to prevent

I'm running into a problem where a user can submit any form built by the Form API multiple times (fast clicking resulting in multiple requests).  I've put in the basic client side (javascript) solution of disabling the button, but I'm curious what the best approach to preventing this situation is on the server side.  Is there a recommended way to use Drupal's form token system to handle this?  Especially a global form solution (ie, adding a custom validator to every form using hook_form_alter()).  My approach so far has been something like this:  function mymodule_form_alter(&$form, &$form_state, $form_id) {   $form['#validate'][] = 'mymodule_form_validate'; }  function mymodule_form_validate(&$form, &$form_state){   //initialize form array   if (!isset($_SESSION['submitted_forms'])){     $_SESSION['submitted_forms'] = array();   }    $form_token = $form_state['values']['form_token'];   if ( isset($_SESSION['submitted_forms'][$form_token]) && $_SESSION['submitted_forms'][$form_token] = TRUE ){     form_set_error('name]', 'This form has already been submitted');   }   else{     $_SESSION['submitted_forms'][$form_token] = TRUE;   } }   I'm running into trouble where the form_token isn't unique to the form - it seems to stay the same no matter what happens.  I'm probably misunderstanding what the token is in the grand scheme of the form api.  Any insight is appreciated!


Which is used to convert analog input signal to PWM output. How can I vary the output with the input? How I can vary duty cycle?

I am building a 1kW PSU that is controlled with DSP MCU. It requires a lot of features such as synchronous rectification, bidirectionality, current regulation. Those features make the PSU very exotic and I was unable to find any suitable PWM control IC. My current problem is that the PSU is unable to regulate current quickly enough and I need to find a solution for that.   It is quite easy to build an analog CMC PWM controller model using ideal analog components and switches. But  I've never seen anyone do that in practice and that suggests me that it might be a terrible idea. There might be complicated problems such as noise pickup or timings mismatches.   Does anyone knows if it is a useful practice to build a PWM controller from discrete components or not and why?


Currently, I am running low on space on my root partition (I need more space to execute the 20.04 update). I have a 14.9 GB swap partition, and a half-filled home partition. I'm thinking I would delete the swap partition, extend my root partition into some, or all of the remaining space, then make a new swap partition by resizing my home partition. This is currently what my  looks like, the first few partitions are for my windows dual boot. How would I accomplish this?

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?


How would I populate a cell with a symbol (for example x) and for that x to convert to currency (for example £4) Could the x also relate another currency in a different cell (for example £10). I then need to be able to add all cells. I am trying to create a register. Thank you

It is difficult to explain what I am looking to do so bear with me, I am trying to create a workbook and I want a specific cell to auto-populate.    I used the IF function because I want the box to populate with information from another field if a condition is met.    For example... I have 3 cells, I want cell C to populate with information provided in cell B but only when cell A is "XYZ" I would assume the function I should use is: =IF(CellA="XYZ","CellB",0).   The problem is I cannot use another cell as the "value".


I finished my 3d model of a face and I tried to import it into Unity. I dragged in the .blend file and then into the scene. But I could only see the back half of the face from where I was looking. I could also see the whole model from the inside.   There is an attached error as well; '.' is not a valid texture file name on asset 'Assets/Imported/NEWFACEblend.blend' on material 'None__Face_001' of renderer 'Plane'. The file will be ignored.

I have modeled a simple pocket watch in Blender. Every time I import it into Unity3D, regardless of whether I export it from Blender as an FBX or 3ds file, it always comes out missing faces! Why is this happening? I have never had problems importing models into Unity3D like this before.  Blender Screenshot    Unity Screenshots     It seems to me that different faces appear when I rotate it differently. How can I prevent this? Thanks!


What is the difference between the following sentences?     1 You have been banned from this server.      2 You were banned from this server.

Source:      There have been seven weeks of protests outside the site from which   "hundreds" of pupils were kept away on Monday.   Why does the sentence say “have been” not  simply “were”?  I think that indicates that the protesters are still protesting untill the moment of writing. Am I correct here?


thi/s is relly g/etting/ in th/e way of thi/ng/s. It does it by it/self about /every thi/r/ty seconds/ or less, and goes on until a new key is h/it - several keys trig/g/er is /as well ing/lduing/// gh esc \ up //////////////////////////// th/ere are other k/eys which /trig/g/er it too. It is only ever/ the / it thinks is being held down. Sometimes it doesn't happen and everything seems to be fine for a while too. They keyboard is clean, nothing has been spilled on it either - my laptop thinks it is clean of virus' and that it's hardware is working fine.   I can ho/nestly say I'm/ at my wits end, because it h/appens so often I can'/t/ /even fix th/em fr/om my typing/. /////////  it/ //h/appened a few /month/s /a/g/o and th/en stopped f/o/r /a few month//s with/ no apparent cha/ng/e to anyth/ing/.

I am running a desktop with Vista.  At random points when typing I will press a key, the key will stick. I will get multiple keypressesssssssssssssssssss. (for example what just happened at the end of that last word!)  Any ideas what is causing this? I dont even know where to start looking here..  EDIT  Ok, have been trying a new keyboard and it hasnt made any difference. Still the same problem.  Any other ideas?


I have always found tikz difficult to learn. But now, I want to write my thesis and I need a good software for drawing. I am a complete beginner.  Do you know good materials to learn tikz?

I feel intimidated in learning TikZ. I was wondering if there are some nice materials (or just your replies) at different level:   for providing big picture, which is important to beginners to not lose direction during learning. for comprehensive reference.   Examples are important, but only examples are not always clear for understanding the big picture and organization.


I want to decrease distance between from the side BC to bottom of border, I tried with no border, but there is white space below side BC.  This is my code  \documentclass[12pt]{standalone} \usepackage{fouriernc} \usepackage{tkz-euclide} \usetkzobj{all} %\tikzset{hidden/.style = {thin, dotted}} \tikzset{hidden/.style = {thick, dashed}} \tkzSetUpPoint[size = 10,fill = black] \begin{document} \begin{tikzpicture}[scale=1] \tkzDefPoints{0/0/A, 6/0/D, -3/-3/B, 3/-3/C, 1/5/S, 1/-2/H} \tkzDefLine[parallel=through H](A,D)  \tkzGetPoint{d}  \tkzDefLine[parallel=through H](A,B)  \tkzGetPoint{l} \tkzInterLL(d,H)(A,B) \tkzGetPoint{M} \tkzInterLL(d,H)(C,D) \tkzGetPoint{N} \tkzInterLL(l,H)(C,B) \tkzGetPoint{P} \tkzInterLL(l,H)(A,D) \tkzGetPoint{Q} \tkzLabelPoints[above](S, Q) \tkzLabelPoints[right](N,D) \tkzLabelPoints[left](A) \tkzLabelPoints[below](B,C,H,M,P) \tkzDrawPoints(S,A,B,C,D,H,M,N,P,Q) \tkzDrawSegments[hidden](S,A A,B A,D S,H M,N P,Q A,H B,H C,H D,H) \tkzDrawPolygon[line width = 1.2pt](S,B,C) \tkzDrawPolygon[line width = 1.2pt](S,C,D) \tkzLabelSegment[below=2pt](B,P){$x$} \tkzLabelSegment[below=2pt](C,P){$y$} \tkzLabelSegment[right=4pt](C,N){$z$} \tkzLabelSegment[right=4pt](D,N){$t$} \end{tikzpicture} \end{document}    How can I decrease this white spaces?

I have the following image    that was created with this code:  \documentclass[varwidth=true, border=2pt]{standalone} \usepackage{tikz} \usepackage{tkz-euclide}  \begin{document} \usetkzobj{all} \begin{tikzpicture}     \tkzSetUpPoint[shape=circle,size=10,color=black,fill=black]     \tkzSetUpLine[line width=1]     \tkzDefPoints{0/0/A, 3/0/B', 2/2/C, 4/4/C'}     \tkzDefLine[parallel=through C](B',C') \tkzGetPoint{Phelper}     \tkzInterLL(A,B')(C,Phelper) \tkzGetPoint{B}     \tkzDrawLine[add=0 and 0.2](A,B')     \tkzDrawLine[add=0 and 0.2](A,C')     \tkzDrawSegment(B',C')      \node at ($(A)+(-0.1,-0.2)$)  {$A$};     \node at ($(B')+(0.2,-0.2)$)  {$B'$};     \node at ($(C')+(0,0.4)$)  {$C'$};     \node at ($(B)+(0.2,-0.2)$)  {$B$};     \node at ($(C)+(0.28,0.5)$)  {$C$};     \tkzDrawPolygon[ultra thick,color=blue,fill=blue!20](A,B',C')      \tkzDrawPolygon[line width=0.3pt,color=red,fill=red!20](A,B,C)      \tkzDrawPoints(A,B',C',B,C)     \tkzLabelSegment[below,red](A,B){$c$}     \tkzLabelSegment[left,red](A,C){$b$}     \tkzLabelSegment[right,red](B,C){$a$}     \tkzLabelSegment[below,blue,pos=0.8](A,B'){$c'$}     \tkzLabelSegment[left,blue,pos=0.8](A,C'){$b'$}     \tkzLabelSegment[right,blue](B',C'){$a'$} \end{tikzpicture} \end{document}   As you might notice, the space above C' is bigger than necessary. This is because of Phelper. I need Phelper for the construction, but it should not influence the image size in any way. I've tried to get Phelper closer to C, but that seems not to be possible.  How can I stop defined (but not visible) points from influencing image size?  Please note: I wrap code like this in a figure. So images like the one above are only a part of the whole document. So working with standalone does not solve my problem.


I'm trying to add a song from one class to a second Album class. But i'm getting "Exception in thread "main" java.lang.NullPointerException" error. I'm new to java and any help is appreciated.  public class Album { // class behaviours private String albumName; private Song[] songs; private int totalAlbumLength; private int numSongs;  // constructor public Album(String albumName) {     setAlbumName(albumName); }   // special setters: adding new song public void addSong(Song newSong) {     this.songs[this.numSongs] = newSong;     this.numSongs++; }  public void addSong(String songName, String artistName, int minutes, int seconds) {     Song newSong = new Song(songName, artistName, minutes, seconds);     addSong(newSong);  }   Song class  public class Song { // class behaviours private String songName = ""; private String artistName = ""; private int songLength = 0;  // constructors public Song(String songName, String artistName, int minutes, int seconds) {     setSongName(songName);     setAtristName(artistName);     setSongLength(minutes, seconds); }  public Song(String songName, String artistName, int seconds) {     setSongName(songName);     setAtristName(artistName);     setSongLength(seconds); }

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?


Solve $u_x+u_y+u=e^{x+2y}$ with $u(x,0)=0$  I try to let $x'=x+y, y'=x-y$ and reduced to $2u_{x'}+u=e^{0.5(3x'-y)}$   How to proceed to the next step? Any other methods to solve?  Thank you!

It is asked to solve the PDE  $$u_x + u_y + u = e^{x+2y}$$  My attempt: We have that $$\frac{dx}{1}=\frac{dy}{1}=\frac{du}{e^{x+2y}-u} $$  $\Rightarrow \frac{dy}{dx}=1 \Rightarrow y=x+C_1 \iff C_1=y-x$  $\Rightarrow \frac{du}{dx}= e^{x+2y}-u \iff \dot{u}+u=e^{x+2y} \iff \\ \frac{d}{dx}(e^x u) = e^{2x+2y} \iff u = e^{-x} ( \frac{1}{2}e^{2x+2y} + C_2)$  As $u$ is constant along its characteristics:  $$u(x,y)=\frac{e^{-x}}{2}(e^{2x+2y} + 2C_2(y-x))$$  where $C_2$ is any function of one variable. But wolfram gave the following answer  $$u(x,y)=\frac{e^{-x}}{4}(e^{2x+2y} + 4C_2(y-x))$$  as you can check   What am I doing wrong?


So I recently moved jobs - one piece of code I've spotted in our build scripts for new SQL Server installations is below.  IF EXISTS ( SELECT  *             FROM    [sys].[syslogins]             WHERE   [name] = N'NT AUTHORITY\SYSTEM' )     BEGIN         DROP LOGIN [NT AUTHORITY\SYSTEM];     END  IF EXISTS ( SELECT  *             FROM    [sys].[syslogins]             WHERE   [name] = N'NT SERVICE\SQLWriter' )     BEGIN         DROP LOGIN [NT SERVICE\SQLWriter];     END  IF EXISTS ( SELECT  *             FROM    [sys].[syslogins]             WHERE   [name] = N'NT SERVICE\Winmgmt' )     BEGIN         DROP LOGIN [NT SERVICE\Winmgmt];     END GO   These accounts are created during the SQL Server installation process by default.  Are dropping the above logins recommended? Are there any side effects this could cause? What are these logins used for?  I read  but it just isn't concrete enough - I can see what they're needed for but very little else. Do they need sysadmin access? etc.  As an example (taken from ):     Local System is a very high-privileged built-in account. It has extensive privileges on the local system and acts as the computer on the network. The actual name of the account is NT AUTHORITY\SYSTEM.   How should I read this? Should it be left with these "high" privileges?

I'm not sure if I'm googling for the wrong thing but I can't find an answer. We're running SQL 2014. The SQL Server and SQL Agent processes are both running under Domain Managed Service Accounts.  When SQL was installed NT SERVICE\MSSQLSERVER, NT SERVICE\SQLSERVERAGENT, NT SERVICE\SQLWriter, NT SERVICE\Winmgmt are all setup as SysAdmins.  If I am running SQL and SQL Agent as a Domain user, do I still need these NT Service accounts, and/or do they need to be SysAdmin?


I'm designing the UI for a financial application. I'd usually do high-fidelity mockups using Photoshop and send them to the developers. What I have noticed is that the text in the actual product looks different from my mockups, but they are in fact the same font. The left image is the hi-fi mockup, using Arial. The right image is the actual product, also in Arial. I tried all the different anti-aliasing options, but none gets me close to the image on the right.  Most websites/web apps I see don't have this problem. I wonder how they do it?

Do I really have to design everything in Photoshop with anti-aliasing set to "none"?  I'm sure there is a better way.    I'd like to have a setting so that when picking a basic web-safe (such as Tahoma) in Photoshop so I can see what it will actually look like when on the web.  For example: The difference between Tahoma with anti-aliasing set to "crisp" in Photoshop and how it renders in Firefox is major.  It looks nice and smooth in Photoshop and looks like crap on the web.  Is there a anti-aliasing choice that is best to start with (that has the most similar outcome) when planning to have the content live on the web?


Take $z_1,z_2 \in \mathbb{C},$ and assume $|z_1| < 1, |z_2| < 1.$ I want to prove that $$\left|\frac{z_1-z_2}{1-\bar{z}_1z_2}\right| < 1.$$ Take $z_1 = x+iy, z_2 = a+ib$ for $x,y,a,b \in \mathbb{R}.$ We see that $$|z_1| < 1 \implies \sqrt{x^2 + y^2} < 1 \implies x^2 + y^2 < 1.$$ similarly we see that $$|z_2| < 1 \implies \sqrt{a^2 + b^2} < 1 \implies a^2 + b^2 < 1.$$ We see that $$\left|\frac{z_1-z_2}{1-\bar{z}_1z_2}\right|  =\left|\frac{(x-a) + i(y-b)}{1 -(x-iy)(a+ib)}\right|  =\left|\frac{(x-a) + i(y-b)}{1 -(xa + ibx -iay + yb)}\right|  =\left|\frac{(x-a) + i(y-b)}{(1-xa-yb) + i(ay - bx)}\right|.$$ However, I am beginning to have some issues as to how to simplify this to a non-fraction. Any recommendations?

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


Find all functions of defined on the set of all real numbers with real values, such that $$ f\left(x^2+f(y)\right) = y + f(x)^2 $$  My attempt: Putting $x = 0$, $f\big(f(y)\big) = y + f^2(0)$ and putting $y = 0$, $f\left(x^2 + f(0)\right) = f(x)^2$. But I can't go any further.

Let $\mathbb R$ denote the set of all real numbers. Find all function $f: R\to \ R$ such that   $$f\left(x^2+f(y)\right)=y+(f(x))^2$$   It is the problem. I tried to it by putting many at the place of $x$ and $y$ but I can't proceed. Please somebody help me.


Does anyone happen to know a nice way to show that $(a+b)^n \le a^n+b^n$, where $a,b\geq 0$ and $n \in (0,1]$?  I figured integrating might help, but I've been unable to pull my argument full circle. Any suggestions are appreciated :)

Let $a, b$ be positive real numbers. Let $0 < x < 1$. Show that  $(a+b)^x < a^x + b^x$.  The function $f(x) = (a+b)^x -a^x - b^x$ has $f(0) = -1$, $f(1) = 0$ and it seems to be an increasing function. But I am unable to show that it is increasing function.


I have a code piece that I'm analysing but I don't understand this lines:   double level = 0;  ...  if (!(level == level) && !(level < level) && !(level > level))     exit(0);   I think it is about double comparison subject. Any idea what it is?

What would be the most efficient way to compare two double or two float values?  Simply doing this is not correct:  bool CompareDoubles1 (double A, double B) {    return A == B; }   But something like:  bool CompareDoubles2 (double A, double B)  {    diff = A - B;    return (diff < EPSILON) && (-diff < EPSILON); }   Seems to waste processing.  Does anyone know a smarter float comparer?


I came across the following  on youtube where a kid was asked to show that $\sum_{n = 1}^{\infty} \frac{\sin{(2n)}}{1 + \cos^4{n}}$ is convergent. He tried to use the integral test but wasn't allowed to finish his argument. I have two questions.  (1) Can you apply integral test in this situation since it is not clear if the terms of the series are decreasing?  (2) How do you solve this problem?

As I was just checking this 'child prodigy' out on Youtube, I stumbled upon  video, in which Glenn Beck asks the kid to do the following proof:    Further on, the kid starts sketching a proof (without a shadow of a doubt regarding the accuracy of his solution ) including the Integral Test. I don't know much about improper integrals since I just finished highschool, but this integral approach seemed, intuitively, pretty inaccurate to me since this is not a strictly decreasing function. Then I found this out from Wikipedia !   Furthermore, the blunt assessment that the series are convergent seems dubious as well..Upon a few computations of my own(mostly partial sums) , I tend to believe that the series are, in fact, divergent .  Can anyone suggest a rigurous take on this problem (easy as it may seem to some amongst you) ?


Running a logistic regression, I have a dependent variable   Loyal Customer can be 0 or 1   and an independent variable   Return.rate is a continuous percent value from 0 to 1   If my odds ratio for Return.rate is 5, how do I interpret the result in words?   What is a unit? 1 which is 100%? Or 0.01 which is 1%?

If I want to use some proportion type independent variables in a logistic regression, then what will be the interpretation of the regression coefficients corresponding to those proportion type variables? Will that mean- "The change in log odds for per unit change in the proportions"?   But what will be meant by "per unit change" in this case? As the proportions lie within [0,1], I am getting a little confused with what a "per unit change" will mean in this scale. Does it mean 0.01 or 1%? (I am sorry for my noob thoughts!)  In my data the range of the proportions is 0 to 1, not multiplied by 100. Do I need to multiply them by 100? So that I can say "per unit change" means 1% change? I have seen that the coefficients do differ in scale if I multiply the proportions by 100. For example, a coefficient of -1.3 for proportions becomes -0.013 for percentages (when the proportions are multiplied by 100).


I saw a regex expression in  other stackoverflow question but I didn't understand the meaning of each part.  String[] split = s.split("(?<=[\\S])[\\S]*\\s*");   The result of this is the Acronym of a sentence.  In order to understand a chaining regex expression should I start reading it from left to right or viceversa? How can I identify (or limit) each part?  Thank you for your answers.

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


I what to format my computer such that both the os and all additional applications are going in one partition and all of my person files in a second one. The reason for that is that I can then create a ghost based on the first partition only and therefore save a lot of space. Alternatively, I would like some help on how to create a ghost that doesn't consider specific folders under my home directory (i.e. my personal files). Any ideas?

My understanding of disc partitioning has always been that you partition a disc to install multiple operating systems so you can boot from multiple operating systems on a single disc. However I'm reading a ubuntu server book and it talks about partitioning the /home directory of a ubuntu installation.      "The /home directory is a popular partitioning candidate among both administrators and desktop users alike because it holds all of the personal files for user accounts on that machine. If you maintain /home as a separate partition, you can install new versions of a distribution or even different distributions altogether without wiping out any user settings."   I don't see how and why anyone would partition the home directory or any other directory for that matter in the file system of a ubuntu installation.


It was possible to get the direct link some months ago but now, since Imgur was updated, I am unable to find the direct link. See:

Has Imgur stopped giving direct file links to images uploaded?  I can't see a direct file link to this image:     (I know that the Stack Exchange website still integrates with Imgur, and gets a direct link, but I'm not asking about that.)


Whenever I try to vote on a post with the Android app it stops responding.    This has happened to me on both The Great Outdoors, Ask Ubuntu, and Meta.  I'm running Android 4.4.4 on a 2013 Moto G. I am running version 1.0.66 of the app.

The latest beta update made the app crash a lot:   when I press 'Add comment'. after deleting a comment. after up/down/unvoting a post (happened when I upvoted an answer) after editing a post (but the edit is applied).   Spec: Nexus 5 on Lollipop 5.1.1, SE App v1.0.66 (beta)


Let $n$ and $r$ be positive integers with $n \geq r$.  Prove that  $$\binom{r}{r} + \binom{r + 1}{r} + \cdots + \binom{n}{r} = \binom{n + 1}{r + 1}$$  I'm confused how to start this question. Would it require induction?

After reading , the most popular answer use the identity $$\sum_{t=0}^n \binom{t}{k} = \binom{n+1}{k+1}.$$  What's the name of this identity? Is it the identity of the  modified.  How can we prove it? I tried by induction, but without success. Can we also prove it algebraically?  Thanks for your help.    EDIT 01 : This identity is known as the  because, on Pascal's triangle, when the addends represented in the summation and the sum itself are highlighted, a hockey-stick shape is revealed.


How can I install Ubuntu on Windows 10 as dual boot? I have a DVD with Ubuntu and when I tried to install Ubuntu I had a warning that the hard disk will be erased. How can I install Ubuntu and keep my Windows 10? Thanks

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


I am building a Flat color based website and am having trouble choosing the color scheme. I need a background color (section background) and a foreground color (element background). The element, in this case a button is on top of the section background.  I have come across multiple color palette websites like  and . They are great. But, all of them give me multiple colors making it hard for me to decide. Is there a website that gives me just a Foreground and Background color? Or, is there a way to test how well two colors would do as a background and foreground color? Thank you!

No matter how nice the composition, flow, and lines of my design are, if I am not copying directly from nature, I have a very difficult time picking a decent color scheme.  It either looks too drab, or too garish.  Is there a good resource that will help me to choose a color scheme that has 2 or 3 colors, and the colors do not clash?  I'm not looking for specific colors or color schemes.  What I need is a resource that will help me choose a color (or colors) that go nicely with, or provide a good accent to, whatever main color I am working with on the design.