# General Usage

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

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

**Page:** 805

---

## ["No output" Travis failure for test that passes locally in \<1 minute on Windows](https://discourse.julialang.org/t/no-output-travis-failure-for-test-that-passes-locally-in-1-minute-on-windows/32064)

<div class="topic-metadata">

**Author:** [@vlandau](https://discourse.julialang.org/u/vlandau)\
**Replies:** 4\
**Last updated:** [December 15, 2019, 8:02pm UTC](https://discourse.julialang.org/t/no-output-travis-failure-for-test-that-passes-locally-in-1-minute-on-windows/32064 "2019-12-15T20:02:07Z")

</div>

Hi All, I’m getting a no output failure for a package test in Travis with Julia 1.3 in Windows. There is no failure for Julia 1.2 on Windows, and tests pass in 1.2 and 1.3 for Mac and Linux. To be sure, I did test loca…

---

## [List of binary infix operators](https://discourse.julialang.org/t/list-of-binary-infix-operators/32282)

<div class="topic-metadata">

**Author:** [@Qiyamah](https://discourse.julialang.org/u/Qiyamah)\
**Replies:** 3\
**Last updated:** [December 15, 2019, 7:03pm UTC](https://discourse.julialang.org/t/list-of-binary-infix-operators/32282 "2019-12-15T19:03:20Z")

</div>

Is there a documentation page where all the binary infix operators are gathered? Thanks

---

## [How do I save the output to .txt file?](https://discourse.julialang.org/t/how-do-i-save-the-output-to-txt-file/32270)

<div class="topic-metadata">

**Author:** [@WEEZEERAE](https://discourse.julialang.org/u/WEEZEERAE)\
**Replies:** 10\
**Last updated:** [December 15, 2019, 7:01pm UTC](https://discourse.julialang.org/t/how-do-i-save-the-output-to-txt-file/32270 "2019-12-15T19:01:38Z")

</div>

Hey People, right now I’m struggling with saving my data. By using a for loop and the println() command, my programm is giving me out a bunch of named arrays like this in the following: for n = 1:10 a = rand(1:10, 4) …

---

## [Can we import \`dill\` in PyCall rather than pickle?](https://discourse.julialang.org/t/can-we-import-dill-in-pycall-rather-than-pickle/32299)

<div class="topic-metadata">

**Author:** [@innerlee](https://discourse.julialang.org/u/innerlee)\
**Replies:** 8\
**Last updated:** [December 15, 2019, 4:59pm UTC](https://discourse.julialang.org/t/can-we-import-dill-in-pycall-rather-than-pickle/32299 "2019-12-15T16:59:01Z")

</div>

The current version of PyCall, and when python3 is used, produces error in pmap: julia\> using Distributed julia\> addprocs(2); julia\> @everywhere using PyCall julia\> @everywhere math=pyimport("math") julia\> a = \[1,2\];…

---

## [False error?](https://discourse.julialang.org/t/false-error/32305)

<div class="topic-metadata">

**Author:** [@alaraints](https://discourse.julialang.org/u/alaraints)\
**Replies:** 4\
**Last updated:** [December 15, 2019, 4:49pm UTC](https://discourse.julialang.org/t/false-error/32305 "2019-12-15T16:49:17Z")

</div>

can this be true?: MethodError: no method matching sort!(::Dict{Int64,String}) that seems to be basic thing, am I doing something wrong? Regards, Alar Aints,

---

## [Plots: legend text is out of bounds](https://discourse.julialang.org/t/plots-legend-text-is-out-of-bounds/32304)

<div class="topic-metadata">

**Author:** [@roi.holtzman](https://discourse.julialang.org/u/roi.holtzman)\
**Replies:** 0\
**Last updated:** [December 15, 2019, 3:22pm UTC](https://discourse.julialang.org/t/plots-legend-text-is-out-of-bounds/32304 "2019-12-15T15:22:47Z")

</div>

When plotting legend, the text go out of bounds (note the 100 that goes out of the frame). Is there a way to fix it? This is the code I used: p1 = hline(\[I(E)\], xlabel=L"\\theta", ylabel=L"I", label="") for (i, T) in…

---

## [Why is there a performance hit on broadcasting with OffsetArrays?](https://discourse.julialang.org/t/why-is-there-a-performance-hit-on-broadcasting-with-offsetarrays/32194)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 3\
**Last updated:** [December 15, 2019, 3:20pm UTC](https://discourse.julialang.org/t/why-is-there-a-performance-hit-on-broadcasting-with-offsetarrays/32194 "2019-12-15T15:20:42Z")

</div>

Please have a look at this example: julia\> a = zeros(3,3); b = zeros(1:3,1:3); julia\> @btime @. $a + $a; 49.681 ns (1 allocation: 160 bytes) julia\> @btime @. $b + $b; 440.101 ns (4 allocations: 288 bytes) julia\> …

---

## [Tensor dimension order on convolution layer](https://discourse.julialang.org/t/tensor-dimension-order-on-convolution-layer/32274)

<div class="topic-metadata">

**Author:** [@fannix](https://discourse.julialang.org/u/fannix)\
**Replies:** 3\
**Last updated:** [December 15, 2019, 9:19am UTC](https://discourse.julialang.org/t/tensor-dimension-order-on-convolution-layer/32274 "2019-12-15T09:19:36Z")

</div>

From Flux document Model Reference · Flux, the dimension order for input data is WHCN (width, height, # channels, # batches). I am a bit confused regarding why this ordering is used. When an image is loaded, the natur…

---

## [Best way to store integer partitions](https://discourse.julialang.org/t/best-way-to-store-integer-partitions/32276)

<div class="topic-metadata">

**Author:** [@Tqft](https://discourse.julialang.org/u/Tqft)\
**Replies:** 6\
**Last updated:** [December 15, 2019, 9:04am UTC](https://discourse.julialang.org/t/best-way-to-store-integer-partitions/32276 "2019-12-15T09:04:23Z")

</div>

This is just a toy example but I was wondering what the best (memory and performance wise) way is to store partitions of a fixed integer n, i.e. lists of positive integers which sum up to n. Currently, I’m using Array{I…

---

## [Passing arguments explicitly to a closure or not](https://discourse.julialang.org/t/passing-arguments-explicitly-to-a-closure-or-not/32268)

<div class="topic-metadata">

**Author:** [@rvignolo](https://discourse.julialang.org/u/rvignolo)\
**Replies:** 5\
**Last updated:** [December 14, 2019, 7:12pm UTC](https://discourse.julialang.org/t/passing-arguments-explicitly-to-a-closure-or-not/32268 "2019-12-14T19:12:59Z")

</div>

Hi there, I am having problems to understand which of the following two scenarios is correct or if they are similar and have the same performance. function input() # define variables and functions inside the # \`in…

---

## [Modifying internal fields inside a nested hierarchy](https://discourse.julialang.org/t/modifying-internal-fields-inside-a-nested-hierarchy/32263)

<div class="topic-metadata">

**Author:** [@dpsanders](https://discourse.julialang.org/u/dpsanders)\
**Replies:** 2\
**Last updated:** [December 14, 2019, 11:52am UTC](https://discourse.julialang.org/t/modifying-internal-fields-inside-a-nested-hierarchy/32263 "2019-12-14T11:52:27Z")

</div>

Suppose I have the following situtation with a nested hierarchy: julia\> mutable struct Foo x end julia\> struct Bar y::Vector{Foo} end julia\> b = Bar(\[Foo(1), Foo(2)\]) Bar(Foo\[Foo(1)…

---

## [How would you write a beautiful DSL?](https://discourse.julialang.org/t/how-would-you-write-a-beautiful-dsl/32241)

<div class="topic-metadata">

**Author:** [@rvignolo](https://discourse.julialang.org/u/rvignolo)\
**Replies:** 20\
**Last updated:** [December 14, 2019, 3:44am UTC](https://discourse.julialang.org/t/how-would-you-write-a-beautiful-dsl/32241 "2019-12-14T03:44:51Z")

</div>

Please jump to this post below if you do not want to read my implementation and want to code it yourself! Hi, community, I am trying to write a beautiful DSL so the user can feel that she is writing mathematical equati…

---

## [ControlSystems bug?](https://discourse.julialang.org/t/controlsystems-bug/30209)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 13\
**Last updated:** [December 13, 2019, 10:15pm UTC](https://discourse.julialang.org/t/controlsystems-bug/30209 "2019-12-13T22:15:11Z")

</div>

I use Julia v. 1.2 on 64bit Windows 10, v. v0.5.3 of package ControlSystems. Consider the following simple system – is there anything wrong in what I do?: julia\> using ControlSystems julia\> A = \[-1. -2.; 0 -2\]; B=\[2.; …

---

## [PlotlyJS GenericTrace Error](https://discourse.julialang.org/t/plotlyjs-generictrace-error/32243)

<div class="topic-metadata">

**Author:** [@alphasig329](https://discourse.julialang.org/u/alphasig329)\
**Replies:** 2\
**Last updated:** [December 13, 2019, 7:08pm UTC](https://discourse.julialang.org/t/plotlyjs-generictrace-error/32243 "2019-12-13T19:08:37Z")

</div>

I am trying to plot a series of boxplot following http://spencerlyon.com/PlotlyJS.jl/examples/box\_plots/ and export it to a static file. However, I am getting errors running the following code: using PlotlyJS using Blin…

---

## [How convert a string with a date and time info with submilisecond resolution to DateTime or perhaps just Time?](https://discourse.julialang.org/t/how-convert-a-string-with-a-date-and-time-info-with-submilisecond-resolution-to-datetime-or-perhaps-just-time/32213)

<div class="topic-metadata">

**Author:** [@zdenek\_hurak](https://discourse.julialang.org/u/zdenek_hurak)\
**Replies:** 1\
**Last updated:** [December 13, 2019, 6:16pm UTC](https://discourse.julialang.org/t/how-convert-a-string-with-a-date-and-time-info-with-submilisecond-resolution-to-datetime-or-perhaps-just-time/32213 "2019-12-13T18:16:18Z")

</div>

What is the simplest way to convert the 2019-12-06 12:01:40.300199 string into a DateTime or perhaps Time type of a variable? The trouble is obviously that the DateTime only considers integer milliseconds as the time re…

---

## [Some possibly useful Julia code: Getpwnam, NetworkInterfaces, hrbc](https://discourse.julialang.org/t/some-possibly-useful-julia-code-getpwnam-networkinterfaces-hrbc/32238)

<div class="topic-metadata">

**Author:** [@mleisher](https://discourse.julialang.org/u/mleisher)\
**Replies:** 0\
**Last updated:** [December 13, 2019, 6:07pm UTC](https://discourse.julialang.org/t/some-possibly-useful-julia-code-getpwnam-networkinterfaces-hrbc/32238 "2019-12-13T18:07:03Z")

</div>

In pursuit of my own amusements, I whipped up some code I needed for a personal project: Getpwnam.jl This module implements getpwnam() for Julia. The Windows-specific portion is kludgy, but my project doesn’t depend …

---

## [Simple challenge: Is there a more "Julian" solution?](https://discourse.julialang.org/t/simple-challenge-is-there-a-more-julian-solution/32211)

<div class="topic-metadata">

**Author:** [@wsphillips](https://discourse.julialang.org/u/wsphillips)\
**Replies:** 12\
**Last updated:** [December 13, 2019, 1:51pm UTC](https://discourse.julialang.org/t/simple-challenge-is-there-a-more-julian-solution/32211 "2019-12-13T13:51:55Z")

</div>

I am porting someone else’s MATLAB code and found an indexing pattern that was baked in rather than generated programmatically. After hacking at it for a bit I managed to generalize the pattern. My solution isn’t very pr…

---

## [ERROR: Unsatisfiable requirements detected for package FactCheck \[01605889\]](https://discourse.julialang.org/t/error-unsatisfiable-requirements-detected-for-package-factcheck-01605889/28214)

<div class="topic-metadata">

**Author:** [@sergevic](https://discourse.julialang.org/u/sergevic)\
**Replies:** 4\
**Last updated:** [December 13, 2019, 1:33pm UTC](https://discourse.julialang.org/t/error-unsatisfiable-requirements-detected-for-package-factcheck-01605889/28214 "2019-12-13T13:33:54Z")

</div>

I’m trying to install the package DeterminantalPointProcesses.jl of alshedivat from Github, but I get the following error message: ERROR: Unsatisfiable requirements detected for package FactCheck \[01605889\]: FactCheck…

---

## [Gadfly: orientation of ticks](https://discourse.julialang.org/t/gadfly-orientation-of-ticks/32174)

<div class="topic-metadata">

**Author:** [@alphasig329](https://discourse.julialang.org/u/alphasig329)\
**Replies:** 1\
**Last updated:** [December 13, 2019, 12:09pm UTC](https://discourse.julialang.org/t/gadfly-orientation-of-ticks/32174 "2019-12-13T12:09:35Z")

</div>

Is it possible to have the orientation of ticks in a plot to be at 45 degrees as opposed to :vertical and :horizontal?

---

## [Fastest way to check if condition is true](https://discourse.julialang.org/t/fastest-way-to-check-if-condition-is-true/32057)

<div class="topic-metadata">

**Author:** [@Diger](https://discourse.julialang.org/u/Diger)\
**Replies:** 29\
**Last updated:** [December 12, 2019, 8:38pm UTC](https://discourse.julialang.org/t/fastest-way-to-check-if-condition-is-true/32057 "2019-12-12T20:38:30Z")

</div>

Hello, I’m looking for the fastest way to check whether this condition is true: minimum(broadcast(abs,broadcast(-,P,Ds\[i\]))) == 0 here P is an Array of integers and Ds\[i\] an integer of another array inside a loop I wa…

---

## [Tell Julia to use more memory than physical RAM, swapping](https://discourse.julialang.org/t/tell-julia-to-use-more-memory-than-physical-ram-swapping/19848)

<div class="topic-metadata">

**Author:** [@Juan](https://discourse.julialang.org/u/Juan)\
**Replies:** 7\
**Last updated:** [December 12, 2019, 7:29pm UTC](https://discourse.julialang.org/t/tell-julia-to-use-more-memory-than-physical-ram-swapping/19848 "2019-12-12T19:29:02Z")

</div>

Hello. In R there is a setting, utils::memory.limit(20000), to let R use a quantity of memory larger than the RAM, if needed. The swap file on the SSD is much slower but sometimes is the only option if you want to per…

---

## [Parallel calculations with CUDA](https://discourse.julialang.org/t/parallel-calculations-with-cuda/32199)

<div class="topic-metadata">

**Author:** [@Diger](https://discourse.julialang.org/u/Diger)\
**Replies:** 0\
**Last updated:** [December 12, 2019, 5:30pm UTC](https://discourse.julialang.org/t/parallel-calculations-with-cuda/32199 "2019-12-12T17:30:31Z")

</div>

I’m going through the tutorial https://juliagpu.gitlab.io/CuArrays.jl/tutorials/generated/intro/ and have some problems and errors. First the problems: I’m starting as in the tutorial using CuArrays, CUDAnative, Benchm…

---

## [Vspan vertical scale wrong when using dates as x axis](https://discourse.julialang.org/t/vspan-vertical-scale-wrong-when-using-dates-as-x-axis/31904)

<div class="topic-metadata">

**Author:** [@jdad](https://discourse.julialang.org/u/jdad)\
**Replies:** 3\
**Last updated:** [December 12, 2019, 3:39pm UTC](https://discourse.julialang.org/t/vspan-vertical-scale-wrong-when-using-dates-as-x-axis/31904 "2019-12-12T15:39:28Z")

</div>

Hello, I am trying to use vspan to highlight specific periods in a plot with dates as x axis. It seems that vspan changes the y axis units to dates also (which is wrong). MWE : # Show vspan problem with date abscissae…

---

## [Revise with Requires?](https://discourse.julialang.org/t/revise-with-requires/19347)

<div class="topic-metadata">

**Author:** [@Raf](https://discourse.julialang.org/u/Raf)\
**Replies:** 14\
**Last updated:** [December 12, 2019, 1:11pm UTC](https://discourse.julialang.org/t/revise-with-requires/19347 "2019-12-12T13:11:26Z")

</div>

Is there a way of getting Revise working on files included with Requires? My experience is files included in a @require block don’t get updated with Revise.

---

## [How to start numerous threads on windows](https://discourse.julialang.org/t/how-to-start-numerous-threads-on-windows/32144)

<div class="topic-metadata">

**Author:** [@Diger](https://discourse.julialang.org/u/Diger)\
**Replies:** 6\
**Last updated:** [December 12, 2019, 11:58am UTC](https://discourse.julialang.org/t/how-to-start-numerous-threads-on-windows/32144 "2019-12-12T11:58:36Z")

</div>

In the manual it says to use $ JULIA\_NUM\_THREADS=4 ./julia But how to invoke threads on windows with the julia icon?

---

## [Gadfly and flatten not defined](https://discourse.julialang.org/t/gadfly-and-flatten-not-defined/32161)

<div class="topic-metadata">

**Author:** [@alphasig329](https://discourse.julialang.org/u/alphasig329)\
**Replies:** 4\
**Last updated:** [December 12, 2019, 1:54am UTC](https://discourse.julialang.org/t/gadfly-and-flatten-not-defined/32161 "2019-12-12T01:54:35Z")

</div>

using JuliaDB, JuliaDBMeta, DataFrames, Gadfly import Cairo import Fontconfig using Compose group\_data = JuliaDB.load("group\_data") test\_plot = Gadfly.plot( group\_data |\> DataFrame, x = "Group", …

---

## [ZeroMQ vs. other transport protocols (such as nanomsg)?](https://discourse.julialang.org/t/zeromq-vs-other-transport-protocols-such-as-nanomsg/2136)

<div class="topic-metadata">

**Author:** [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)\
**Replies:** 4\
**Last updated:** [December 12, 2019, 12:38am UTC](https://discourse.julialang.org/t/zeromq-vs-other-transport-protocols-such-as-nanomsg/2136 "2019-12-12T00:38:54Z")

</div>

I’m interested in your opinion on ZMQ vs. other things such as nanomsg - we are currently also using ZeroMQ for communications in Julia (with our own wrapper), but one of the people at my company is concerned because th…

---

## [Pkg.update() fails after upgrading to v1.3](https://discourse.julialang.org/t/pkg-update-fails-after-upgrading-to-v1-3/32165)

<div class="topic-metadata">

**Author:** [@bliang26](https://discourse.julialang.org/u/bliang26)\
**Replies:** 8\
**Last updated:** [December 11, 2019, 8:17pm UTC](https://discourse.julialang.org/t/pkg-update-fails-after-upgrading-to-v1-3/32165 "2019-12-11T20:17:12Z")

</div>

I just upgraded Julia to v1.3 and Pkg.update() fails with the following message. It was working fine with v1.2. I tried deleting ~/.julia but it didn’t work. Please help. julia\> Pkg.update() Cloning default registries …

---

## [Defining \`getindex\` for \`Tables.columntable\` objects](https://discourse.julialang.org/t/defining-getindex-for-tables-columntable-objects/31944)

<div class="topic-metadata">

**Author:** [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Replies:** 2\
**Last updated:** [December 11, 2019, 6:15pm UTC](https://discourse.julialang.org/t/defining-getindex-for-tables-columntable-objects/31944 "2019-12-11T18:15:49Z")

</div>

Let’s say you are working with tabular objects and for convenience and want to use t\[i, j\] getindexing (and not too many other functions) throughout your code. On the other hand you want to support the Tables.jl interfa…

---

## [WTF plots causing Signal desktop app to run?](https://discourse.julialang.org/t/wtf-plots-causing-signal-desktop-app-to-run/32126)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 6\
**Last updated:** [December 11, 2019, 5:55pm UTC](https://discourse.julialang.org/t/wtf-plots-causing-signal-desktop-app-to-run/32126 "2019-12-11T17:55:21Z")

</div>

I am relatively new to Julia, I try to use it every so often. Right now I have a problem where I’m solving some diffusion problems and have some data that I want to plot. So, Queryverse looks nice, and I decide to try t…

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

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