# General Usage

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

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

**Page:** 863

---

## [How to plot in different notebooks in Jupyter?](https://discourse.julialang.org/t/how-to-plot-in-different-notebooks-in-jupyter/24662)

<div class="topic-metadata">

**Author:** [@PabloBME](https://discourse.julialang.org/u/PabloBME)\
**Replies:** 1\
**Last updated:** [May 27, 2019, 8:50pm UTC](https://discourse.julialang.org/t/how-to-plot-in-different-notebooks-in-jupyter/24662 "2019-05-27T20:50:45Z")

</div>

I’m new and I’m learning Julia in Jupyter. I took this code from the internet to start plotting and it worked perfectly: using Pkg Pkg.add(“PyPlot”) using PyPlot x = range(0,stop=2pi,length=1000); y = sin.(3x + 4c…

---

## [Concerning parametric types only present in keyword arguments](https://discourse.julialang.org/t/concerning-parametric-types-only-present-in-keyword-arguments/24632)

<div class="topic-metadata">

**Author:** [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Replies:** 5\
**Last updated:** [May 27, 2019, 7:29pm UTC](https://discourse.julialang.org/t/concerning-parametric-types-only-present-in-keyword-arguments/24632 "2019-05-27T19:29:56Z")

</div>

The code excerpts are MREs. I wrote the following method: f(a :: T; b :: S = zero(S)) where {T, S} = convert(S, a) + b It is kinda obvious in hindsight it should not have worked (maybe not even allowed to exist): \> …

---

## [Weave how to print markdown in for loop?](https://discourse.julialang.org/t/weave-how-to-print-markdown-in-for-loop/24643)

<div class="topic-metadata">

**Author:** [@Wikunia](https://discourse.julialang.org/u/Wikunia)\
**Replies:** 6\
**Last updated:** [May 27, 2019, 10:30am UTC](https://discourse.julialang.org/t/weave-how-to-print-markdown-in-for-loop/24643 "2019-05-27T10:30:07Z")

</div>

I currently trying to use GitHub - JunoLab/Weave.jl: Scientific reports/literate programming for Julia but not really getting my head around its usage. In general I need more examples of the usage of julia markdown. My…

---

## [Debugging with Juno (multiple restarts necessary to make code changes debuggable)](https://discourse.julialang.org/t/debugging-with-juno-multiple-restarts-necessary-to-make-code-changes-debuggable/24427)

<div class="topic-metadata">

**Author:** [@Volker](https://discourse.julialang.org/u/Volker)\
**Replies:** 8\
**Last updated:** [May 27, 2019, 10:25am UTC](https://discourse.julialang.org/t/debugging-with-juno-multiple-restarts-necessary-to-make-code-changes-debuggable/24427 "2019-05-27T10:25:48Z")

</div>

Hello, I use Julia v1.1, Atom 1.37.0 x64, Juno 0.8.3. under Windows 10. Sometimes when try to debug my code Juno doesn´t recognize my code or the code changes I have made. So that I have to restart Julia relatively oft…

---

## [What is the meaning of Base.Order.ForwardOrdering?](https://discourse.julialang.org/t/what-is-the-meaning-of-base-order-forwardordering/24640)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 1\
**Last updated:** [May 27, 2019, 8:14am UTC](https://discourse.julialang.org/t/what-is-the-meaning-of-base-order-forwardordering/24640 "2019-05-27T08:14:31Z")

</div>

In my task, I need to write code to create a mutable struct with name Si, which has an attribute with name eventQueue, which is of type PriorityQueue. After playing with the code, the following works out well. using Dat…

---

## [Evaluation speed during debugging](https://discourse.julialang.org/t/evaluation-speed-during-debugging/24520)

<div class="topic-metadata">

**Author:** [@Volker](https://discourse.julialang.org/u/Volker)\
**Replies:** 13\
**Last updated:** [May 27, 2019, 7:49am UTC](https://discourse.julialang.org/t/evaluation-speed-during-debugging/24520 "2019-05-27T07:49:18Z")

</div>

Hello, During debugging with Julia v1.1, Atom 1.37.0 x64, Juno 0.8.3 and the latest Rebugger,Debugger, Revise and JulianInterpreter packages. I have noticed that a snippet of my code takes really long (several minutes) …

---

## [Call function every N seconds](https://discourse.julialang.org/t/call-function-every-n-seconds/24611)

<div class="topic-metadata">

**Author:** [@dfdx](https://discourse.julialang.org/u/dfdx)\
**Replies:** 10\
**Last updated:** [May 26, 2019, 11:02pm UTC](https://discourse.julialang.org/t/call-function-every-n-seconds/24611 "2019-05-26T23:02:40Z")

</div>

In Julia 1.x, is there a way to call a function every N seconds? Some details: reasonable delays in function calls are ok no task cooperation can be assumed, caller is allowed to run entirely within a single task witho…

---

## [Matching method argument types in Macro](https://discourse.julialang.org/t/matching-method-argument-types-in-macro/24626)

<div class="topic-metadata">

**Author:** [@fraxx001](https://discourse.julialang.org/u/fraxx001)\
**Replies:** 3\
**Last updated:** [May 26, 2019, 10:58pm UTC](https://discourse.julialang.org/t/matching-method-argument-types-in-macro/24626 "2019-05-26T22:58:05Z")

</div>

Iam trying to build a macro for chaining operations which works like follow: @chain vec |\> map(x -\> x^2) |\> reduce(+, 0) |\> first(6) The macro should be able to paste the result of the evaluation of a chain element int…

---

## [Starting Juliavia bat file with new var ? C:\\Users\\PC\\AppData\\Local\\Julia-0.7.0\\bin\\julia.exe -E, a=5?](https://discourse.julialang.org/t/starting-juliavia-bat-file-with-new-var-c-users-pc-appdata-local-julia-0-7-0-bin-julia-exe-e-a-5/24609)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 0\
**Last updated:** [May 25, 2019, 7:14pm UTC](https://discourse.julialang.org/t/starting-juliavia-bat-file-with-new-var-c-users-pc-appdata-local-julia-0-7-0-bin-julia-exe-e-a-5/24609 "2019-05-25T19:14:59Z")

</div>

Win I am starting Julia by bat file included: C:\\Users\\PC\\AppData\\Local\\Julia-0.7.0\\bin\\julia.exe Is OK Now I need on the start from operating send any var i.e a=5 anyway … I find switcher E. C:\\Users\\PC\\AppData\\Loc…

---

## [Avoid intermediate arrays in reduction of broadcast](https://discourse.julialang.org/t/avoid-intermediate-arrays-in-reduction-of-broadcast/24608)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 11\
**Last updated:** [May 25, 2019, 6:48pm UTC](https://discourse.julialang.org/t/avoid-intermediate-arrays-in-reduction-of-broadcast/24608 "2019-05-25T18:48:38Z")

</div>

I have some code that looks like this: A = randn(5,4,2) B = randn(5,1,1) C = zeros(5,4,1) sum!(C, A .\* B) # avoid forming \`A.\*B\` ? Is there a simple way to avoid forming the intermediate array A.\*B? I was looking into…

---

## [How to create a priority queue with a certain type of key and priority?](https://discourse.julialang.org/t/how-to-create-a-priority-queue-with-a-certain-type-of-key-and-priority/24604)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 1\
**Last updated:** [May 25, 2019, 4:47pm UTC](https://discourse.julialang.org/t/how-to-create-a-priority-queue-with-a-certain-type-of-key-and-priority/24604 "2019-05-25T16:47:24Z")

</div>

mutable struct Event time::Float64 Event = new(-1.0) end create a priority queue with keys of type Event and priorities of type Float64 pq = PriorityQueue(Event, Float64) Then, I got the following error. "Me…

---

## [How much of a difference does avoiding allocations make?](https://discourse.julialang.org/t/how-much-of-a-difference-does-avoiding-allocations-make/24585)

<div class="topic-metadata">

**Author:** [@jules](https://discourse.julialang.org/u/jules)\
**Replies:** 15\
**Last updated:** [May 25, 2019, 1:44pm UTC](https://discourse.julialang.org/t/how-much-of-a-difference-does-avoiding-allocations-make/24585 "2019-05-25T13:44:16Z")

</div>

I was wondering how much use it is to try and prohibit allocations in different scenarios. One case that came to mind was taking the median of many equally sized arrays. I was doing this with an array of arrays: medians…

---

## [CSV mmap error when parsing large file](https://discourse.julialang.org/t/csv-mmap-error-when-parsing-large-file/24555)

<div class="topic-metadata">

**Author:** [@greg\_plowman](https://discourse.julialang.org/u/greg_plowman)\
**Replies:** 6\
**Last updated:** [May 25, 2019, 10:43am UTC](https://discourse.julialang.org/t/csv-mmap-error-when-parsing-large-file/24555 "2019-05-25T10:43:42Z")

</div>

I’m trying to read a large csv file, one row at a time. I want to do something like: using CSV csvFile = CSV.File(infile) for row in csvFile # do stuff with row end However, on Windows 10, Julia v1.1.1, I’m gettin…

---

## [Build errors at CI](https://discourse.julialang.org/t/build-errors-at-ci/24595)

<div class="topic-metadata">

**Author:** [@leiteiro](https://discourse.julialang.org/u/leiteiro)\
**Replies:** 3\
**Last updated:** [May 25, 2019, 8:03am UTC](https://discourse.julialang.org/t/build-errors-at-ci/24595 "2019-05-25T08:03:12Z")

</div>

Since Julia 1.1.1 the builds on appveyor and travis don’t work. For example on appveyor the build yields: Build started git clone -q --branch=master … git checkout -qf … Running Install scripts iex ((new-object net…

---

## [Appearance of log axis in Plots](https://discourse.julialang.org/t/appearance-of-log-axis-in-plots/24553)

<div class="topic-metadata">

**Author:** [@Nathaniel](https://discourse.julialang.org/u/Nathaniel)\
**Replies:** 5\
**Last updated:** [May 25, 2019, 7:13am UTC](https://discourse.julialang.org/t/appearance-of-log-axis-in-plots/24553 "2019-05-25T07:13:31Z")

</div>

In Plots, using xaxis=:log, I get evenly spaced tick marks, like this: However, in my case I would much prefer unevenly spaced tickmarks representing uniform intervals, as in this image generated with matplotlib: I…

---

## [Complicated type question](https://discourse.julialang.org/t/complicated-type-question/24582)

<div class="topic-metadata">

**Author:** [@atteson](https://discourse.julialang.org/u/atteson)\
**Replies:** 1\
**Last updated:** [May 25, 2019, 6:38am UTC](https://discourse.julialang.org/t/complicated-type-question/24582 "2019-05-25T06:38:20Z")

</div>

I’d like to define some types similar to the following simplified types. However, since T3’s type is determined by U, I’d rather not have to specify T when writing its type. Is there a way to do this? abstract type T1…

---

## [Randomly generate a GPS location in WGS 84 format from China?](https://discourse.julialang.org/t/randomly-generate-a-gps-location-in-wgs-84-format-from-china/24579)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 3\
**Last updated:** [May 24, 2019, 10:02pm UTC](https://discourse.julialang.org/t/randomly-generate-a-gps-location-in-wgs-84-format-from-china/24579 "2019-05-24T22:02:50Z")

</div>

Hi, this is not exactly a Julia question I guess. But I really like this forum. So I post it here. I was wondering, how to randomly generate a GPS location from China in WGS 84 format? I guess we will need to find the ra…

---

## [Unexpected behavior with multiple processors and @everywhere in for loop](https://discourse.julialang.org/t/unexpected-behavior-with-multiple-processors-and-everywhere-in-for-loop/24589)

<div class="topic-metadata">

**Author:** [@omalled](https://discourse.julialang.org/u/omalled)\
**Replies:** 0\
**Last updated:** [May 24, 2019, 9:50pm UTC](https://discourse.julialang.org/t/unexpected-behavior-with-multiple-processors-and-everywhere-in-for-loop/24589 "2019-05-24T21:50:04Z")

</div>

I’m running into an issue that I can’t wrap my head around. Here’s a MWE reduced from a more complex code: i = 0 for j = 1:2 global i i = j @show :before, myid(), i @everywhere i = remotecall\_fetch(()-\>i, 1) @show …

---

## [1.1.1 - sporadic "\<varname\>" not defined](https://discourse.julialang.org/t/1-1-1-sporadic-varname-not-defined/24580)

<div class="topic-metadata">

**Author:** [@BioTurboNick](https://discourse.julialang.org/u/BioTurboNick)\
**Replies:** 3\
**Last updated:** [May 24, 2019, 6:41pm UTC](https://discourse.julialang.org/t/1-1-1-sporadic-varname-not-defined/24580 "2019-05-24T18:41:01Z")

</div>

I’m getting a sporadic \<varname\> not defined error on 1.1.1 for one of my workspace variables. The next time I run the command it typically executes as expected. I recall there being an earlier sporadic issue where ther…

---

## [Nested QuadGK: Long compilation time gets short when plotting the argument beforehand, but not when calling it](https://discourse.julialang.org/t/nested-quadgk-long-compilation-time-gets-short-when-plotting-the-argument-beforehand-but-not-when-calling-it/24519)

<div class="topic-metadata">

**Author:** [@alpharho](https://discourse.julialang.org/u/alpharho)\
**Replies:** 2\
**Last updated:** [May 24, 2019, 3:34pm UTC](https://discourse.julialang.org/t/nested-quadgk-long-compilation-time-gets-short-when-plotting-the-argument-beforehand-but-not-when-calling-it/24519 "2019-05-24T15:34:57Z")

</div>

Hey everyone, I stumbled upon a weird behaviour of compilation time. I have the following function definitions: using QuadGK …

---

## [PackageCompiler error](https://discourse.julialang.org/t/packagecompiler-error/24570)

<div class="topic-metadata">

**Author:** [@Maxim\_Chase](https://discourse.julialang.org/u/Maxim_Chase)\
**Replies:** 2\
**Last updated:** [May 24, 2019, 2:35pm UTC](https://discourse.julialang.org/t/packagecompiler-error/24570 "2019-05-24T14:35:02Z")

</div>

Hi guys! I’m a newbie in Julia, and I have a question. While building PackageCompiler I received this error Error building PackageCompiler LoadError: Package candidate for gcc not found. Any suggestions? What I actually …

---

## [1.1.1 upgrade, JLD2, and a cascade of errors](https://discourse.julialang.org/t/1-1-1-upgrade-jld2-and-a-cascade-of-errors/24540)

<div class="topic-metadata">

**Author:** [@BioTurboNick](https://discourse.julialang.org/u/BioTurboNick)\
**Replies:** 3\
**Last updated:** [May 24, 2019, 2:23pm UTC](https://discourse.julialang.org/t/1-1-1-upgrade-jld2-and-a-cascade-of-errors/24540 "2019-05-24T14:23:32Z")

</div>

I installed 1.1.1 for use in Juno and updated the Atom packages, then tried to bring my packages in. When I added JLD2.jl, after it updated WeakRefStrings to 0.6.1, I got an ArgumentError: Package Reexport not found in c…

---

## [Save variable to variable name](https://discourse.julialang.org/t/save-variable-to-variable-name/24565)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 1\
**Last updated:** [May 24, 2019, 1:15pm UTC](https://discourse.julialang.org/t/save-variable-to-variable-name/24565 "2019-05-24T13:15:28Z")

</div>

Giving up… I have a bunch of JulaiDB tables and I want to save them. To avoid zipping through a list of their variables and an irritatingly similar list of the variables’ names, I’d like to solve this with metaprogrammi…

---

## [DynamicHMC: multivariate normal loglikelihood?](https://discourse.julialang.org/t/dynamichmc-multivariate-normal-loglikelihood/24505)

<div class="topic-metadata">

**Author:** [@mcreel](https://discourse.julialang.org/u/mcreel)\
**Replies:** 10\
**Last updated:** [May 24, 2019, 11:30am UTC](https://discourse.julialang.org/t/dynamichmc-multivariate-normal-loglikelihood/24505 "2019-05-24T11:30:34Z")

</div>

I have a simple example working with a univariate normal loglikelihood, but I am having trouble extending it to multivariate normal. I am implementing simulated moments, with the asymptotic Gaussian distribution used to …

---

## [Interesting micro-benchmark](https://discourse.julialang.org/t/interesting-micro-benchmark/24529)

<div class="topic-metadata">

**Author:** [@purplishrock](https://discourse.julialang.org/u/purplishrock)\
**Replies:** 8\
**Last updated:** [May 24, 2019, 10:52am UTC](https://discourse.julialang.org/t/interesting-micro-benchmark/24529 "2019-05-24T10:52:59Z")

</div>

The data set i’m processing is organized in chunks, and each chunk is variable length, and i have to filter over all the chunks and create a set of data for several categories. i noticed that my program was starting to …

---

## [Problem Installing ZMQ as part of IJulia](https://discourse.julialang.org/t/problem-installing-zmq-as-part-of-ijulia/24560)

<div class="topic-metadata">

**Author:** [@JP\_91](https://discourse.julialang.org/u/JP_91)\
**Replies:** 0\
**Last updated:** [May 24, 2019, 10:38am UTC](https://discourse.julialang.org/t/problem-installing-zmq-as-part-of-ijulia/24560 "2019-05-24T10:38:05Z")

</div>

Hi. I am having problems installing ZMQ when I try to install IJulia. I am working on windows 7 with julia 1.1.0. I get the following error: Dropbox - Error\_IJulia.png - Simplify your life. In advance, thank you for your…

---

## [Macro: escaping, interpolation, scope etc](https://discourse.julialang.org/t/macro-escaping-interpolation-scope-etc/24408)

<div class="topic-metadata">

**Author:** [@samo](https://discourse.julialang.org/u/samo)\
**Replies:** 7\
**Last updated:** [May 24, 2019, 10:02am UTC](https://discourse.julialang.org/t/macro-escaping-interpolation-scope-etc/24408 "2019-05-24T10:02:26Z")

</div>

I would like to achieve something along the following lines: when I write @all(A), it should replace it with A\[ix,iy,iz\] in the caller’s scope (ix, iy and iz are defined in the caller’s scope). So, I wrote the followin…

---

## [Using PackageCompiler to create a custom system image](https://discourse.julialang.org/t/using-packagecompiler-to-create-a-custom-system-image/24528)

<div class="topic-metadata">

**Author:** [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Replies:** 11\
**Last updated:** [May 24, 2019, 2:20am UTC](https://discourse.julialang.org/t/using-packagecompiler-to-create-a-custom-system-image/24528 "2019-05-24T02:20:14Z")

</div>

Hi guys, I need help to create a custom system image Using PackageCompiler. I need to build a system image with a package bundled. The idea is to send this system image to another person that will be able to use my pack…

---

## [Access variable inside of a funciton from another function](https://discourse.julialang.org/t/access-variable-inside-of-a-funciton-from-another-function/24268)

<div class="topic-metadata">

**Author:** [@orange\_si](https://discourse.julialang.org/u/orange_si)\
**Replies:** 10\
**Last updated:** [May 24, 2019, 1:15am UTC](https://discourse.julialang.org/t/access-variable-inside-of-a-funciton-from-another-function/24268 "2019-05-24T01:15:40Z")

</div>

hello, everyone, I have a question about how to access local variable of a funciton in another funciton, my code is like this: function FA() name = "world" return "hello" end function FB(f::Function) printl…

---

## [Some project already done in Julia about image processing](https://discourse.julialang.org/t/some-project-already-done-in-julia-about-image-processing/24533)

<div class="topic-metadata">

**Author:** [@GERSON\_EZEQUIEL\_HERN](https://discourse.julialang.org/u/GERSON_EZEQUIEL_HERN)\
**Replies:** 1\
**Last updated:** [May 23, 2019, 8:38pm UTC](https://discourse.julialang.org/t/some-project-already-done-in-julia-about-image-processing/24533 "2019-05-23T20:38:37Z")

</div>

someone could help me or could you provide me with a project that has to do with recognition of patterns in images working in Julia. Help me…!!

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

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