Virtual deconstructor - Memory leak
When to use virtual destructors?
Cannot connect to internet after using airmon-ng check kill In new version of Kali 2.0 with updated "aircrack-ng" tool, there is a problem between Internet connection and using cracking tools.   I have my wireless card as wlan0. And the Internet connection is fine too. Then, what I do is:  airmon-ng start wlan0 airodump-ng wlan0mon   Now the airodump-ng doesn't work, saying "Device or resource busy".  In order to run this I have to kill some processes, using:  airmon-ng stop wlan0 airmon-ng check kill airmon-ng start wlan0 airodump-ng wlan0mon   Now the cracking process is up.   I can start cracking, but now I cannot connect to the Internet after the kill process.  On typing iwconfig in terminal, I get this:  root@kali:~#iwconfig wlan0mon IEEE 802.11bgn  ESSID:"myessid"         Mode:Managed  Frequency:2.412 GHz  Access Point: 00:00:00:00:00:00          Bit Rate=108 Mb/s   Tx-Power=20 dBm          Retry short limit:7   RTS thr:off   Fragment thr:off       Encryption key:off       Power Management:off       Link Quality=42/70  Signal level=-68 dBm         Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0       Tx excessive retries:2  Invalid misc:9   Missed beacon:0  eth0      no wireless extensions. lo        no wireless extensions.   And, on running ifconfig on terminal, I get this:  root@kali:~#ifconfig lo        Link encap:Local Loopback         inet addr:127.0.0.1  Mask:255.0.0.0       inet6 addr: ::1/128 Scope:Host       UP LOOPBACK RUNNING  MTU:65536  Metric:1       RX packets:5604 errors:0 dropped:0 overruns:0 frame:0       TX packets:5604 errors:0 dropped:0 overruns:0 carrier:0       collisions:0 txqueuelen:0        RX bytes:452904 (442.2 KiB)  TX bytes:452904 (442.2 KiB)   There is no wlan0 or wlan0mon. I also restarted the network manager by:      service network-manager restart   But nothing changed. Though it displays wlan0 when checked using ifconfig this time. I have got a NFC key to enter in my room and i want to make a copy of this key in case of loss. I read the nfc tag key with my nexus 5 with Broadcom BCM20793M NFC controller. The phone reads the tag and retrivies all the infos but when i try to copy the tag it gives an "Error reading the tag" message. The tag is a  NXP MIFARE Classic. I read that it is not compatible with the newest chips so i wanna buy an Arduino NFC reader to read and copy the tag.  Might it works?    Below all the infos retrieved from the nfc key: Where were the cannons in final fight in Wakanda in Infinity War? In Black Panther, Ulysses Klaue describes his arm cannon as a leaf blower in comparison to the cannons/weapons that Wakanda has.  Infinity War comes after the events of Black Panther, so the weapons should exist. During the final fight with the children of Thanos and Space Dogs (as Rocket refers to them), Wakandans could have used these powerful cannons, pointing them at the opened section of barrier. Instead they chose a fist fight.  Even M'Baku says that it would be the end of Wakanda, so the magnitude is huge and risks are very high. Why were these powerful weapons not used?    Edit 1: I watched the movie again and planes are there in the fight. But they were only used to destroy the spaceships that crashed. Alarm is working even when the phone is powered off I just discovered that if I set the alarm clock and then power off the phone (by holding the power button and then selecting "Power Off") the alarm will still go off when the time comes.  Is this expected behavior? It makes me feel like "power off" doesn't actually power off the phone.  I have a Huawei Y530-U051 running android 4.3. How to delete directories with path/names too long for normal delete Windows seems to have a length limit on file names when trying to delete, though it won't prevent those files from being created.  Our build process creates a number of temporary files (many build off of a WSDL) that run afoul of this limit.  Our ant script is somehow able to delete them when doing a clean, but sometimes I need to delete the workarea directory (where all the temp files go) without actually doing a full clean from ant.  This is the same errors , but the answers there don't really work for me as I'm dealing with a directory, not a file, and I don't always know what specific files or subdirectories are causing the problem.  And I'm trying to avoid any manual process (other than triggering a single command) to actually delete them.  If I try deleting the directory from Explorer I get the error   Cannot delete [file name]: The file name you specified is not valid or too long.   Specify a different file name   Trying Remove-Item in powershell gives the following error:  Remove-Item : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. At line:1 char:12 + Remove-Item  &lt;&lt;&lt;&lt; -force -Recurse &lt;directory&gt;   Does anyone know of any tools or easy ways to get around this delete error without having to manually find the problem files and move/rename them? Can I levitate an object without using an electromagnet? Change of flavour, Weak interaction I couldn't find a straight and clear answer to this question on the internet: Why is the weak interaction (charged), the only interaction which can change the flavours of the quarks? Example where convergence in mean does not imply convergence in quadratic mean Is there an example where convergence in mean does not imply convergence in quadratic mean. $E|X_n-X|\rightarrow 0$ but $E|X_n-X|^2 \nrightarrow 0$.  It seems like this should be fairly straightforward, but I cannot really come up with an answer.  I'd imagine the answer would look something like   $$X_n=\begin{cases}a &amp; \text{with probability } \frac{1}{n} \\\  0&amp; \text{with probability } 1-\frac{1}{n} \end{cases}$$ Hypothetically, should I pay off the smaller + higher interest rate loan first, or the larger + higher absolute interest cost? I have this hypothetical situation on my mind and I am not sure which is the best solution. Given:  Loan 1: $340,000 at an interest rate of 1.69% per year Loan 2: $40,000 at an interest rate of  3.6% per year  I have a fixed amount available to pay these, let's say, $1,500 monthly and I can decide how much I want to pay each one (I could pay 750/750, 1000/500, 1500/0 for instance). I do not have a time limit to pay these. My question: What is the optimal way to pay these? What I always heard is: pay the debt that has the highest interest first. This would lead me to a solution: pay loan 2 as fast as possible. But the total amount of interest on 340,000 is higher (in this case, $5780 annually) than the amount over $40,000 (1440, in this case), so, to me, it feels I should pay the Loan 1 first. I would love to run some simulations, but I have no idea how to calculate these things (I don't even have a clue on how to research it). ps: this is really a hypothetical situation, I am not getting such loans without being able to calculate it, don't worry ;) Using a wi-fi and an ethernet connection at the same time thus having more bandwidth? What color can lightsabers be? I just saw the fan film  and the Force-sensitive bounty-hunter, Korbain Thor, wielded an ochre lightsaber (or at least that's what  described it as).   I'm just wondering if ochre is a canon color for a lightsaber? US tourism/business visa from non-resident country I applied for multiple visas before (not US visa), but all of them were from my residence country. In all of these cases, I can get official paper which support my evidence (bank statement, letter which states I am employed with high salary, marriage certificate, security clearance, ...).  It is the same question as , but I am not residing; I have a business visa.  case-specific details: I am from Egypt, I have business visa for Ireland. While in Ireland, I want to apply for US business visa.  Why not to apply from Egypt? Because the waiting time is too long (75 days). The waiting time in Ireland in only 18 days. Both visits (Ireland, US) are short visits (3 weeks for each). I use Ubuntu 12.04 64-bit, I did the following: sudo gedit /etc/apt/apt.conf and added  APT::Install-Recommends "false"; APT::Install-Suggests "false";    But it did not work. When I try to install a package, it still wants to install the suggested and recommended packages. How can I solve this? Tag info not updated regularly on profile? From my , I learned that all tag related info on profile will be updated daily at UTC 03:00.  However, something is wrong here. It's now UTC 05:00+, but my tag number, say 93 (c++) is not updated against yesterday. I am pretty sure about this and I did earn some more points throughout the day. Sorry for not be able to capture the screenshot yesterday, but I did check this number 10 hours ago (which belongs to yesterday, also 93).  Is there a bug happening here? Or updating time different?    UPDATE: As of 24 Jan, the tags are still not updated with the proper values.  UPDATE2: Fixed around 25 Jan, UTC 03:00, at least for me. What I am working with: I am running my self-made Arduino board (in the sense that I use the Arduino bootloader and code editor) at 3.3V, and powered from a Lithium ion battery, which is USB-charged by a corresponding Microchip charger IC.  What I am trying to achieve: I want to measure battery capacity once every minute or so. I have an LCD attached, so the idea is that the overall setup lets me know how the battery is doing at a given moment. The datasheet of the battery has a voltage versus discharge-level curve, and so by measuring the voltage of the battery, I can estimate the remaining capacity (very roughly but enough for me!).  What I did:   (EDIT: Resistor values updated and P-MOSFET switch added based on @stevenvh and @Jonny's suggestions).  I connected a voltage divider from the battery V_plus, with the larger "portion" going to an analog-read-pin (i.e., ADC) on the Arduino/Atmega chip. The divider is 33 KOhm-to-10 KOhm, thus allowing measurement up to 4.1 Volts maximum of the Li-ion battery from my 3.3V level microcontroller. Also, using one of the I/O pins connected to an n-channel MOSFET, I can switch the current through the divider only when I need the measurement. Here is a rough schematic (updated for a 2nd time based on suggestions of @stevenvh and @Nick):     My question:   How is my current setup? My only constraints are: (1) I would like to make a rough measurement of the battery capacity based on the voltage reading, as described above. (2) I would like to prevent the voltage divider from interfering with my charging IC's reading of battery presence (in my original setup, the divider sometimes caused the IC to misread presence even when the battery was absent). How to use the Bevel node in 2.79b How do I get the browser to reask me to integrate with a website? I'm using  and I accidentally clicked "No" when asked if I want to integrate with the website.  How can I have Firefox or Chrome reask me to integrate the site with Ubuntu? Reset CSS display property to default value Mysql crashed, dumped DB's in recovery mode. What now? Prove $\sum_{i=1}^n i! \cdot i = (n+1)! - 1$? Prove the summation:  $$\sum_{i=1}^n i! \cdot i = (n+1)! - 1$$ using induction.   base case:  $n=1$: \begin{align*} \sum_{i=1}^1 i! \cdot i &amp;= (1+1)! - 1 \\ 1 &amp;= 2 - 1 \\ 1 &amp;= 1 \end{align*}   This is a question from my test review packet, currently have the base case completed and I am a bit lost on where to go from there. Any help/hints are appreciated.