Quantcast
Channel: First steps - JuliaLang
Browsing all 2795 articles
Browse latest View live

List into list

hi thanks this site help me to improve my knowledge in julia, so function pair_sum(nums, target) #Given nums = [2, 7, 11, 15], target = 9, d = Dict() output = Int[] count =0 for i in nums component =...

View Article


Image may be NSFW.
Clik here to view.

Implementing a "keepAlive" call to Betfair's API

I am trying to implement a “keepAlive” call to Betfair’s API and thereby keep my session alive. Unfortunately, I am having some difficulty, and I am hoping that someone here can help me. (Please see...

View Article


Split char from word

help please i have an array arr = [AAAAA] i need to split it to arr = [A,A,A,A,A] i tried the split method put it does not work 3 posts - 3 participants Read full topic

View Article

Image may be NSFW.
Clik here to view.

Compile error

hi all can any one tell me why this code not working ? its from HackerRank Hash Tables: Ransom Note | HackerRank Given two sets of dictionaries, tell if one of them is a subset of the other. function...

View Article

Is there a package to compare if two DataFrames are the same?

Something that has more options than the == in Base for comparing dataframes? E.g. one where you can set the tolerance of difference in a float column. And also can compare columns by name even though...

View Article


Solve system of nonlinear equations w/ Newton-Raphson iteration

Consider a boring system of 4 nonlinear equations in 4 variables: a=bcd a+b=cd a+b+c=d a+b+c+d=1 Solution: (a,b,c,d)=(\frac{1}{42}, \frac{1}{7}, \frac{1}{3}, \frac{1}{2}) My code: using Zygote; NR(x0)...

View Article

Parameter Structure in Array

I’m conducting a set of simulations where each scenario has a set of parameters that can vary. These are scalars (e.g., random number seed, sample size, dropout rate, number of simulations), vectors...

View Article

Parallel programming capabilities in Julia

I know that according to ( https://docs.julialang.org/en/v1/manual/parallel-computing/ ) there are three categories for parallel programming in Julia: Coroutines (Green Threading), Multi-Threading and...

View Article


Managing larger project in Julia

Hi, Coming from the MATLAB background where a large project can be handled pretty easily by calling out all the other functions, which are written in separate .m files, into a Main.m file (the name...

View Article


Float to int

hi all if i have array c = [1.0, 2.0, 2.0, 1.0] and i want to convert it to Int in this way c = [1,2,2,1] i tried some thing like that for i in count i = Int64(i) println(i) # the output her is 1 then...

View Article

Julia & PyQt

Hello, I consider that PyQt (or PySide) is the best option for my open-source & multi-platform desktop project…however, Julia as language is very attractive and, afaics, there is possibility to...

View Article

`make testall` noninteractively?

Is there a way to run make testall noninteractively? I want to do something along the lines of nice make testall1 &> make.tests.julia-1.5.0.$(date +'%Y%m%d-%H%M%S').log & but the tests...

View Article

Revise package does not seem to work for me

Hi there I have just tried to install Revise and the usage example given in https://timholy.github.io/Revise.jl/stable/ does not seem to work as expected. I was wondering if someone could point out...

View Article


Swap two number

i just need to swap to number i try it on REPL and some thing weird is happen function highestValuePalindrome(s, n, k) temp = Array{Int64}(undef,n) j=1 for i in s println(i) # here i =3 temp[j] = i #...

View Article

Run as administrator to install system wide

Hello, I am trying to install Juila system wide on a windows master image. I have tried to right click and “Run as administrator” and I have tried to run it from an administrator cmd line, but the...

View Article


Installing R in Julia

Hi, im trying to install the package RCall but I’m running in some problem. for context: >R RHOME /usr/local/lib/R >R --version R version 3.6.3 (2020-02-29) – “Holding the Windsock” OS: Linux...

View Article

Type of array views

Hi, I have just discovered the catch with passing array slices to a function that is to modify the array entries. “view” is the solution. (9792). The rub is, that while c[:,i] is a plain ol’ vector,...

View Article


Basic solving equation with NLsove

Total Julia noob here. So I would like to ultimately solve an equation f(x,a)=0 for x many times as I vary a and plot the solution as a function of a. Before getting to that though, I am first trying...

View Article

Multi of word in dict

Hello all i need to do some thing like that in the dictionary Dict(314 => ["ate","eat","tea"],311 => ["bat"],323 => ["nat","tan"]) iand this is my code function groupAnagrams(str) **d =...

View Article

Image may be NSFW.
Clik here to view.

Optional arguments+splatting

Julia’s creators say they are greedy - so am I. I want to create a function g that accepts a list of arguments (I am trying with a named tuple), and passes it on to a function f. I have 3 requirements...

View Article
Browsing all 2795 articles
Browse latest View live