I came across this statement in a book and I don't understand it. The sentence is: "The templates in &lt;function&gt; help you construct objects that define operator(). These objects are called function objects and can be used in place of function pointers in many places".  Please tell me what operator() is, and I would also like some help in understanding what "function object" mean in this context.
I keep hearing a lot about functors in C++. Can someone give me an overview as to what they are and in what cases they would be useful?
Trying to keep track of the updates to all the great, user-developed add-ons is fairly frustrating (at least for me). Is there currently a centralized resource where all these amazing add-ons are kept and updated in one location?  If there isn't such a resource, would it be possible to have blender query the collection of installed add-ins and then iterate through on-line references looking at version #'s for add-ins?  Since, as far as I know, it hasn't been done...I have to ask if there are any major flaws in the concept. Of course, in my dream scenario, there would be a "voting" front-end that would allow users to see what the most popular and useful add-ons are and where you don't have to read pages (and pages) of threads. Subdivision Surface on curved mesh I'm trying to delete those ugly lines visible in the cylindrical shape of the lens. What is causing them is the added edge loops I made for the protruding detail with the switch. The problem is that if I delete those edges, it'll look even worse because of the n-gons. Any ideas? I  to the question "" which was specific to the question asked.  Another user engaged positively with my answer, as there was a small conversation thread.  That person then  and made what I would say are minor modifications (the comments I left in my original code that pertained to the specific case are still in the places where he made edits to be more specific).  The answer does acknowledge that it is a general case of my specific code.  Ignoring the fact that I'm involved in it, what should one do when seeing this situation?  The only thing I can think of, and I'm not sure that it's necessarily the right solution, is to flag the answer for moderator attention.  Other possible actions, which I believe are wrong, are:   Editing the answer; that would change its intent Voting the answer down; it's a technically correct answer   One could leave a comment, but that can lead to confrontation and escalation (depending on the parties involved) which would be counterproductive.  The only thing I've done, which is not really related, is edit the answer to hyperlink the already existing attribution (but I do this as a regular edit for any answer which explicitly references another).  What's the best approach here, if any? How to use resistors? I have a power supply of 5 volts @ 1A. I want to reduce the current from 1A to 250mA. Which resistor should be use?   I tried this equation(Ohm's Law):  R = V / I  = 5/(0.75)  = 6.66 Ohms.  I tried the 6.66 Ohm resistor but it only reduce few mili Amps. How do I disable the guest session in Ubuntu 11.10 or higher? I don't want people to be able to use my computer without using a password to log in! What is the procedure for taking down Titans? Examples of patterns that eventually fail Often, when I try to describe mathematics to the layman, I find myself struggling to convince them of the importance and consequence of "proof". I receive responses like: "surely if Collatz is true up to $20×2^{58}$, then it must always be true?"; and "the sequence of number of edges on a complete graph starts $0,1,3,6,10$, so the next term must be 15 etc."  Granted, this second statement is less logically unsound than the first since it's not difficult to see the reason why the sequence must continue as such; nevertheless, the statement was made on a premise that boils down to "interesting patterns must always continue".  I try to counter this logic by creating a ridiculous argument like "the numbers $1,2,3,4,5$ are less than $100$, so surely all numbers are", but this usually fails to be convincing.  So, are there any examples of non-trivial patterns that appear to be true for a large number of small cases, but then fail for some larger case? A good answer to this question should:   be one which could be explained to the layman without having to subject them to a 24 lecture course of background material, and have as a minimal counterexample a case which cannot (feasibly) be checked without the use of a computer.   I believe conditions 1. and 2. make my question specific enough to have in some sense a "right" (or at least a "not wrong") answer; but I'd be happy to clarify if this is not the case. I suppose I'm expecting an answer to come from number theory, but can see that areas like graph theory, combinatorics more generally and set theory could potentially offer suitable answers. Can't run gparted in fresh system Trying to run gparted in fresh installed Ubuntu. System not found this program. When I try to install I have report that it is already installed. How to solve this problem?  g@g-Lenovo:~$ gparted The program 'gparted' is currently not installed. You can install it by typing: sudo apt install gparted g@g-Lenovo:~$ sudo aptitude install gparted [sudo] password for g:  gparted is already installed at the requested version (0.25.0-1) gparted is already installed at the requested version (0.25.0-1) No packages will be installed, upgraded, or removed. 0 packages upgraded, 0 newly installed, 0 to remove and 130 not upgraded. Need to get 0 B of archives. After unpacking 0 B will be used. Counter example for $(A \times B) \cap (C \times D) = (A \cap C ) \times (B \cap D)$ Is $\mathbb{Z} \left[ \frac{1+i \sqrt{7}}{2} \right]$ euclidean? Best way to return multiple values from a function? My  has failed me.  In Python, are the following two tests for equality equivalent?  n = 5 # Test one. if n == 5:     print 'Yay!'  # Test two. if n is 5:     print 'Yay!'   Does this hold true for objects where you would be comparing instances (a list say)?  Okay, so this kind of answers my question:  L = [] L.append(1) if L == [1]:     print 'Yay!' # Holds true, but...  if L is [1]:     print 'Yay!' # Doesn't.   So == tests value where is tests to see if they are the same object? We're in the process of deploying a private openstack instance but don't have the Swift object storage service available yet. Can juju bootstrap launch a utility instance without swift? I see that the openstack configuration control-bucket is a container id. Is it possible to make an underfull tabulary spread out? With this MWE  \documentclass{article} \usepackage{tabulary}  \begin{document}  \hrule  \begin{center}   \begin{tabulary}{\textwidth}{|L|L|L|}     foo&amp;bar&amp;baz   \end{tabulary} \end{center}  \hrule  \end{document}   I get a table which is narrower than the page:   But I'd like the table to be spread out to \textwidth like tabularx would do. Is this possible?  Or is there an alternative approach? Is there a way to set initial state with rigid bodies? Let's say I set up a Rigid Body simulation in Blender (not in GE), and then run the simulation for a number of frames. Is there a way to tell Blender to use the current state and position as the initial state? So that when I go back to frame 1, the rigid bodies stay in the same place they did in frame X.  For instance, if I want a pile of bricks, I first place the bricks in the air and then let them drop down on the ground, coming to rest. When they have come to rest, I want to use that position as the starting position. Scanner issue when using nextLine after nextXXX Zip all files in directory? "Series" – a noun of multitude similar to "lot", "majority", "percentage", "proportion"– verb agreement According to Garner's fourth edition  Though serving as a plural when the need arises, series is ordinarily a singular noun. But it is also a noun of multitude, so that phrases such as a series of things take a plural verb. However, the collocation there {has been - is} a series has predominated in print sources. Common nouns of multitude: lot, majority, mass, minority, multitude, percentage, proportion, variety.  However,  reads  When it has the singular sense of &quot;one set,&quot; it takes a singular verb, even when series is followed by of and a plural noun: A series of lectures is scheduled.  Are these dissimilar usages stylic advice? Secondly, the inversion after there also chooses singular elsewhere; why is it so?  When the verb precedes the noun percentage, a singular verb is required. That is, a higher percentage of them are, but there is a higher percentage of them. Best Method to SFTP or FTPS Files via SSIS This question originally asked which is the best method for uploading files via SFTP or FTPS in SSIS.  It now just lists the pros and cons of each solution.  I personally use CozyRoc's SFTP library these days, but I've used each of the below solutions at one point or another.  SSIS COMPONENT LIBRARY  Method: Install a SSIS component library from , , , , or some other vendor on each development and production server and use the SFTP task to upload the files.  Pros: Easy to use.  It looks, smells, and feels like a normal SSIS task.  SSIS also recognizes the password as sensitive information and allows you all the normal options for protecting the sensitive information instead of just storing it in clear text in a non-secure manner.  Works well with other SSIS tasks such as ForEach Loop Containers.  Errors out when uploads and downloads fail.  Works well when you don't know the names of the files on the remote FTP site to download or when you won't know the name of the file to upload until run-time.  Cons: With the exception of the Codeplex solution, this costs money to license in a production environment.  Requires installing the libraries on each development and production machine.  If it is the Codeplex solution, then you are using software that isn't supported by any specific vendor.  This also makes you dependent upon the vendor to update their libraries between each version.  For instance, before 2008 RTM'd, I was developing a new server on a CTP version of 2008 and the CozyRoc 2005 library was incompatible with it.  Eventually they released a 2008 compatible version, but I had to temporarily use the command line solution to work around this issue.    COMMAND LINE SFTP PROGRAM  Method: Install a free command-line SFTP application such as Putty and WinSCP and execute it either by running a batch file or operating system process task.  Instructions for doing this via WinSCP are listed .  Pros: Free, free, and free.  You can be sure it is secure if you are using Putty since numerous GUI FTP clients appear to use Putty under the covers.  You DEFINATELY know you are using SSH2 and not SSH.  Cons: The two command-line utilities I tried (Putty and Cygwin) required storing the SFTP password in a non-secure location.  I haven't found a good way to capture failures or errors when uploading files.  The process doesn't look and smell like SSIS.  Most of the code is encapsulated in text files instead of SSIS itself.  Difficult to use if you don't know the exact name of the file you are uploading or downloading.  A 3RD PARTY C# or VB.NET LIBRARY  Method: Install a SFTP or FTPS library and use a Script Task that references the library to upload the files.  (I've never tried this, so I'm going to guess at the pros and cons)  Pros: Probably easy to capture errors.  Should work well with variables, so it would probably be easy to use even when you don't know the exact name of the file you are uploading or downloading.  Cons: It's a script task combined with .NET libraries.  If you are using SSIS, then you probably are more comfortable with SSIS tasks then .NET code.  Script tasks are also difficult to troubleshoot since they don't have the same debugging tools and features as regular .NET projects.  Creates a dependency on 3rd party code that may not work between different versions of SQL Server.  To be fair, it is probably MORE likely to work between different versions of SQL Server than a 3rd party SSIS task library.  Another huge con -- I haven't found a free C# or VB.NET library that does this as of yet.  So if anyone knows of one, then please let me know! Vi on Linux: show ^M line endings for DOS-format files On Solaris, if you open a file in vi that has Windows line endings, this shows up as ^M at the end of every line.  On Linux, vi is cleverer and understands the Windows file format, and does not display ^M.  Is there a setting to make Linux vi behave the same as Solaris in this respect?  A common problem for us is copying a shell script off a (Windows) dev box and forgetting to dos2unix it, and then being confused when it doesn't work properly. On Solaris the problem is obvious as soon as you vi the file, but not on Linux.  Thanks.