My question is regarding a SQL server query.  Assume a user types a text "text1 text2 text3...textn" in a search textbox. Now I want to send this to a SELECT's  WHERE clause using a parameter.    cmd.Parameters.AddWithValue("@colname", textSearch.Text).    I want to write in this way    SELECT ... WHERE (colname LIKE text1 OR colname LIKE text2 OR colname LIKE text3 OR ....... colname LIKE textn)  OR (colname LIKE 'text1 text2 text3 ...textn')   How can I do this in SQL?
How do I parameterize a query containing an IN clause with a variable number of arguments, like this one?  SELECT * FROM Tags  WHERE Name IN ('ruby','rails','scruffy','rubyonrails') ORDER BY Count DESC   In this query, the number of arguments could be anywhere from 1 to 5.  I would prefer not to use a dedicated stored procedure for this (or XML), but if there is some elegant way specific to , I am open to that.
Is the inverse of a linear transformation linear as well? A question from the field of Linear Algebra. If I have a linear transformation $T$ that is one-to-one and onto, would that mean that the $T^{-1}$ will also be linear? If so, is there any general proof for it?  Thanks Does a car use friction to move? When a car's engine injects fuel into the cylinder chambers, the reaction creates a force that generates rotational momentum to the shaft and over the transmission, it translates that power to the wheels, right?  But, something's bothering me, how does the car actually move, is it dependent on the force of friction? Wheels have a contact with the road in one exact point and when the drive gets to rotate them, a force is exerted on the road in the direction of movement and there is friction that is counteracting it.  Is the key to get a car properly moving to have the drive force equal or less than the force of friction to keep that point locked to the ground and use the rolling of the wheel for translational displacement ie. moving forward? If it's bigger than the force of friction, that would cause the wheels to spin in place?  Am I completely off or am I getting something right? If there's a knowledgeable person on this topic, I'd greatly appreciate some insight, perhaps even a bigger response with some basic vehicle physics. Squares in arithmetic progression It is easy to find 3 squares (of integers) in arithmetic progression. For example, $1^2,5^2,7^2$.  I've been told Fermat proved that there are no progressions of length 4 in the squares. Do you know of a proof of this result?   (Additionally, are there similar results for cubes, 4th powers, etc? If so, what would be a good reference for this type of material?)    Edit, March 30, 2012: The following  in MO is related and may be useful to people interested in the question I posted here. Why am I getting no power when I pedal? Yesterday when I was biking my mountain bike on level paved path, I would pedal but get no power to the wheel.  To use a car analogy, it was as if I had the clutch in and was apply gas.  It seemed to happen most often after I coasted and then went back to pedalling.  I would pedal and realize that no power was going to the wheel.  The chain was definitely on the sprockets and moving. I could change gears no problem while I had no power.  Sometimes stopping the bike and starting again would work, or just trying again.  Needless to say, I'm taking it in as I'm not mechanically inclined, but I'm hoping to learn something.  Perhaps a link to a site that explains the problem?  So my questions.   What is going on?  I have heard of something called the "freehub".  I really don't know how bikes work though, so I'm hoping for an explanation of how one can pedal and give power to the wheel and then stop pedalling and the wheel just keeps moving (without the pedals moving).   If you are on a ride, is there any emergency adjustment to make?   For what it's worth, it's an old bike.  Circa 1993 Performance Mtn Bike.  So it's not too surprising that it's falling apart.  I haven't used it a whole lot, and have tried to wash and oil it, but I probably haven't taken the care that a biking aficionado would.  Also, besides losing power after coasting, one time I was pedaling and suddenly the pedals weren't powering the wheel.  I almost went over the handlebars!  So, I definitely want to get it fixed.  I'd just like to know a little bit about what is going on.  Thanks,  Dave.  Bonus question:  If there is enough info to make a diagnosis and you have ideas on costs to fix, perhaps you could comment on whether it's worth fixing.  Like I said, it's circa 1993 and cost about $450 then.  No shocks or anything.  Just 21 speed Mtn. Bike. How can I prove that $xy\leq x^2+y^2$? How can I prove that $xy\leq x^2+y^2$ for all $x,y\in\mathbb{R}$ ? When I add the picture, the word and pdf is the full page and the Latex moves to the right of the page. How can I solve this problem?  this is my work. this is my work and pdf link: https://we.tl/t-cgDSwDuu8H  I couldn't stop the pictures from sliding right. What should I do to make the image look like the original PDF file? If I reduce the scale of the picture is centered but this time it becomes very small.  Is a situation caused by page margins?  \documentclass [12pt, a4paper]{article} \usepackage{color} %\usepackage[turkish]{babel} \usepackage{graphicx} \usepackage{tabularx} \usepackage{multirow} \usepackage{graphicx} %\usepackage[pass,showframe]{geometry} %\usepackage[T1]{fontenc}  \begin{document}  \definecolor{renkbir}{RGB}{0,32,96}  \begin{tabular}{ m{8,5cm} m{6cm} } \Large{\textbf{MsdasdasdN }} \large{\textbf{\textcolor{renkbir}{Firma Adı }}} &amp;\small {Uçak Mühendisi \newline T.C No: asd \newline asd \newline asd \newline asd} \end{tabular} \ %Uçak mühendisi Tc No kısımını sağa yaslamak istedim fakat yapamadım.  \begin{center} \large{\textbf{\textcolor{renkbir}{KİŞİSEL BİLGİLER}}} \end{center}  \begin{center} \begin{tabular}{ l l r } Ad &amp; Mehm &amp; \multirow{9}{*}{\includegraphics[scale=0.15]{2.pdf}} \ Soyad &amp; asdasd \ Doğum Tarihi &amp; sanane (23 Yaşında) \ Adres &amp; asd \ Telefon &amp; asd \ Mail &amp; asd \ Sigara Kullanımı &amp; Hayır \ Ehliyet &amp; B \ Askerlik &amp; Tecilli (31.12.2020) \ \end{tabular} \end{center}  %\vspace{1cm} Burası boşluk bırakma komutu.  \begin{center} \begin{tabular}{ m{4cm} m{6cm} m{5cm} } \multicolumn{3}{c}{\large{\textbf{\textcolor{renkbir}{EĞİTİMLER}}}} \ \hline \multirow{2}{}{Üniversite(YL)} &amp; asd \newline Makine Mühendisliği \newline Özel Öğrenci / Türkçe \newline Durumu : Devam ediyor &amp; \multirow{2}{}{Eylül 2018 / } \ \hline \multirow{2}{}{Üniversite} &amp; asd \newline Uçak ve Uzay Bilimleri Fakültesi \newline Uçak asd \newline Örgün Öğretim / İngilizce \newline Durumu : Mezun &amp; \multirow{1}{}{Ekim 2013 / Haziran 2018} \ \hline \multirow{1}{}{Lise} &amp; asd \newline Anadolu Lisesi (100 / 90,02) &amp; \multirow{1}{}{Ekim 2013 / Haziran 2018} \ \end{tabular} \end{center}  \begin{center} \begin{tabular}{ m{3cm} m{4cm} m{4cm} m{4cm} } \multicolumn{4}{c}{\large{\textbf{\textcolor{renkbir}{YABANCI DİLLER}}}} \ \hline \textbf{İngilizce} &amp;\textbf{Okuma:} İyi &amp;\textbf{Yazma:} İyi &amp;\textbf{Konuşma:} Orta \ \end{tabular} \end{center}  \begin{center} \begin{tabular}{ m{5cm} m{5cm} m{5cm} } \multicolumn{3}{c}{\large{\textbf{\textcolor{renkbir}{BİLGİSAYAR BİLGİLERİ}}}} \ \hline \multicolumn{3}{l}{Donanım - Ofis Programları} % donann ofis koyu yazmak istedim yapamadım. \ Ms Excel &amp; Çok İyi &amp; +5 Yıl \ MS Word &amp; Çok İyi &amp; +5 Yıl \ Ms Powerpoint &amp; Çok İyi &amp; +5 Yıl \ \hline \multicolumn{3}{l}{Yazılım Geliştirme} % donann ofis koyu yazmak istedim yapamadım. \ Office &amp; Orta &amp; 2-3 Yıl \ Matlab &amp; Orta &amp; 2-3 Yıl \ Phyton &amp; Orta &amp; 0-1 Yıl \ Fortran &amp; Başlangıç &amp; 0-1 Yıl \ C++ &amp; Başlangıç &amp; 0-1 Yıl \ Ansys &amp; Başlangıç &amp; 0-1 Yıl \ Miktex &amp; Başlangıç &amp; 0-1 Yıl \ \hline \multicolumn{3}{l}{Bilgisayar Destekli Tasarım} % donann ofis koyu yazmak istedim yapamadım. \ SolidWorks &amp; Orta &amp; 2-3 Yıl \ AutoCAD &amp; Orta &amp; 0-1 Yıl \ \end{tabular} \end{center}  \begin{figure} \includegraphics[width=\linewidth]{2.pdf} \end{figure}  \begin{figure} \includegraphics[scale=1]{2.pdf} \end{figure}  \end{document}   Latex SS is here:  PDF SS is here: What is the reason for the observation that across the board fields in physics are generally governed by second order (partial) differential equations?    If someone on the street would flat out ask me that question, then I'd probably mumble something about physicists wanting to be able to use the Lagrangian approach. And to allow a positive rotation and translation invariant energy term, which allows for local propagation, you need something like $-\phi\Delta\phi$.  I assume the answer goes in this direction, but I can't really justify why more complex terms in the Lagrangian are not allowed or why higher orders are a physical problem. Even if these require more initial data, I don't see the a priori problem.  Furthermore you could come up with quantities in the spirit of $F\wedge F$ and $F \wedge *F$ and okay yes... maybe any made up scalar just doesn't describe physics or misses valuable symmetries. On there other hand in the whole renormalization business, they seem to be allowed to use lots and lots of terms in their Lagrangians. And if I understand correctly, supersymmetry theory is basically a method of introducing new Lagrangian densities too.   Do we know the limit for making up these objects? What is the fundamental justification for order two? Print file content without the first and last lines Is there a simple way I can echo a file, skipping the first and last lines? I was looking at piping from head into tail, but for those it seems like I would have to know the total lines from the outset. I was also looking at split, but I don't see a way to do it with that either. In my  I was printing a double using cout that got rounded when I wasn't expecting it.  How can I make cout print a double using full precision? Steps to Reproduce   Tap faster on the code. or Tap once on a huge code.   but happens only when  setupForGeneric() is called, might be a bug related to   private void setupForCode()   { String str = getIntent().getStringExtra("com.stackexchange.marvin:code_block"); PrettyWebView localPrettyWebView = (PrettyWebView)findViewById(R.id.code); localPrettyWebView.setPostBody("&lt;pre&gt;&lt;code&gt;" + TextUtils.htmlEncode(str) + "&lt;/pre&gt;&lt;/code&gt;", false); localPrettyWebView.setBackgroundColor("#eeeeee"); }  private void setupForGeneric() { String str = getIntent().getStringExtra("com.stackexchange.marvin:web_url"); PrettyWebView localPrettyWebView = (PrettyWebView)findViewById(R.id.code); localPrettyWebView.getSettings().setBuiltInZoomControls(true); localPrettyWebView.getSettings().setLoadWithOverviewMode(true); localPrettyWebView.getSettings().setUseWideViewPort(true); localPrettyWebView.loadUrl(str); localPrettyWebView.setBackgroundColor("#eeeeee"); }   Log  09-05 03:54:30.312: E/AndroidRuntime(26264): FATAL EXCEPTION: WebViewCoreThread  09-05 03:09:39.522: E/Crittercism(18318): java.lang.NullPointerException: [v0.1.22]  09-05 03:09:39.522: E/Crittercism(18318):   at android.content.ComponentName.&lt;init&gt;(ComponentName.java:75) 09-05 03:09:39.522: E/Crittercism(18318):   at android.content.Intent.&lt;init&gt;(Intent.java:3156) 09-05 03:09:39.522: E/Crittercism(18318):   at com.stackexchange.marvin.ui.ViewPopupActivity.showCode(ViewPopupActivity.java:25) 09-05 03:09:39.522: E/Crittercism(18318):   at com.stackexchange.marvin.ui.question.QuestionFragment$1.onCodeClicked(QuestionFragment.java:67) 09-05 03:09:39.522: E/Crittercism(18318):   at com.stackexchange.marvin.ui.common.PrettyWebView$WebAppInterface.codeClicked(PrettyWebView.java:197) 09-05 03:09:39.522: E/Crittercism(18318):   at android.webkit.WebViewCore.nativeTouchUp(Native Method) 09-05 03:09:39.522: E/Crittercism(18318):   at android.webkit.WebViewCore.nativeTouchUp(Native Method) 09-05 03:09:39.522: E/Crittercism(18318):   at android.webkit.WebViewCore.access$4000(WebViewCore.java:59) 09-05 03:09:39.522: E/Crittercism(18318):   at android.webkit.WebViewCore$EventHub$1.handleMessage(WebViewCore.java:1449) 09-05 03:09:39.522: E/Crittercism(18318):   at android.os.Handler.dispatchMessage(Handler.java:99) 09-05 03:09:39.522: E/Crittercism(18318):   at android.os.Looper.loop(Looper.java:137) 09-05 03:09:39.522: E/Crittercism(18318):   at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:790) 09-05 03:09:39.522: E/Crittercism(18318):   at java.lang.Thread.run(Thread.java:856) Can we get an alternative to the "That solved my problem!" button that doesn't make the presumption that it solved my problem? I.e. "Yes, that's the problem I have."  In some cases, SE (et. al.) answer something, but the answer really doesn't solve it, it was a "cop-out" -- a "we know there's a problem, but there's currently no fix or workaround". Can we get a button that indicates that "Yes, I acknowledge I have that same problem, and I may have even tried those solutions, but it's not solved by any means." button or something?  I get the purpose of it - make it more friendly and easier to remove duplicates, but I refuse to say "That solved my problem!" if I still have a problem (mostly on principle). I'd rather have a "Ah yes, that's my issue! But, it seems like there's no actual solution there."  As an example: How to disable Windows 10 system log In Windows 10 Resource Monitor I found that the system process is constantly writing C:\ProgramData\Microsoft\Windows\wfp\wfpdiag.etl at like 30-100KB/s. This equals 1TB write/year which is not healthy for SSD. There are other log write like C:\Windows\System32\LogFiles*** too.   Although logs is needed for diagnostics, it's better to be turned on only when problem has already occured.  Is it possible to disable as much system logs as possible to decrease garbage write amoung to SSD? Error When Create Drupal Commerce Product Display While learning about Random variables I came across the mean of random variable X.  The definition says that the expected value of random variable E(X) = Mean of Random variable X  I am not able to understand why is that so. Can any one please help me with it Can a Mac be used by different users at the same time?  I mean to say that we have a single Mac but 3 users. Can they access the same machine remotely at the same time for developing applications on iPhone or Mac?  Does Mac OS X server allow us to do this?  If so, how do I configure it for that? $$\lim_{x \to 0} \frac{f(x)}{|x|}=1$$ Then prove that $f$ is not differentiable at $0$. I was given this assignment and I'm not sure about my proof.. it feels like I'm assuming too much and not explaining with enough detail. Is there anything I need to add to make it sufficient? Assume toward contradiction that $f$ is differentiable at $0$. Then by definition we know that $f$ is continuous at $0$. Therefore $\lim _{x\to 0}f\left(x\right)=f\left(0\right)$ We know that $\lim _{x\to 0}\frac{\left(f\left(x\right)\right)}{\left|x\right|}=1$ Therefore we can conclude $\lim _{x\to 0}\frac{\left(f\left(x\right)\right)}{\left|x\right|}\cdot \left|x\right|=1\cdot 0=0$ But we can also rewrite this as $\lim _{x\to 0}\left(f\left(x\right)\right)\cdot \frac{\left|x\right|}{\left|x\right|}=f\left(0\right)\cdot 1=0$ Therefore $f(0) = 0$. Since $f$ is differentiable at $0$ we have $\lim _{x\to 0}\frac{\left(f\left(x\right)-f\left(0\right)\right)}{x-0}=\lim _{x\to 0}\frac{\left(f\left(x\right)-0\right)}{x}=\lim \:_{x\to \:0}\frac{\left(f\left(x\right)\right)}{x}\cdot \frac{\left|x\right|}{\left|x\right|}=\lim \:\:_{x\to 0}\frac{\left(f\left(x\right)\right)}{\left|x\right|}\cdot \:\frac{\left|x\right|}{x}$ Since the one sided limits of $\frac{f\left(x\right)}{\left|x\right|}$ exist, and are both equal to 1, we have $\lim \:_{x\to 0^+}\frac{\left(f\left(x\right)\right)}{\left|x\right|}\cdot \:\:\frac{\left|x\right|}{x}=\lim \:_{x\to \:0^+}\frac{\left(f\left(x\right)\right)}{x}\cdot \:\:\:\frac{x}{x}=1\cdot 1=1$ $\lim \:_{x\to 0^-}\frac{\left(f\left(x\right)\right)}{\left|x\right|}\cdot \:\:\frac{\left|x\right|}{x}=\lim \:_{x\to \:0^-}\frac{\left(f\left(x\right)\right)}{-x}\cdot \:\:\:\frac{-x}{x}=1\cdot -1=-1$ Since the limit doesn't exist, we have a contradiction to the fact $f$ is differentiable at $0$. Therefore $f$ is not differentiable at 0. Orientation on $\mathbb{CP}^2$ Why is __init__() always called after __new__()? I'm just trying to streamline one of my classes and have introduced some functionality in the same style as the .  However, I'm a bit confused as to why __init__ is always called after __new__. I wasn't expecting this. Can anyone tell me why this is happening and how I can implement this functionality otherwise? (Apart from putting the implementation into the __new__ which feels quite hacky.)  Here's an example:  class A(object):     _dict = dict()      def __new__(cls):         if 'key' in A._dict:             print "EXISTS"             return A._dict['key']         else:             print "NEW"             return super(A, cls).__new__(cls)      def __init__(self):         print "INIT"         A._dict['key'] = self         print ""  a1 = A() a2 = A() a3 = A()   Outputs:  NEW INIT  EXISTS INIT  EXISTS INIT   Why? How to make DNS server propagate faster if you are a site owner? It's often the case that I want to change name servers because my site is messed up.  Well, it takes a very long time for the name server to propagate.  Is there something in DNS, or registrar or anything I can do to speed that up.  Flushing my dns server using  and it rarely works The more I use Stack Exchange, the more it is getting a knowledge-base for me. All questions, that I need for later reference I mark as favorite. Now I need to store these pages locally on my laptop. It is really time-consuming:  I could use Ctrl+S on each favorite question page  on Linux: there could be a solution with wget -N -r -l 1 &quot;https://stackoverflow.com/users/1069083/rubo77?tab=favorites&quot;  this will download all favorite questions but it creates no correct index.html Another approach would be to use the  to automatically follow into all your Stack Exchange-accounts. But that would have to be somehow limited to only favorites links on your  in each stack. cross-platform: You would need a firefox-plugin that downloads links recursively but only within the favorite-area of the  in your stack  Additionally, I would like to  and