I have this POJO. Also, I have a List of Students and I want to filter with stream which registers have in his schoolname the text santa. In SQL it would be something like this: LIKE %SANTA%     public class Student {     private String name;     private String lastName;     private String city;     private String schoolname;     private String telephone;      public String getName() {       return name;     }      public void setName(String name) {       this.name = name;     }      public String getLastName() {       return lastName;     }      public void setLastName(String lastName) {       this.lastName = lastName;     }      public String getCity() {       return city;     }      public void setCity(String city) {       this.city = city;     }      public String getSchoolname() {       return schoolname;     }      public void setSchoolname(String schoolname) {       this.schoolname = schoolname;     }      public String getTelephone() {       return telephone;     }      public void setTelephone(String telephone) {        this.telephone = telephone;     } }   And I would like to obtain the students which his schoolname contains the string santa, do you know how can I have to do the filter with streams?  I need to do with stream, I can't do it with if and else statements.
I want to filter a java.util.Collection based on a predicate.
Similar to , what's the best way to stay up to date with the latest stable releases of Thunderbird? Where did the ~/Library folder go in Lion? \begin{eqnarray*} M&amp;=&amp; \max{\left \{a,b,\frac{a+b}{2},\right}\\ &amp;&amp; a+b,a+b/2\Bigg\} \end{eqnarray*} How to send an SMS in iOS 10 How many roots have modulus less than $1$? If roots of the equation   $$x^7 - 4x^3 + x + 1=0$$        are plotted on the Argand plane, how many of them have distance from the origin less than $1$?     I found, by plotting the rough curve of $y= x^7 - 4x^3 + x + 1$ that it has three real roots, out of which two of them have modulus greater than $1$ and one has modulus less than $1$. But I don't know how to do the same for non - real roots. The answer given in my book is that $3$ roots have modulus less than $1$. My Realtek NIC in my Windows Home Server (essentially w2k3) box refuses to run at 1000Mb/s even if I change the driver settings from Auto Negotion to 1000Mb/s full duplex. I've installed the latest driver and tried changing the speed setting but I'm having no luck. Not sure what to try next. Any ideas?  I have a Netgear GS605 v2 Switch supports 10/100/1000 D Link DIR 655 router.  All my machines bar one/2 have 1000Mb/s NICs (Old laptop/Xbox being the exceptions)  The reason I noticed the problem was because I was copying files between two machines and maxing one NIC out and only seeing 10% on the other machine. I do have a fairly lengthy cable between the switch and the router (maybe 20m) could that be the issue? How do I upgrade from 12.10 to 13.04? Write space with TCPDF into a PDF file How to check battery temperature? How do I know the normal temperature of it?  My OS is Ubuntu, and my laptop is Lenovo G470.  Output of acpi -t:  Thermal 0: ok, 0.0 degrees C Do file descriptors optimise writing to files? PC won't boot (Asus P5K pro mainboard) No beeps, no screen output I typed up an assignment with a lot of numbers in LaTeX and turned it in to my adviser.  When he returned it to me with some corrections, one of which was a lot of $ around my numbers.  I understand that $ are necessary around some mathematical formulas, but I was just using numbers like -2 and 4.  I did not see any change in the font of the numbers when I added the $ either.  Since my adviser did not want to give me an explanation, what is the rationale? How do I sort a MySQL table by two columns? What I want are articles sorted by highest ratings first, then most recent date.  As an example, this would be a sample output (left # is the rating, then the article title, then the article date)  +================+=============================+==============+ | article_rating | article                     | article_time | +================+=============================+==============+ | 50             | This article rocks          | Feb 4, 2009  | +----------------+-----------------------------+--------------+ | 35             | This article is pretty good | Feb 1, 2009  | +----------------+-----------------------------+--------------+ | 5              | This Article isn't so hot   | Jan 25, 2009 | +================+=============================+==============+  The relevant SQL I'm using is: ORDER BY article_rating, article_time DESC  I can sort by one or the other, but not both. What are the maximum bag space and Pokemon storage? How many upgrades are needed to reach the limits? Using Fermats prime numbers to prove that there is infinitely many prime numbers Continuous and preserves measurability $\implies$ preserves null sets. How do i fix this Eevee rendering Problem? I can notfix this issue when selecting Eevee for my renders. It gets really annoying. I can get rid of them temporary when I scroll out or into the viewport. Does anyone have an Idea how I can fix that?  thanks c: I want to shade the area of overlap for adjacent normal curves, shown in the lower graph. I can get shading between the first two curves but not for subsequent curves. I need shading at overlapping areas indicated by the arrows. I applied the "logic" of the first fill for the subsequent curves but that does not work.   The arrows and letters in the example image are not part of the MWE.   \documentclass{article}  \usepackage{pgfplots} \pgfplotsset{ticks=none} \pgfplotsset{compat=1.7}  \usepgfplotslibrary{fillbetween}  \pgfmathdeclarefunction{gauss}{2}{%normal distribution where #1 = mean and #2 = sd}     \pgfmathparse{exp(-((x-#1)^2)/(2*#2^2))}% }  \pgfplotsset{baseplot/.style={%     no markers,      domain=1:4.5,      samples=100,     smooth,     axis lines*=left,     height=5cm, width=12cm,     enlargelimits=upper, clip=false, axis on top,     xlabel = near ticks,     xlabel={Resource} }}  \begin{document}  \begin{tikzpicture}   \begin{axis}[baseplot]   \addplot+[name path=A]{gauss(2.7,0.4)};   \addplot+[name path=B]{gauss(3.2,0.4)};   \fill[gray!20, intersection segments ={of= B and A}]; \end{axis} \end{tikzpicture}  \vspace*{3\baselineskip}  \begin{tikzpicture}   \begin{axis}[baseplot]   \addplot+[name path=A]{gauss(1.7,0.15)};   \addplot+[name path=B]{gauss(2.2, 0.15)};   \addplot+[name path=C]{gauss(2.7, 0.15)};   \addplot+[name path=D]{gauss(3.2, 0.15)};   \addplot+[name path=E]{gauss(3.7, 0.15)};   \fill[gray!20, intersection segments ={of= B and A}];   \fill[gray!20, intersection segments ={of= C and B}];   \fill[gray!20, intersection segments ={of= D and C}];   \fill[gray!20, intersection segments ={of= E and D}]; \end{axis} \end{tikzpicture}  \end{document} Is JavaScript's "new" keyword considered harmful? In another , a user pointed out that the new keyword was dangerous to use and proposed a solution to object creation that did not use new. I didn't believe that was true, mostly because I've used Prototype, Scriptaculous and other excellent JavaScript libraries, and everyone of them used the new keyword.  In spite of that, yesterday I was watching Douglas Crockford's talk at YUI theater and he said the exactly same thing, that he didn't use the new keyword anymore in his code ().  Is it 'bad' to use the new keyword? What are the advantages and disadvantages of using it? In a batch file I need to extract a month, day, year from the date command.  So I used the following, which essentially parses the Date command to extract its sub strings into a variable:  set Day=%Date:~3,2% set Mth=%Date:~0,2% set Yr=%Date:~6,4%   This is all great, but if I deploy this batch file to a machine with a different regional/country settings, it fails because month, day and year are in different locations.   How can I extract month, day and year regardless of the date format?