# General Usage

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

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

**Page:** 409

---

## [Good guide to setting up a reproducible julia project?](https://discourse.julialang.org/t/good-guide-to-setting-up-a-reproducible-julia-project/85848)

<div class="topic-metadata">

**Author:** [@NHDaly](https://discourse.julialang.org/u/NHDaly)\
**Replies:** 12\
**Last updated:** [August 17, 2022, 12:35am UTC](https://discourse.julialang.org/t/good-guide-to-setting-up-a-reproducible-julia-project/85848 "2022-08-17T00:35:54Z")

</div>

Hello, I was looking for a good guide on how to set up a new julia project/application, so that it is reproducible, and stays up to date with its dependencies. My coworkers were setting up a new julia project, and I co…

---

## [Package compiler errors with "system image too large" message](https://discourse.julialang.org/t/package-compiler-errors-with-system-image-too-large-message/85849)

<div class="topic-metadata">

**Author:** [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Replies:** 0\
**Last updated:** [August 16, 2022, 10:46pm UTC](https://discourse.julialang.org/t/package-compiler-errors-with-system-image-too-large-message/85849 "2022-08-16T22:46:53Z")

</div>

Trying to create a sysimage using vscode build task. This has worked forever but today cannot get it to compile. It returns a “system image too large” error message. Anybody else having this problem? Version InfoVSCode…

---

## [For loop : mixing iterator with argument of a function](https://discourse.julialang.org/t/for-loop-mixing-iterator-with-argument-of-a-function/85846)

<div class="topic-metadata">

**Author:** [@Julia\_fun\_123](https://discourse.julialang.org/u/Julia_fun_123)\
**Replies:** 4\
**Last updated:** [August 16, 2022, 9:56pm UTC](https://discourse.julialang.org/t/for-loop-mixing-iterator-with-argument-of-a-function/85846 "2022-08-16T21:56:30Z")

</div>

Hello everyone. I am using Julia 1.7.3 with Jupyter Lab, and I have this code (which is partially taken from this link : Converting image colors · ColorSchemeTools) : using FileIO, ColorSchemes, ColorSchemeTools, Imag…

---

## [Readlines in Pluto limiting file size](https://discourse.julialang.org/t/readlines-in-pluto-limiting-file-size/85828)

<div class="topic-metadata">

**Author:** [@dkzwart](https://discourse.julialang.org/u/dkzwart)\
**Replies:** 2\
**Last updated:** [August 16, 2022, 9:00pm UTC](https://discourse.julialang.org/t/readlines-in-pluto-limiting-file-size/85828 "2022-08-16T21:00:26Z")

</div>

I am trying to read in files with a lot of lines using Pluto. However, readlines seems to be limited to 137k odd lines, where I need 142k lines to be read. If I run the code in a Julia REPL outside of Pluto it sees the w…

---

## [Automate Git credentials for package updates](https://discourse.julialang.org/t/automate-git-credentials-for-package-updates/34607)

<div class="topic-metadata">

**Author:** [@Adriel](https://discourse.julialang.org/u/Adriel)\
**Replies:** 5\
**Last updated:** [August 16, 2022, 8:54pm UTC](https://discourse.julialang.org/t/automate-git-credentials-for-package-updates/34607 "2022-08-16T20:54:30Z")

</div>

I have several of my own packages stored on a campus GitLab server. Every time I do a Pkg.update(), I have to provide my Git username/password, individually for each of these packages. It gets a bit tedious. Is there a…

---

## [Assert type instability](https://discourse.julialang.org/t/assert-type-instability/85840)

<div class="topic-metadata">

**Author:** [@Joao\_Barata](https://discourse.julialang.org/u/Joao_Barata)\
**Replies:** 5\
**Last updated:** [August 16, 2022, 7:33pm UTC](https://discourse.julialang.org/t/assert-type-instability/85840 "2022-08-16T19:33:57Z")

</div>

Hi guys Simple question. Take the function below function bogus(n::Int) @assert n \> 1 end If I do @code\_warntype on this function, I get Arguments #self#::Core.Const(bogus) n::Int64 Body::Nothing 1 ─ %1 = (n…

---

## [Loops for unknown numbers of inputs](https://discourse.julialang.org/t/loops-for-unknown-numbers-of-inputs/85773)

<div class="topic-metadata">

**Author:** [@Funkerfish](https://discourse.julialang.org/u/Funkerfish)\
**Replies:** 12\
**Last updated:** [August 16, 2022, 6:23pm UTC](https://discourse.julialang.org/t/loops-for-unknown-numbers-of-inputs/85773 "2022-08-16T18:23:56Z")

</div>

Hello! Now I am trying to make functions to form a matrix which can traverse all the values of input. Can you help with that? Suppose that we have three arrays: as = \[1,2\] bs = \[3,4, 5\] cs = \[6\] Then I want to build …

---

## [Best practice using PackageCompiler.jl (or something else!) for code obfuscation and extensibility](https://discourse.julialang.org/t/best-practice-using-packagecompiler-jl-or-something-else-for-code-obfuscation-and-extensibility/85806)

<div class="topic-metadata">

**Author:** [@pdetrempe](https://discourse.julialang.org/u/pdetrempe)\
**Replies:** 2\
**Last updated:** [August 16, 2022, 3:08pm UTC](https://discourse.julialang.org/t/best-practice-using-packagecompiler-jl-or-something-else-for-code-obfuscation-and-extensibility/85806 "2022-08-16T15:08:45Z")

</div>

I want to use Julia for a new, proprietary, software package being developed at work, however, a couple of requirements are that the package be deliverable to customers without visible source code and be extensible to al…

---

## [Numerical or Auto Differentiation Noob question](https://discourse.julialang.org/t/numerical-or-auto-differentiation-noob-question/85750)

<div class="topic-metadata">

**Author:** [@samerb](https://discourse.julialang.org/u/samerb)\
**Replies:** 3\
**Last updated:** [August 16, 2022, 3:24pm UTC](https://discourse.julialang.org/t/numerical-or-auto-differentiation-noob-question/85750 "2022-08-16T15:24:38Z")

</div>

Suppose I have a function which calls a nonlinear solver. For example, function sqrte(y) f(x) = x\[1\]^2 - y\[1\] x0 = \[0.1\] return nlsolve(f, x0).zero end sqrte(\[4.0\]) \> 1-element Vector{Float64}: 2.0000 Wh…

---

## [About Error:"Correlation function is not specified"](https://discourse.julialang.org/t/about-error-correlation-function-is-not-specified/85753)

<div class="topic-metadata">

**Author:** [@Yangheng\_Jizhe](https://discourse.julialang.org/u/Yangheng_Jizhe)\
**Replies:** 4\
**Last updated:** [August 16, 2022, 2:36am UTC](https://discourse.julialang.org/t/about-error-correlation-function-is-not-specified/85753 "2022-08-16T02:36:34Z")

</div>

Hi there, I’m new to Julia, and I jumped into this error: I defined a CustomBath: physFact = 16/0.33338579560200365 ctoff = 0.012pi function smsi(x) if abs(x) \<ctoff a = x/(ctoff^2) else a =sign(x)/abs(x) end …

---

## [Take data from one DataFrame to another based on a conditional](https://discourse.julialang.org/t/take-data-from-one-dataframe-to-another-based-on-a-conditional/85688)

<div class="topic-metadata">

**Author:** [@dlshew19](https://discourse.julialang.org/u/dlshew19)\
**Replies:** 5\
**Last updated:** [August 15, 2022, 10:21pm UTC](https://discourse.julialang.org/t/take-data-from-one-dataframe-to-another-based-on-a-conditional/85688 "2022-08-15T22:21:21Z")

</div>

The problem I’m having is I can’t figure out how to move data from one DataFrame to a different one. Let’s say I have two DataFrames. df1 is: Team Rating Chi 10 Ny 8 Oak 6 Ott 6 df2 is: HomeTeam …

---

## [Problems using solvers from Iterativesolvers.jl in DifferentialEquations.jl](https://discourse.julialang.org/t/problems-using-solvers-from-iterativesolvers-jl-in-differentialequations-jl/59935)

<div class="topic-metadata">

**Author:** [@amael](https://discourse.julialang.org/u/amael)\
**Replies:** 6\
**Last updated:** [August 15, 2022, 7:22pm UTC](https://discourse.julialang.org/t/problems-using-solvers-from-iterativesolvers-jl-in-differentialequations-jl/59935 "2022-08-15T19:22:38Z")

</div>

Hi, Trying the LinSolveIterativeSolvers API of DifferentialEquations.jl to use the linear solvers from IterativeSolvers.jl always lead to some errors. I’m using julia 1.6. First the API only works for the gmres solver …

---

## [Can't get the preconditioners to work for ode problem](https://discourse.julialang.org/t/cant-get-the-preconditioners-to-work-for-ode-problem/85782)

<div class="topic-metadata">

**Author:** [@Shashank](https://discourse.julialang.org/u/Shashank)\
**Replies:** 1\
**Last updated:** [August 15, 2022, 6:32pm UTC](https://discourse.julialang.org/t/cant-get-the-preconditioners-to-work-for-ode-problem/85782 "2022-08-15T18:32:33Z")

</div>

I have been trying to learn how to use preconditioners while solving an ode but I get an error, and I don’t understand what I am doing wrong. I followed the tutorial on Solving Large Stiff Equations · DifferentialEquatio…

---

## [Rotate axis labels and change axis location in Makie](https://discourse.julialang.org/t/rotate-axis-labels-and-change-axis-location-in-makie/85787)

<div class="topic-metadata">

**Author:** [@PavanChaggar](https://discourse.julialang.org/u/PavanChaggar)\
**Replies:** 3\
**Last updated:** [August 15, 2022, 5:13pm UTC](https://discourse.julialang.org/t/rotate-axis-labels-and-change-axis-location-in-makie/85787 "2022-08-15T17:13:44Z")

</div>

Hi, I have a plot that currently looks like: I want to do two things: rotate the ylabel 90 degrees clockwise move the x-axis up so that it intersects at y=0 I couldn’t find these in the docs or discourse. Any hel…

---

## [Differences between ParameterHandling and Functors](https://discourse.julialang.org/t/differences-between-parameterhandling-and-functors/63495)

<div class="topic-metadata">

**Author:** [@theogf](https://discourse.julialang.org/u/theogf)\
**Replies:** 0\
**Last updated:** [June 24, 2021, 12:03pm UTC](https://discourse.julialang.org/t/differences-between-parameterhandling-and-functors/63495 "2021-06-24T12:03:41Z")

</div>

Could someone tell me if I got the differences between ParameterHandling.jl and Functors.jl right? Both seem to allow to deconstruct/reconstruct a struct to extract arrays of parameters. The differences I see are : F…

---

## [How can I measure the time to compile each function in a package?](https://discourse.julialang.org/t/how-can-i-measure-the-time-to-compile-each-function-in-a-package/85749)

<div class="topic-metadata">

**Author:** [@guilhermebodin](https://discourse.julialang.org/u/guilhermebodin)\
**Replies:** 0\
**Last updated:** [August 14, 2022, 11:00pm UTC](https://discourse.julialang.org/t/how-can-i-measure-the-time-to-compile-each-function-in-a-package/85749 "2022-08-14T23:00:43Z")

</div>

When I profile the first time to do something in a package I find out that it is making a lot of LLVM passes, it is possible to profile on which functions these LLVM passes spend the most time?

---

## [Moving a GTK window](https://discourse.julialang.org/t/moving-a-gtk-window/85729)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 4\
**Last updated:** [August 15, 2022, 4:40pm UTC](https://discourse.julialang.org/t/moving-a-gtk-window/85729 "2022-08-15T16:40:41Z")

</div>

I have the following code: using Gtk.ShortNames, GtkObservables # define the default values OPTION\_A = false OPTION\_B = false finished = false cb1 = checkbox(OPTION\_A, label="Option A") cb2 = checkbox(OPTION\_B, label…

---

## [Subject: Initializing file I/O so that code is agnostic to running locally/on cloud](https://discourse.julialang.org/t/subject-initializing-file-i-o-so-that-code-is-agnostic-to-running-locally-on-cloud/85769)

<div class="topic-metadata">

**Author:** [@Pablo](https://discourse.julialang.org/u/Pablo)\
**Replies:** 1\
**Last updated:** [August 15, 2022, 2:05pm UTC](https://discourse.julialang.org/t/subject-initializing-file-i-o-so-that-code-is-agnostic-to-running-locally-on-cloud/85769 "2022-08-15T14:05:15Z")

</div>

Hello, We are developing a Julia app, and we want to close the gap between running our code in development and production by making the bulk of our code agnostic to whether it’s running in either stage. We have already…

---

## [Is it possible to traverse a tree without allocations](https://discourse.julialang.org/t/is-it-possible-to-traverse-a-tree-without-allocations/85490)

<div class="topic-metadata">

**Author:** [@peremato](https://discourse.julialang.org/u/peremato)\
**Replies:** 10\
**Last updated:** [August 15, 2022, 1:51pm UTC](https://discourse.julialang.org/t/is-it-possible-to-traverse-a-tree-without-allocations/85490 "2022-08-15T13:51:02Z")

</div>

I have defined a tree made of ‘nodes’ and ‘leaves’ as follows. Each leaf has a vector of indices that I would like to iterate under certain conditions. using AbstractTrees struct BVH name::String children::Unio…

---

## [Simple interpolation?](https://discourse.julialang.org/t/simple-interpolation/55320)

<div class="topic-metadata">

**Author:** [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Replies:** 19\
**Last updated:** [August 15, 2022, 12:05pm UTC](https://discourse.julialang.org/t/simple-interpolation/55320 "2022-08-15T12:05:41Z")

</div>

I could do with some maths help! I have a few equally-spaced values between 0.0 and 1.0: \[0.0, 0.1, 0.85, 0.9, 1.0\] and I want a function f(n) that returns a suitably close value for any other n between 0.0 and 1.0. …

---

## [Loading HDF5.jl causes previously working function to crash](https://discourse.julialang.org/t/loading-hdf5-jl-causes-previously-working-function-to-crash/85768)

<div class="topic-metadata">

**Author:** [@huangc](https://discourse.julialang.org/u/huangc)\
**Replies:** 0\
**Last updated:** [August 15, 2022, 11:16am UTC](https://discourse.julialang.org/t/loading-hdf5-jl-causes-previously-working-function-to-crash/85768 "2022-08-15T11:16:52Z")

</div>

I ran into a really confusing situation today. I upgrade my Linux distro yesterday to Ubuntu 22.04, and one of my previously working packages started to crash. While trying to debug and reproduce this, I realised that if…

---

## [How to create a modal dialog with Gtk.jl?](https://discourse.julialang.org/t/how-to-create-a-modal-dialog-with-gtk-jl/85735)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 8\
**Last updated:** [August 15, 2022, 6:17am UTC](https://discourse.julialang.org/t/how-to-create-a-modal-dialog-with-gtk-jl/85735 "2022-08-15T06:17:34Z")

</div>

How can I create a modal dialog with Gtk.jl ? The following code kind-of works: # This example creates a modal dialog with two checkboxes. using Gtk.ShortNames, GtkObservables # define the default values OPTION\_A = fa…

---

## [JULIA\_DEBUG Usage](https://discourse.julialang.org/t/julia-debug-usage/85743)

<div class="topic-metadata">

**Author:** [@cadojo](https://discourse.julialang.org/u/cadojo)\
**Replies:** 1\
**Last updated:** [August 15, 2022, 4:47am UTC](https://discourse.julialang.org/t/julia-debug-usage/85743 "2022-08-15T04:47:27Z")

</div>

How can I set the logging level to Warning or higher with an environment variable? I’ve checked the documentation and other Discourse posts, but I’m still a bit confused. I have CI which builds documents with Quarto, an…

---

## [\`isfile\` lies?](https://discourse.julialang.org/t/isfile-lies/85693)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 21\
**Last updated:** [August 15, 2022, 1:21am UTC](https://discourse.julialang.org/t/isfile-lies/85693 "2022-08-15T01:21:40Z")

</div>

Why would this be? julia\> isfile("GrayWhale\\\\simulations\\\\gw\_fs\_fluid\_damping=1\_forcing\_type=approx\_acoustic\_pressure\_meshnum=8\_neigvs=2200\_sweep=full25\\\\gw\_fs\_fluid\_damping=1\_forcing\_type=approx\_acoustic\_pressure\_meshn…

---

## [Taylor expansion in Symbolics](https://discourse.julialang.org/t/taylor-expansion-in-symbolics/74309)

<div class="topic-metadata">

**Author:** [@purplishrock](https://discourse.julialang.org/u/purplishrock)\
**Replies:** 8\
**Last updated:** [August 14, 2022, 8:58pm UTC](https://discourse.julialang.org/t/taylor-expansion-in-symbolics/74309 "2022-08-14T20:58:42Z")

</div>

I found the very useful library https://github.com/JuliaDiff/TaylorSeries.jl and was able to use it to generate the Taylor series coefficients for a problem I was working on. I thought to myself this would be a really…

---

## [Speeding up a sum involving 3 matrices](https://discourse.julialang.org/t/speeding-up-a-sum-involving-3-matrices/85713)

<div class="topic-metadata">

**Author:** [@structural](https://discourse.julialang.org/u/structural)\
**Replies:** 4\
**Last updated:** [August 14, 2022, 10:41pm UTC](https://discourse.julialang.org/t/speeding-up-a-sum-involving-3-matrices/85713 "2022-08-14T22:41:18Z")

</div>

Thanks for your answers. It made a 20x improvement in my overall computation time. May I get your help with another related task? I need to compute a 10,000+ row vector in which the i^{th} row is \\sum\_{jk} x^{}\_{ij}z^{}…

---

## [WGLMakie slider issue](https://discourse.julialang.org/t/wglmakie-slider-issue/85689)

<div class="topic-metadata">

**Author:** [@AlexisRenchon](https://discourse.julialang.org/u/AlexisRenchon)\
**Replies:** 1\
**Last updated:** [August 14, 2022, 8:31pm UTC](https://discourse.julialang.org/t/wglmakie-slider-issue/85689 "2022-08-14T20:31:40Z")

</div>

I have 2 scripts that can be reproduced here: they are the same script, but one in GLMakie, one in WGLMakie The GLMakie script works as intended, but the WGLMakie slider is not responsive. I don’t know why, because if…

---

## [Specify the type of function when it is a parameter of another function](https://discourse.julialang.org/t/specify-the-type-of-function-when-it-is-a-parameter-of-another-function/85724)

<div class="topic-metadata">

**Author:** [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Replies:** 4\
**Last updated:** [August 14, 2022, 6:56pm UTC](https://discourse.julialang.org/t/specify-the-type-of-function-when-it-is-a-parameter-of-another-function/85724 "2022-08-14T18:56:12Z")

</div>

Perhaps the question doesn’t matter much in practice or even makes little sense in theory. In which case, please explain the reasons in a simple way. Playing with the splitarray function, I wondered if and how it was po…

---

## [Diophantine equations 3-d plots](https://discourse.julialang.org/t/diophantine-equations-3-d-plots/85727)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 2\
**Last updated:** [August 14, 2022, 3:53pm UTC](https://discourse.julialang.org/t/diophantine-equations-3-d-plots/85727 "2022-08-14T15:53:36Z")

</div>

Hi all, I see this equation and I want to plot it, but could not be able to do it: z^{3} - z = (x^{3} - x) + (y^{3} - y) This is my code: using Plots pyplot() x=range(-2,stop=2,length=100) y=range(sqrt(2),stop=2,le…

---

## [Plot window appears in background](https://discourse.julialang.org/t/plot-window-appears-in-background/82293)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 6\
**Last updated:** [August 14, 2022, 2:58pm UTC](https://discourse.julialang.org/t/plot-window-appears-in-background/82293 "2022-08-14T14:58:08Z")

</div>

I am already pretty happy with InspectDR. Can be tuned to be beautiful. One more question: If I run the following script once all works fine: using Plots; inspectdr() InspectDR.defaults.xaxiscontrol\_visible = false x …

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

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