# General Usage

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

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

**Page:** 853

---

## [LazySets: overapproximate sum of two HPolyhedron in 3D (or n-D)](https://discourse.julialang.org/t/lazysets-overapproximate-sum-of-two-hpolyhedron-in-3d-or-n-d/24396)

<div class="topic-metadata">

**Author:** [@uwechsler](https://discourse.julialang.org/u/uwechsler)\
**Replies:** 1\
**Last updated:** [July 5, 2019, 1:19pm UTC](https://discourse.julialang.org/t/lazysets-overapproximate-sum-of-two-hpolyhedron-in-3d-or-n-d/24396 "2019-07-05T13:19:42Z")

</div>

I am using the package LazySets to compute the Minkowsky sum of two HPolyhedron and then extract the resulting constraints to feed them into my JuMP model. For the 2D case, I can approximate the exact Polyhedron with ov…

---

## [Duck typing when \`quack\` is not in \`Base\`](https://discourse.julialang.org/t/duck-typing-when-quack-is-not-in-base/26011)

<div class="topic-metadata">

**Author:** [@lairez](https://discourse.julialang.org/u/lairez)\
**Replies:** 3\
**Last updated:** [July 5, 2019, 6:43am UTC](https://discourse.julialang.org/t/duck-typing-when-quack-is-not-in-base/26011 "2019-07-05T06:43:01Z")

</div>

Say that I develop a package Foo that does interesting things with any type T with a well defined function quack(T). Typically, I may not want to impose T to let the user add relevant metadata or use a type from another …

---

## [Questions: Gadfly and Cairo, Fontconfig](https://discourse.julialang.org/t/questions-gadfly-and-cairo-fontconfig/26016)

<div class="topic-metadata">

**Author:** [@sungjae](https://discourse.julialang.org/u/sungjae)\
**Replies:** 5\
**Last updated:** [July 4, 2019, 9:50pm UTC](https://discourse.julialang.org/t/questions-gadfly-and-cairo-fontconfig/26016 "2019-07-04T21:50:15Z")

</div>

It seems that this topic was discussed before, but I could not find an answer. I am using Julia 1.1.1. I am trying to produce histograms by using Gadfly, but once I load up Cario and Fontconfig, the plot command stops w…

---

## [Gadfly: how to add a legend to stacked plots?](https://discourse.julialang.org/t/gadfly-how-to-add-a-legend-to-stacked-plots/24955)

<div class="topic-metadata">

**Author:** [@mike\_k](https://discourse.julialang.org/u/mike_k)\
**Replies:** 1\
**Last updated:** [July 4, 2019, 6:54pm UTC](https://discourse.julialang.org/t/gadfly-how-to-add-a-legend-to-stacked-plots/24955 "2019-07-04T18:54:19Z")

</div>

Dear folks, suppose we have two figures figA and figB which have the same legend. Is it possible to stack them together, e.g., newFig = hstack(figA, figB) and to add only one legend to newFig afterwards (in my case ce…

---

## [Best way to create a julia function wrapper of a cpp function](https://discourse.julialang.org/t/best-way-to-create-a-julia-function-wrapper-of-a-cpp-function/25915)

<div class="topic-metadata">

**Author:** [@Volker](https://discourse.julialang.org/u/Volker)\
**Replies:** 9\
**Last updated:** [July 4, 2019, 12:27pm UTC](https://discourse.julialang.org/t/best-way-to-create-a-julia-function-wrapper-of-a-cpp-function/25915 "2019-07-04T12:27:06Z")

</div>

Hi, what is the best way to create a julia function wrapper of a C++ function. I started with the Cxx package and just put the C++ code in cxx"“” but it is quite slow. Now I´m considering to use the CxxWrap package. Is …

---

## [Didn't get consistent result of ANOVA from R and Julia](https://discourse.julialang.org/t/didnt-get-consistent-result-of-anova-from-r-and-julia/26003)

<div class="topic-metadata">

**Author:** [@Losses](https://discourse.julialang.org/u/Losses)\
**Replies:** 2\
**Last updated:** [July 4, 2019, 10:54am UTC](https://discourse.julialang.org/t/didnt-get-consistent-result-of-anova-from-r-and-julia/26003 "2019-07-04T10:54:06Z")

</div>

Hello, everyone, I’m a new user of Julia, previously using R/Python. I’m trying to run an ANOVA with Julia but got different result from R. The test data is extracted from Jamovi: test\_data.csv - Pastebin.com The R cod…

---

## [Avoiding allocations in \`view\`s](https://discourse.julialang.org/t/avoiding-allocations-in-view-s/25983)

<div class="topic-metadata">

**Author:** [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Replies:** 7\
**Last updated:** [July 4, 2019, 7:54am UTC](https://discourse.julialang.org/t/avoiding-allocations-in-view-s/25983 "2019-07-04T07:54:36Z")

</div>

Is there a way to avoid allocations with view and missing values? If I change the inner loop to sum then there are allocations in both tests. using BenchmarkTools X = randn(10, 1000) Xm = convert(Array{Union{Float64, …

---

## [One hour difference in modification date & time bewteen mtime and displayed](https://discourse.julialang.org/t/one-hour-difference-in-modification-date-time-bewteen-mtime-and-displayed/25989)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 2\
**Last updated:** [July 3, 2019, 5:04pm UTC](https://discourse.julialang.org/t/one-hour-difference-in-modification-date-time-bewteen-mtime-and-displayed/25989 "2019-07-03T17:04:21Z")

</div>

This is a bit off-topic, might have to do with MacOS more than Julia, but it does involve Julia’s mtime function… On a mac, the displayed date & time in the “modification time” column (in file-finder or whatever it’s ca…

---

## [Overlaying multiple plots in VegaLite](https://discourse.julialang.org/t/overlaying-multiple-plots-in-vegalite/25945)

<div class="topic-metadata">

**Author:** [@yanivab](https://discourse.julialang.org/u/yanivab)\
**Replies:** 3\
**Last updated:** [July 3, 2019, 3:51pm UTC](https://discourse.julialang.org/t/overlaying-multiple-plots-in-vegalite/25945 "2019-07-03T15:51:38Z")

</div>

I’m trying to plot two errorbands on top of each other (one for a 50% CI, one for a 80% CI). The lower and upperbounds of each errorband are saved as four columns in a dataframe, together with the x axis variable. As a …

---

## [Julia flags for startup - is there a list?](https://discourse.julialang.org/t/julia-flags-for-startup-is-there-a-list/25932)

<div class="topic-metadata">

**Author:** [@holger](https://discourse.julialang.org/u/holger)\
**Replies:** 9\
**Last updated:** [July 3, 2019, 2:57pm UTC](https://discourse.julialang.org/t/julia-flags-for-startup-is-there-a-list/25932 "2019-07-03T14:57:06Z")

</div>

I’m having trouble understanding the different startup flags, e.g. julia -e. Is there a list in the documentation?

---

## [Could not parse manifest](https://discourse.julialang.org/t/could-not-parse-manifest/25947)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 1\
**Last updated:** [July 3, 2019, 2:23pm UTC](https://discourse.julialang.org/t/could-not-parse-manifest/25947 "2019-07-03T14:23:31Z")

</div>

Hi, Somehow, I got into a weird state that Pkg complains about not being able to parse the manifest file: (MyPackage) pkg\> st Project MyPackage v0.1.0 ERROR: Could not parse manifest : CompositeException(Any\[ParserErro…

---

## [Unexplained gap between calculation, and fetch time](https://discourse.julialang.org/t/unexplained-gap-between-calculation-and-fetch-time/25980)

<div class="topic-metadata">

**Author:** [@Dinari](https://discourse.julialang.org/u/Dinari)\
**Replies:** 0\
**Last updated:** [July 3, 2019, 11:22am UTC](https://discourse.julialang.org/t/unexplained-gap-between-calculation-and-fetch-time/25980 "2019-07-03T11:22:54Z")

</div>

In my code I have a rather simple architecture, Master process send some calculation to a worker, the calculation is done on a DArray, and the master collects it using fetch. However, I have a big unexplained gap betwee…

---

## [Types as Function Parameters](https://discourse.julialang.org/t/types-as-function-parameters/25944)

<div class="topic-metadata">

**Author:** [@clinton](https://discourse.julialang.org/u/clinton)\
**Replies:** 6\
**Last updated:** [July 3, 2019, 3:26am UTC](https://discourse.julialang.org/t/types-as-function-parameters/25944 "2019-07-03T03:26:19Z")

</div>

I feel like this is probably somewhere easily found in the documentation, but I haven’t figured out where, so I think I just don’t know the right vocabulary here. Suppose I wanted to write the following silly function: …

---

## [Weird behavior of pmap](https://discourse.julialang.org/t/weird-behavior-of-pmap/25910)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 5\
**Last updated:** [July 2, 2019, 8:43pm UTC](https://discourse.julialang.org/t/weird-behavior-of-pmap/25910 "2019-07-02T20:43:57Z")

</div>

The following suboptimal behavior of the parallel map has been observed: 53.927 s (82132566 allocations: 2.81 GiB) 2.011 s (8000041 allocations: 167.85 MiB) 18.922 ms (2 allocations: 7.63 MiB) 20.058 ms (3 alloc…

---

## [Interact Layout over Grid](https://discourse.julialang.org/t/interact-layout-over-grid/25940)

<div class="topic-metadata">

**Author:** [@rand5](https://discourse.julialang.org/u/rand5)\
**Replies:** 0\
**Last updated:** [July 2, 2019, 7:37pm UTC](https://discourse.julialang.org/t/interact-layout-over-grid/25940 "2019-07-02T19:37:57Z")

</div>

I am trying to create a grid of drop down menus. I was hoping something along the lines of the following would work: using Interact M = 2 N = 3 options = Observable(\["a", "b"\]) c = repeat(\[dropdown(options)\],M,N) displa…

---

## [Differential Equations and Parameter Estimation](https://discourse.julialang.org/t/differential-equations-and-parameter-estimation/24246)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 21\
**Last updated:** [July 2, 2019, 7:20pm UTC](https://discourse.julialang.org/t/differential-equations-and-parameter-estimation/24246 "2019-07-02T19:20:09Z")

</div>

I’m about to attempt parameter estimation using DifferentialEquations, and have a couple of questions – I hope someone can share their experience. I’ve read the tutorial, and some previous discussion. My problem is a s…

---

## [Ccall library as a variable string](https://discourse.julialang.org/t/ccall-library-as-a-variable-string/25923)

<div class="topic-metadata">

**Author:** [@Mikel\_Antonana](https://discourse.julialang.org/u/Mikel_Antonana)\
**Replies:** 2\
**Last updated:** [July 2, 2019, 3:47pm UTC](https://discourse.julialang.org/t/ccall-library-as-a-variable-string/25923 "2019-07-02T15:47:27Z")

</div>

This works right, ccall((:lwrite, “/home/mikel/mylibraries/libCbin\_IO”), void, ()) But if I define a variable to specify the library, it does not work. mylib=/home/mikel/mylibraries/libCbin\_IO" ccall((:lwrite,mylib),…

---

## [ERROR: Unsatisfiable requirements detected for package Cpp \[2859d429\]](https://discourse.julialang.org/t/error-unsatisfiable-requirements-detected-for-package-cpp-2859d429/25914)

<div class="topic-metadata">

**Author:** [@Volker](https://discourse.julialang.org/u/Volker)\
**Replies:** 2\
**Last updated:** [July 2, 2019, 8:37am UTC](https://discourse.julialang.org/t/error-unsatisfiable-requirements-detected-for-package-cpp-2859d429/25914 "2019-07-02T08:37:11Z")

</div>

Hi, I would like to use the package Cpp, but when I tried to add it via the package manager I got the following error. Does somebody know what I´m doing wrong? First I tried julia Pkg.add("Cpp") and then I tried julia …

---

## [Weird MethodError with custom logger](https://discourse.julialang.org/t/weird-methoderror-with-custom-logger/25897)

<div class="topic-metadata">

**Author:** [@cserteGT3](https://discourse.julialang.org/u/cserteGT3)\
**Replies:** 9\
**Last updated:** [July 2, 2019, 7:37am UTC](https://discourse.julialang.org/t/weird-methoderror-with-custom-logger/25897 "2019-07-02T07:37:03Z")

</div>

I’m trying to construct a custom logger and getting a weird MethodError. For MWE, I copied SimpleLogger and changed its name to TestLogger. Here’s the logger code (testlog.jl): using Logging using Logging: Info # Test…

---

## [Automatic differentiation and missing values](https://discourse.julialang.org/t/automatic-differentiation-and-missing-values/25764)

<div class="topic-metadata">

**Author:** [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Replies:** 2\
**Last updated:** [July 2, 2019, 6:57am UTC](https://discourse.julialang.org/t/automatic-differentiation-and-missing-values/25764 "2019-07-02T06:57:51Z")

</div>

I am trying to calculate the Jacobian matrix of a function that is robust with missing values and want to use one of the great Julia packages that do automatic differentiation and have hit some kind of a roadblock: usin…

---

## [Help me Improve my poker hand evaluator](https://discourse.julialang.org/t/help-me-improve-my-poker-hand-evaluator/19360)

<div class="topic-metadata">

**Author:** [@rapasite](https://discourse.julialang.org/u/rapasite)\
**Replies:** 11\
**Last updated:** [January 14, 2019, 9:32am UTC](https://discourse.julialang.org/t/help-me-improve-my-poker-hand-evaluator/19360 "2019-01-14T09:32:53Z")

</div>

Hi, I am making a poker hand evaluator for fun. the deck of card is represent by the 52 first bits (low value) of a UInt64 like so: 0000/0000/0000/AAAA/KKKK/QQQQ/JJJJ/10,10,10,10/9999/8888/7777/6666/5555/4444/3333/222…

---

## [Different way of accessing python objects (difference between pyimport("sys").path and pyimport("sys")."path")](https://discourse.julialang.org/t/different-way-of-accessing-python-objects-difference-between-pyimport-sys-path-and-pyimport-sys-path/25859)

<div class="topic-metadata">

**Author:** [@nitin-ppnp](https://discourse.julialang.org/u/nitin-ppnp)\
**Replies:** 2\
**Last updated:** [July 1, 2019, 6:45pm UTC](https://discourse.julialang.org/t/different-way-of-accessing-python-objects-difference-between-pyimport-sys-path-and-pyimport-sys-path/25859 "2019-07-01T18:45:55Z")

</div>

When I do pushfirst!(PyVector(pyimport("sys").path),"") and check with pyimport("sys").path it remains unchanged. However, if I do pushfirst!(PyVector(pyimport("sys")."path"),""), pyimport("sys").path shows the mo…

---

## [\`splice!\` for vector of structs](https://discourse.julialang.org/t/splice-for-vector-of-structs/25898)

<div class="topic-metadata">

**Author:** [@jacob-roth](https://discourse.julialang.org/u/jacob-roth)\
**Replies:** 1\
**Last updated:** [July 1, 2019, 5:13pm UTC](https://discourse.julialang.org/t/splice-for-vector-of-structs/25898 "2019-07-01T17:13:08Z")

</div>

I’m trying to splice! a custom structure into an array containing my custom structures, something like: mutable struct MyType a::Int64 b::Float64 c::Bool end MyType() = MyType(0, 0.0, false) myvec = \[MyType(…

---

## [How to remove invisible characters in JSON](https://discourse.julialang.org/t/how-to-remove-invisible-characters-in-json/25847)

<div class="topic-metadata">

**Author:** [@Gavinclarke](https://discourse.julialang.org/u/Gavinclarke)\
**Replies:** 2\
**Last updated:** [July 1, 2019, 9:57am UTC](https://discourse.julialang.org/t/how-to-remove-invisible-characters-in-json/25847 "2019-07-01T09:57:16Z")

</div>

I am querying a json which is returned with invisible characters at the beginning specifically 0xef, 0xbb, 0xbf in UTF8, I have tried replacing them in string from with replace with the code: clean = replace(unclean, “…

---

## [What is the right way to construct and then run a Julia function programmatically?](https://discourse.julialang.org/t/what-is-the-right-way-to-construct-and-then-run-a-julia-function-programmatically/25845)

<div class="topic-metadata">

**Author:** [@Nathaniel](https://discourse.julialang.org/u/Nathaniel)\
**Replies:** 13\
**Last updated:** [July 1, 2019, 3:28am UTC](https://discourse.julialang.org/t/what-is-the-right-way-to-construct-and-then-run-a-julia-function-programmatically/25845 "2019-07-01T03:28:54Z")

</div>

I would like to write a Julia program that does the following: Build up a big, complicated Expr object using metaprogramming Compile that expression into a Julia function Call that function repeatedly with different ar…

---

## [Unsatisfiable requirements detected for package JWAS](https://discourse.julialang.org/t/unsatisfiable-requirements-detected-for-package-jwas/25879)

<div class="topic-metadata">

**Author:** [@min](https://discourse.julialang.org/u/min)\
**Replies:** 5\
**Last updated:** [July 1, 2019, 2:54am UTC](https://discourse.julialang.org/t/unsatisfiable-requirements-detected-for-package-jwas/25879 "2019-07-01T02:54:42Z")

</div>

julia\> using Pkg julia\> Pkg.add(“JWAS”) Updating registry at C:\\Users\\iq600\\.julia\\registries\\General Updating git-repo https://github.com/JuliaRegistries/General.git Resolving package versions… ERROR: Unsatisfiable…

---

## [Trouble understanding how scopes work when using @testset](https://discourse.julialang.org/t/trouble-understanding-how-scopes-work-when-using-testset/25854)

<div class="topic-metadata">

**Author:** [@JKRT](https://discourse.julialang.org/u/JKRT)\
**Replies:** 9\
**Last updated:** [June 30, 2019, 3:12pm UTC](https://discourse.julialang.org/t/trouble-understanding-how-scopes-work-when-using-testset/25854 "2019-06-30T15:12:53Z")

</div>

Hello! This is a continuation of the discussion here: Lettings macros get the entire scope from where it is called through implicit parameter · Issue #32453 · JuliaLang/julia · GitHub You see this really bothers me. Th…

---

## [Multiple Axis Plot](https://discourse.julialang.org/t/multiple-axis-plot/25869)

<div class="topic-metadata">

**Author:** [@Santiago\_Cuervo](https://discourse.julialang.org/u/Santiago_Cuervo)\
**Replies:** 0\
**Last updated:** [June 30, 2019, 9:31pm UTC](https://discourse.julialang.org/t/multiple-axis-plot/25869 "2019-06-30T21:31:12Z")

</div>

I’m trying to make a recipe for multiple axis plot, but I don’t know how. The twinx() keyword does not work. Here is the recipe i’m working on. I’d like to have another one or more axis to visualize this data in a bett…

---

## [An Observable of an abstract type](https://discourse.julialang.org/t/an-observable-of-an-abstract-type/25865)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 1\
**Last updated:** [June 30, 2019, 8:42pm UTC](https://discourse.julialang.org/t/an-observable-of-an-abstract-type/25865 "2019-06-30T20:42:25Z")

</div>

I have an Observable (from https://github.com/JuliaGizmos/Observables.jl) that could contain any concrete subtype of some common abstract type. Is this the best way to do it? using Observables o = Observable(Any\[\]) o\[\] …

---

## [Using Cxx to interface to a C++ library](https://discourse.julialang.org/t/using-cxx-to-interface-to-a-c-library/24969)

<div class="topic-metadata">

**Author:** [@hros](https://discourse.julialang.org/u/hros)\
**Replies:** 9\
**Last updated:** [June 30, 2019, 6:25pm UTC](https://discourse.julialang.org/t/using-cxx-to-interface-to-a-c-library/24969 "2019-06-30T18:25:54Z")

</div>

I am trying to interface a c++ library (ntl) and am thinking of using the Cxx module. Specifically, I’m looking to use the included C++ types directly in Julia, and perform mathematical operations on them using the C++ …

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

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