How to check sbt version?

How to check sbt version?

$ sbt sbtVersion

This prints the sbt version used in your current project, or if it is a multi-module project for each module.

$ sbt inspect sbtVersion
[info] Set current project to jacek (in build file:/Users/jacek/)
[info] Setting: java.lang.String = 0.13.1
[info] Description:
[info]  Provides the version of sbt.  This setting should be not be modified.
[info] Provided by:
[info]  */*:sbtVersion
[info] Defined at:
[info]  (sbt.Defaults) Defaults.scala:68
[info] Delegates:
[info]  *:sbtVersion
[info]  {.}/*:sbtVersion
[info]  */*:sbtVersion
[info] Related:
[info]  */*:sbtVersion

You may also want to use sbt about that (copying Mark Harrahs comment):

The about command was added recently to try to succinctly print the
most relevant information, including the sbt version.

sbt about then enter to get SBT version

enter

How to check sbt version?

Running the command, sbt sbt-version will simply output your current directory and the version number.

$ sbt sbt-version
[info] Set current project to spark (in build file:/home/morgan/code/spark/)
[info] 0.13.8

Related posts

continuous deployment – Trouble trying to run queued Github Actions

continuous deployment – Trouble trying to run queued Github Actions

I see here the following solutions:

  1. You can sleep your dependant workflow to simulate a waiting for
    1st workflow. wait-action might help
    you with that.
  2. You can try to trigger second action from the first action (instead of trigger it on
    push).

But all these options tbh are more like hacks. GitHub Actions are designed to run in parallel and if you want to run actions in specific order you should consider to use jobs instead and use needs property to make a dependency between them. Example:

jobs:
  job1:
    name: Run 1st job
  job2:
    name: Run 2nd job
    needs: job1

Documentation – needs

You can use concurrency.

name: CI

on:
  pull_request:
    branches: [main]

concurrency: ci

jobs:

Documentation

continuous deployment – Trouble trying to run queued Github Actions

Related Posts

Git diff all local uncommitted changes

Git diff all local uncommitted changes

Taken from this answer, to a similar (but I dont think duplicate) question, I think what youre looking for is:

git diff HEAD

This will show you all the differences between your current working directory (i.e. your staged and unstaged changes) and the HEAD commit.

Or – if you prefer to match the syntax in your question, this would do the same thing:

git diff master

(where master is your current branch).

Git diff all local uncommitted changes

Related posts

python – Issues with Anaconda install – Failed to create Anaconda menus

python – Issues with Anaconda install – Failed to create Anaconda menus

2.5 years later, I had the same problem installing v2019.07, but the version actually doesnt matter. Anaconda has had this bug in the installer for a long time.

  • 2019.07 successfully installed on one of my dev boxes
  • 2019.07 failed to create menus on a second dev box with a very similar environment. Both Anaconda and Miniconda failed. I tried everything in this thread, and then some.

Finally I went to the download archive and grabbed 2019.03, which installed with no issues. This fixed it for me, your mileage may vary.

Could you try choosing run as administrator before clicking Anaconda 3 installation? That fixed mine.

python – Issues with Anaconda install – Failed to create Anaconda menus

I was also facing the same issue while installing Anaconda 3.5, please follow the steps below before you start installation :

  1. Delete old Python versions from your PC/Laptop
  2. Clear path variables which have created on your PC
  3. Turn off your anti virus program before you start installation
  4. If you have JDK installed on your machine, uninstall it, also delete JAVA path created in variable

Related Posts

git – How to add a GitHub personal access token to Visual Studio Code

git – How to add a GitHub personal access token to Visual Studio Code

Follow these simple steps to set up GitHub authentication with a personal access token:

  1. Open a command line window on your PC or Terminal on Mac
  2. Set the current directory to your project root
    cd C:UsersGiddysourcerepoMySampleProject
    
  3. Run the command to set remote access via a token
    git remote set-url origin https://username:[email protected]/username/repository.git
    

    Example:

    git remote set-url origin https://sampleuser:a7b19929***[email protected]/sampleuser/sampleproject.git
    

Tested on Visual Studio Code (Mac)

no need for an extra extension. I only trust official extensions, sorry.
GitHub extension by KnisterPeter

  1. Generate a personal access token from github.com
  2. Make sure to save your access token (e.g., ghp_pVC*****)
  3. Open your project with Visual Studio Code or navigate to your project in the terminal, cd ~/path/to/your/project
  4. In the Visual Studio Code terminal, git remote set-url origin https://<personal_access_token>@github.com/<your_username or organization_name>/<repo_name>.git
  5. Now you can try git push

Note:

When generating a personal access token, make sure to enable workflow:

Enter

Hint

You can type git remote -v to see your origin or upstream.

origin  https://github.com/<username>/<repo_name>.git (fetch)
origin  https://github.com/<username>/<repo_name>.git (push)
upstream        https://github.com/<username>/<repo_name>.git (fetch)
upstream        https://github.com/<username>/<repo_name>.git (push)

Also after setting git remote set-url origin https://<personal_access_token>@github.com/<your_username>/<repo_name>.git

Your git remote -v should be something like:

origin  https://<your_personal_access_token>@github.com/<username>/<repo_name>.git (fetch)
origin  https://<your_personal_access_token>@github.com/<username>/<repo_name>.git (push)

git – How to add a GitHub personal access token to Visual Studio Code

Related posts

regsvr32 – Windows 7: unable to register DLL – Error Code:0X80004005

regsvr32 – Windows 7: unable to register DLL – Error Code:0X80004005

According to this: http://www.vistax64.com/vista-installation-setup/33219-regsvr32-error-0x80004005.html

Run it in a elevated command prompt.

Open the start menu and type cmd into the search box
Hold Ctrl + Shift and press Enter

This runs the Command Prompt in Administrator mode.

Now type regsvr32 MyComobject.dll

regsvr32 – Windows 7: unable to register DLL – Error Code:0X80004005

Use following command should work on windows 7. dont forget to enclose the dll name with full path in double quotations.

C:WindowsSysWOW64>regsvr32 c:dll.name 

Related Posts

MATLAB: How do I fix subscripted assignment dimension mismatch?

MATLAB: How do I fix subscripted assignment dimension mismatch?

The line:

new_img(rows,cols,:) = curMean;

will only work if rows and cols are scalar values. If they are vectors, there are a few options you have to perform the assignment correctly depending on exactly what sort of assignment you are doing. As Jonas mentions in his answer, you can either assign values for every pairwise combination of indices in rows and cols, or you can assign values for each pair [rows(i),cols(i)]. For the case where you are assigning values for every pairwise combination, here are a couple of the ways you can do it:

  • Break up the assignment into 3 steps, one for each plane in the third dimension:
    new_img(rows,cols,1) = curMean(1);  %# Assignment for the first plane
    new_img(rows,cols,2) = curMean(2);  %# Assignment for the second plane
    new_img(rows,cols,3) = curMean(3);  %# Assignment for the third plane
    

    You could also do this in a for loop as Jonas suggested, but for such a small number of iterations I kinda like to use an unrolled version like above.

  • Use the functions RESHAPE and REPMAT on curMean to reshape and replicate the vector so that it matches the dimensions of the sub-indexed section of new_img:
    nRows = numel(rows);  %# The number of indices in rows
    nCols = numel(cols);  %# The number of indices in cols
    new_img(rows,cols,:) = repmat(reshape(curMean,[1 1 3]),[nRows nCols]);
    

For an example of how the above works, lets say I have the following:

new_img = zeros(3,3,3);
rows = [1 2];
cols = [1 2];
curMean = [1 2 3];

Either of the above solutions will give you this result:

>> new_img

new_img(:,:,1) =

     1     1     0
     1     1     0
     0     0     0

new_img(:,:,2) =

     2     2     0
     2     2     0
     0     0     0

new_img(:,:,3) =

     3     3     0
     3     3     0
     0     0     0

Be careful with such assignments!

a=zeros(3);
a([1 3],[1 3]) = 1
a =
     1     0     1
     0     0     0
     1     0     1

In other words, you assign all combinations of row and column indices. If thats what you want, writing

for z = 1:3
   newImg(rows,cols,z) = curMean(z);
end

should get what you want (as @gnovice suggested).

However, if rows and cols are matched pairs (i.e. youd only want to assign 1 to elements (1,1) and (3,3) in the above example), you may be better off writing

for i=1:length(rows)
    newImg(rows(i),cols(i),:) = curMean;
end

MATLAB: How do I fix subscripted assignment dimension mismatch?

Related Posts

gaussian – GMM by fitgmdist in MATLAB gives different results when running all iterations at once or iteratively

gaussian – GMM by fitgmdist in MATLAB gives different results when running all iterations at once or iteratively

The stopping is likely related to the convergence check in MATLAB/R201Xy/toolbox/stats/stats/@gmdistribution/private/gmcluster.m about halfway through in gmcluster_learn:

%check if it converges
llDiff = ll-ll_old;
if llDiff >= 0 && llDiff < options.TolFun *abs(ll)                                                                                                                    
    optimInfo.Converged=true;
    break;
end
ll_old = ll; 

where ll is set via [ll,post] = estep(log_lh);, but near the top of the function it sets

ll_old = -inf;

so when you run all at once, llDiff shrinks over the iterations but when you run one by one, it remains large and the convergence check always fails.

gaussian – GMM by fitgmdist in MATLAB gives different results when running all iterations at once or iteratively

Related posts

javascript – freecodecamp Challenges- Seek and Destroy

javascript – freecodecamp Challenges- Seek and Destroy

You can create an array of all values that are supposed to be removed. Then use Array.filter to filter out these values.

Note: Array.splice will change original array.

function destroyer() {
  var arr = arguments[0];
  var params = [];

  // Create array of all elements to be removed
  for (var k = 1; k < arguments.length; k++)
    params.push(arguments[k]);
  
  // return all not matching values
  return arr.filter(function(item) {
    return params.indexOf(item) < 0;
  });
}

console.log(destroyer([1, 2, 3, 1, 2, 3], 2, 3));
function destroyer(arr) {
  /* Put all arguments in an array using spread operator and remove elements 
     starting from 1 using slice intead of splice so as not to mutate the initial array */
  const args = [...arguments].slice(1);
  /* Check whether arguments include elements from an array and return all that 
     do not include(false) */
  return arr.filter(el => !args.includes(el));
}

