# General Usage

**URL:** https://discourse.julialang.org/c/usage/6.md?page=858

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 859

---

## [HTTP 404 error on adding package by dependency DiffRules](https://discourse.julialang.org/t/http-404-error-on-adding-package-by-dependency-diffrules/25034)

<div class="topic-metadata">

**Author:** [@GeraldKaeferle](https://discourse.julialang.org/u/GeraldKaeferle)\
**Replies:** 6\
**Last updated:** [June 12, 2019, 11:02am UTC](https://discourse.julialang.org/t/http-404-error-on-adding-package-by-dependency-diffrules/25034 "2019-06-12T11:02:33Z")

</div>

Hello! I get this error messages when I try to install Gadfly or Flux. DiffRules.jl availability on GitHub seems not to be a problem and adding different packages e.g Wavelets.jl did work. \]update did’t help. I use Jul…

---

## [Julia AWS.jl](https://discourse.julialang.org/t/julia-aws-jl/25137)

<div class="topic-metadata">

**Author:** [@Caesar\_KG](https://discourse.julialang.org/u/Caesar_KG)\
**Replies:** 4\
**Last updated:** [June 12, 2019, 7:33am UTC](https://discourse.julialang.org/t/julia-aws-jl/25137 "2019-06-12T07:33:37Z")

</div>

Is there anyone using AWS.jl on Julia 1.0 or 1.1? It seems that AWS.jl is no longer supported by these two versions. Can we fix this or do we have other alternatives? I’m using AWS to save user-uploaded files via a brows…

---

## [Linear interpolation to find a GPS location (latitude, longitude) between two given GPS locations (latitudes, longitudes) using Julia](https://discourse.julialang.org/t/linear-interpolation-to-find-a-gps-location-latitude-longitude-between-two-given-gps-locations-latitudes-longitudes-using-julia/24858)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 8\
**Last updated:** [June 12, 2019, 12:48am UTC](https://discourse.julialang.org/t/linear-interpolation-to-find-a-gps-location-latitude-longitude-between-two-given-gps-locations-latitudes-longitudes-using-julia/24858 "2019-06-12T00:48:02Z")

</div>

I know how to do the following basic algebra calculation to find the y-value, say y\_0 of a intermediate point corresponding to a given t\_0 in a straight line from point (t\_1, y\_1) to (t\_2, y\_2). My question is, does it m…

---

## [Range vs. Array](https://discourse.julialang.org/t/range-vs-array/25171)

<div class="topic-metadata">

**Author:** [@mroavi](https://discourse.julialang.org/u/mroavi)\
**Replies:** 2\
**Last updated:** [June 12, 2019, 12:19am UTC](https://discourse.julialang.org/t/range-vs-array/25171 "2019-06-12T00:19:10Z")

</div>

I would like to understand why the two statements below generate different results. I was expecting both results to be the same (equal to the one produced by the second statement). I’m running Julia Version 1.1.0 (2019-0…

---

## [3D Annotation Rotation](https://discourse.julialang.org/t/3d-annotation-rotation/25164)

<div class="topic-metadata">

**Author:** [@isamuelsson](https://discourse.julialang.org/u/isamuelsson)\
**Replies:** 0\
**Last updated:** [June 11, 2019, 7:18pm UTC](https://discourse.julialang.org/t/3d-annotation-rotation/25164 "2019-06-11T19:18:10Z")

</div>

Hi I am trying to find a way to annotate numbers that rotate/stay with the markers on my plot. Currently all the annotate functions I have found either do not rotate with the markers or do not allow for a 3rd dimension t…

---

## [DifferentialEquations & inputs](https://discourse.julialang.org/t/differentialequations-inputs/25157)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 2\
**Last updated:** [June 11, 2019, 6:18pm UTC](https://discourse.julialang.org/t/differentialequations-inputs/25157 "2019-06-11T18:18:01Z")

</div>

I’m trying to figure out the best way to pose a (control) system model of form: \\frac{dx}{dt} = f(x,u,t;\\theta) and use this model with DifferentialEquations. The “problem” is to merge two contradicting constraints: …

---

## [How to convert a string that contains timezone to DateTime?](https://discourse.julialang.org/t/how-to-convert-a-string-that-contains-timezone-to-datetime/25120)

<div class="topic-metadata">

**Author:** [@jayce\_ram](https://discourse.julialang.org/u/jayce_ram)\
**Replies:** 3\
**Last updated:** [June 11, 2019, 4:05pm UTC](https://discourse.julialang.org/t/how-to-convert-a-string-that-contains-timezone-to-datetime/25120 "2019-06-11T16:05:31Z")

</div>

I have a huge csv file (\>60 millions of lines) that contains a column with date time associated. These data are seen by Julia as string and they are formatted like that: "2019-01-23T04:30:00+01:00" I have read the docu…

---

## ["literals" in Julia: "immutable values known at compile times"?](https://discourse.julialang.org/t/literals-in-julia-immutable-values-known-at-compile-times/25145)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 2\
**Last updated:** [June 11, 2019, 1:09pm UTC](https://discourse.julialang.org/t/literals-in-julia-immutable-values-known-at-compile-times/25145 "2019-06-11T13:09:20Z")

</div>

Would be correct to say that literals in Julia are “immutable values known at compile times” ?

---

## [Parsing expressions into functions](https://discourse.julialang.org/t/parsing-expressions-into-functions/25108)

<div class="topic-metadata">

**Author:** [@JesseSantoso](https://discourse.julialang.org/u/JesseSantoso)\
**Replies:** 22\
**Last updated:** [June 11, 2019, 9:17am UTC](https://discourse.julialang.org/t/parsing-expressions-into-functions/25108 "2019-06-11T09:17:17Z")

</div>

Hi, I’m relatively new to Julia but feel like I’m mostly getting the hang of it. I have a project where I need to parse a large number of arbitrary expressions (e.g. ax^b, a+bx^2, etc.) into a function, but I’m running …

---

## [JuliaDB: convert a Int (0,1) column to Boolean](https://discourse.julialang.org/t/juliadb-convert-a-int-0-1-column-to-boolean/25124)

<div class="topic-metadata">

**Author:** [@GdMacmillan](https://discourse.julialang.org/u/GdMacmillan)\
**Replies:** 2\
**Last updated:** [June 10, 2019, 11:33pm UTC](https://discourse.julialang.org/t/juliadb-convert-a-int-0-1-column-to-boolean/25124 "2019-06-10T23:33:38Z")

</div>

Hi, pretty straightforward question here: How would I go about converting a JuliaDB table column of type Int64 to Boolean values so I can run counts… I was thinking something like select(t, :is\_bad =\> convert) but conv…

---

## [Help with .travis.yml](https://discourse.julialang.org/t/help-with-travis-yml/25017)

<div class="topic-metadata">

**Author:** [@goedman](https://discourse.julialang.org/u/goedman)\
**Replies:** 4\
**Last updated:** [June 10, 2019, 8:35pm UTC](https://discourse.julialang.org/t/help-with-travis-yml/25017 "2019-06-10T20:35:17Z")

</div>

For several years I’ve been testing Cmdstan.jl (previously Stan.jl) with a script like below. I updated building the docs mid last year and attempted to use stages, with limited success, but at least early on below scrip…

---

## [V1.0 Pkg - Can't copy packages](https://discourse.julialang.org/t/v1-0-pkg-cant-copy-packages/18764)

<div class="topic-metadata">

**Author:** [@Glen1](https://discourse.julialang.org/u/Glen1)\
**Replies:** 8\
**Last updated:** [June 10, 2019, 8:23pm UTC](https://discourse.julialang.org/t/v1-0-pkg-cant-copy-packages/18764 "2019-06-10T20:23:15Z")

</div>

I’m so frustrated. We’ve implemented our whole production environment in Julia and working really well, but can’t get v1.0 packages working. We are behind a firewall, so can’t add/download packages, so I currently have…

---

## [Sundials.jl --\> LoadError: TypeError: in cfunction, expected Union{}, got Int32](https://discourse.julialang.org/t/sundials-jl-loaderror-typeerror-in-cfunction-expected-union-got-int32/25059)

<div class="topic-metadata">

**Author:** [@Boris\_Penaloza](https://discourse.julialang.org/u/Boris_Penaloza)\
**Replies:** 2\
**Last updated:** [June 10, 2019, 5:54pm UTC](https://discourse.julialang.org/t/sundials-jl-loaderror-typeerror-in-cfunction-expected-union-got-int32/25059 "2019-06-10T17:54:41Z")

</div>

Hello guys, I am trying to solve a ODE using the CVODE\_BDF() solver of the Sundials package. Here is a snippet of my code: Defining the function function f(dX, X, p, t) #A, B, D, E, Inh = p #dX = -A\*X + (B - X)\*E - (…

---

## [Invalid escape sequence](https://discourse.julialang.org/t/invalid-escape-sequence/19805)

<div class="topic-metadata">

**Author:** [@S.stark](https://discourse.julialang.org/u/S.stark)\
**Replies:** 1\
**Last updated:** [June 10, 2019, 12:52pm UTC](https://discourse.julialang.org/t/invalid-escape-sequence/19805 "2019-06-10T12:52:59Z")

</div>

I’m studying Genie from the example in GitHub - GenieFramework/Genie.jl: 🧞The highly productive Julia web framework When I was trying connect SearchLight to DB, using the following command: julia\> SearchLight.Configura…

---

## [Precompiling Makie on Windows](https://discourse.julialang.org/t/precompiling-makie-on-windows/25112)

<div class="topic-metadata">

**Author:** [@dawbarton](https://discourse.julialang.org/u/dawbarton)\
**Replies:** 3\
**Last updated:** [June 10, 2019, 10:44am UTC](https://discourse.julialang.org/t/precompiling-makie-on-windows/25112 "2019-06-10T10:44:52Z")

</div>

Is it possible to precompile Makie on Windows? I’ve just tried on my Linux machine and it works perfectly but on Windows I get an error about “Task cannot be serialized”; see below for the output \<\<\<snip\>\>\> Test Summary…

---

## [Filling arrays in rows](https://discourse.julialang.org/t/filling-arrays-in-rows/25097)

<div class="topic-metadata">

**Author:** [@STHossain](https://discourse.julialang.org/u/STHossain)\
**Replies:** 4\
**Last updated:** [June 9, 2019, 6:25pm UTC](https://discourse.julialang.org/t/filling-arrays-in-rows/25097 "2019-06-09T18:25:33Z")

</div>

Hi, Could someone please help me to figure out how a matrix could be filled in rows. So if I give some numbers with dimension then they would form a 2 dimensional array but it will start filling from the first row, the…

---

## [How to read big data chunk by chunk(column-wise chunking)?](https://discourse.julialang.org/t/how-to-read-big-data-chunk-by-chunk-column-wise-chunking/25084)

<div class="topic-metadata">

**Author:** [@Carol](https://discourse.julialang.org/u/Carol)\
**Replies:** 5\
**Last updated:** [June 9, 2019, 4:53pm UTC](https://discourse.julialang.org/t/how-to-read-big-data-chunk-by-chunk-column-wise-chunking/25084 "2019-06-09T16:53:43Z")

</div>

Hi, could you please tell me how to read data chunk by chunk? For example, read 100 columns at one time, like: sub\_data=read\_data(file, start\_column=1,end\_column=100) After n-iteration, I can process all of my 100n co…

---

## [Rank of admission and subtraction](https://discourse.julialang.org/t/rank-of-admission-and-subtraction/25065)

<div class="topic-metadata">

**Author:** [@GERSON\_EZEQUIEL\_HERN](https://discourse.julialang.org/u/GERSON_EZEQUIEL_HERN)\
**Replies:** 3\
**Last updated:** [June 9, 2019, 11:17am UTC](https://discourse.julialang.org/t/rank-of-admission-and-subtraction/25065 "2019-06-09T11:17:59Z")

</div>

How could you define the range in admission and subtraction over an image? enter (0-255) without going past 255 or reducing me from 0. my code is something like this … #= admiminsion and subtracion =# R₁ = float.(imgg…

---

## [Counting number of times a RNG is called](https://discourse.julialang.org/t/counting-number-of-times-a-rng-is-called/24903)

<div class="topic-metadata">

**Author:** [@MFairley](https://discourse.julialang.org/u/MFairley)\
**Replies:** 22\
**Last updated:** [June 9, 2019, 8:11am UTC](https://discourse.julialang.org/t/counting-number-of-times-a-rng-is-called/24903 "2019-06-09T08:11:32Z")

</div>

Hi, I’m trying to measure the number of random numbers generated by a Monte Carlo estimator for a given level of precision. Is there an easy way I could do this? I would like to do something like: rng = MersenneTwiste…

---

## [How to \`promote\_type\` of more than 2 values?](https://discourse.julialang.org/t/how-to-promote-type-of-more-than-2-values/25088)

<div class="topic-metadata">

**Author:** [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Replies:** 3\
**Last updated:** [June 9, 2019, 5:12am UTC](https://discourse.julialang.org/t/how-to-promote-type-of-more-than-2-values/25088 "2019-06-09T05:12:19Z")

</div>

For example, I have 4 numbers 1, 2, 3, 4.0, and I want to get their promoted type. What should I do? I currently have two ways of writing julia\> promote\_type(map(typeof, promote(1, 2, 3, 4.0))...) Float64 or julia\> el…

---

## [Automatic Threshold image](https://discourse.julialang.org/t/automatic-threshold-image/25028)

<div class="topic-metadata">

**Author:** [@GERSON\_EZEQUIEL\_HERN](https://discourse.julialang.org/u/GERSON_EZEQUIEL_HERN)\
**Replies:** 14\
**Last updated:** [June 9, 2019, 2:50am UTC](https://discourse.julialang.org/t/automatic-threshold-image/25028 "2019-06-09T02:50:09Z")

</div>

How can I do the process … This is my code. I’m working in Juno. using ImageContrastAdjustment, Images, ImageFiltering, TestImages, ColorTypes, HistogramThresholding const ICA = ImageContrastAdjustment function exam…

---

## [Setting the "color scale" in Plots](https://discourse.julialang.org/t/setting-the-color-scale-in-plots/6373)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon](https://discourse.julialang.org/u/Philippe_Maincon)\
**Replies:** 16\
**Last updated:** [June 8, 2019, 7:03pm UTC](https://discourse.julialang.org/t/setting-the-color-scale-in-plots/6373 "2019-06-08T19:03:58Z")

</div>

Hi, A question about Plots.jl. The “contour” plot below (actually representing a scalar field by colors), works as it says on the packaging. using Plots;gr(size=(2000,1000)) x = y = linspace(0,1,51) p2 = plot(x,y,(…

---

## [What exactly is the meaning of this one line code written in Julia?](https://discourse.julialang.org/t/what-exactly-is-the-meaning-of-this-one-line-code-written-in-julia/24185)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 3\
**Last updated:** [May 13, 2019, 7:29pm UTC](https://discourse.julialang.org/t/what-exactly-is-the-meaning-of-this-one-line-code-written-in-julia/24185 "2019-05-13T19:29:54Z")

</div>

findlast(e -\> e.time \>= event.time, eventList) I understand that the findlast(A) function will return the index or key of the last true value in A. It will return nothing if there is no true value in A. What I do not q…

---

## [PlotlyJS : File save error（.eps）](https://discourse.julialang.org/t/plotlyjs-file-save-error-eps/25075)

<div class="topic-metadata">

**Author:** [@FujiwaraTakumiEH](https://discourse.julialang.org/u/FujiwaraTakumiEH)\
**Replies:** 0\
**Last updated:** [June 8, 2019, 2:28pm UTC](https://discourse.julialang.org/t/plotlyjs-file-save-error-eps/25075 "2019-06-08T14:28:15Z")

</div>

I am getting an error when I try to save the generated image to .eps format,code show as below: using PlotlyJS using ORCA function Draw() X=\[0, 1, 2, 0\] Y=\[0, 0, 1, 0\] Z=\[0, 2, 0, 0\] trace1 = scatter3d(;x=X,y=Y,…

---

## [Personal StdLibs](https://discourse.julialang.org/t/personal-stdlibs/25058)

<div class="topic-metadata">

**Author:** [@louisponet](https://discourse.julialang.org/u/louisponet)\
**Replies:** 6\
**Last updated:** [June 8, 2019, 12:04pm UTC](https://discourse.julialang.org/t/personal-stdlibs/25058 "2019-06-08T12:04:55Z")

</div>

Hi All, Having written a couple of Julia programs and working on some packages, I’ve started to group things I use very often and find handy into my personal (local) StdLib or whatever you want to call it. I assume tha…

---

## [Elseif, ellse, why read(stdin,Char) not works in Julia 0.7?](https://discourse.julialang.org/t/elseif-ellse-why-read-stdin-char-not-works-in-julia-0-7/25069)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 2\
**Last updated:** [June 8, 2019, 11:13am UTC](https://discourse.julialang.org/t/elseif-ellse-why-read-stdin-char-not-works-in-julia-0-7/25069 "2019-06-08T11:13:45Z")

</div>

Why not works else take() after enter ‘s’ to take() function take() global agreement=read(stdin,Char) end take() s if agreement=='y' ; elseif agreement=='n' ; else take() end

---

## [Why the println line is multiplaying?](https://discourse.julialang.org/t/why-the-println-line-is-multiplaying/25072)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 1\
**Last updated:** [June 8, 2019, 10:46am UTC](https://discourse.julialang.org/t/why-the-println-line-is-multiplaying/25072 "2019-06-08T10:46:41Z")

</div>

Julia display 3 times the same lines. Why ? What wrong? zgoda='o' while (!(zgoda=='y' || zgoda=='n' || zgoda=='Y' || zgoda=='N')); println("Reported missings? enter 'y' or 'n' end press ENTER"); global zgoda=read(stdin,…

---

## [How to avoid Any in list comprehensions with small unions](https://discourse.julialang.org/t/how-to-avoid-any-in-list-comprehensions-with-small-unions/25070)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 5\
**Last updated:** [June 8, 2019, 10:19am UTC](https://discourse.julialang.org/t/how-to-avoid-any-in-list-comprehensions-with-small-unions/25070 "2019-06-08T10:19:26Z")

</div>

Hi all- I have a situation where I want to generate one of two types of arrays from a list comprehension. In the simplest case, all of the elements are Float64. This is straightforward and always works. In the other cas…

---

## [How to use SemVer with Julia?](https://discourse.julialang.org/t/how-to-use-semver-with-julia/25049)

<div class="topic-metadata">

**Author:** [@mrkaspa](https://discourse.julialang.org/u/mrkaspa)\
**Replies:** 1\
**Last updated:** [June 7, 2019, 3:16pm UTC](https://discourse.julialang.org/t/how-to-use-semver-with-julia/25049 "2019-06-07T15:16:54Z")

</div>

How can I add a package from a specific version to Julia, in my Project.toml looks like I only bind it to an specific commit \[deps\] Distributions = “31c24e10-a181-5473-b8eb-7969acd0382f” JSON = “682c06a0-de6a-54ab-a14…

---

## [Allocations reported by \`@time\`](https://discourse.julialang.org/t/allocations-reported-by-time/25032)

<div class="topic-metadata">

**Author:** [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Replies:** 4\
**Last updated:** [June 7, 2019, 2:53pm UTC](https://discourse.julialang.org/t/allocations-reported-by-time/25032 "2019-06-07T14:53:08Z")

</div>

I am confused by the following results of @time. I understand that the first call contains compilation overhead. But why is the second call allocate much more then the third? julia\> mutable struct M{T}; inner::T; end j…

[Previous page](https://discourse.julialang.org/c/usage/6.md?page=857)

[Next page](https://discourse.julialang.org/c/usage/6.md?page=859)
