I have many files that look similar to this:  56.mp3?referredby=rss   What I want to do is remove the ?referredby=rss so they'll be like this:  56.mp3   How would I do this?
I have a number of tiff files named:    sw.001.tif sw.002.tif ...   and I want to remove the .tif at the end of each of the files.  How can I use the rename command to do this?
How to filter IPv4 and IPv6 addresses? How does "this" keyword work within a function? How can I query SEDE for tags I've created? How can I query the  for tags I've created? How do the EV stats work? What is the Taylor series of $$\ln \frac{1-x^2}{1+x^2}$$   ?   I started by evaluating the first derivatives but the more I go, the more complicated they are and I can't identify a pattern. This is a spin-off question from .   says this on the subject of storage order (clustered index) and the output order     A lot of people believe that a clustered index guarantees a sort order on output. But that's not what it does; it guarantees a storage order on disk.   See, for example, .   I've read the blog post by Hugo Kornelis and understands that an index doesn't guarantee that the sql server reads the records in a specific order. Yet I have a hard time accepting that I can't assume this for my scenario?  CREATE TABLE [dbo].[SensorValues](   [DeviceId] [int] NOT NULL,   [SensorId] [int] NOT NULL,   [SensorValue] [int] NOT NULL,   [Date] [int] NOT NULL, CONSTRAINT [PK_SensorValues] PRIMARY KEY CLUSTERED  (   [DeviceId] ASC,   [SensorId] ASC,   [Date] DESC ) WITH (     FILLFACTOR=75,     DATA_COMPRESSION = PAGE,     PAD_INDEX = OFF,     STATISTICS_NORECOMPUTE = OFF,     SORT_IN_TEMPDB = OFF,     IGNORE_DUP_KEY = OFF,     ONLINE = OFF,     ALLOW_ROW_LOCKS = ON,     ALLOW_PAGE_LOCKS = ON)   ON [MyPartitioningScheme]([Date])   My original query was this:  SELECT TOP 1 SensorValue   FROM SensorValues   WHERE SensorId = 53     AND DeviceId = 3819     AND Date &lt; 1339225010   ORDER BY Date DESC   But I suggest that I could as well use this one (read below for my explanation):  SELECT TOP 1 SensorValue   FROM SensorValues   WHERE SensorId = 53     AND DeviceId = 3819     AND Date &lt; 1339225010   As you can see, my table rows are small (16bytes) and I've got only one index, a clustered. In my scenario, the table consists of 100.000.000 records at this moment (and this will most likely increase tenfold).  When the database server queries this table it has two ways of finding my rows, either it seeks the primary key and thereby reading and returning my values in desc. order of Date, or it has to do a full table scan. My conclusion is that a full table scan on all those records will be way too slow and the database server will therefore always seek the table via its primary key and thereby returning the values sorted by Date DESC Wine pollutes "Open With" application list The dialog box in question here is the one you get with the context menu option "open with other applications". Wine seems to have inserted more than a dozen or so entries for each application I install, which makes it a pain to find the correct application:     What can I do to remove the duplicates?     Update: Neither of the two solutions really work. The bug is interesting, but the symptoms does not match my problem (I'm not having problem with uninstalling applications, but rather the things that are inserted after installing them), and with the other one, all references to the Wine application are removed, which actually makes the problem worse (although it may be an acceptable solution if nothing else can be found). So this is still an open question; any takers? Are the Night's Watch still required? What's the best way to communicate between view controllers? Being new to objective-c, cocoa, and iPhone dev in general, I have a strong desire to get the most out of the language and the frameworks.  One of the resources I'm using is Stanford's CS193P class notes that they have left on the web.  It includes lecture notes, assignments and sample code, and since the course was given by Apple dev's, I definitely consider it to be "from the horse's mouth".  Class Website:   Lecture 08 is related to an assignment to build a UINavigationController based app that has multiple UIViewControllers pushed onto the UINavigationController stack.  That's how the UINavigationController works.  That's logical.  However, there are some stern warnings in the slide about communicating between your UIViewControllers.  I'm going to quote from this serious of slides:   Page 16/51:     How Not To Share Data         Global Variables or singletons         This includes your application delegate      Direct dependencies make your code less reusable         And more difficult to debug &amp; test         Ok.  I'm down with that.  Don't blindly toss all your methods that will be used for communicating between the viewcontroller into your app delegate and reference the viewcontroller instances in the app delegate methods.  Fair 'nuff.  A bit further on, we get this slide telling us what we should do.  Page 18/51:     Best Practices for Data Flow         Figure out exactly what needs to be communicated   Define input parameters for your view controller   For communicating back up the hierarchy, use loose coupling         Define a generic interface for observers (like delegation)         This slide is then followed by what appears to be a place holder slide where the lecturer then apparently demonstrates the best practices using an example with the UIImagePickerController.  I wish the videos were available! :(  Ok, so... I'm afraid my objc-fu is not so strong.  I'm also a bit confused by the final line in the above quote.  I've been doing my fair share of googling about this and I found what appears to be a decent article talking about the various methods of Observing/Notification techniques:   Method #5 even indicates delegates as an method!  Except.... objects can only set one delegate at a time.  So when I have multiple viewcontroller communication, what am I to do?  Ok, that's the set up gang.  I know I can easily do my communication methods in the app delegate by reference's the multiple viewcontroller instances in my appdelegate but I want to do this sort of thing the right way.  Please help me "do the right thing" by answering the following questions:   When I am trying to push a new viewcontroller on the UINavigationController stack, who should be doing this push.  Which class/file in my code is the correct place? When I want to affect some piece of data (value of an iVar) in one of my UIViewControllers when I am in a different UIViewController, what is the "right" way to do this? Give that we can only have one delegate set at a time in an object, what would the implementation look like for when the lecturer says "Define a generic interface for observers (like delegation)".  A pseudocode example would be awfully helpful here if possible. LaTeX packages: automatic versus manual installation, and related issues I often run into problems in LaTeX with packages. I did a reinstall (MiKTeX) and it seemed to fix some issues with knowing where packages coming from or going. In general, I am not sure what should or does happen when using \usepackage command.  Is it standard that these packages are automatically pulled from the internet? Where do they go (by default)? Is there a better place to put them?  If I am troubleshooting, and if we can say packages are usually installed automatically, when, and should I ever, install packages manually? If so, where would I put them?  For instance, I believe the package easylist is installed on my computer. I was able, with some difficulty, to get into the roaming folder, looked around, and really the only package I saw, was several easylist files, such as .sty, and an associated readme file. I did a windows search for easylist, and only found one, with suffix .tpm and in the Program Files (x86)\MiKTeX 2.9\tpm folder.  My problem currently, is that I am trying to use the todonotes package. It seems to require the xcolor package. But this "can not be found". It asks to choose a place to get it. I think default was "choose random", but I just switched it to internet, and some random mirror site in country (USA). That didn't work, and I'm afraid I've now fiddled with the default settings for getting packages, which will create problems later.  Here are some other threads I have been fishing through:             In lieu of picture, I have this:    miktex-pdftex.exe: No connection could be made because the target machine actively refused it.  miktex-pdftex.exe: Data: connect failed in tcp_connect() {}======================================================================  ! LaTeX Error: File `xcolor.sty' not found.  Type X to quit or &lt;RETURN&gt; to proceed, or enter new name. (Default extension: sty)  Enter file name:    and from clipboard:    MiKTeX Problem Report Message: No connection could be made because the target machine actively refused it.  Data: connect failed in tcp_connect() Source: Libraries\MiKTeX\PackageManager\PackageManager.cpp Line: 2461 MiKTeX: 2.9 OS: Microsoft Windows 7 Home Premium Edition, 64-bit Service Pack 1 (build 7601) Invokers: explorer SystemAdmin: no PowerUser: no Root0: C:\Users\aUserName\AppData\Roaming\MiKTeX\2.9 Root1: C:\Users\aUserName\AppData\Local\MiKTeX\2.9 Root2: C:\ProgramData\MiKTeX\2.9 Root3: C:\Program Files (x86)\MiKTeX 2.9 UserInstall: C:\Users\aUserName\AppData\Roaming\MiKTeX\2.9 UserConfig: C:\Users\aUserName\AppData\Roaming\MiKTeX\2.9 UserData: C:\Users\aUserName\AppData\Local\MiKTeX\2.9 CommonInstall: C:\Program Files (x86)\MiKTeX 2.9 CommonConfig: C:\ProgramData\MiKTeX\2.9 CommonData: C:\ProgramData\MiKTeX\2.9    (from "Package Installation" window below)   The required file        tex\latex\xcolor\xcolor.sty  is missing. It is part of the following package:        xcolor  The package will be installed from:  ftp://... [Change...] The package will be installed for... Low wifi signal in 14.04 LTS Evaluate   $$\lim_{n\rightarrow \infty}\frac{1}{2n}\cdot \ln \binom{2n}{n}.$$   $\underline{\bf{My\;\;Try}}::$ Let $\displaystyle y = \lim_{n\rightarrow \infty}\frac{1}{2n}\cdot \ln \binom{2n}{n} = \lim_{n\rightarrow \infty}\frac{1}{2n}\cdot \ln \left(\frac{(n+1)\cdot (n+2)\cdot (n+3)\cdots (n+n)}{(1)\cdot (2)\cdot (3)\cdots (n)}\right)$  $\displaystyle y = \lim_{n\rightarrow \infty}\frac{1}{2n}\cdot \left\{\ln \left(\frac{n+1}{1}\right)+\ln \left(\frac{n+2}{2}\right)+\ln \left(\frac{n+3}{3}\right)+\cdots+\ln \left(\frac{n+n}{n}\right)\right\}$  $\displaystyle y = \lim_{n\rightarrow \infty}\frac{1}{2n}\cdot \sum_{r=1}^{n}\ln \left(\frac{n+r}{r}\right) = \lim_{n\rightarrow \infty}\frac{1}{2n}\cdot \sum_{r=1}^{n}\ln \left(\frac{1+\frac{r}{n}}{\frac{r}{n}}\right)$  Now Using Reinman Sum  $\displaystyle y = \frac{1}{2}\int_{0}^{1}\ln \left(\frac{x+1}{x}\right)dx = \frac{1}{2}\int_{0}^{1}\ln (x+1)dx-\frac{1}{2}\int_{0}^{1}\ln (x)dx =  \ln (2)$  My Question is , Is there is any method other then that like Striling Approximation OR Stolz–Cesàro theorem OR Ratio Test  If yes then please explain here  Thanks Prove that if $(ab)^i = a^ib^i \forall a,b\in G$ for three consecutive integers $i$ then G is abelian I've been working on this problem listed in Herstein's Topics in Algebra (Chapter 2.3, problem 4):     If $G$ is a group such that $(ab)^i = a^ib^i$ for three consecutive integers $i$ for all $a, b\in G$, show that $G$ is abelian.   I managed to prove it, but I'm not very happy with my result (I think there's a neater way to prove this). Anyway, I'm just looking to see if there's a different approach to this.   My approach:  Let $j=i+1, k=i+2$ for some $i\in \mathbb{Z}$.  Then we have that $(ab)^i = a^ib^i$, $(ab)^j = a^jb^j$ and $(ab)^k = a^kb^k$.  If $(ab)^k = a^kb^k$, then $a^jb^jab =a^jab^jb$.   We cancel on the left and right and we have $b^ja = ab^j$, that is $b^iba = ab^j$.  Multiply both sides by $a^i$ on the left and we get $a^ib^iba = a^jb^j$, so $(ab)^iba = (ab)^j$. But that is $(ab)^iba = (ab)^iab$.   Cancelling on the left yields $ab=ba$, which holds for all $a,b \in G$, and therefore, $G$ is abelian.  Thanks! Custom blocks created as a plugin in a module not showing for Block::load() I have a couple of blocks that have been created using the ... extends BlockBase syntax in my module. They work perfectly fine, and I can add them on the blocks layout page, can add them into DS as a field, etc. They definitely exist fine.  However, when I try and render them using Block::load(), they won't show up, unlike other blocks that work fine.  For example, if I have the following docblock:  /**  * Provides a 'Cute Cats' Block.  *  * @Block(  *   id = "cute_cats",  *   admin_label = @Translation("Cute cats yo"),  * )  */  class CuteCats extends BlockBase { ... }   ... and then try and call it like this:  $block = \Drupal\block\Entity\Block::load('cute_cats'); return render(\Drupal::entityTypeManager()   -&gt;getViewBuilder('block')   -&gt;view($block));   Any idea why? Thanks in advance. How do I make a floor plan with specific dimensions? What are sentences like "the longer X, the more Y" called and can they be used in formal written English? What is the type of sentence exemplified below called? Is it appropriate to use it in a scientific paper and formal written English in general?     1. The more pronounced the variation, the   more the waste.      2. The more you give, the more you get.      3. The longer I live, the more I realize the impact of attitude on life. Show that $\sum_{n=1}^{\infty}(n^{3}\sin\left(\frac{1}{n}\right)-n^{2}+\frac{1}{6})$ converges Let $t\in \mathbb R$. Prove that $\displaystyle{\sum_{n=1}^{\infty}n^{3}\sin\left(\frac{1}{n}\right)-n^{2}+t}$ converges iff $t=\frac{1}{6}$.  While the $(\Rightarrow)$ direction was fairly easy (as $a_n$ should converge to $0$, forcing $t=\frac{1}{6}$), i'm facing some hard time trying to prove the second direction, that is $\displaystyle{\sum_{n=1}^{\infty}(n^{3}\sin\left(\frac{1}{n}\right)-n^{2}+\frac{1}{6})}$ converges. I did notice that $a_n=a_{-n}$ and tried to write this series as a Leibnitz series, but had no luck since the sequence doesn't decrease. I also tried to prove absolute convergence but then again, no luck. Thanks. Is there an easy way to show which spheres can be Lie groups? Rigorous proof that $dx dy=r\ dr\ d\theta$ I get the graphic explanation, i.e. that the area $dA$ of the sector's increment can be looked upon as a polar "rectangle" as $dr$ and $d\theta$ are infinitesimal, but how do you prove this rigorously?    1. Geometrically, the exact area would be $$\frac{(r+dr)^2d\theta}{2} - \frac{r^2d\theta}{2}$$$$= (r + \frac{dr}{2}) dr d\theta  $$$$= r dr d\theta + \frac{dr^2 d\theta}{2}.$$  How do we get rid of $\frac{dr^2 d\theta}{2}$? Is it too insignificant in value compared to $r dr d\theta$ so that it vanishes? If so, is it the reason it gets ignored? And what's more, geometrically speaking, why would the two areas - $dx dy$ and $r dr d\theta$, be equal?  2. Approaching it algebraically, setting $$x = r\sin\theta$$$$y = r \cos\theta$$  gives $$\frac{dx}{d\theta} = r\cos\theta,  dx = r\cos{\theta} d\theta$$$$ \frac{dy}{dr} = \cos\theta,  dy = \cos\theta dr. $$  Multiplying both equations, side by side, gives $$dxdy = r\cos^2\theta dr d\theta.$$  Again I get an extra term, which is $\cos^2 \theta$. In both cases I am unable to derive that $dxdy = rdrd\theta$.  What do I do wrong in my reasoning? It all makes me think that I'm getting something essential terribly wrong. How to have separated but vinculated multiple Ubuntu One accounts?