console.log(destroyer([1, 2, 3, 1, 2, 3], 2, 3));

javascript – freecodecamp Challenges- Seek and Destroy

This worked for me:

function destroyer(arr) {
    // Remove all the values

    var args = Array.from(arguments);
    var filter = [];

    for (i = 0; i < args[0].length; i++) {
        for (j = 1; j < args.length; j++) {
            if (args[0][i] === args[j]) {
                delete args[0][i];
            }
        }
    }

    return args[0].filter(function(x) {
        return Boolean(x);
    });
}

console.log(
    destroyer([1, 2, 3, 1, 2, 3], 2, 3)
);

Related posts

Where can I find documentation for Barnes and Noble search API?

Where can I find documentation for Barnes and Noble search API?

They actually do have one, but unlike Amazon, its private, and getting access is a very manual and time consuming process.

Heres the process I went through:

  1. Sign up as an affiliate @ http://affiliates.barnesandnoble.com/join-now/ (http://affiliates.barnesandnoble.com/ has more information). You dont actually sign up with B&N, you sign up with LinkShare.
  2. Email [email protected] with your LinkShare ID and the URL of the site you are building
  3. Answer any questions they have about your site
  4. Get approved as an affiliate
  5. Accept the affiliate invitation on LinkShare
  6. Email the LinkShare contact requesting API access
  7. Wait for them to forward that email and B&N to get you set up (took a week in my case)
  8. Receive an email with your access key, and a few 3 page word docs of documentation

After that, youre set.

They do not have one.

http://www.barnesandnoble.com/help/help.asp

Where can I find documentation for Barnes and Noble search API?

Even better, they claim to have one, but when you register, theres actually nothing there:

http://developer.bn.com/page

Related Posts