I assume that my case is weird but I've the following information:   IV: 0x263e or 0x3e26 Auth tag: 0x25 AES256-GCM encrypted payload: 0x4eec96df534ade4c013a AES256-GCM decrypted payload: 0x0041e36baf2648090174   Regarding the length of the IV and Auth tag, I'm wondering if it is possible to guess the key used to encrypt the payload ?
I have a file, which was encrypted with AES-128 in ECB mode. I know the format of the original file and know that all files in this format have the same headers. So, I have an encrypted block and the original block.  Can I get the encryption key, using this information?
Are locks unnecessary in multi-threaded Python code because of the GIL? If you are relying on an implementation of Python that has a Global Interpreter Lock (i.e. CPython) and writing multithreaded code, do you really need locks at all?  If the GIL doesn't allow multiple instructions to be executed in parallel, wouldn't shared data be unnecessary to protect?  sorry if this is a dumb question, but it is something I have always wondered about Python on multi-processor/core machines.    same thing would apply to any other language implementation that has a GIL. JSON Parsing in Android Normalising Constant for exponentiated function What would the normalising  constant be of the following, or atleast an approximation? I would like to avoid sampling.  $$f(\theta)=\exp(-k_1e^{-k_2\theta^2}-\theta^2)\qquad\theta\in(-\infty,\infty), \quad k_1,k_2&gt;0$$  In the event that its not possible, what would be a valid polynomial lower bound on $\log(f(\theta))$, that would take into account $k_1$  For anyone, who is interested, I end up with this expresssion because I place a Gaussian prior over (a squared exponential) kernel parameters, and trying to use variational bayes (hence, a lower bound). Use (or non-use) of articles before abstract nouns Run a Windows Service as a console app I've seen the  here before, as well as on many sites on the web.  I've also seen different info on what was covered.  I'm not a huge X-Men fan, but I do enjoy the characters and stories, so I know I'm probably missing out on a lot, and may have missed the obvious along the way because I didn't read a particular series or something like that.  I had a relative die from leukemia a few years ago and that reminded me of basic junior high science: that red and white blood cells are produced in the bone marrow and must be able to reach from the marrow into the blood vessels.  The leukemia my relative had was the kind where the "bad" cells would surround the marrow and prevent the new "good" blood cells from getting out to the rest of the body.  So just how much of Wolverine's skeleton is covered with Adamantium?  If it's the whole thing, there'd have to be openings for new red blood cells to get out if he is to remain alive.  I've never seen a reference to this issue, is it ever addressed?  That also raises another issue along the same line: Are hard to reach areas, such as ball and socket joints covered?  If not, then stress on other covered areas could be transferred to the weaker uncovered areas, which would lead to breakage there.  And if joints like that are covered, is there anything to say how it was done?  Are there openings or gaps in the Adamantium covering on his body?  Are there any references to any of these issues that deal with them? Problem with PDO MySQL In which US accent is “again” pronounced /əˈɡeɪn/ with the FACE vowel, not /əˈɡɛn/ with the DRESS vowel? Most dictionaries provide the US pronunciation of “again” as /əˈɡɛn/ (uh-gen) with the DRESS vowel. This is the most common pronunciation in the USA. However, I think I might have also come across /əˈɡeɪn/ (uh-gain) with the FACE vowel. This sounds like the word “gain” with an “a” at the beginning. Is there a US accent where “again” is pronounced this way? How to install pip for python 3 in ubuntu 12.04 LTS Are repository lists secure? Is there an HTTPS version? Are repository updates secure?  As a bear of little brain from the developer side, I cannot understand why the repository list is http://security.ubuntu.com and the other http(unsecured) sites listed in /etc/apt/sources.list.  Without a certificate chain match this appears as "ask any responder for a list of packages to update" instead of "ask the ubuntu.com site..."  Can any network choose to spoof the update sites, and is this a common practice to provide a locally cached and vetted copy? I've found ,  and  which are releated to my question, but no longer seem to apply since Drupal 8.1 and the deprecation of .  Also popular guides such as  appear to no longer apply as they also mention composer manager.   The other solution opposed to composer manager, alter the core composer.json file feels like too much core hacking and would probably break with every Drush update of Drupal core(?).  More specifically, I am attempting to update  from Drupal 7 to 8. I have created my composer.json file as follows:  {   "name": "drupal/views_vcards",   "description": "Allows creation of vCards using the fields provided by the Views module.",   "type": "drupal-module",   "license": "GPL-2.0+",   "homepage": "https://drupal.org/project/views_vcards",   "require": {     "maennchen/zipstream-php": "0.3.*"   } }   But if I put a composer.json file in my module folder, how do I make Drupal aware that that file is there, and how do I make sure the required zipstream-php library is downloaded?  Simply running composer update from the Drupal root does update a lot of Drupal dependencies, but it does not include the composer.json files that are in the modules folders. I also don't assume I should be calling composer install from inside all modules with dependencies.  How do I make Drupal aware of a module's dependency without using composer manager and/or hacking core?  UPDATE:  The  appears to have support a wildcard path:  {     "require": {         "wikimedia/composer-merge-plugin": "dev-master"     },     "extra": {         "merge-plugin": {             "include": [                 "composer.local.json",                 "extensions/*/composer.json" // &lt; ---- THIS LINE             ],             "require": [                 "submodule/composer.json"             ],             "recurse": true,             "replace": false,             "merge-dev": true,             "merge-extra": false         }     } }   Why doesn't core merge modules/*/composer.json, that would solve everything right?  Update 2:  THe reasoning for not supporting this is covered in  (which also has been quiet for some time now). SQL Server 2008 R2 SP1  My company uses the Great Plains (GP) financial system with several customizations.  Our Value-Added-Reseller (VAR) for GP has setup most of these customizations in a separate database from the GP data called DYNCUSTOM.  In the DYNCUSTOM database is a View that is merely a SELECT * FROM a table in the GP company database (called PARTS).  I was approached by a user having problems trying to select on this view.  The error he was getting:  Msg 229, Level 14, State 5, Line 2 SELECT permission denied on object 'BM010415', database 'PARTS', schema 'dbo'   I looked at how his login was mapped and he had a database user in the DYNCUSTOM database belonging to a database role that was granted select on the view.  However, he did not have a database user in the PARTS database.    Usually the intent of a view is so that one can grant select permissions on the view without exposing access to the underlying table.  With SQL Server however, if the view crosses databases does it then change the security context being used?  Therefore, the user would also need a database user in the PARTS database as well as granted select access to the underlying table? Why doesn't xpath work when processing an XHTML document with lxml (in python)? Placement of varistor with respect to fuse My design includes a pretty standard AC/DC converter powered by mains for intended use at home. For overvoltage and overcurrent protection, I am planning to use a combination of varistor and fuse placed before the power converter.  I understand it is good practice to put the fuse before the varistor - in an overvoltage event, the varistor will draw a large current that may blow the fuse, protecting the rest of the circuit and even the upstream circuitry.  However, due to extremely tight layout, it is very hard to put the fuse before the varistor.  What risk am I running if I put the varistor before the fuse?  What if I put a second fuse in series with the varistor? Does it negate the varistor's protection of the downstream circuit? When traveling to a country with a different currency, how should you take your money? Recently my wife and I traveled to Italy and before we left we got about 85% of our money in travelers checks and the other 15% we carried on in cash. When we arrived there, no one would take our travelers checks and many places did not accept credit cards. Eventually, we found some currency exchange places that would take the travelers checks and give us Euro's, but at a 7-15% fee, which was not really a very fun surprise.   While I was under the impression that it is safer to use travelers checks, it seems that they were not really accepted (the usual explanation being fraud). So the question is, is it best to just exchange your currency at home and carry all of it with you when you travel or are there other alternatives to carrying cash that are safer and cost effective? line of mathematicians guess their own hat color out of c colors There is a common problem in which a long line of N mathematicians are each given a hat that is either red or blue.  They cannot see their own hat but can see all in front of time and can hear any response. They must state their own hat color from the back of the line forwards and no information may be passed besides their guess.  They may have a planning session in advance.  What is the maximum number of correct guesses can they guarantee?  The answer is (look away if you don't know) $N-1$.  If, instead of 2 colored hats, we use $c$ different colored hats, how many can we guarantee?  Assuming $N&gt;&gt;c$  I believe the answer to be $N-c+1$ and have confirmed this for $c=2, 3$, and $4$.  I believe this should be simple to prove by using the concept of "$x$ formulas allow you to solve for $x$ variables" but I am not well versed enough in pure mathematics to answer this. Meta duplicates don't require an answer. Don't suggest there is one when that's not true This request was sparked . The vote to close as a duplicate on meta, in contrast to the main site, does not require for the duplicate to have an answer. Yet, the closure message still says:     This question has been asked before and already has an answer.    ...even when this is not the case. Perhaps we should either only show this particular sentence if there is indeed an answer, or remove this altogether for meta.   Note: I fear this might be a duplicate request, but I was unable to find one. (Not even one without an answer :) ) Why is usable RAM less than total RAM? My girlfriend bought a laptop last week. It's a core 2 duo with 4 GB  We installed vista 64bit, and one of the first things we did was right click on "My computer" to see gthe properties. Immediately we noticed something strange about her RAM, the line said: Installed memory (RAM): 4,00 GB (3,68 GB usable)  I told her not to worry, thinking it must be something about the laptop hardware (considering her vista installation came from the same DVD as mine, and I never noticed anything like that on my 4 GB desktop). One hour ago, it got worse. We looked at Properties again, and it now says: Installed memory (RAM): 4,00 GB (2,98 GB usable)  What does that mean? Are those 1,02 GB missing or being used by the system?  EDIT: There is a possibility that the sytem information is wrong. I just noticed that it reports an intel T6500 processor, when it's actually a T6400.  How can I find out how much RAM is really available to the system?  EDIT2: Checking the resource monitors, it says 1003 MB are reserved for the hardware. Is that good or bad? Thanks I am trying to solve the exercises from the book Stochastic differential equations -An Introduction with applications by Bernt Oksendal and I am stuck on 1 question.  Prove directly from the definition of Ito's integral that   $$\int_0^t B_s^2 dB_s=\frac{1}{3}B_t^3-\int_0^t B_s ds$$  I have tried for a couple of hours but I simply cannot prove it . I would be grateful if somebody could help me out , even a hint would be very helpful How do you create a daemon in Python? reveals x2 code snippets. The first result is to  which has a lot of documentation and explanation, along with some useful discussion underneath.   However, , whilst not containing so much documentation, includes sample code for passing commands such as start, stop and restart. It also creates a PID file which can be handy for checking if the daemon is already running etc.  These samples both explain how to create the daemon. Are there any additional things that need to be considered? Is one sample better than the other, and why?