Do I need to wrap the body of case in switch statement with curly braces in C++?
Why can't variables be declared in a switch statement?
I'm trying to connect 32 I²C "root of trust"  devices.    I'm thinking about a good way that does that, I mean what kind of communication should I use? A digital multiplexer that selects a device? but based on what? switching on the VDD source? but that needs reinitialization of the device and that takes time. How to get color of pixel in coordinates 123, 456 in screen? My AppleScript app needs to get color of pixel in coordinates 123, 456 in screen. In the original PC release of RollerCoaster Tycoon, if playing in a scenario with a lot of grassland, I would ensure my handymen did not mow the grass as their other services seemed more beneficial to keeping the park tidy, as well as making sure the handymen did not wander off the paths. In the android release, the handymen by default do not mow the grass (that duty by default is set to off).  I know the guests will remark on the scenery and vandalism, but I have not seen anything to suggest that mowing the grass has an effect on the guests or ride construction.  My question is; does mowing the grass have any effects apart from just making the park look tidier? Does allowing it to overgrow have any negative effects? How to switch from Resident visa to Tourist visa status in the Schengen area? I have a 1-year residence permit from one Schengen country that is now expiring. Upon its expiration, I would like to get my 90/180 days validity as a tourist to stay, or return here as soon as possible.  I understand that the tourist short-stay scheme is based on the 90/180 days "counter". But what happens if my previous stay was not tourism but residence (as searching year). Wouldn't that mean that I can quickly exit and re-enter the Schengen area to activate my tourist stay?   Also, is there a way to change this purpose of stay without exiting the Schengen area? How can I distribute a native executable for a Python program? Lately all of my work has been in Python (and Ruby), and I'm in love with those two languages. There are many libraries for game development on Python but the problem I see is that many of those frameworks don't cover the "distribution" aspect of game creation. I'd like to code my game on Python (and any other pure Python extra libraries I need) and be able to distribute an executable for the main PC platforms (Windows, Mac and Linux).  Any options out there or what are the best combinations for this? (maybe pyglet + cx_freeze) In QGIS I would like to clip a raster precipitation layer using an admin boundary layer that is vector data. However the Geoprocessing tools seem to be usable only for vector data. How can I clip this precipitation layer? Accept Multiple Answers or Split Bounty among Several Users Often more than one person contributes to the community coming up with the final accepted answer to a question. However, it is only possible to accept a single answer. Restricting to one final answer does make sense for the sake of referencing that answer later, but in many cases that answer is the product of the input from several individuals. I would like to be able to decide how much of a bounty goes to different users, or some other mechanism to recognize the contribution of multiple users. Of course I could always upvote their previous answers, but this is really incorrect if their previous answers aren't the complete, final answer I've accepted.  What think you metaSOrs? I've got a rather large number of files on my Windows drive that have a colon in their name. (These came from unpacking some Unix archives.)   When I try to delete them, Windows (XP) complains that the file does not exist, and refuses to delete it. This happens when trying to delete or rename it from explorer or the command line. Still, chkdsk does not complain about those files nor fix the problem.   Any ideas on how to get rid of them? Install apt package in ubuntu 12.04 I have mistakenly removed the default package APT from my system .  When I run command locate apt-get, I get below output:  /home/jeet/apt-get /home/jeet/Desktop/apt/apt-0.7.25.3ubuntu9.13/cmdline/apt-get.cc /home/jeet/Desktop/apt/apt-0.7.25.3ubuntu9.13/doc/apt-get.8.xml /home/jeet/Desktop/apt/apt-0.7.25.3ubuntu9.13/doc/de/apt-get.de.8 /home/jeet/Desktop/apt/apt-0.7.25.3ubuntu9.13/doc/fr/apt-get.fr.8 /home/jeet/Desktop/apt/apt-0.7.25.3ubuntu9.13/doc/ja/apt-get.ja.8 /home/jeet/Downloads/apt-get /home/jeet/Downloads/apt-get.8.gz /usr/share/bash-completion/completions/apt-get /usr/share/bash-completion/completions/slapt-get   If I run ls | grep apt-get, then I won't get any output.  Can anybody please advice how to recover apt package or install it from start? How do I break out of a loop in Perl? I'm trying to use a break statement in a for loop, but since I'm also using strict subs in my Perl code, I'm getting an error saying:     Bareword "break" not allowed while   "strict subs" in use at ./final.pl   line 154.   Is there a workaround for this (besides disabling strict subs)?  My code is formatted as follows:  for my $entry (@array){     if ($string eq "text"){          break;     } } How to convert strings into integers in Python? Difference between float and decimal data type Batch Requests/sec reported by DMV millions of times larger than Activity Monitor I have verified through SQL Server Profiler that my request per-second are around 30 request/s as is corroborated by SSMS Activity Monitor but sys.dm_os_performance_counters is reporting hundreds of millions/s.  Any idea what might be causing this gross discrepancy?  Query:  SELECT     RTrim(LTrim(object_name)) as object_name,     RTrim(LTrim(counter_name)) as counter_name,     cntr_value FROM     sys.dm_os_performance_counters  WHERE      instance_name IN ('', '_Total')     and counter_name IN (         N'Batch Requests/sec'         , N'SQL Compilations/sec'         , N'SQL Re-Compilations/sec'         , N'Transactions/sec')   Results:  object_name counter_name    cntr_value SQLServer:Databases Transactions/sec    191721399 SQLServer:SQL Statistics    Batch Requests/sec  242955426 SQLServer:SQL Statistics    SQL Compilations/sec    42048371 SQLServer:SQL Statistics    SQL Re-Compilations/sec 1200947 Is it possible to prevent an NSURLRequest from caching data or remove cached data following a request? On iPhone, I perform a HTTP request using NSURLRequest for a chunk of data. Object allocation spikes and I assign the data accordingly. When I finish with the data, I free it up accordingly - however instruments doesn't show any data to have been freed!  My theory is that by default HTTP requests are cached, however - I don't want my iPhone app to cache this data.   Is there a way to clear this cache after a request or prevent any data from being cached in the first place?  I've tried using all the cache policies documented a little like below:  NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url]]; theRequest.cachePolicy = NSURLRequestReloadIgnoringLocalCacheData;   but nothing seems to free up the memory! Bit error rate calculation for LIN protocol I am having this microcontroller -   I am using an 8MHz external clock. I want to calculate the Bit error rate of my LIN Communication. My LIN Communication Baud rate is 19.2kbps. My questions :  Can I use the LPUART Module in the Mirocontroller for the LIN Communication?  How to find the Bit error rate for the LIN Protocol communication for my baud rate of 19.2kbps and external clock of 8MHz.   I found this below from the reference manual. But not sure, how to calculate the Bit error rate from this.   How to calculate the SBR Register value, OSR and the LPUART ASYNCH Module clock?  Please help How can I create that glitter tears effect and the sparkles? $\sqrt{c+\sqrt{c+\sqrt{c+\cdots}}}$, or the limit of the sequence $x_{n+1} = \sqrt{c+x_n}$ (Fitzpatrick Advanced Calculus 2e, Sec. 2.4 #12)  For $c \gt 0$, consider the quadratic equation $x^2 - x - c = 0, x &gt; 0$.  Define the sequence $\{x_n\}$ recursively by fixing $|x_1| \lt c$ and then, if $n$ is an index for which $x_n$ has been defined, defining  $$x_{n+1} = \sqrt{c+x_n}$$  Prove that the sequence $\{x_n\}$ converges monotonically to the solution of the above equation.  Note: The answers below might assume $x_1 \gt 0$, but they still work, as we have $x_3 \gt 0$.    This is being repurposed in an effort to cut down on duplicates, see here: .  and here: . Is 'that is' optional? When I write something like this:     I am a man that is doing these things.   Is it correct to shorten it like this?     I am a man doing these things.   And does it require commas? Frequency count of two column in R How do I sort a dictionary by value? I have a dictionary of values read from two fields in a database: a string field and a numeric field. The string field is unique, so that is the key of the dictionary.  I can sort on the keys, but how can I sort based on the values?  Note: I have read Stack Overflow question here  and probably could change my code to have a list of dictionaries, but since I do not really need a list of dictionaries I wanted to know if there is a simpler solution to sort either in ascending or descending order.