This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function old_colon{T<:Integer}(start::T, step::T, stop::T) | |
Range(start, step, max(0, div(stop-start+step, step))) | |
end | |
function new_colon{T<:Integer}(start::T, step::T, stop::T) | |
len,rem = divrem(stop-start,step) | |
Range(start, step, max(0, len+div(rem+step,step))) | |
end | |
function range_test_old() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_ | |
_ _ _(_)_ | A fresh approach to technical computing | |
(_) | (_) (_) | Documentation: http://docs.julialang.org | |
_ _ _| |_ __ _ | Type "help()" to list help topics | |
| | | | | | |/ _` | | | |
| | |_| | | | (_| | | Version 0.2.0-prerelease+3952 | |
_/ |\__'_|_|_|\__'_| | Commit d0c2058 2013-10-06 19:08:09 UTC | |
|__/ | x86_64-w64-mingw32 | |
julia> abstract BTree |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Somewhat minimal example demonstrating how the Python dropbox api has inconcistent UTF-8 handeling | |
for filenames and paths. | |
To simpelify upload of many files i let users copy their files to a upload folder under an | |
application specific dropox folder named upload. Then I download theese files to my server and makes | |
them availible to the application. | |
My problem was that if filenames contains non ASCII characters like æøå I got an encoding error when | |
I tried to delete the file. The problem was resolved when i encoded f['path'] to utf-8, but I have |
NewerOlder