This a continuation to the . Got compile error  g++ -fpermissive -std=c++11 te2b.cc te2d.cc /tmp/ccUVm8OV.o: In function `notify(std::string, int)': te2b.cc:(.text+0x80): undefined reference to `void notify&lt;char const*&gt;(char const*, char const*&amp;&amp;)' /tmp/ccUVm8OV.o: In function `main': te2b.cc:(.text+0xe6): undefined reference to `void notify&lt;int&gt;(char const*, int&amp;&amp;)' collect2: error: ld returned 1 exit status   Guess my extern for a template function was not declared right, don't know how to correct it. Any ideas?  Thanks!  ====== te2b.cc======  #include &lt;vector&gt; #include &lt;iostream&gt; #include &lt;unordered_map&gt; #include &lt;stdarg.h&gt; using namespace std;  extern char notifyBuf[]; template &lt;typename ... Ts&gt; extern void notify(const char* format, Ts&amp;&amp;... args); void notify(string s, int maxSize=0) {     if (maxSize &amp;&amp; (maxSize &lt; s.size())) {         s.erase(maxSize);     }     printf("second invokation\n");     notify("%s\n", s.c_str()); } int main(int argc, char *argv[]) {     string s = "hi tom";     //notify(s);     notify("hi %5d \n", 89);         printf("%s\n", &amp;notifyBuf[0]);     notify(s, 5);     printf("%s\n", &amp;notifyBuf[0]);     return 0; }   ====== te2d.cc =======  #include &lt;sys/shm.h&gt; #include &lt;malloc.h&gt; #include &lt;unordered_map&gt; #include &lt;string&gt; #include &lt;iostream&gt; typedef unsigned char uchar; typedef unsigned short uint16; using namespace std;  char notifyBuf[0x100000] = "s"; template &lt;typename ... Ts&gt; void notify(const char* format, Ts&amp;&amp;... args)  {     sprintf(&amp;notifyBuf[1], format, std::forward&lt;Ts&gt;(args)...); }
Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)
Force a browser to load the 'https' edition of a website, not the 'http'? can't login as mysql user root from normal user account in ubuntu 16.04 I just installed Ubuntu 16.04 LTS along with the packages php, mariadb and nginx. I ran mysql_secure_installation and changed the root password.  Now when I try to login to mysql using the root account while logged in Ubuntu as normal user account I get access denied.   When I login using sudo mysql, mysql doesn't even ask me password. If I run mysql_secure_installtion I see that old settings never got set permanently.   What am I doing wrong? This post is in reference to the following blog post:   To start off, a quick introduction of myself; my name is Jascha Drel, Product Manager for Advertising at Stack Overflow. In this role, I am part of ’s organization.   Our team is continuously making improvements to the ads experience on our sites. One of the changes we’re excited about sharing is the new Report this Ad feature now available on some of our sites. We want to continue to give our communities more native control over their ad experience. We needed a quantifiable way to receive feedback and this feature will allow that.  We enforce strict  on the types of advertisers we work with but cannot fully control what is shown due to how advertising delivery works. However, being able to hear from our users about problematic ads will be a huge benefit as we can address those problems faster and with more accuracy. The Report this Ad feature will allow us to quickly see and investigate ads reported by you which matters to us because we want to hear your thoughts.  Furthermore, this new feature ensures that the members of our communities have a built-in way to report ads they consider problematic when we test any new ad formats/solutions.  We are launching this feature on 5 sites initially (, , , , and ) to get a good understanding of what we can expect in terms of numbers of reports whenever launching this to the entire network. Prior to launching it network-wide, we’ll share general results we’ve seen here.  What happens once an ad is reported?  All reports will be consolidated into a dashboard that the team will look at several times per week to spot irregularities in terms of the total number of reports, report categories, and on an advertising campaign basis. We will not be replying to individual reports, but we will reach out to our advertisers, to share feedback or notify them if the ad being reported does not fit our guidelines. We may also evaluate our policies in response to large numbers of reports not covered by them. Since we don’t have a baseline for the number of ads that are going to be reported using this new feature, we will consider reevaluating the process if the current process doesn’t scale.    We’d like to share an update on the progress of this feature:   We've launched this feature on 5 SE sites (Server Fault, Database Administrators, Arqade, Game Development, and Unix &amp; Linux) initially for logged in users only, and for anonymous users afterward. The report this ad button was shown several million times (of which roughly 65% paid ads and 35% house ads). We showed several dozens of different ad campaigns. So far we have received 0 reports. We've tested the feature several ways, found some minor bugs (which have been/are being fixed), however, in the vast majority of the scenarios the feature works well (we’re happy to be ).   We’re currently graduating this feature and are releasing it network-wide this week. Feel free to comment below if you have any questions/comments. There are many beings that have very big powers. There are beings that are worshipped as gods (Asgardians; and I would lump Azazel into that as well since Marvel seems to imply that he's - while a mutant - someone people consider to be "Devil"). There are mutants whose power would clearly have been considered as "god like" by people worshipping Greek or other polytheistic pantheons where the threshold to what made you a god was pretty low.  But are there any actual major "Gods" in Marvel universe?  Since there are many different definition of what a "god" is, the one that is pertinent to this question:   Power wise, being able to create Universe(s); e.g. gods more in a sense of Christianity/Judaism scale rather than "Pan" or "Hestia" in Greek pantheon who merely have some limited supernatural powers over small domain of natural events. Effectively immortal, at least excluding specific exotic attacks. Origin-wise, be "supernatural", not merely a human mutant or a powerful alien with advanced technology. Desire/demand/like followers' worship or prayers. If I want my app to behave differently on a jailbroken iPhone, how would I go about determining this? Why can I only change my Stack Overflow name once every 30 days? I want to be able to lock my translation/scale operations to two axes at a time, say xy, xz or yz. It currently takes two operations (one for each axis).  Example, say for a cylinder, I would like to reduce the radius. I currently have to scale on the x axis first, then on the y axis, or I have to manually input the scale values in the object properties panel.  This option is easily accessible in 3dsmax via the axis constraints command bar. Or I can click the intersecting area between the 3d manipulator of the axes in question and move in that plane. Invest money and get 120% back - a site says Transforming multiple rows into a single row What if 'kill -9' does not work? I have a process I can't kill with kill -9 &lt;pid&gt;. What's the problem in such a case, especially since I am the owner of that process. I thought nothing could evade that kill option. The Java documentation says:      It is not possible for two invocations of synchronized methods on the   same object to interleave.   What does this mean for a static method?  Since a static method has no associated object, will the synchronized keyword lock on the class, instead of the object? Error installing virtualbox-dkms on Ubuntu 20 Ubuntu 20.04. I installed virtualbox using package; it worked, I created and ran a RM. But then stopped to work after software update. I cannot run the VMs, message says : Kernel driver not installed (rc=-1908)  The VirtualBox Linux kernel driver is either not loaded or not set up correctly.  Please reinstall virtualbox-dkms package and load the kernel module by executing  'modprobe vboxdrv'  as root.  I managed to disable secure boot, so this is not related to this. Now I try to reinstall virtualbox-dkms package as requested : sudo apt remove virtualbox-dkms sudo apt install virtualbox-dkms  But then I get the following error : Préparation du dépaquetage de .../virtualbox-dkms_6.1.10-dfsg-1~ubuntu1.20.04.1_amd64.deb ... Dépaquetage de virtualbox-dkms (6.1.10-dfsg-1~ubuntu1.20.04.1) ... Paramétrage de virtualbox-dkms (6.1.10-dfsg-1~ubuntu1.20.04.1) ... Loading new virtualbox-6.1.10 DKMS files... Building for 5.8.0-34-generic Building initial module for 5.8.0-34-generic Error! Bad return status for module build on kernel: 5.8.0-34-generic (x86_64) Consult /var/lib/dkms/virtualbox/6.1.10/build/make.log for more information. dpkg: erreur de traitement du paquet virtualbox-dkms (--configure) :  installed virtualbox-dkms package post-installation script subprocess returned error exit status 10 Des erreurs ont été rencontrées pendant l'exécution :  virtualbox-dkms E: Sub-process /usr/bin/dpkg returned an error code (1)  If I look at /var/lib/dkms/virtualbox/6.1.10/build/make.log I see : /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/linux/SUPDrv-linux.c:760:38: error: ‘cpu_tlbstate’ undeclared (first use in this function); did you mean ‘cpuhp_state’?   760 |     RTCCUINTREG uOld = this_cpu_read(cpu_tlbstate.cr4);       |                                      ^~~~~~~~~~~~ ./include/linux/percpu-defs.h:318:9: note: in definition of macro ‘__pcpu_size_call_return’   318 |  typeof(variable) pscr_ret__;     \       |         ^~~~~~~~ /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/linux/SUPDrv-linux.c:760:24: note: in expansion of macro ‘this_cpu_read’   760 |     RTCCUINTREG uOld = this_cpu_read(cpu_tlbstate.cr4);       |                        ^~~~~~~~~~~~~ /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/linux/SUPDrv-linux.c:760:38: note: each undeclared identifier is reported only once for each function it appears in   760 |     RTCCUINTREG uOld = this_cpu_read(cpu_tlbstate.cr4);       |                                      ^~~~~~~~~~~~ ./include/linux/percpu-defs.h:318:9: note: in definition of macro ‘__pcpu_size_call_return’   318 |  typeof(variable) pscr_ret__;     \       |         ^~~~~~~~ /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/linux/SUPDrv-linux.c:760:24: note: in expansion of macro ‘this_cpu_read’   760 |     RTCCUINTREG uOld = this_cpu_read(cpu_tlbstate.cr4);       |                        ^~~~~~~~~~~~~ make[2]: *** [scripts/Makefile.build:290 : /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/linux/SUPDrv-linux.o] Erreur 1 make[2]: *** Attente des tâches non terminées.... make[1]: *** [scripts/Makefile.build:519 : /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv] Erreur 2  What I am missing ? \documentclass[]{phstyle} \usepackage{latexsym,amsfonts,amssymb, undertilde} \usepackage[fleqn]{amsmath} \usepackage{makeidx}  %Preamble  \numberwithin{equation}{chapter} %\renewcommand{\theequation}{\thesection.\arabic{equation}}  \begin{document}  %\include{chapI}   these 2 lines are because the chapters are different tex files  %\include{chap1}  \renewcommand{\thechapter}{\Roman{chapter}}  %\setcounter{chapter}{0} %\renewcommand{\theequation}{\thechapter.\arabic{equation}}  \chapter{Introduction}  \section{Chap I Section1}  \begin{equation} this is equation I.1 \end{equation}  \begin{equation} this is equation I.2 \end{equation}  \section{Chap I Section2}  \begin{equation} this is equation I.3 \end{equation}  \chapter{Chapter 1}  \section{Chap 1 Section 1}  \begin{equation} this is equation 1.1.1 \end{equation}  \begin{equation} this is equation 1.1.2 \end{equation}  \end{document}     I have been typing Chapters 1-5 that contain sections and subsections and equations. The equations were numbered globally, i.e. if I had 3 equations in section 1 of Chap 1, they were numbered 1.1.1, 1.1.2, 1.1.3 and for Section 2, the equations were 1.2.4, 1.2.5, etc.  Recently I had to change Chap 1 and everything in it to Chapter I (roman number) and Chap 2 were renumbered to Chap 1, etc.  My problem is that LaTeX started numbering the equations in Chap I (the other chapters did not have this problem) according to the sections and not globally anymore. That is, the 3 equations in Chap I were I.1, I.2, I.3, and the equations in the second section of Chap I became I.1, I.2, etc instead of I.4, I.5, etc  I needed the prefix to be the chapter and not the sections. I don't understand why there is a change. I have never used \numberwithin in my book  Here are some of my codes  \documentclass[]{phstyle} \usepackage{latexsym,amsfonts,amssymb, undertilde} \usepackage[fleqn]{amsmath}   for the equation numbering in Chap I  \renewcommand{\thechapter}{\Roman{chapter}} \renewcommand{\theequation}{\thechapter.\arabic{equation}} **   Previously when Chap I was Chap 1, ** was  \renewcommand{\theequation}{\thesection.\arabic{equation}}   I have also tried the line below but it didn't work  \renewcommand{\theequation}{I.\arabic{equation}}   Thank you in advance Why isn't sizeof for a struct equal to the sum of sizeof of each member? Why does the sizeof operator return a size larger for a structure than the total sizes of the structure's members? Using .NET, how can you find the mime type of a file based on the file signature not the extension Gnome terminal will not start I just tried to install python 3.6 on my Ubuntu 16.04 system, and now I can't run the terminal from the launcher or from Ctrl + Alt + T. I tried to run gnome-terminal from XTerm and got the following message:  Traceback (most recent call last):   File "/usr/bin/gnome-terminal", line 9, in &lt;module&gt;     from gi.repository import GLib, Gio   File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in &lt;module&gt;     from . import _gi ImportError: cannot import name '_gi' Error in sys.excepthook: Traceback (most recent call last):   File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook     from apport.fileutils import likely_packaged, get_recent_crashes   File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in &lt;module&gt;     from apport.report import Report   File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in &lt;module&gt;     import apport.fileutils   File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in &lt;module&gt;     from apport.packaging_impl import impl as packaging   File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 23, in &lt;module&gt;     import apt   File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in &lt;module&gt;     import apt_pkg ModuleNotFoundError: No module named 'apt_pkg'  Original exception was: Traceback (most recent call last):   File "/usr/bin/gnome-terminal", line 9, in &lt;module&gt;     from gi.repository import GLib, Gio   File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in &lt;module&gt;     from . import _gi ImportError: cannot import name '_gi'   How can I fix this error?  It should also be noted that:   My gnome-terminal file is now a python script. The gnome-terminal.real file will open the terminal as expected. python3.5 gnome-terminal will open the terminal as expected. Possible to turn on Airplane mode with WiFi on only? I know the definition of Airplane mode is all communications and radio signals are blocked. But is it possible to turn off the "calling/receiving" part of the phone so your phone is not connecting to a cell tower and only allow Wifi? I've looked into a couple of apps in Google Play but they're either not working or out of date with newer versions of Android.   I know there is strong opinions on both sides of the issue but I'm worried about radiation from my phone since i use it a lot in bed and I hold the phone close to my head and face. At night I'm not worried about receiving calls, so I just want to turn off the phone part and  use WiFi. Is there a way? Or am i just crazy and paranoid? Why $\sqrt[3]{{2 + \sqrt 5 }} + \sqrt[3]{{2 - \sqrt 5 }}$ is a rational number? In my javascript I have this      loopDeLoop:         while (foo !== bar) {             switch (fubar) {                 case reallyFubar:                     if (anotherFoo == anotherBar) {                         break loopDeLoop;                     }                     break;                 default:                     break;             }         }   But JSLint says... lint warning: use of label  Here's the notes from        Labels   JavaScript allows any statement to have a label, and labels have a separate name space. JSLint is more strict.      JSLint expects labels only on statements that interact with break: switch, while, do, and for. JSLint expects that labels will be distinct from vars and parameters.   How do I construct the above to get rid of the warning?  Thanks, Greg How to include audio file in PDF