Trying to load a package in Julia - module

I'd like to use the function bitrand(), which is in the compat.jl package. Here is what I did:
julia> Pkg.add("compat")
INFO: Nothing to be done
julia> using Compat
julia> bitrand()
ERROR: bitrand not defined
julia> Pkg.update()
INFO: Updating METADATA...
INFO: Computing changes...
INFO: No packages to install, update or remove
julia> using Compat
julia> bitrand()
ERROR: bitrand not defined
julia> Compat.bitrand()
ERROR: bitrand not defined
For info, I am using Julia-0.3.2. Thank you!
EDIT
julia> Pkg.status()
3 required packages:
- Compat 0.2.10
- Distributions 0.6.3
- StatsBase 0.6.10
3 additional packages:
- ArrayViews 0.4.8
- JSON 0.4.0
- PDMats 0.3.1
julia> Pkg.add("Compat")
INFO: Nothing to be done
julia> using Compat
julia> bitrand()
ERROR: bitrand not defined

This definitely works for me on Julia v0.3.3 with Compat.jl v0.2.10, so can you do the following:
Pkg.rm("Compat")
Run readdir(Pkg.dir()) to confirm its gone
Pkg.update()
Pkg.add("Compat") with a capital C
Close and re-open Julia, just to be sure
using Compat

Related

blogdown::new_site(): Error in dir.exists(x) : invalid filename argument

I am for the first time trying to make a website with blogdown. On running
setwd("..to-my-empty-website-directory..")
library(blogdown)
new_site(theme="yihui/hugo-xmin", dir=".")
I get the error
> new_site(theme="yihui/hugo-xmin", dir=".")
― Creating your new site
| Installing the theme yihui/hugo-xmin from github.com
trying URL 'https://github.com/yihui/hugo-xmin/archive/HEAD.tar.gz'
downloaded 68 KB
Error in dir.exists(x) : invalid filename argument
What is wrong? I have latest versions of hugo v0.103.0 and RStudio 2022.07.1 Build 554. All R packages are up-to-date. Here is Session info
> sessionInfo()
R version 4.2.1 (2022-06-23)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.7
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] blogdown_1.12.1
loaded via a namespace (and not attached):
[1] compiler_4.2.1 tools_4.2.1 yaml_2.3.5 knitr_1.40 xfun_0.33
This is a bug in blogdown, and I have just fixed it in the dev version. Please try the dev version:
remotes::install_github('rstudio/blogdown')

Brownie doesn't import the downloaded files

I have checked various questions regarding Brownie compile. But mine is a little unique. I have some Japanese font which is not read properly by the Brownie compiler.
enter image description here
PS C:\Bharath\src\crypto\python\demos\boss\brow2\brownie_fund_me> brownie compile
INFO: Could not find files for the given pattern(s).
Brownie v1.17.2 - Python development framework for Ethereum
865kiB [00:01, 509kiB/s]
WARNING: Unable to compile smartcontractkit/chainlink-brownie-contracts#1.1.1 due to a UnicodeDecodeError - you may still be able to import sources from the package, but will be unable to load the package directly.
Compiling contracts...
Solc version: 0.6.12
Optimizer: Enabled Runs: 200
EVM Version: Istanbul
CompilerError: solc returned the following errors:
contracts/FundMe.sol:5:1: ParserError: Source "C:/Users/チEôェバラト!EharathTV��.brownie/packages/smartcontractkit/chainlink-brownie-contracts#1.1.1/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol" not found: File outside of allowed directories.
import "#chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol";
^--------------------------------------------------------------------------^
contracts/FundMe.sol:6:1: ParserError: Source "C:/Users/チEôェバラト!EharathTV��.brownie/packages/smartcontractkit/chainlink-brownie-contracts#1.1.1/contracts/src/v0.6/vendor/SafeMathChainlink.sol" not found: File outside of allowed directories.
import "#chainlink/contracts/src/v0.6/vendor/SafeMathChainlink.sol";
^------------------------------------------------------------------^
contracts/test/MockV3Aggregator.sol:4:1: ParserError: Source "C:/Users/チEôェバラト!EharathTV��.brownie/packages/smartcontractkit/chainlink-brownie-contracts#1.1.1/contracts/src/v0.6/interfaces/AggregatorV2V3Interface.sol" not found: File outside of allowed directories.
import "#chainlink/contracts/src/v0.6/interfaces/AggregatorV2V3Interface.sol";
Did you add them into your brownie-config.yaml?
It should look like this:
dependencies:
- OpenZeppelin/openzeppelin-contracts#4.4.1
- smartcontractkit/chainlink-brownie-contracts#1.1.1
compiler:
solc:
remappings:
- '#openzeppelin=OpenZeppelin/openzeppelin-contracts#4.4.1'
- '#chainlink=smartcontractkit/chainlink-brownie contracts#1.1.1'
dotenv: .env
wallets:
from_key: ${PRIVATE_KEY}
I was facing the same issue then i changed solidity version in FundMe.sol file
to pragma solidity ^0.6.6;
I hope this will help you as well.
There could be a possibility of typo in brownie-config.yml file. I had the same issue and I found that it was due to a misspelling.
dependencies:
# the pattern is <organization/repo>#<version>
- smartcontractkit/chainlink-brownie-contracts#1.1.1
compiler:
solc:
remappings:
- '#chainlink=smartcontractkit/chainlink-brownie-contracts#1.1.1'

