I write application for studies, i am not experienced with c/c++. I have problem with call callback function, when I try call callback function i have an error  invalid use of non-static member function      if(pcap_loop(handle, 1, got_packet, NULL)&lt;0){  Here is my callback function:  void got_packet(u_char *args, const struct pcap_pkthdr *header, const u_char *packet)     {         static int count = 1;             fprintf(stdout,"%d, ",count);             if(count == 4)                 fprintf(stdout,"Come on baby sayyy you love me!!! ");             if(count == 7)                 fprintf(stdout,"Tiiimmmeesss!! ");             fflush(stdout);             count++;     }   this is how I call this function      int CapThread::capture() {      char *dev, errbuf[PCAP_ERRBUF_SIZE];      dev = pcap_lookupdev(errbuf);      QString filter_expression = "udp and ip dst host "+ui-&gt;ip_addr-&gt;text();     QByteArray byte_array =filter_expression.toUtf8();      const char *filter_exp = byte_array.data();      struct bpf_program fp;       bpf_u_int32 mask;            bpf_u_int32 net;        /* The IP of our sniffing device */     struct pcap_pkthdr header;       struct ether_header *eptr;       struct udphdr *udp_header;       const u_char *packet;        struct ip *ip;     struct rtp_header *rtp_header;       u_char *ptr;      if (pcap_lookupnet(dev, &amp;net, &amp;mask, errbuf) == -1) {         fprintf(stderr, "Couldn't get netmask for device %s: %s\n", dev, errbuf);         net = 0;         mask = 0;         return(1);     }      pcap_t *handle;     handle = pcap_open_live(dev, BUFSIZ, 1, 1000, errbuf);     if (handle == NULL) {         fprintf(stderr, "Couldn't open device %s: %s\n", dev, errbuf);         return(2);     }      if (pcap_compile(handle, &amp;fp, filter_exp, 0, net) == -1) {         fprintf(stderr, "Couldn't parse filter %s: %s\n", filter_exp, pcap_geterr(handle));         return(3);     }     if (pcap_setfilter(handle, &amp;fp) == -1) {         fprintf(stderr, "Couldn't install filtecho deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.lister %s: %s\n", filter_exp, pcap_geterr(handle));         return(4);     } //    packet = pcap_next(handle, &amp;header); //    pcap_loop(handle,5,got_packet,NULL);     if(pcap_loop(handle, 6, got_packet, NULL)&lt;0){         qDebug()&lt;&lt;"got packet";     }      pcap_close(handle);     return 0; }   this is how my header file look like:      #ifndef CAPTHREAD_H #define CAPTHREAD_H #include &lt;pcap.h&gt; #include &lt;netinet/ether.h&gt;  //plik nagłówkowy umożliwiający przekonwertowanie danych z nagłówka na kod ASCII #include &lt;netinet/ip.h&gt;     //plik zawierający struktury nagłówka IP i umożliwiający przekonwertowanie danych z nagłówka na kod ASCII #include &lt;net/ethernet.h&gt; #include &lt;netinet/udp.h&gt; #include &lt;arpa/inet.h&gt; #include &lt;QDebug&gt; #include &lt;iostream&gt; #include &lt;stdio.h&gt; #include "ui_mainwindow.h"  class CapThread { public:     CapThread();     CapThread(Ui::MainWindow *ui);     ~CapThread();     void got_packet(u_char *args, const pcap_pkthdr *header, const u_char *packet);     int capture(); private:     struct rtp;     Ui::MainWindow *ui;     char *dev, errbuf;     pcap_t *handle;     char filter_exp[];     struct bpf_program fp;     struct ether_header *eptr;     bpf_u_int32 mask;     bpf_u_int32 net; };   #endif // CAPTHREAD_H   actually i am out of ideas, can someone help me?
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!!
Can a finite group act freely (as homeomorphisms) on $\mathbb R^n$ I am asking if whether or not a finite group acts freely (as homeomorphisms) on $\mathbb R^n$.  To answer in the negative, it suffices to show: for any homeomorphism $f$ such that $f^d=\text{id}_{\mathbb R^n}$, then $f$ has a fixed point.  I am looking for a complete self-contained answer. How to properly render smoke on a transparent background? When rendering volumes with Film > Transparent enabled, the alpha appears to be the wrong type (premultiplied/straight). In the 3D view it works as expected:    This is a known .  Is there any way to work around this? I am working in Illustrator (15.0.2 (CS5) or 16.0.0 (CS6)) and when I try to move objects small distances, they snap to the nearest two pixels on some invisible grid. I can't find anything in the preferences. Here are some screen shots: Proving Cauchy condensation test How to initiate a Full Reboot/Shutdown on Windows 10 Fall Creators Update Environment: Windows 10 Fall Creators Update / 1709  Background: There is a new feature in the Fall Creators update where post reboot applications and browser windows are reopened to the state they were in before the reboot.  Issue: The only time i really reboot is when I no longer want the applications to be open. Its driving me crazy that i cant fully shutdown/reboot the machine.   Solutions attempted I always reboot by using Win+R and running "Shutdown -r -t 0". the "-r" option should do a full reboot but that isnt working for me.   Any other suggestions or hacks to control via commandline on how to do a full reboot vs. this Zombie reboote (Which is a feature i like when i did not want to reboot and had to) I am trying to prove:     $a\mid b \land b\mid c \Rightarrow a\mid c $   $a\mid b$ means that a divides b if there is an integer k, that $b=k\cdot a$  Please give me a hint on how to start, because I have no idea. Why is there a diode connected in parallel to a relay coil? In most electrical circuits with a relay, a diode is connected in parallel to the coil of the relay. Why? Is it always a good practice? Defining my own None-like Python constant $f:\mathbb{R}^3\to\mathbb{R}, f(rx)=r^{\alpha}f(x)$ for some $\alpha&gt;0$, $\forall x\in\mathbb{R}$, for any $r\in\mathbb{R}$, could any one tell me which of the following is true?  $1.$ If $f(x)=f(y)$ whenever $||x||=||y||=\beta&gt;0$, then $f(x)=\beta ||x||^{\alpha}$  $2.$ If $f(x)=f(y)$ whenever $||x||=||y||=1$, then $f(x)= ||x||^{\alpha}$  $3.$ If $f(x)=f(y)$ whenever $||x||=||y||=1$, then $f(x)=c||x||^{\alpha}$ for some constant $c$  $4.$ If $f(x)=f(y)$ whenever $||x||=||y||$, then $f(x)$ must be a constant function. Thank you. Wake-on-LAN quit working with latest kernel (Bionic) Newman's "Natural proof"(Analytic) of Prime Number Theorem (1980) I am trying to understand this short proof by newmann. I faced some problems while grasping this very proof. Please help me out.  1 . I am not clear, why in step (1)'s proof he says that from unique factorization and the absolute convergence of zeta we have... [here factorization makes sense but where did he use absolute convergence to prove (1).]  2 . Step 2 is clear but where will he use it (may be I will out later as i am still working on next steps.  3 . My major problem is to understand step 3rd's last part that i put it in the red box. please elaborate it. I didn't understand anything in this box.  I am still working on the next steps of the proofs. If i get any problem in them i will ask you.  Thank you so much in advance. Word for "scary thing that's about to occur"? I have the feeling I'm forgetting a very simple word. But anyway, is there a word for that? Example:     The [...] that haven't occurred yet are the most scary ones. Don't impose delay loading Close dialog when you haven't just loaded it I own a 2016 Macbook (with the USB-C charging) - at the time and in response to all of the reports of poor cables and poor chargers, I bought a meter so I could see what the throughput of my cables/chargers was. However, having run some tests I'm now not sure what to consider normal / what is harmless to the battery.   For all tests I used an original Apple C-C cable - though was able to replicate with two third party cables I own.  I have the original Apple block charging at 14.3 V / 1.99 A and a third party block that charges the same.  Another third party block which advertises USB PD and 3 A is currently charging at 20 V / 1.43 A  I've done some research online but I can't find any articles that indicate what a normal USB PD output is relative to the devices that connect to it and would appreciate any guidance / assistance.   TL;DR: Have Apple charger which charges at one voltage/amperage. Bought several others advertised at PD which are higher voltage, lower amperage. Not sure what is 'safe', or 'fast', or does least overall damage to battery. Homeomorphism that maps given points to given points What's the deal with the phrase "could care less"?  Whilst growing up, I've always known people (parents etc) to use the phrase "couldn't care less", but I've also come across people who use the phrase "could care less" to mean the same thing (that is, "I do not care at all about that").  To me "couldn't care less" seems a lot more logical. If I couldn't care less about something, that implies I do not care about it at all. In contrast to this, to my mind the phrase "could care less" seems to indicate "I do care about this to some degree at least", but that's definitely not the meaning intended.  What's going on here? Is my (logical) analysis correct or in error? How do I show apt-get package management history via command line? Is there a way to show the history of packages that were changed by apt-get via command line? Optimizing $(X_{n}+c)^{2}$ to show that $P(\overline{X}_{n}\geq \lambda) \leq E(X_{n}^{2})/(EX_{n}^{2}+ \lambda^{2})$ Define $\overline{X}_{n}:=\max\limits_{1\leq m \leq n} X_{m}$ and let $(X_{n})_{n}$ be a martingale where $X_{0}:=0$ and $EX_{n}^{2}&lt; \infty$  Show that $P(\overline{X}_{n}\geq \lambda) \leq E(X_{n}^{2})/(EX_{n}^{2}+ \lambda^{2})$  As a hint: Consider $(X_{n}+c)^{2}$ and optimize over $c$.  It is clear that $((X_{n}+c)^{2})_{n}$ is a submartingale and when I optimize over $c$, I get:   $X_{n}^{2}+2X_{n}c +c^{2}\Rightarrow 0=2X_{n}+2c=0\Rightarrow -X_{n}=c$  It is also clear I need to use Doob's inequality but I am not sure how to go about this, and how the above optimization helps me. Is there a Unix command to get the absolute (and canonicalized) path from a relative path which may contain symbolic links? I need to extrude a circular shape from a surface that's basically just a grid of quads. What's the best practice to do this without screwing up the topology too much?  I basically want to have a circular face I can extrude, in order to have a cylinder like protuberance on the object, something like this: