Mock to HTTP connection gives null pointer exception
What is a NullPointerException, and how do I fix it?
Find $f$ if $ f(x)+f\left(\frac{1}{1-x}\right)=x $ Find $f$ if $$ f(x)+f\left(\frac{1}{1-x}\right)=x $$ I think, that I have to find x that $f(x) = f\left(\frac{1}{1-x}\right)$ I've tried to put x which make $x = \frac{1}{1 - x}$, but this equation has no roots in real numbers. How can I get an email message's text content using Python? First of all, I know that light does indeed travel slower in a medium like air or water, but that's because the photons are bouncing off of the medium's particles and in different directions so the light beam as a whole is slowed down (or at least that's the classical explanation I've read somewhere).  But my question is about light traveling freely in the vacuum. What if an astronaut during a spacewalk switches on a flashlight towards the opposite direction he is moving. Will that light travel slower than normal?  If not, is there another way to make light move slower? For example, can you make a beam of light move so slow that you can visually perceive it being affected by gravity? Two blue arrows at top right of icons I wish to have long and short forms of command line options invoked using my shell script.  I know that getopts can be used, but like in Perl, I have not been able to do the same with shell.  Any ideas on how this can be done, so that I can use options like:  ./shell.sh --copyfile abc.pl /tmp/ ./shell.sh -c abc.pl /tmp/   In the above, both the commands mean the same thing to my shell, but using getopts, I have not been able to implement these? Assign default keyboard language per-application Is it possible to assign default keyboard language for specific applications? I know that there is an option to always start an application with a default keyboard language but this is not what I want.  I'm looking for something similar to "fixed workspaces" which you can set using CompizConfig (You set Chrome to always open at X1Y1, terminal at X2Y1 etc). Something where I would set Chrome: Czech, terminal: English, Spotify: English, ... What is the optimal order of post-processing steps? How to combine an SSD boot drive with a HDD data drive? Macbook Pro hard drive failing? How to check which TLS protocol is using the FUEL-SDK for java How can I add "page # of ##" on my document? I want to add a footer to my document displaying the current number out of total number of pages. How do I do that? We have an instance of SQL Server 2008 installed on a customer server. The customer's IT department is in charge of the various backups of the machine.  The SQL Server log shows there is a full backup every day at 7 PM but we can't find evidence of any plan scheduled in SQL Server.  The technicians we contacted couldn't tell us if there was some sort of automatic backup, all they told is that the entire machine is being backup up.  Using a script I found in  I found out that the physical device name is a GUID and that this means that this is an external backup process:  USE [msdb] GO  SELECT      [bs].[database_name],      [bs].[backup_start_date],      [bs].[backup_finish_date],      [bs].Server_name,     [bs].user_name AS [BackupCreator] ,     [bmf].physical_device_name FROM msdb..backupset bs   INNER JOIN msdb..backupmediafamily bmf ON [bs].[media_set_id] = [bmf].[media_set_id]  ORDER BY [bs].[backup_start_date] DESC   This is a row from the above query:     db_name 2015-09-16 19:01:23.000   2015-09-16 19:01:28.000SERVER_NAME  NT AUTHORITY\SYSTEM{424F084A-F35D-4A66-8FC7-072268A89A77} 5   Moreover the backup start and finish date spans only for 5 seconds, so I guess it's clear it's not a job of sql server.  This is a line from the log:     2015-09-03 19:02:30.71 Backup   Database backed up.   Database: db_name, creation date(time): 2012/10/12(20:52:11), pages dumped: 3290021,   first LSN: 276028:152755:172, last LSN: 276028:152827:1, number of dump devices: 1,   device information:   (FILE=1, TYPE=VIRTUAL_DEVICE: {'{95380B0A-D50B-408F-B95F-1AB8975BA7F8}5'}).   This is an informational message only. No user action is required.   So, since they can't help us what can I do to track down the process responsible of the backups? We need this because we want to coordinate the backup in an ordered manner, and do the transaction log backups too in order to keep the log at a reasonable size (now we do shrink the log every week, and this is not the good way to go). How can I make a message appears on my PC when my phone is ringing? When I'm at work, I usually have a headset on my head and I am listening to music. My phone is always on vibrate to respect co-workers.  However, I don't keep the phone in my pocket because of its size, so I don't feel it vibrating.  I miss a lot of calls.  I was wondering if it's possible to forward "phone is ringing" notifications to the PC, ideally via a Bluetooth connection.  I would not mind installing a 3rd-party app on the phone or software on the PC. Are $10\times 10$ matrices spanned by powers of a single matrix? I don't know how to answer this question:     Is there a $10 \times 10$ matrix $A$ such that $$M_{10}(\mathbb{F})=\text{span}\{I,A,A^2,\ldots, A^{100}\}\textrm{,}$$ where $M_{10}(\mathbb{F})$ is the vector space of $10 \times 10$ matrices over $\mathbb{F}$?   I think there is a connection to Jordan normal form. Can I be admitted to graduate school in a different field from my degree?  Specific cases include:   If I've taken plenty of advanced courses in field X in the process of completing a degree in another field, can I apply to graduate school in X? What if I haven't taken many courses in X, but I have acquired a good grasp of X through self-study or working in a related field? What if I've never studied X, but I have done very well in an unrelated field?  Could I be admitted to graduate school in X on the basis of general intellectual promise, and then make up the missing background after enrollment?   Note that this question is an attempt to provide a comprehensive answer, to avoid the need for a profusion of field-specific questions on this topic (see the associated ). Please feel free to edit the question or answer to improve them. Documents required by Indian citizens wishing to travel to Nepal I'm a citizen of India and I'm travelling to Nepal by air. Is an Aadhaar Card a valid document used for travelling to Nepal by air? In D&amp;D 5, the saving throws for spells has the following formula:  The DC is set to 8 + prof bonus + magical stat bonus.  The target then makes a saving throw, adding their stat bonus and hoping to get above that DC.  Instead of having the defender roll the saving throw, we would like the attacker to roll the attack against the "defense" of the monster. (Mainly to make play by post run smoother)  Would this mean that the attacker just rolls d20+prof + magic stat bonus, and they try to get a number which is higher than 8+ monster def stat bonus, or is there a different formula which better maintains the math? (This math sounds wrong to me, so I assume there is a better formula) Why is $1 in a function not printing the script's first argument? Why doesn't echo $1 print $1 in this simple bash script?    #!/bin/bash # function.sh print_something () { echo $1 } print_something  $ ./function.sh 123  -&gt; why doesn't it print '123' as a result? How can I remap a keyboard key? Should I add a 'Home' Button to the navigation? I know that it is common behavior to have the logo of a web page be a link to the home page, but should I also have a 'home' link in the navigation bar for it as well?