Connect to JIRA using R

I am not able to connect to JIRA using R. Following are the details which might help you to help me.
R version being used:
R version 3.4.1 (2017-06-30) -- "Single Candle"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)
Installed package RJDBC. I get following output after loading the library
library('RJDBC')
Loading required package: DBI
Loading required package: rJava
Warning messages:
1: package ‘RJDBC’ was built under R version 3.4.4
2: package ‘DBI’ was built under R version 3.4.4
3: package ‘rJava’ was built under R version 3.4.3
Installed and loaded cdata
library('cdata')
Loading required package: wrapr
Warning messages:
1: package ‘cdata’ was built under R version 3.4.4
2: package ‘wrapr’ was built under R version 3.4.4
How do I remove below error?
driver <- JDBC(driverClass = "cdata.jdbc.jira.JiraDriver", classPath = "MyInstallationDir//lib//cdata.jdbc.jira.jar", identifier.quote = "'")
Error in .jfindClass(as.character(driverClass)[1]) : class not found

Ejabberd crash when using mod_muc_admin

We are compiling ejabberd 17.9 using Erlang OTP 20 and Elixir 1.5.2.
We are getting the following error when we try to use mod_muc_admin to remove unused rooms with history_size > 0:
:mod_muc_admin.rooms_unused_list("global", 1)
** (FunctionClauseError) no function clause matching in :calendar.datetime_to_gregorian_seconds/1
The following arguments were given to :calendar.datetime_to_gregorian_seconds/1:
# 1
{1513, 700515, 685388}
(stdlib) calendar.erl:137: :calendar.datetime_to_gregorian_seconds/1
I suspect this is related to Erlang/Elixir versions, but I did not found any official documentation that states any problem with the versions we are using.
The documentation of the erlang source code states:
https://github.com/processone/ejabberd
Erlang/OTP 17.5 or higher.
Any thoughts?
Best regards,
The problem was caused by a bug in ejabberd.
It was corrected in commit:
https://github.com/processone/ejabberd/commit/5e4c547856de6624e4012eb3bf

Pass tags via build.gradle instead thro RunCukesSpec

When I pass tags in the following manner it works perfectly.
package features
import org.junit.runner.RunWith
import cucumber.junit.Cucumber
import geb.junit4.GebReportingTest
#RunWith(Cucumber.class)
#Cucumber.Options(format = ["pretty", "html:build/cucumber", "json-pretty:build/cucumber-report.json"])
,tags = ["#login_neg"])
class RunCukesSpec extends GebReportingTest {}
But my goal is to config same thing via build.gradle & if it succeeds then pass through command line. I tried below as the initial step and hope that by running gradle test in command line to get the expected results.
test {
testLogging.showStandardStreams = true
args = ['--tags', '#login_neg',
'--format', 'html:build/cucumber',
'--format', 'json-pretty:build/cucumber-report.json',
'--format', 'pretty']
}
In this case all the tags are running though.
Tried this as well. But no luck
gradle test -DCucumber.Options="--tags #login_neg"
versions:
------------------------------------------------------------
Gradle 1.9
------------------------------------------------------------
Build time: 2013-11-19 08:20:02 UTC
Build number: none
Revision: 7970ec3503b4f5767ee1c1c69f8b4186c4763e3d
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.9.2 compiled on July 8 2013
Ivy: 2.2.0
JVM: 1.7.0_45 (Oracle Corporation 24.45-b08)
OS: Windows 7 6.1 amd64
You can pass options as System properties by updating your build.gradle file with:
test {
systemProperty "cucumber.options", System.properties.getProperty("cucumber.options")
}
This configuration will pass the cucumber.options System property from the Gradle JVM to the JVM running the tests.
You can then run gradle test -Dcucumber.options="--help" to see the available options for that System property (replace --help with your options).