String compare against an element in a string vector in C++
Case-insensitive string comparison in C++
The three files are read in this order?  .bash_profile .profile .bashrc   This is not happening when I first open a terminal.   I have trace statements in the files appending to the file init.log. Please take a look at the following. It begins after opening a terminal. I have placed a comment to show where the log picks up after the su command.  stephen@debian:~$ cat init.log reading .bashrc done reading .bashrc stephen@debian:~$ su - stephen Password:  stephen@debian:~$ cat init.log reading .bashrc done reading .bashrc # # after su # reading .bash_profile reading .profile reading .bashrc done reading .bashrc done reading .profile done reading .bash_profile stephen@debian:~$    So the su - login triggers the expected sequence however the initial login reads only the bashrc. This cannot be correct. Can someone explain under what conditions this would occur. I could modify the bashrc and profile files so that the initial read includes all expected files but I would rather get to the root of the problem and fix it there. Scorched3d worked then stopped. Unistalled and reinstalled did not help. Running Ubuntu 16.04.04LTS. I think it was after installing new release.  I think the problem is the Ubuntu 16.04.4LTS. The newer version has no Scorched3d in the Ubuntu Software Center. I have 3 systems. After updating to new version. Scorched3D will not install and work after updating.  ron@RonsComputer:~$ sudo objdump -p $(type -p scorched3d) | grep NEEDED  NEEDED libwx_gtk2u_adv-3.0.so.0  NEEDED libwx_gtk2u_core-3.0.so.0 NEEDED libwx_baseu-3.0.so.0 NEEDED libfreetype.so.6 NEEDED libz.so.1 NEEDED libSDL-1.2.so.0 NEEDED libSDL_net-1.2.so.0 NEEDED libexpat.so.1  NEEDED libstdc++.so.6 NEEDED libm.so.6 NEEDED libgcc_s.so.1 NEEDED libpthread.so.0 NEEDED libc.so.6   ron@ron-desktop ~ $ objdump -p $(type -p scorched3d) | grep NEEDED | awk '{print $2}' | xargs -n 1 dpkg -S  libwxgtk3.0-0v5:amd64: /usr/lib/x86_64-linux-gnu/libwx_gtk2u_adv-3.0.so.0.2.0 libwxgtk3.0-0v5:amd64: /usr/lib/x86_64-linux-gnu/libwx_gtk2u_adv-3.0.so.0 libwxgtk3.0-0v5:amd64: /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.2.0 libwxgtk3.0-0v5:amd64: /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0 libwxbase3.0-0v5:amd64: /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0.2.0 libwxbase3.0-0v5:amd64: /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0 libfreetype6:amd64: /usr/lib/x86_64-linux-gnu/libfreetype.so.6.12.1 libfreetype6:i386: /usr/lib/i386-linux-gnu/libfreetype.so.6 libfreetype6:amd64: /usr/lib/x86_64-linux-gnu/libfreetype.so.6 libfreetype6:i386: /usr/lib/i386-linux-gnu/libfreetype.so.6.12.1 zlib1g:i386: /lib/i386-linux-gnu/libz.so.1.2.8 zlib1g:amd64: /lib/x86_64-linux-gnu/libz.so.1 zlib1g:i386: /lib/i386-linux-gnu/libz.so.1 zlib1g:amd64: /lib/x86_64-linux-gnu/libz.so.1.2.8 libsdl1.2debian:amd64: /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0.11.4 libsdl1.2debian:i386: /usr/lib/i386-linux-gnu/libSDL-1.2.so.0 libsdl1.2debian:i386: /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4 libsdl1.2debian:amd64: /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0 libsdl-net1.2:amd64: /usr/lib/x86_64-linux-gnu/libSDL_net-1.2.so.0 libsdl-net1.2:i386: /usr/lib/i386-linux-gnu/libSDL_net-1.2.so.0 libsdl-net1.2:amd64: /usr/lib/x86_64-linux-gnu/libSDL_net-1.2.so.0.8.0 libsdl-net1.2:i386: /usr/lib/i386-linux-gnu/libSDL_net-1.2.so.0.8.0 libexpat1:i386: /lib/i386-linux-gnu/libexpat.so.1.6.0 libexpat1:amd64: /lib/x86_64-linux-gnu/libexpat.so.1 libexpat1:amd64: /lib/x86_64-linux-gnu/libexpat.so.1.6.0 libexpat1:i386: /lib/i386-linux-gnu/libexpat.so.1 libstdc++6:amd64: /usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21-gdb.py libstdc++6:i386: /usr/lib/i386-linux-gnu/libstdc++.so.6 libstdc++6:amd64: /usr/lib/x86_64-linux-gnu/libstdc++.so.6 libstdc++6:amd64: /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 libstdc++6:i386: /usr/lib/i386-linux-gnu/libstdc++.so.6.0.21 libstdc++6:i386: /usr/share/gdb/auto-load/usr/lib/i386-linux-gnu/libstdc++.so.6.0.21-gdb.py libc6:amd64: /lib/x86_64-linux-gnu/libm.so.6 libc6:i386: /lib/i386-linux-gnu/libm.so.6 libgcc1:amd64: /lib/x86_64-linux-gnu/libgcc_s.so.1 libgcc1:i386: /lib/i386-linux-gnu/libgcc_s.so.1 libc6:i386: /lib/i386-linux-gnu/libpthread.so.0 libc6:amd64: /lib/x86_64-linux-gnu/libpthread.so.0 libc6:i386: /lib/i386-linux-gnu/libc.so.6 libc6:amd64: /lib/x86_64-linux-gnu/libc.so.6 ron@ron-desktop ~ $ Why does the order of summation of the terms of an infinite series influence its value? I was looking through my lecture notes and got puzzled by the following fact: if we want to find the value of some infinite series we are allowed to rearrange only the finite number of its terms. To visualize this consider the alternating harmonic series: $$\sum_{n=1}^\infty(-1)^{k-1}\frac1k=1-\frac12+\frac13-\frac14+\frac15-+\dots=0.693147...$$  But if we rearrange the terms as follows the value of the series gets influenced by this action: $$1+\frac13-\frac12+\frac15+\frac17-\frac14+\dots=1.03972...$$  So commutativity of addition isn't true on infinity? How was it obtained and how can it be proved? Help ending a proof using binomial theorem: $\sum_{k=0}^n {n \choose k}\cdot\frac{(-1)^k}{k+1} = \frac{1}{n+1}$ I have a 2015 MBP for work, which I connect my iPhone (6 plus, iOS 10) to charge, and I don't want to trust the computer, ever. However, I must click "Don't Trust" every single time I connect for charging. This is asymmetric to the "Trust" selection, which remembers my decision.  Does anyone know if it's possible to stop the 'Trust/Don't Trust' modal from appearing every time, and have the machine not be trusted?  If possible, can you please tell me how? If not possible, can you please provide proof or evidence that lead you to this conclusion?  Finally, I am not concerned with arguments or opinions about this feature. Only what is outline above. What commands (exactly) should replace the deprecated apt-key? How to avoid overflow using \IEEEpubid on the first column? I am trying to write a journal paper using the IEEEtran.cls template.  My problem is that the Publication ID Mark overflows into my thanks section.  This is the bottom of the title page:    From the documentation of IEEEtran.cls we see that:    I included the command \IEEEpubidadjcol into the second column. This prevents the overflow in the second column as you can see in my previous image, but lets the first column run freely.  I tried including \IEEEpubidadjcol into the first column aswell, but that causes compilation errors.  Please, could you give me some hint on how to solve this problem without doing something illegal with respect to the IEEE modus operandi?  EDIT:  As the answer suggests, the problem can be solved using the \IEEEpubidadjcol command twice. When I tried this, I got an error:  Infinite glue shrinkage found in box being split   In spite of this error a correct pdf is produced. The error goes away when I do not include packages fixltx2e and dblfloatfix. Structuring game narrative. Handling NPC, Quest, General Dialogue. Is Json/XML the right way to go? Or any other solutions? Hello guys I'm try to make some games that have more to it than just simple high score scrolling shooters etc.  I'm trying to design my own systm of handling narrative. I want to be able to place NPC's in the game world, with scripts attached to them. Some of the NPC's would just have n random greetings. Others will be mission givers and will offer you a quest of sorts. (The quest could be go speak to Bob in the pub, or it might be bring me the Holy Grail and Crown Jewels, or something in between).  I've wracked my brain for a long while over this but sadly keep slipping back to the only way I know how, which is to manually code all the strings that people can say and have a horrible web of if statements and other such insanity to give me a rudimental dialogue system. Its not good enough even with just a few characters, but if I had dozens/hundreds of characters it would be even worse.  I've read lots about it already but I'm still very confused when I start trying on my own project. I've read that Json/XML might be the way to go and that I can add custom markups in the Json text to call methods in my code, but I dont even know if this is right and if so how I can do it.  The back of my brain is screaming at me that there is a simpler way to do it, but I've sat here for a very long time without managing to think of ideas.  Here is a diagram I drew which pretty much shows the flow of how I want my NPC to behave. If anyone can see this and then tell me how they might do something like this that would be fantastic!! (note: if Json is the correct advise, please give me a exact example of how exactly to format the Json in order to check the bools I mention in my flowchart - thanks!):    note: The circles denote an output from the data as Text for the dialogue system. The bools will need to be checked against by the data file to see which output to give (hope that makes sense and is possible) How do I install an R package from source? Pre & post increment operator behavior in C, C++, Java, & C# how to show only changed rows if want querying the following table :  EventDateTime (DateTime), Host (guid), Flag ( bit) 2013-04-01 05:00, {id-x}, 0 2013-04-01 05:01, {id-x}, 0 2013-04-01 05:02, {id-x}, 0 2013-04-01 05:03, {id-x}, 0 2013-04-01 05:04, {id-x}, 1 2013-04-01 05:05, {id-x}, 1 2013-04-01 05:06, {id-x}, 1 2013-04-01 05:07, {id-x}, 0 2013-04-01 05:08, {id-x}, 0 2013-04-01 05:09, {id-x}, 0 2013-04-01 05:10, {id-x}, 0 2013-04-01 05:11, {id-x}, 1 2013-04-01 05:12, {id-x}, 1 2013-04-01 05:13, {id-x}, 1 2013-04-01 05:14, {id-x}, 1 2013-04-01 05:15, {id-x}, 0   and the result should be:  2013-04-01 05:04, {id-x}, 1 2013-04-01 05:07, {id-x}, 0 2013-04-01 05:11, {id-x}, 1 2013-04-01 05:15, {id-x}, 0   i have try it with LAG,LEAD and OVER Clause. but no luck :( There are  with not having ftp and telnet present in 10.13 now as per Apple's dictate.  Has anyone found a solid way to bring BSD ftp and telnet back to macOS vs using inetutils? Are there recommendations or pitfalls for playing an archer cleric? In my 4E game, a player is going to try an elven cleric with a longbow (and a mace, just in case). She chose mostly ranged powers. Are there any caveats to playing such a character, or any builds that I could recommend for her? There is no or there was no I read a sentence in an exam:     There is no child who did not bring his parents to the picnic.    I think that the sentence does not have tense-agreement. Why is is used instead of was? Please explain it to me. I'm training a neural network but the training loss doesn't decrease. How can I fix this?  I'm not asking about overfitting or regularization. I'm asking about how to solve the problem where my network's performance doesn't improve on the training set.    This question is intentionally general so that other questions about how to train a neural network can be closed as a duplicate of this one, with the attitude that "if you give a man a fish you feed him for a day, but if you teach a man to fish, you can feed him for the rest of his life." See this Meta thread for a discussion:   If your neural network does not generalize well, see: As the title suggests, I’m simply looking for a method to compute the number of Eulerian Paths in the complete graph $K_5$, where all paths start from the same node. Since there are 5 nodes, all Eulerian paths must be Eulerian circuits as well.  Thanks. I'm looking for a way to have two separate objects be connected, so that when I move the first object the second one will move also. The term parent is used, but how do I parent a object? What happens if my ESTA expires on the day of arrival? I'm French and will travel the 14th of June to the US. My ESTA expires the 14th of  June 2013 and I'm wondering if my ESTA will be valid when I'll land in the US on the 14th of June 2013.  Does someone know anything about that? Best way to simulate "group by" from bash? Supremum of a product measurable function...