Suppose I have a vector in c++ as v = ('a','e','i','o','u'). I want to check whether a string is a vowel or not by simply checking if the character is in the vector  v or not. I don't want any code for that as I myself know that , I am looking for a function or a keyword in c++ which is equivalent of below in python :   list = ['a', 'e', 'i', 'o', 'u'] if str in list:     #do stuff   PS : Also let me know if nothing equivalent to this exists.
All I want to do is to check whether an element exists in the vector or not, so I can deal with each case.  if ( item_present )    do_this(); else    do_that();
I'm reading "BASH pocket guide of Oreilly". It said:      The process ID of the current Bash process.   In some cases, this can differ from $$.   Above explanation , explained $BASHPID variable.  Question: which cases? PHP MySQLi doesn't recognize login info What is the difference between a framework and a library?   I always thought of a library as a set of objects and functions that focuses on solving a particular problem or a specific area of application development (i.e. database access); and a framework on the other hand as a collection of libraries centered on a particular methodology (i.e. MVC) and which covers all areas of application development. Shortcut in Windows 7 to switch between same application's windows, like Cmd + ` in OS X Is there a shortcut in Windows 7 to switch between windows in a given application only? I very much like this feature in OS X; what is its equivalent in Windows? Open Windows Terminal as admin with WIN+R I use shortcut  +R to run Windows Terminal [wt], but I cannot run it as Admin, which causes problems when I install something via choco.   To open it as Admin, I have to:  Press  > Right-click Terminal > More > Run as Admin  > ◀ > ENTER Some solutions say to use the following, but it can only open powershell, not wt:  +X > A > ◀ > ENTER While  say to use the following, but it also doesn't work:  +R > SHIFT+CTRL+ENTER   How do I open Windows Terminal as Admin via a command? How can I launch a GameObject at a target if I am given everything except for its launch angle? I am trying to launch an object at a target, given its position, its target position, the launch speed, and the gravity.  I am following this formula from :  $$ \theta = arctan \bigg( \frac{v^2 \pm \sqrt{v^4-g(gx^2 + 2yv^2)}}{gx} \bigg) $$  I have simplified the code to the best of my ability, but I still cannot consistently hit the target.  I am only considering the taller trajectory, of the two available from the +- choice in the formula.  Does anyone know what I am doing wrong?  using UnityEngine;  public class Launcher : MonoBehaviour {     public float speed = 10.0f;      void Start()     {         Launch(GameObject.Find("Target").transform);     }      public void Launch(Transform target)     {         float angle = GetAngle(transform.position, target.position, speed, -Physics2D.gravity.y);         var forceToAdd = new Vector2(Mathf.Cos(angle), Mathf.Sin(angle)) * speed;         GetComponent&lt;Rigidbody2D&gt;().AddForce(forceToAdd, ForceMode2D.Impulse);     }      private float GetAngle(Vector2 origin, Vector2 destination, float speed, float gravity)     {         float angle = 0.0f;          //Labeling variables to match formula         float x = Mathf.Abs(destination.x - origin.x);         float y = Mathf.Abs(destination.y - origin.y);         float v = speed;         float g = gravity;          //Formula seen above         float valueToBeSquareRooted = Mathf.Pow(v, 4) - g * (g * Mathf.Pow(x, 2) + 2 * y * Mathf.Pow(v, 2));         if (valueToBeSquareRooted &gt;= 0)         {             angle = Mathf.Atan((Mathf.Pow(v, 2) + Mathf.Sqrt(valueToBeSquareRooted)) / g * x);         }         else         {             //Destination is out of range         }          return angle;     } } Change web folders names with uppercase to lowercase or not? Subsurf Modifier artifacts So I was messing with Subsurf modifier to create a certain sword and then some weird artifacts began to appear (cape-like). I've tried adjusting the Crease, but couldn't achive what I wanted. Basicly, what I whant is the as on the screens, but wo any artifacts :)   Also, here's the .blend file, cause I assume I didn't make myselt 100% clear. How can you prove that a function has no closed form integral? In the past, I've come across statements  along the lines of &quot;function $f(x)$ has no closed form integral&quot;, which I assume means that there is no combination of the operations:  addition/subtraction multiplication/division raising to powers and roots trigonometric functions exponential functions logarithmic functions  which when differentiated gives the function $f(x)$. I've heard this said about the function $f(x) = x^x$, for example. What sort of techniques are used to prove statements like this? What is this branch of mathematics called?  Merged with &quot;&quot; by : Sometimes we are told that some functions like $\dfrac{\sin(x)}{x}$ don't have an indefinite integral, or that it can't be expressed in term of other simple functions. I wonder how we can prove that kind of assertion? Does python have the ability to create dynamic keywords?  For example:  qset.filter(min_price__usd__range=(min_price, max_price))   I want to be able to change the usd part based on a selected currency. Keyboard shortcut to minimize a window on Ubuntu 18.10 Dell Vostro 5490 no WIFI in Ubuntu 18.04 I am trying to install Ubuntu 16.04 LTS on a Dell XPS 13 (9350). The laptop came with Windows 10 pre-installed. I am installing from a pendrive but I think the issue would be the same if I used e.g. a USB DVD drive.   Dude, where's my hard drive?  I am blocked because the installation program cannot find 8.6Gb of free space on my hard drive despite the fact that there are hundreds of Gb free according to Windows. Digging a bit into the problem, it seems that Ubuntu cannot see my hard disk at all.    This is the output of GParted:    I am not sure what that drive mounted at /cdrom is, but it seems the only device that exists in the system that is not a RAM disk or a loop device:   Content of /proc/partitions:   ubuntu@ubuntu:~$ cat /proc/partitions   major minor  #blocks  name     1        0      65536 ram0     1        1      65536 ram1     1        2      65536 ram2     1        3      65536 ram3     1        4      65536 ram4     1        5      65536 ram5     1        6      65536 ram6     1        7      65536 ram7     1        8      65536 ram8     1        9      65536 ram9     1       10      65536 ram10     1       11      65536 ram11     1       12      65536 ram12     1       13      65536 ram13     1       14      65536 ram14     1       15      65536 ram15     7        0     130048 loop0     7        1    1104188 loop1     8        0    1970239 sda     8        1    1953439 sda1   Summary of fdisk -l:   ubuntu@ubuntu:~$ sudo fdisk -l |grep Disk Disk /dev/ram0: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/ram1: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/ram2: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/ram3: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/ram4: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/ram5: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/ram6: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/ram7: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/ram8: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/ram9: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/ram10: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/ram11: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/ram12: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/ram13: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/ram14: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/ram15: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/loop0: 127 MiB, 133169152 bytes, 260096 sectors Disk /dev/loop1: 1.1 GiB, 1130688512 bytes, 2208376 sectors Disk /dev/sda: 1.9 GiB, 2017525248 bytes, 3940479 sectors Disklabel type: dos Disk identifier: 0x00000000   Result of fdisk of the only non-loop non-RAM device (not sure this is relevant):   ubuntu@ubuntu:~$ sudo fdisk -l |grep -A 50 sda Disk /dev/sda: 1.9 GiB, 2017525248 bytes, 3940479 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x00000000  Device     Boot Start     End Sectors  Size Id Type /dev/sda1  *      129 3907007 3906879  1.9G  c W95 FAT32 (LBA)   I am blocked at this point. Any help will be much appreciated.   Additional information (following comments):   Running dmesg |grep -i sata shows (among others) eight lines that suggest some kind of error:   ata1: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF) ata2: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF) ata3: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF) ata4: SATA link down (SStatus 0 SControl 0) ata5: SATA link down (SStatus 0 SControl 0) ata6: SATA link down (SStatus 0 SControl 0) ata7: SATA link down (SStatus 0 SControl 0) ata8: SATA link down (SStatus 0 SControl 0)  I have "Restarted" windows instead of only "Shutdown" it to avoid problems with "fast startup", following some recommendations I have read of other users having problems installing Linux on Windows 10 laptops.ago   Regarding SATA, the BIOS says: "SATA Operation: RAID ON". The other two options available are "Disabled" and "AHCI".    I have followed the instructions of these two pages from Dell: , . I was wondering, why there are passport checks at the check-in counter, Immigration and even at the gate?    For example, I was at Istanbul flying to either UK or US. There's a security check at the check-in counter asking a bunch of questions about my immigration status - even more than the Immigration officer at the border. Also, at the gate, there's also Security officer checking my immigration status and passport asking the same questions.    I thought that would be the responsibility of an Immigration officer rather than some third party company?   The thing I'm curious the most is they don't even know which countries this passport can go to with or without visa. They have to go back to the counter and check with the system which takes a long time. I was wondering why they hire these kind of companies to slow down the process? Convert binary to ASCII and vice versa Why there is a $\frac{1}{2}$ in the distance formula $d=\frac{1}{2}at^2$? I'm preparing for my exam, but I have difficulties in perceiving why there is a $\frac{1}{2}$ in the distance formula $d=\frac{1}{2}at^2$? Why is Compactification restricted to Toroids, Calabi-Yau et al? Why is pressure in a liquid the same in all directions? I'd like answers both in the more intuitive side an on the more precise side.   Thinking of water as "cubes" of water, for example, would allow pressure in the z axis to be independent of the y or x axis. Choosing other "shapes", like a  triangular prism, yield different results. Will this fact, then, be dependent on the format of the molecules of the liquid ?  I've heard of the rotational symmetry of liquids. What is its precise statement ? Why is it true ? What is the best way to remove accents (normalize) in a Python unicode string? I have a Unicode string in Python, and I would like to remove all the accents (diacritics). I found on the web an elegant way to do this (in Java):  convert the Unicode string to its long normalized form (with a separate character for letters and diacritics) remove all the characters whose Unicode type is &quot;diacritic&quot;.  Do I need to install a library such as pyICU or is this possible with just the Python standard library?  And what about python 3? Important note: I would like to avoid code with an explicit mapping from accented characters to their non-accented counterpart. Wirtinger Inequality: $\int_0^1 f'^2 \geq \pi^2 \int_0^1 f^2 $ I have a  basic question  Let $f$ be a $\mathcal{C}^1$  map  from  $[0,1]$ into $\mathbb{R}$ vanishing in $0$ and $1$. I want to prove that   $$\int_0^1 f'^2 \geq \pi^2 \int_0^1 f^2 $$  and to see when we have equality.