I know I have dealt with this before, but I found a Stack Overflow thread that does a pretty good job of explaining this problem. Plus, the thread shows you how to use Python to fire up a simple web server to get around the issue:
http://stackoverflow.com/questions/20041656/xmlhttprequest-cannot-load-file-cross-origin-requests-are-only-supported-for-ht
Thursday, August 7, 2014
Thursday, July 17, 2014
Multiprocessing Versus Threading in Python
I keep forgetting the difference between multiprocessing and threading in Python. This Stack Overflow thread explains the difference between the two pretty well:
http://stackoverflow.com/questions/3044580/multiprocessing-vs-threading-python
http://stackoverflow.com/questions/3044580/multiprocessing-vs-threading-python
Tuesday, June 3, 2014
Pushing to a remote bitbucket repository with Mercurial
Ugh. This is a lot harder than it ought to be. I am finding that a lot of activities with Mercurial is just easier to do through the command line instead of TortoiseHg.
If you want to push to your bitbucket repo, type this command in your directory:
> hg push https://username@bitbucket.org/username/someproject
However, the smarter way is to go into the .hg directory and modify the hgrc file like so:
[paths]
default-push = https://username@bitbucket.org/username/someproject
Now just type 'hg push' at the command prompt.
If you do not see the hgrc file, then you will have to make one!
If you want to push to your bitbucket repo, type this command in your directory:
> hg push https://username@bitbucket.org/username/someproject
However, the smarter way is to go into the .hg directory and modify the hgrc file like so:
[paths]
default-push = https://username@bitbucket.org/username/someproject
Now just type 'hg push' at the command prompt.
If you do not see the hgrc file, then you will have to make one!
Monday, June 2, 2014
Copying Text To And From the Command Prompt in Microsoft
When programming in a Microsoft development environment, I actually find the Command Prompt to be fairly useful. However, I keep forgetting how to copy and paste text to it. This page shows you how:
https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/windows_dos_copy.mspx?mfr=true
https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/windows_dos_copy.mspx?mfr=true
Saturday, April 19, 2014
Managing Multiple Versions of Python with pyenv
I have been recently working on a project that needed to be tested on multiple versions of Python. I found pyenv to be invaluable:
https://github.com/yyuu/pyenv
This project was apparently forked rbenv and ruby-build and works about the same.
I also found this article useful:
http://dtucker.co.uk/hack/installing-pyenv-on-mac-osx.html
https://github.com/yyuu/pyenv
This project was apparently forked rbenv and ruby-build and works about the same.
I also found this article useful:
http://dtucker.co.uk/hack/installing-pyenv-on-mac-osx.html
Python + Gmail = Email Adventures!
Today I learned how to send email using Gmail as a service provider. I learned from reading this thread:
http://stackoverflow.com/questions/10147455/trying-to-send-email-gmail-as-mail-provider-using-python
http://stackoverflow.com/questions/10147455/trying-to-send-email-gmail-as-mail-provider-using-python
Sunday, April 6, 2014
Location of bower_components directory in AngularJS phone tutorial
I'm actually enjoying the Angular JS tutorial: http://docs.angularjs.org/tutorial
However, I have a sneaking suspicion that the bower_components directory should be located on the same level as the app directory (not inside of it).
However, I have a sneaking suspicion that the bower_components directory should be located on the same level as the app directory (not inside of it).
christohersmbp2:angular-phonecat christopherspears$ ll | awk '{print $9}'
LICENSE
README.md
app/
bower.json
bower_components/ <- moved it here
node_modules/
npm-debug.log
package.json
scripts/
test/
Am I wrong?
Subscribe to:
Posts (Atom)