I am trying to implement a wrapper library for an Arduino-based ESP8266 which will act as a Modbus controller.   The Modbus library I am using (ModbusMaster) has a function which sets what is to be done before each transmission: _modbus.preTransmission(void( *preTransmission)().   I am trying to figure out how to set my function MyWrapperClass::preTransmission() to be the callback function.  MyWrapperFunction::MyWrapperFunction() {     _modbus.begin(_slaveId, serial); //_modbus defined in header file ModbusMaster _modbus;    _modbus.preTransmission(this-&gt;preTransmission);   _modbus.postTransmission(this-&gt;postTransmission); }  void MyWrapperFunction::preTransmission() {   //Stuff before transmission }  void MyWrapperFunction::postTransmission() {   //Stuff after transmission }   But I get various compiler errors (depending on what I'm doing), including:  error: no matching function for call to 'ModbusMaster::postTransmission(&lt;unresolved overloaded function type&gt;)'   Also sorry if this is a duplicate - it is very hard to search for similar things when you don't know the terms to search for. I am sure that this has been asked before but I couldn't find an answer.
I'm using an API that requires me to pass a function pointer as a callback. I'm trying to use this API from my class but I'm getting compilation errors.   Here is what I did from my constructor:  m_cRedundencyManager-&gt;Init(this-&gt;RedundencyManagerCallBack);   This doesn't compile - I get the following error:      Error  8 error C3867: 'CLoggersInfra::RedundencyManagerCallBack': function call missing argument list; use '&amp;CLoggersInfra::RedundencyManagerCallBack' to create a pointer to member   I tried the suggestion to use &amp;CLoggersInfra::RedundencyManagerCallBack - didn't work for me.   Any suggestions/explanation for this??  I'm using VS2008.  Thanks!!
I'd like to write something in the shape of this "coat of arms".    I'd like to have the text filling the coat but with a hole roughly in the shape of the sword. I know there is the \shapepar command to create paragraph shapes so I tried to , a patch for XFig that allows you to draw the shape you want but it never worked on my computer (Mac OS X). I also know I can build the shape by myself with shapepar syntax but it seems really complicated and I don't think I'll make a lot of shapes. So if anybody has ShapePatch working on his computer or knows shapepar syntax very well, could he give me the code? Math mode accents In my long document I, sadly, have to use several accents to denote different kinds of symbols. Currently, I use primes ($x'$), hat, tilde, and overline. In addition I use two colored symbols (red colored tilde and blue $\prescript\ulcorner$), as I need further distinguishment.  Now I'd like to have no colors in my document, while I still have at least six different ways to differentiate certain symbols.  Which alternatives could I use that are easy to recognize and 'stand out', while they are different to prime/hat/tilde/overline?  EDIT: The reader should be able to see the kind of accent used even if the symbol in question is in a sub-script (possibly even a sub-sub-script). I know that I have to use some tweaking tool and then a extension for this. But all extensions that are suggested for this(Workspace grid, Workspace matrix), aren't available in the software center. Unmarshal a single element list fails Why does cycle rendering only use one core from an AMD GPU? Why do people sometimes use the past perfect form of a verb when the past would suffice? (e.g. "you had mentioned") I noticed that my American friends tend to use the past perfect form when they use the verb mention in its past form, almost despite of the context of the sentence. I hear them say  "you had mentioned" a lot more often even in situations where the use of simple past would have been perfectly fine. Have you noticed it too and is it one of those unwritten rules, or is there a more formal explanation to it?  It seems like there was more verbs like that, but I am having a hard time remembering it now. If I do, I will edit the post and likely change the title to accommodate other verbs. Is there a need to set Objects to Nothing I always read that it is recommended to set objects to nothing, once I am done with them. But I normally use them only in functions inside forms.  Isn't the reference lost and memory released when the function scope is left, regardless of setting objects to Nothing?   i.e. is it really necessary to do:  Set db = Nothing Set record_set = Nothing Often when I edit one of my answers, it's because I want to better address the original question. The only problem is that I can't see the original question while I'm editing my answer!  I'd love to see the original question text beneath the "answer edit" form. This way I could scroll down slightly to read it if I wanted to, or just ignore it if not.  Current workaround is to click the 'return to answer' link and hope that you remember to launch it in a new tab/window, then tab back and forth.    Imported from this uservoice item: Limit involving binomial coefficients: $\lim_{n\to\infty}\left(\binom{n}{0}\binom{n}{1}\dots\binom{n}{n}\right)^{\frac{1}{n(n+1)}}$ I am facing difficulty with the following limit. $$ \lim_{n\to\infty}\left(\binom{n}{0}\binom{n}{1}\dots\binom{n}{n}\right)^{\frac{1}{n(n+1)}} $$ I tried to take log both sides but I could not simplify the resulting expression. Please help in this regard. Thanks. How to fix very slow Ubuntu booting? When I boot up my my newly installed copy of Ubuntu on my custom rig w/4GB DDR3 RAM and a 3 Ghz Intel Core i7, it takes about a minute and a half at the purple loading screen, and then after logging in it takes a while for the icons to show up on the screen. This computer could run and boot Windows 7 faster, so  i have a problem here. In C#, why can't a List object be stored in a List variable It seems that a List object cannot be stored in a List variable in C#, and can't even be explicitly cast that way.  List&lt;string&gt; sl = new List&lt;string&gt;(); List&lt;object&gt; ol; ol = sl;   results in Cannot implicitly convert type System.Collections.Generic.List&lt;string&gt; to System.Collections.Generic.List&lt;object&gt;  And then...  List&lt;string&gt; sl = new List&lt;string&gt;(); List&lt;object&gt; ol; ol = (List&lt;object&gt;)sl;   results in Cannot convert type System.Collections.Generic.List&lt;string&gt; to System.Collections.Generic.List&lt;object&gt;  Of course, you can do it by pulling everything out of the string list and putting it back in one at a time, but it is a rather convoluted solution. How do I view the SQL generated by the Entity Framework? Missing dollar problem This sounds silly but I saw this and I couldn't figure it out so I thought you could help. The below is what I saw.  You see a top you want to buy for $\$97$, but you don't have any money so you borrow $\$50$ from your mom and $\$50$ from your dad.  You buy the top and have $\$3$ change, you give your mom $\$1$,your dad $\$1$, and keep $\$1$ for yourself.  You now owe your mom $\$49$ and your dad $\$49$.  $\$49 + \$49 = \$98$ and you kept $\$1$.   Where is the missing $\$1$? Showing that $a^n - 1 \mid a^m - 1 \iff n \mid m$ Let $a\ge 2$ be an integer. Show that for positive integers $m,n$, we have $a^n - 1$ divides $a^m - 1$ if and only if $n$ divides $m$.   I am having trouble showing this. I've seen a similar problem on here but it only shows one direction for the proof. I would like to see both directions.  This is what I have so far: Let $m = nq + r$, then $a^m - 1 = a^{nq + r}- 1 = a^{nq}a^r - 1 = a^{nq}a^r - a^r + a^r - 1 = a^r(a^{nq} - 1) + a^r - 1$. Since $0\le r\lt n$, $r = 0$ then $a^m - 1$ = $a^{nq} - 1$ so $a^m$ = $a^{nq}$ . Thus $m = nq$ hence $n\mid m$. Factors for max CP at a particular trainer level? Java toString() using reflection? Best way to migrate a huge SQL Server database with low downtime over network Problem definition  Our database server needs to be transferred to an other datacenter. It runs on Microsoft SQL Server 2012 Enterprise (64-bit) and contains two databases of about 2TB and 1TB.  Having little to no downtime for this would be ideal.  Workload  Those databases are used for a .NET website and are constantly getting updated.   Having it not available over the weekend would be acceptable though. The currently in use DB would remain the only one in use until the switch over to the new one.  That switch would ideally be made just by changing DNS entries to point to the new DB server while making sure the DB is not being updated.  Also, time taken by this operation does not really matter as long as the switch from one server to the other (downtime) is kept low.  Approaches considered   Backup and restore  This has been done in the past but involved a high downtime even though it was done through an internal network, so more efficiently than through Internet Log shipping  As far as I understand, this approach would minimize downtime by configuring a master/slave and transferring  an exact copy of the master DB to its slave being read only. As mentioned above, no access to the slave would be necessary and we just need a way to have a replica of the master DB without data corruption.   It also seems to be quite efficient in terms of resources utilization and wouldn't impact to much the master performance.   I might be wrong about this approach so feel free to correct me. Database mirroring  I'm not too aware of that approach but it seems like a valid option. No need to have real time sync and performance of the master is quite important so asynchronous would be the way to go if this approach were to be chosen. Other options?  That server runs directly on bare metal hardware so lower level solutions are unfortunately not an option. Maybe there is a better way to get this done?   Constraints  As described, those databases are quite big to the point they are hard to maintain but that's an other problem.  The versions of SQL Server will be the same (Microsoft SQL Server 2012 Enterprise 64-bit).  It will have to be transferred over network between two datacenters so most probably over Internet. Having disks sent from one site to the other for an initial sync is unfortunately not an option. Having some sort of security for the transfer would be ideal but we will do the best of this situation.  That should give a quite good overview of our needs for this task and hopefully some of you had to face that situation before. Getting the ID of the element that fired an event Is there any way to get the ID of the element that fires an event?  I'm thinking something like:    $(document).ready(function() {   $("a").click(function() {     var test = caller.id;     alert(test.val());   }); }); &lt;script type="text/javascript" src="starterkit/jquery.js"&gt;&lt;/script&gt;  &lt;form class="item" id="aaa"&gt;   &lt;input class="title"&gt;&lt;/input&gt; &lt;/form&gt; &lt;form class="item" id="bbb"&gt;   &lt;input class="title"&gt;&lt;/input&gt; &lt;/form&gt;     Except of course that the var test should contain the id "aaa", if the event is fired from the first form, and "bbb", if the event is fired from the second form. why does loop-cut-and-slide ignore some faces but not others? why does the loop-cut-and-slide operation ignore certain faces but happily cut others?the model is symmetrical so it is a bit strange to pick 3 faces that won't get cut. I tried applying it to see if it was just a graphics glitch causing the purple line to not display over everything, but it did end up cutting only what the line was selecting, instead of the whole mesh.    as requested,here's a paste of the blend: How can orbitals be oriented if the nucleus is symmetrical? I know very little about quantum physics, but I just can't wrap my head around the fact that non-spherical orbitals appear to be "oriented", constituting a set of fixed "frame of reference axes".  Does it really work like that? Are there for a single atom given directions in which the orbitals "protrude"? And if so, what are they based on? If I understand it right, the nucleus is seemingly spherical - symmetrical with no unique axis of symmetry. What would then decide the orientation of the orbitals in space (with respect to the surroundings)?  Edit: I understand any orientation works to satisfy the wave equation. I was more curious why the atom would choose one direction, instead of any of the others. Is that fundamentally random? And is this setup retained further, or can it change at any time?