# General Usage

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

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

**Page:** 414

---

## [SVG to RGB: How to save a series of svg images to video?](https://discourse.julialang.org/t/svg-to-rgb-how-to-save-a-series-of-svg-images-to-video/85309)

<div class="topic-metadata">

**Author:** [@rakeshvar](https://discourse.julialang.org/u/rakeshvar)\
**Replies:** 3\
**Last updated:** [August 5, 2022, 8:11am UTC](https://discourse.julialang.org/t/svg-to-rgb-how-to-save-a-series-of-svg-images-to-video/85309 "2022-08-05T08:11:08Z")

</div>

My code generates a series of svg images as text. Now I want to save them as an animated video. Here is a MWE. svgtxt = """ \<svg width="100%" height="100%" viewBox="30 57 1102 582"\> \<g style="stroke:#f00; stroke-width…

---

## [Is it possible to add reliable tests that functions do not allocate?](https://discourse.julialang.org/t/is-it-possible-to-add-reliable-tests-that-functions-do-not-allocate/85320)

<div class="topic-metadata">

**Author:** [@heyx3](https://discourse.julialang.org/u/heyx3)\
**Replies:** 4\
**Last updated:** [August 5, 2022, 7:50am UTC](https://discourse.julialang.org/t/is-it-possible-to-add-reliable-tests-that-functions-do-not-allocate/85320 "2022-08-05T07:50:59Z")

</div>

I’m working on a project involving 3D graphics. In this sort of domain, you create a lot of short-term vector and matrix data of a constant size (usually 2D, 3D, and 4D). As well as quaternions, which are stored like a 4…

---

## [Using perf top with non-stdlib julia code](https://discourse.julialang.org/t/using-perf-top-with-non-stdlib-julia-code/85322)

<div class="topic-metadata">

**Author:** [@ikirill](https://discourse.julialang.org/u/ikirill)\
**Replies:** 3\
**Last updated:** [August 5, 2022, 4:46am UTC](https://discourse.julialang.org/t/using-perf-top-with-non-stdlib-julia-code/85322 "2022-08-05T04:46:51Z")

</div>

When running sudo perf top -p $(pidof -s julia) on a running Julia process, none of the function addresses are resolved to names: Samples: 39K of event 'cycles', 4000 Hz, Event count (approx.): 22211461168 lost: 0/0 dro…

---

## [How can I swap columns of InMemoryDatasets?](https://discourse.julialang.org/t/how-can-i-swap-columns-of-inmemorydatasets/84808)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 3\
**Last updated:** [August 5, 2022, 4:38am UTC](https://discourse.julialang.org/t/how-can-i-swap-columns-of-inmemorydatasets/84808 "2022-08-05T04:38:33Z")

</div>

I have the following example: using InMemoryDatasets g1 = repeat(1:6, inner = 4); g2 = repeat(1:4, 6); y = \["d8888b. ", " .d8b. ", "d888888b ", " .d8b. ", "88 \`8D ", "d8' \`8b ", "\`~~88~~' ", " d8' \`…

---

## [Issues using multithreading with Combinatorics](https://discourse.julialang.org/t/issues-using-multithreading-with-combinatorics/85318)

<div class="topic-metadata">

**Author:** [@Philip\_Stuckey](https://discourse.julialang.org/u/Philip_Stuckey)\
**Replies:** 1\
**Last updated:** [August 4, 2022, 11:44pm UTC](https://discourse.julialang.org/t/issues-using-multithreading-with-combinatorics/85318 "2022-08-04T23:44:56Z")

</div>

When I try to run the following code using Combinatorics using Base.Threads five\_letter\_words = \["taxis", "deans", "krone", "unset", "other", "ovens", "spilt", "yanks", "flout", "clang"\] @threads :static for combo in co…

---

## [Type conversions with 2π (2pi) and how to avoid them](https://discourse.julialang.org/t/type-conversions-with-2-2pi-and-how-to-avoid-them/85168)

<div class="topic-metadata">

**Author:** [@roflmaostc](https://discourse.julialang.org/u/roflmaostc)\
**Replies:** 15\
**Last updated:** [August 4, 2022, 10:50pm UTC](https://discourse.julialang.org/t/type-conversions-with-2-2pi-and-how-to-avoid-them/85168 "2022-08-04T22:50:08Z")

</div>

Hi! Quite often I write expressions such as: julia\> x = randn(Float32, (2, 2)); julia\> typeof(pi) Irrational{:π} julia\> x ./ π # all good 2×2 Matrix{Float32}: -0.22765 -0.10363 0.0520012 0.129431 julia\> x ./…

---

## [\`using SomePackage\` in block](https://discourse.julialang.org/t/using-somepackage-in-block/85314)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 3\
**Last updated:** [August 4, 2022, 10:48pm UTC](https://discourse.julialang.org/t/using-somepackage-in-block/85314 "2022-08-04T22:48:25Z")

</div>

How can I call using SomePackage to load a package inside a block? Be it begin, a function, or any other block. Here is my attempts at loading GLMakie in a block: julia\> begin using GLMakie L"f(x)…

---

## [State maintained by the Julia Package Ststem](https://discourse.julialang.org/t/state-maintained-by-the-julia-package-ststem/85316)

<div class="topic-metadata">

**Author:** [@Mark\_Nahabedian](https://discourse.julialang.org/u/Mark_Nahabedian)\
**Replies:** 0\
**Last updated:** [August 4, 2022, 8:20pm UTC](https://discourse.julialang.org/t/state-maintained-by-the-julia-package-ststem/85316 "2022-08-04T20:20:49Z")

</div>

The Julia Package system maintains various loci of state for each package. The ones I can think of off the top of my head are the General registry on GitHub the user’s local copy of the General registry in .julia/regi…

---

## [Jupyter not finding Julia 1.5.1](https://discourse.julialang.org/t/jupyter-not-finding-julia-1-5-1/47146)

<div class="topic-metadata">

**Author:** [@matthew-wingate](https://discourse.julialang.org/u/matthew-wingate)\
**Replies:** 3\
**Last updated:** [August 4, 2022, 7:59pm UTC](https://discourse.julialang.org/t/jupyter-not-finding-julia-1-5-1/47146 "2022-08-04T19:59:12Z")

</div>

Hi. Usually when I want to install a new version of julia kernel for use in a jupyter notebook, I follow the follow these steps: Install julia (say v1.5.1) Run julia from a command line. julia\> using Pkg; Pkg.add("IJul…

---

## [Determining size of DataFrame for memory management](https://discourse.julialang.org/t/determining-size-of-dataframe-for-memory-management/85277)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 35\
**Last updated:** [August 4, 2022, 6:43pm UTC](https://discourse.julialang.org/t/determining-size-of-dataframe-for-memory-management/85277 "2022-08-04T18:43:46Z")

</div>

I’m working on some data analysis, and I don’t have as much RAM as I’d ideally like. I’m building a variety of datasets by joining several together etc. I’d like to get a list of all objects in the global environment, f…

---

## [What to do when Julia runs away from you? (how to interrupt on C-c?)](https://discourse.julialang.org/t/what-to-do-when-julia-runs-away-from-you-how-to-interrupt-on-c-c/85310)

<div class="topic-metadata">

**Author:** [@Brad\_Carman](https://discourse.julialang.org/u/Brad_Carman)\
**Replies:** 2\
**Last updated:** [August 4, 2022, 6:26pm UTC](https://discourse.julialang.org/t/what-to-do-when-julia-runs-away-from-you-how-to-interrupt-on-c-c/85310 "2022-08-04T18:26:19Z")

</div>

I’m currently working on a model that somehow get’s in a solving loop that I can’t cancel with Ctrl+C. To prove this I’m printing to the console from within the while loop that is running away. I can see the print stat…

---

## [RobotOS publishing PointCloud](https://discourse.julialang.org/t/robotos-publishing-pointcloud/85311)

<div class="topic-metadata">

**Author:** [@ga72kud](https://discourse.julialang.org/u/ga72kud)\
**Replies:** 0\
**Last updated:** [August 4, 2022, 6:01pm UTC](https://discourse.julialang.org/t/robotos-publishing-pointcloud/85311 "2022-08-04T18:01:32Z")

</div>

I am using Pointclouds in ROS and Julia Lang with RobotOS.jl I am able to create a random pointcloud, but I have trouble in specifying the right colors. It is in RGB8.

---

## [Write jld2 files to s3 bucket](https://discourse.julialang.org/t/write-jld2-files-to-s3-bucket/85307)

<div class="topic-metadata">

**Author:** [@sunayana](https://discourse.julialang.org/u/sunayana)\
**Replies:** 0\
**Last updated:** [August 4, 2022, 5:00pm UTC](https://discourse.julialang.org/t/write-jld2-files-to-s3-bucket/85307 "2022-08-04T17:00:48Z")

</div>

Hi, I would like to write a jld2 file to an s3 bucket. Since I cannot use the save function from JLD2 library directly any suggestion on how to do this is much appreciated. Thanks!

---

## [Arithmetic on colors](https://discourse.julialang.org/t/arithmetic-on-colors/85297)

<div class="topic-metadata">

**Author:** [@rakeshvar](https://discourse.julialang.org/u/rakeshvar)\
**Replies:** 16\
**Last updated:** [August 4, 2022, 3:40pm UTC](https://discourse.julialang.org/t/arithmetic-on-colors/85297 "2022-08-04T15:40:28Z")

</div>

Hello there, I want to find the total Sum of Squared Errors of a set of colors from their mean. Using Colors. The colors and the mean look something like this, where m = mean(cols). cols\[1:10\] = RGB{FixedPointNumbers.…

---

## [Is there a way to turn off the warnings "indexing with indices obtained from 'length','size' etc is discouraged in VSCode?](https://discourse.julialang.org/t/is-there-a-way-to-turn-off-the-warnings-indexing-with-indices-obtained-from-length-size-etc-is-discouraged-in-vscode/85093)

<div class="topic-metadata">

**Author:** [@Steven\_Sagaert](https://discourse.julialang.org/u/Steven_Sagaert)\
**Replies:** 14\
**Last updated:** [August 4, 2022, 3:20pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-turn-off-the-warnings-indexing-with-indices-obtained-from-length-size-etc-is-discouraged-in-vscode/85093 "2022-08-04T15:20:46Z")

</div>

I get that you want these warnings for package writers but this is an application using Base matrices and it’s never going to use any other matrices with exotic indexing and you can’t pass matrices as an argument to the …

---

## [Port conflict when running several nodes on a Slurm cluster](https://discourse.julialang.org/t/port-conflict-when-running-several-nodes-on-a-slurm-cluster/85024)

<div class="topic-metadata">

**Author:** [@matthiasbe](https://discourse.julialang.org/u/matthiasbe)\
**Replies:** 3\
**Last updated:** [August 4, 2022, 1:36pm UTC](https://discourse.julialang.org/t/port-conflict-when-running-several-nodes-on-a-slurm-cluster/85024 "2022-08-04T13:36:58Z")

</div>

Hello, I have trouble running Julia on a cluster. It randomly crashes when trying to connect the workers with addprocs() with error “connection refused”. From what I understand, the problem comes from the fact that sev…

---

## [Repetitive Matrix Addition using Threads](https://discourse.julialang.org/t/repetitive-matrix-addition-using-threads/85292)

<div class="topic-metadata">

**Author:** [@Amol\_H](https://discourse.julialang.org/u/Amol_H)\
**Replies:** 1\
**Last updated:** [August 4, 2022, 11:30am UTC](https://discourse.julialang.org/t/repetitive-matrix-addition-using-threads/85292 "2022-08-04T11:30:37Z")

</div>

Greetings All, Please suggest how to reduce the Matrix addition using @threads. In the following example, I am trying to add 10x10 ones matrix 100 times. Ideally, the sum of all elements of the final matrix should be 10…

---

## [Error: curl\_easy\_setopt: 48](https://discourse.julialang.org/t/error-curl-easy-setopt-48/85287)

<div class="topic-metadata">

**Author:** [@emreK](https://discourse.julialang.org/u/emreK)\
**Replies:** 2\
**Last updated:** [August 4, 2022, 11:00am UTC](https://discourse.julialang.org/t/error-curl-easy-setopt-48/85287 "2022-08-04T11:00:27Z")

</div>

When I try to install a package on my personal computer, where I have v1.7.3, everything is fine. When I try it in our cluster for v1.7.3, I get the below error. This is the case for even older versions (v1.3, v1.5), wh…

---

## [Doing CCA/CVA in Julia with MultivariateStats.jl package - how to get canonical vectors?](https://discourse.julialang.org/t/doing-cca-cva-in-julia-with-multivariatestats-jl-package-how-to-get-canonical-vectors/43626)

<div class="topic-metadata">

**Author:** [@cheins](https://discourse.julialang.org/u/cheins)\
**Replies:** 1\
**Last updated:** [August 4, 2022, 10:09am UTC](https://discourse.julialang.org/t/doing-cca-cva-in-julia-with-multivariatestats-jl-package-how-to-get-canonical-vectors/43626 "2022-08-04T10:09:32Z")

</div>

I am using the fit(CCA,...) function from the MultivariateStats.jl package and I want to know how to pull out the principal canonical vectors. The resulting CCA model object has methods like xprojection and ypro…

---

## [IJulia and Pyplot backend problem with old Python version](https://discourse.julialang.org/t/ijulia-and-pyplot-backend-problem-with-old-python-version/85216)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 12\
**Last updated:** [August 4, 2022, 8:46am UTC](https://discourse.julialang.org/t/ijulia-and-pyplot-backend-problem-with-old-python-version/85216 "2022-08-04T08:46:33Z")

</div>

Hi all, I have upgraded my Python to 3.10 just to be able to use Pyplot backend (do not know if it is worth the trouble, perhaps other backend is better) I want to plot this: using Plots; pyplot(); xc = \[0,0,1,1\] yc …

---

## [Julia 1.7.3 Build Fails on M1 MAC Pro](https://discourse.julialang.org/t/julia-1-7-3-build-fails-on-m1-mac-pro/85270)

<div class="topic-metadata">

**Author:** [@Nitin\_Arora](https://discourse.julialang.org/u/Nitin_Arora)\
**Replies:** 3\
**Last updated:** [August 4, 2022, 7:20am UTC](https://discourse.julialang.org/t/julia-1-7-3-build-fails-on-m1-mac-pro/85270 "2022-08-04T07:20:30Z")

</div>

I am trying to compile Julia (V 1.7.3) on M1 Mac Pro but it seems to be failing with Error 138 : CC src/llvm-remove-ni.o CC src/llvm-julia-licm.o CC src/llvm-demote-float16.o LINK usr/lib/libjulia-internal…

---

## [Rename columns in view](https://discourse.julialang.org/t/rename-columns-in-view/85272)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 4\
**Last updated:** [August 4, 2022, 6:37am UTC](https://discourse.julialang.org/t/rename-columns-in-view/85272 "2022-08-04T06:37:04Z")

</div>

Is it possible to rename columns in a DataFrame view ? (without altering the column names in the underlying DataFrame)

---

## [Parallel computing of matrix with @threads](https://discourse.julialang.org/t/parallel-computing-of-matrix-with-threads/85228)

<div class="topic-metadata">

**Author:** [@lukemin](https://discourse.julialang.org/u/lukemin)\
**Replies:** 3\
**Last updated:** [August 4, 2022, 5:03am UTC](https://discourse.julialang.org/t/parallel-computing-of-matrix-with-threads/85228 "2022-08-04T05:03:47Z")

</div>

Hi, I am trying to implement some multi-threading on my project written in julia. Although, it seems that @threads macro does not work as I intended. I have tried almost every solutions / multithreading methods I could f…

---

## [How to read .json file in dataframe without using Pandas.jl](https://discourse.julialang.org/t/how-to-read-json-file-in-dataframe-without-using-pandas-jl/85276)

<div class="topic-metadata">

**Author:** [@Starpower\_Power](https://discourse.julialang.org/u/Starpower_Power)\
**Replies:** 1\
**Last updated:** [August 4, 2022, 3:36am UTC](https://discourse.julialang.org/t/how-to-read-json-file-in-dataframe-without-using-pandas-jl/85276 "2022-08-04T03:36:38Z")

</div>

how to read .json file in dataframe without using Pandas.jl, because using both package there will conflict error.

---

## [Pushing to an array which is an element of another array (Modifying an array in an array)](https://discourse.julialang.org/t/pushing-to-an-array-which-is-an-element-of-another-array-modifying-an-array-in-an-array/85179)

<div class="topic-metadata">

**Author:** [@Jonas208](https://discourse.julialang.org/u/Jonas208)\
**Replies:** 11\
**Last updated:** [August 3, 2022, 10:45pm UTC](https://discourse.julialang.org/t/pushing-to-an-array-which-is-an-element-of-another-array-modifying-an-array-in-an-array/85179 "2022-08-03T22:45:41Z")

</div>

Imagine the following situation: I create an array with a fixed size and every element in this array is another array. In a loop, I want to push tuples to one array of the outer array. So I want to modify one array wh…

---

## [Negative zeros and sorting](https://discourse.julialang.org/t/negative-zeros-and-sorting/85252)

<div class="topic-metadata">

**Author:** [@Gus\_Hart](https://discourse.julialang.org/u/Gus_Hart)\
**Replies:** 13\
**Last updated:** [August 3, 2022, 8:04pm UTC](https://discourse.julialang.org/t/negative-zeros-and-sorting/85252 "2022-08-03T20:04:43Z")

</div>

Negative zeros are equivalent to positive zeros, and yet in sorting the negatives come before positives. This behavior caused a very subtle bug in a function I wrote to compare clusters of points. I’m wondering if there …

---

## [Allocations using dualcache](https://discourse.julialang.org/t/allocations-using-dualcache/85244)

<div class="topic-metadata">

**Author:** [@dbs](https://discourse.julialang.org/u/dbs)\
**Replies:** 1\
**Last updated:** [August 3, 2022, 6:07pm UTC](https://discourse.julialang.org/t/allocations-using-dualcache/85244 "2022-08-03T18:07:22Z")

</div>

I have a rather complicated function that I’ve written in a non-allocating manner, and am now trying to use ForwardDiff.jacobian! to generate a non-allocating jacobian. The function has many substeps, so use of a pre-a…

---

## [MQTT message topic parsing optimization](https://discourse.julialang.org/t/mqtt-message-topic-parsing-optimization/85151)

<div class="topic-metadata">

**Author:** [@shindler25](https://discourse.julialang.org/u/shindler25)\
**Replies:** 2\
**Last updated:** [August 3, 2022, 1:23pm UTC](https://discourse.julialang.org/t/mqtt-message-topic-parsing-optimization/85151 "2022-08-03T13:23:58Z")

</div>

Hello, The problem: I am designing an MQTT client using GitHub - rweilbacher/MQTT.jl: An asynchronous MQTT client library for julia and am trying to determine the best way to handle incoming messages. messages are handl…

---

## [Multiple dispatch of \`in\`](https://discourse.julialang.org/t/multiple-dispatch-of-in/85227)

<div class="topic-metadata">

**Author:** [@this\_josh](https://discourse.julialang.org/u/this_josh)\
**Replies:** 2\
**Last updated:** [August 3, 2022, 12:48pm UTC](https://discourse.julialang.org/t/multiple-dispatch-of-in/85227 "2022-08-03T12:48:01Z")

</div>

I’d like to customise how in works for a struct I’ve created as only some fields matter. I’d like it to work like this where here I just want to check the dogs breeds: struct Dog breed name end a = Dog("husky",…

---

## [How to export this type of vector like matlab .mat](https://discourse.julialang.org/t/how-to-export-this-type-of-vector-like-matlab-mat/85223)

<div class="topic-metadata">

**Author:** [@Starpower\_Power](https://discourse.julialang.org/u/Starpower_Power)\
**Replies:** 0\
**Last updated:** [August 3, 2022, 11:48am UTC](https://discourse.julialang.org/t/how-to-export-this-type-of-vector-like-matlab-mat/85223 "2022-08-03T11:48:56Z")

</div>

i have to save this variable res so i can call this variable without run the code please help on that. using Rotations using LinearAlgebra function trans(x) alpha=x\[1\]; a=x\[2\]; d=x\[3\]; t=x\[4\] T=\[ cos(t)…

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

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