Can you resize a C++ array after initialization?
How to resize array in C++?
Nginx Subdirectory returning 404 I currently have a bunch of working static files at the domain name khairulslt.me (from NameCheap). Recently, I've tried setting up a subdirectory (khairulslt.me/RGBGame) as seen in the code below; However, I keep getting 404 errors. What am i missing out?  server {    server_name khairulslt.me www.khairulslt.me;    autoindex off;   location / {     root /var/www/khairulslt.me;     index circles.html;   }   listen 443 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/khairulslt.me/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/khairulslt.me/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot  location /RGBGame {     root /var/www/khairulslt.me/RGBGame;     index colorGame.html;     try_files $uri $uri/ /var/www/RGBGame/colorGame.html?q=$uri&amp;$args;     autoindex off;   }  location /robots.txt { return 200 "User-agent: *\nDisallow: /\n";    }  }   server { if ($host = www.khairulslt.me) {     return 301 https://$host$request_uri;   } # managed by Certbot   if ($host = khairulslt.me) {     return 301 https://$host$request_uri;   } # managed by Certbot   listen 80; server_name khairulslt.me www.khairulslt.me; return 404; # managed by Certbot }   I've tried all the different settings like (alias vs root), try_files, autoindex(on, off). My main website www.khairulslt.me works fine and is serving the html/css/js files in /var/www/khairulslt.me perfectly fine. I'm just not sure why I can't replicate the settings for my other app (html/css/js files in folder /RGBGame). Could it be that I've missed out something that isn't related to the nginx config? On June 13th 2017 all SharePoint calculated columns with HTML markup stopped working.   Basically the fields now render text (regardless of setting the data type to number). The gist of the notice from Microsoft () is:     In Microsoft SharePoint lists and libraries, calculated fields that   are running in the classic UI mode can be used to display results   based on Excel-like formulas. This is a long standing capability, and   is documented in Calculate data in lists or libraries.      Some users have added HTML markup or script elements to calculated   fields. This is an undocumented use of the feature, and we will begin   blocking execution of custom markup in calculated fields in SharePoint   Online from June 13, 2017 onwards. We are also providing this as a   configurable option for on-premises in SharePoint Server 2016 and   SharePoint Server 2013 via the June 2017 and subsequent Public   Updates.   As we don't have on premise SharePoint (online), we have to find an immediate work around, given that this impacts our processes and thus, business.   Is anyone aware of third party applications that will allow for HTML, script markup (that works with SP online)? After viewing episode 5 of season 6 of Game of Thrones, we have come to know that      the Children of the Forest created the White Walkers.   But it seems that the White Walkers attack the Children of Forest. My question is why they would do so, given their origin. Converting PostGIS point to text causing loss of data? I have a road network and want to test connectivity between the features.  I am having trouble with two specific features, the rest of the dataset is functioning just fine.  When I get those 2 links' start &amp; end locations using ST_StartPoint and ST_EndPoint, the result is that they are slightly different.  However, when I convert the result to text by wrapping it like so:  ST_AsText(ST_StartPoint(geom)) and ST_AsText(ST_EndPoint(geom))  then the results are exactly the same.  Is it possible they are actually off by a tiny amount like .000000001 and the ST_AsText loses a decimal point? How long can I store soaked beans before cooking? Why do I always hear remote train horn at night? This is definitely not an illusion, as many people have the same experience. I have usually lived in places miles away from train stations, which makes it unlikely to hear any train horns during the day. However at night, occasionally train horns can be heard. I hope if any one can explain the physics of this effect, like possibly sound travels faster at low temperature. What's the recommend way of changing the font size in a particular table? Is there a better way than enclosing all values with, for example, the \tiny function. Atmospheric lighting in cycles How would I go a about making volume light beams?  I have have tried  various tutorials, but they must be for a older version. as applying them does seemingly nothing.  A link to a functioning tutorial would be greatly appreciated as well.  I don't have a picture or .blend to show, as my problem with atmospheric lighting does not pertain to any specific scene. Specifically, if diary Tom Riddle had succeeded, how would he have strengthened the present day Voldemort?   In , @Pearsonartphoto gives a quote from J.K. Rowling in his answer regarding what would have happened if Tom Riddle had succeeded in fully manifesting from his diary memory form to a full human form.     Q: In Harry Potter and the Chamber of Secrets, what would have happened if Ginny had died and Tom Riddle had escaped the diary?   J.K. Rowling: I can’t answer that fully until all seven books are finished, but it would have strengthened the present-day Voldemort considerably.    - FAQ - Wayback Machine   As well, I've read all seven Harry Potter books many, many times and I haven't been able to ferret out any overt details regarding exactly how the present day Voldemort would've been strengthened by co-existing with diary Tom Riddle.  Specifically, how would the reincarnation of 16-year-old Tom Riddle have strengthened the 67-year-old present-day Voldemort at the time of Chamber of Secrets?  &#9733; I would love an answer from canon, any of J.K. Rowling's interviews, or Pottermore, or an answer constructed within the spirit of canon. Workflow for converting LaTeX into Open Office / MS Word Format I often have to write up reports based on the analysis of some data. I use R to analyse the data and export tables, figures, and text. This is then included into a LaTeX document either using input or Sweave ().  However, when I collaborate with others, I sometimes need to provide a document in Open Office / MS Word format.  Question:  Thus, assume the simplest scenario   I have a LaTeX document with text, tables, and figures I need to export this reliably into Open Office or MS Word format: this includes mathematical formulas, table formatting, and quality figures) I don't need to go back from MS Word to LaTeX   What is a reliable, efficient, and preferably free process?  Initial Thoughts:   Export to HTML,  LaTeX - LyX - ODF Use odfWeave  that deals with some specific issues associated with LaTeX to Open Office conversion    I was hoping that there is an expert out there who has worked out a good system already. Run TTY script every time I open a GUI terminal When I log in to a TTY I get the following nice text:  Ubuntu 16.04.03 LTS Log-in: username Password: Last log-in date/time Welcome to Ubuntu 16.04.03 LTS   * Documentation:  * Management:  * Support:  9 packages to update 4 updates are security updates   I would like the last 2 lines repeated every time I open a GUI terminal for all users in the adm group (but will settle for having the entire thing displayed each and every time I open a GUI Terminal for all users)  I tried the obvious:  fab-root@fab-ux-predator:~ $ cd /etc/update-motd.d/ fab-root@fab-ux-predator:/etc/update-motd.d $ ./90-updates-available  fab-root@fab-ux-predator:/etc/update-motd.d $ cat /var/lib/update-notifier/updates-available cat: /var/lib/update-notifier/updates-available: Permission denied fab-root@fab-ux-predator:/etc/update-motd.d $   What am I missing?  P.S. Obviously I can chmod o+r the file, but how future-proof would that be? Max or Default? What is the best way to get the Max value from a LINQ query that may return no rows? If I just do  Dim x = (From y In context.MyTable _          Where y.MyField = value _          Select y.MyCounter).Max   I get an error when the query returns no rows. I could do  Dim x = (From y In context.MyTable _          Where y.MyField = value _          Select y.MyCounter _          Order By MyCounter Descending).FirstOrDefault   but that feels a little obtuse for such a simple request. Am I missing a better way to do it?  UPDATE: Here's the back story: I'm trying to retrieve the next eligibility counter from a child table (legacy system, don't get me started...). The first eligibility row for each patient is always 1, the second is 2, etc. (obviously this is not the primary key of the child table). So, I'm selecting the max existing counter value for a patient, and then adding 1 to it to create a new row. When there are no existing child values, I need the query to return 0 (so adding 1 will give me a counter value of 1). Note that I don't want to rely on the raw count of child rows, in case the legacy app introduces gaps in the counter values (possible). My bad for trying to make the question too generic. Spheres with csv file onClick to get the ID of the clicked button Do I have to recompile my application when I upgrade a third party jar? Rational solutions of $y^2 = x^3 - x$ Animation Cycles rendering remains incredible slow The following MWE compiles (for me)  \documentclass{article}  \usepackage{pgfplots} \pgfplotsset{compat=newest} \usetikzlibrary{external} \tikzexternalize[prefix=figures/externalized/]   \begin{document} \begin{figure}     \centering     \begin{tikzpicture}          \begin{axis}  %           \addplot3[surf,mesh/rows=129,mesh/cols=129,mesh/ordering=y varies] table[x=X,y=Y,z=psi] {figures/data/LidDrivenCavity/Lid_SPIKE_128x128_Re1000_psi.dat};              \addplot3[contour gnuplot,mesh/rows=129,mesh/cols=129,mesh/ordering=y varies] table[x=X,y=Y,z=psi] {figures/data/LidDrivenCavity/Lid_SPIKE_128x128_Re1000_psi.dat};          \end{axis}      \end{tikzpicture}     \caption{ciao} \end{figure} \end{document}   where the data file is . If I de-comment the first \addplot3 and comment the second one, then I get an error. The final part of the log file (the interesting one, I think) is  ===== 'mode=convert with system call': Invoking 'pdflatex -shell-escape -halt-o n-error -interaction=batchmode -jobname "figures/externalized/prova-figure0" "\ def\tikzexternalrealjob{prova}\input{prova}"' ======== \openout3 = `prova.auxlock'.  runsystem(pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname  "figures/externalized/prova-figure0" "\def\tikzexternalrealjob{prova}\input{pr ova}")...executed.  \openout3 = `prova.auxlock'.   ./prova.tex:22: Package tikz Error: Sorry, the system call 'pdflatex -shell-esc ape -halt-on-error -interaction=batchmode -jobname "figures/externalized/prova- figure0" "\def\tikzexternalrealjob{prova}\input{prova}"' did NOT result in a us able output file 'figures/externalized/prova-figure0' (expected one of .pdf:.jp g:.jpeg:.png:). Please verify that you have enabled system calls. For pdflatex,  this is 'pdflatex -shell-escape'. Sometimes it is also named 'write 18' or som ething like that. Or maybe the command simply failed? Error messages can be fou nd in 'figures/externalized/prova-figure0.log'. If you continue now, I'll try t o typeset the picture.  See the tikz package documentation for explanation. Type  H &lt;return&gt;  for immediate help.  ...                                                l.22    \end{tikzpicture}  ?  PGFPlots: reading {figures/data/LidDrivenCavity/Lid_SPIKE_128x128_Re1000_psi.da t} Runaway argument? {\pgfkeyssetvalue {/pgfplots/execute at begin plot visualization}{}\pgfkeyssetv alue \ETC. ./prova.tex:22: TeX capacity exceeded, sorry [main memory size=5000000]. &lt;argument&gt; ...5e-1],2Y7.753628e-3]}{2Y8.20894\ETC.  l.22    \end{tikzpicture}  If you really absolutely need more capacity, you can ask a wizard to enlarge me.   Here is how much of TeX's memory you used:  20761 strings out of 493054  547383 string characters out of 6134761  5000001 words of memory out of 5000000  23958 multiletter control sequences out of 15000+600000  3640 words of font info for 14 fonts, out of 8000000 for 9000  1141 hyphenation exceptions out of 8191  62i,4n,84p,728b,1519s stack positions out of 5000i,500n,10000p,200000b,80000s ./prova.tex:22:  ==&gt; Fatal error occurred, no output PDF file produced!   similar (or the same) error appears if externalization is not enabled/used.  My TeX distribution is TeX Live on Mac OS X 10.9.5 and I use TeXShop as editor.  Once I (partially) solved a  on Windows+MikTeX+TeXniccenter by modifying/adding options to the command executed when compile button is pressed. I say partially since I actually solved the problem for some data file. Then I experienced the same problem with larger datafile and/or different plots (I don't remember anymore) and didn't find a way out, no matter how much I extended the memory.  What should I do now? Proving that $G$ is a group if $a*x=b$ and $y*a=b$ have solutions. Is "guy" gender-neutral?