create a file middleware.py and type
def __init__(self, get_response):
self.get_response = get_response
def __call__(self, request):
response = self.get_response(request)
response['Access-Control-Allow-Origin'] = "*"
MIDDLEWARE = [
In command prompt or powershell
certutil -hashfile filename.zip MD5
Often this happens when for some reason or the other your OpenGL config is broken. This is often an issue on Ubuntu 17.04.
To confirm this is your problem, (Assuming your Android SDK lives in ~/Android/Sdk)
Get your emulator’s name:
In my case it was Nexus_4_API_25
Test running using system OpenGL
~/Android/Sdk/emulator/emulator -avd Nexus_4_API_25 -use-system-libs
If the emulator starts successfully we can make this solution semi-permanent by having a symbolic link in the android Sdk dirs to the system’s openGL
mv libstdc++.so.6 backup/
ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6 .
Voilà, you should now be able to launch your emulator from android studio or anywhere else. In the case of any future updates, you can just run the above commands again.
Source: Martin Revert (stackoverflow)
When starting a project in Intellij IDEA if you see an error around the lines of
Gradle sync failed: The newly created daemon process has a different context than expected.
It won't be possible to reconnect to this daemon. Context mismatch:
Java home is different.
Wanted: DefaultDaemonContext[uid=null,javaHome=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 2016.3.2\jre,daemonRegistryDir=C:\Users\Ronald\.gradle\daemon,pid=7044,idleTimeout=null,daemonOpts=-Xmx1536m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]
Actual: DefaultDaemonContext[uid=7819e5ac-98ac-4dd2-8891-cacf4e56f662,javaHome=C:\Program Files\Java\jdk1.8.0_112,daemonRegistryDir=C:\Users\Ronald\.gradle\daemon,pid=4720,idleTimeout=60000,daemonOpts=-Xmx1536m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]
Consult IDE log for more details (Help | Show Log)
The solution would be to explicitly tell grade where your java directory is. You can do this in two places
- Open up %USERPROFILE%\.gradle\ and create the file gradle.properties
- In your android project create or edit the gradle.properties file
Inside that file put the location of your java path using forwardslashes instead of backslashes
In my case it looks like:
TL:DR Cores Cores Cores (but no more than pCPU count)
When creating a new virtual machine in VMware ESXi or VMware Workstation, it asks you how may processor cores you wish to set and gives you the option to set both ‘Number of processors‘ and ‘Number of cores per processor‘.
Most places online (looking at you Stack Overflow) said that only ‘Total processor cores‘ matters. I was curious as to how true that was and decided to run some tests myself.
The results are as follows
The results here were pretty astonishing, as soon as we increase the CPU count we actually lost single-core performance and gained a slightly higher multi-core score.
This may be because of the way VMware handle cores vs CPU’s. It could also be because of how the guest operating system handles multiple processors. Regardless, seeing as single-thread performance is more important in most applications, I’d stick with adding cores and not processors for the time being.
TL:DR Even with Hyperthreading enabled, do not exceed the amount of PHYSICAL cores your machine has.
The General rule for assigning CPU’s is to keep your virtual cpu count at or lower than your physical cpu count. (VMware blog) .
I was curious as to why this was, seeing as generally one can get anywhere between a 10-30% increase in performance with hyperthreading.
To see how the performance scaled with each additional core, I decided to test it out on my laptop (1CPU, 2 Cores, 4ht cores). I spun up a new CentOS 7 machine and ran geekbench4 on each core configuration. The results were as follows
From our table we can see that after we arrived at the physical CPU count, adding extra cores gave us very little in terms of a performance boost.
A new year has begun. Time to format my disks. New windows install and more importantly, new Linux install. With windows, the choice is easy. Windows 10. With Linux, it’s a bit more complicated….
Here were the candidates
Ubuntu 16.04 LTS
Here’s a little history about my relationship with Ubuntu. Ubuntu was my first distro and all was right with the world, I would never have left… that is..
until the fire nation att… until unity. It was a bit of a messy breakup, something about it just didn’t resonate with my soul. A year or two ago I tried it again but I remember seeing amazon search results integrated by default and was instantly disgusted. But time has passed, seasons have changed and I believe people learn from their mistakes..so I wanted to give it another shot. so I did… Continue reading
With Fedora 25 (as you probably already know) X was replaced with Wayland as the default display server. Now while I applaud Fedora for taking that giant step forward. The fact remains that X11 just performs better.
With Wayland i’ve noticed various flickers where there shouldn’t be. As well as a general feeling of… lag or slowness.
Luckily for us it’s pretty easy to go back to X.
- Logout (not yet!! Read the rest of the tutorial first)
- Click on your profile
- Look for the settings icon and select Gnome on XOrg.
Voila! you should now see an immediate difference.
With the newest update, windows has hidden the option “search online and include web results” and therefore has made it difficult for users to disable Cortana and Web results completely.
Luckily for us there is a relatively easy fix.
- Type Win + R to open run and type in gpedit.msc
- Go to Local Computer Policy > Computer Configuration > Administrative Templates > Windows Components > Search
- Disable “Allow Cortana”
- Enable “Do not allow web search”
Open cmd as an administrator and
net stop wuauserv
net stop wuauserv
net stop bits
net stop dosvc
net stop wuauserv is written twice as the first attempt tends to fail.
To make it easier in the future, copy those lines to a bat file and save it on your desktop.