Re: [julia-users] Re: UDP Support

2014-02-23 Thread Bassem Youssef
For what it's worth, something like the following has been working with no issues whatsoever for me: sock = UdpSocket() Base.bind(sock,ip,0) Base.setopt(sock,enable_broadcast=1) # i'm not sure why you need the ccall to uv_udp_set_broadcast above send(sock,ip,port,data) This is both on 10.9 and Li

Re: [julia-users] Re: kw arguments and expression question

2014-02-21 Thread Bassem Youssef
Expr(:kw, > :b, 7). > > On Friday, February 21, 2014 6:17:48 PM UTC-5, Bassem Youssef wrote: >> >> Suppose i have a simple function as follows: >> >> julia> func(a;b=3) = a + b >> func (generic function with 1 method) >> >> as expected: >>

[julia-users] kw arguments and expression question

2014-02-21 Thread Bassem Youssef
Suppose i have a simple function as follows: julia> func(a;b=3) = a + b func (generic function with 1 method) as expected: julia> func(3,b=5) 8 julia> ex = :(func(3,b=5)) :(func(3,b=5)) julia> eval(ex) 8 julia> ex.args 3-element Array{Any,1}: :func 3 :(b=5) julia> ex.args[3] :(b=5) Howe

Re: [julia-users] Help with Requests.jl/adding data to POST request

2014-02-05 Thread Bassem Youssef
Hi Randy, The following works for me: where $enc is the encoded creds as you had above. post(URI("https://api.twitter.com/oauth2/token";),"grant_type=client_credentials",{"Authorization" => "Basic $enc","Content-Type" => "application/x-www-form-urlencoded;charset=UTF-8"}) Note the URI() before th