Fetch dependencies during configuration for offline build

I use corrosion in environments where network access is available for CMake configuration, but not for building. While corrosion_import_crate can be run with FLAGS --offline for an offline build, this fails if the dependencies have not been downloaded.
I believe cargo fetch during configuration would make this possible. What are your thoughts on such a change/feature?

Maybe I am missing something, but it seems like cargo vendor is a bit inconvenient to use as Cargo.toml changes are needed.
I've ended up just doing the following with cargo fetch:
FetchContent_Declare(example ...)
FetchContent_Populate(example)
get_property(CARGO_EXECUTABLE TARGET Rust::Cargo PROPERTY IMPORTED_LOCATION)
execute_process(COMMAND ${CARGO_EXECUTABLE} fetch WORKING_DIRECTORY ${example_SOURCE_DIR})
corrosion_import_crate(MANIFEST_PATH ${example_SOURCE_DIR}/Cargo.toml FLAGS --offline ...)


Review implementations and related areas of quoted-identifiers

Implementation
The identifier in BLangNode, the BLangIdentifier has two values

value - processed name to use in references
originalValue - name defined by the user

In Compiler, a symbol has two values for its name

name - represents the name we use for symbol, created using the name of BLangIdentifier
originalName - represent the value the user has defined, created using originalName of BLangIdentifier

ScopeEntries added using symbols’ name as the key.
Ex:
key: symbol = client : 'client
In Semantic API, we iterate through symbols in a particular scope and create BallerinaSymbol for each symbol using their originalName except package-symbols
https://github.com/ballerina-platform/ballerina-lang/blob/master/compiler/ballerina-lang/src/main/java/io/ballerina/compiler/api/impl/BallerinaSemanticModel.java#L534
//TODO: Fix #31808 and remove this if-check
if (symbol.getKind() == SymbolKind.PACKAGE) {
    compiledSymbol = symbolFactory.getBCompiledSymbol(symbol, name.getValue());
} else {
    compiledSymbol = symbolFactory.getBCompiledSymbol(symbol, symbol.getOriginalName().getValue());
}

Note
In BPackageSymbol, originalName and name are the names defined by the user by bal add <name>
Even though the user defined the package alias with a quoted identifier (’module), in Compiler, they model it as a name that only contains the un-quoted value (module). Therefore, the name originally the user has defined is not getting captured.
We need a proper protocol and convention to follow to address issues that could occur
Related Issue for Sematic API: Related Issue for Semantic API,  https://github.com/ballerina-platform/ballerina-lang/issues/31808

Q: Why has Semantic API is modeled to use the original-name (the name user defined) to use to create the Compiler API Symbols?
A: When the user retrieves the symbol she has defined, she should get what she had declared.
As an example:
If the user wants to complete the <cursor> with 'int vaue, she should be suggested 'int instead of int (int is already a keyword)
int 'int = 4;
int valueX = <cursor>

These facts were found in the live discussion.
[1] In Semantic API, Module symbols have their unquoted names for quoted alias (import test.module as 'mod), But we add the quote (') in the language server implementation when we give the completions.
[2] In the latest client declaration design, since the user should be able to call cls:client even though the client is defined as 'client, we have special-cased this in language-server

Another case which will be tracked under the issue


Remove deprecated sms-voice service in favor of pinpoint-sms-voice

We renamed sms-voice to pinpoint-sms-voice but left the old model directory. Now that we use service id exclusively for events these two services are ambiguous which is problematic. This removes sms-voice on the V2 branch.

Codecov Report

Merging #1958 into v2 will increase coverage by 0.03%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##               v2    #1958      +/-   ##
==========================================
+ Coverage   92.52%   92.56%   +0.03%
==========================================
  Files          55       55
  Lines       10200    10323     +123
==========================================
+ Hits         9438     9555     +117
- Misses        762      768       +6

Impacted Files
Coverage Δ

botocore/handlers.py
95.09% <ø> (-1.41%)
:arrow_down:

botocore/discovery.py
100% <0%> (ø)
:arrow_up:

botocore/eventstream.py
100% <0%> (ø)
:arrow_up:

botocore/retries/quota.py
100% <0%> (ø)
:arrow_up:

botocore/parsers.py
99.79% <0%> (ø)
:arrow_up:

botocore/client.py
99.73% <0%> (ø)
:arrow_up:

botocore/waiter.py
98.68% <0%> (ø)
:arrow_up:

botocore/credentials.py
98.64% <0%> (+0.01%)
:arrow_up:

botocore/utils.py
97.72% <0%> (+0.01%)
:arrow_up:

... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3bd529b...0eee61e. Read the comment docs.


Update the universal footer

We just rolled a new universal footer on news and we need to update the footer on our other platforms for consistency.
Todo:

[ ] update the footer on /learn

The link "news" on the issue redirects to a faulty page. Did you by any chance mean "https://www.freecodecamp.org/news/"?

@MarceloDamian, Yes. Thanks for letting me know.

@ahmadabdolsaheb can I pick this?

Please, go ahead. @abhi0977

I'd like to update the forum's footer. Is there anyway to preview changes of other sites like forum or news on GitPod ?

@Twaha-Rahman, thanks for your interest.
For updating the footer on the forum you need to use Discourse theme creator.
Please refer to the guide for using it:
https://meta.discourse.org/t/beginners-guide-to-using-theme-creator-and-theme-cli-to-start-building-a-discourse-theme/108444

@abhi0977, how is the progress on this? meanwhile if anyone else is interested, they could submit a pr. The first comprehensive pr will be reviewed first.

@ahmadabdolsaheb
I haven't started yet. Working on other things now. i'll update here once I start.
Meanwhile if anyone is interested they can pick this up.

The footer requirements has changed.


List most-recently-used working directories instead of files?

Hi,
Could I configure startify to list MRU working directories instead of files? Because MRU files may be a long list.
Thanks!

Hi, I wasn't active on GitHub in recent months, hence the late reply.
Anyway.. you can do that with a bit of scripting!
function! s:mru_dirs()
  " get 5 most recently used working directories
  let dirs = uniq(map(copy(v:oldfiles), 'fnamemodify(v:val, ":h")'))[:4]
  return map(dirs, '{"line": fnamemodify(v:val, ":."), "path": v:val}')
endfunction

let g:startify_lists = [
      \ { 'header': ['   MRU dirs'],       'type': function('s:mru_dirs') },
      \ { 'header': ['   MRU'],            'type': 'files' },
      \ { 'header': ['   MRU '. getcwd()], 'type': 'dir' },
      \ { 'header': ['   Sessions'],       'type': 'sessions' },
      \ ]

See :h g:startify_lists for more on custom functions.

@mhinz Thank you! I also added a function to list NERDTree bookmarks based on yours.
function! s:nerdtreeBookmarks()
    " List NERDTree bookmarks.
    let bookmarksFile = expand('$HOME') . '/.NERDTreeBookmarks'
    if filereadable(bookmarksFile)
        let bookmarksStrs = readfile(bookmarksFile)
        let bookmarks = []
        for str in bookmarksStrs
            " Ignore blank lines.
            if str !=# ''
                let name = substitute(str, '^\(.\{-}\) .*$', '\1', '')
                let path = substitute(str, '^.\{-} \(.*\)$', '\1', '')
                let path = fnamemodify(path, ':p')

                call add(bookmarks, {'line': name, 'path': path})
            endif
        endfor
        return bookmarks
    endif

    return []
endfunction


[cmake] add function vcpkg_from_bitbucket

This PR adds a similar function as vcpkg_from_github for bitbucket repositories.
A direct application is given for the blaze library portfile in vcpkg.
Contrary to github, when using a tag, the archive downloaded does not have the same name as the folder inside. Therefore it is needed to use the API to retrieve the corresponding hash.
A commit hash is possible to use as REF, it must be 12 characters longs as appearing in the URL, e.g. here and not as displayed on the webpage such as here

@FabienPean,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by Microsoft. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

Thanks for the PR!
There is some code duplication between this and vcpkg_from_github that I would like to address, but having the functionality right now is more important.
Merged.


Don't fail on non-US locales

@Byter09 can you test this before I merge? pre-commit.sh should work without environment variables now.

Codecov Report

Merging #330 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #330   +/-   ##
=======================================
  Coverage   79.49%   79.49%
=======================================
  Files          26       26
  Lines        6842     6842
=======================================
  Hits         5439     5439
  Misses       1403     1403

Impacted Files
Coverage Δ

tests/varargs.rs
100% <ø> (ø)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 13ae508...b05441f. Read the comment docs.


How to train on only one GPU?

Hello,
Which parameters do I need to change to make this train and evaluate on one GPU?
I am currently getting an OOM Resource Exhausted Error when i try to train on one GTX 1080.
I tried setting num_towers=1 in train_imagenet.py but this did not help.

Also tried reducing the batch size to 32,16,etc but the program got stuck before even starting to iterate

https://github.com/brain-research/self-attention-gan/blob/ad9612e60f6ba2b5ad3d3340ebae60f724636d75/train_imagenet.py#L124
did you try  config.gpu_options.allow_growth=True ? or config.gpu_options.per_process_gpu_memory_fraction = 0.4


update tutorial

I had a bit of trouble to set up live_state on my phoenix app as there where some missing pieces on the tutorial.
This Pr only adds a bit more details into how to setup live_state.
Thanks for the work !

Out of context, but i'd like to try and build an igniter installer if you don't mind.
igniter


Sort Attributes rule

Motivation
Hello!
ESLint Plugin Perfectionist plans to deprecate from rules that use third-party parsers (https://github.com/azat-io/eslint-plugin-perfectionist/issues/175).
We'd like to move a rule to you for sorting Astro element attributes.
Description
This rule is needed to sort attributes and create a consistent codebase style.
The rule should be able to sort attributes alphabetically and by line length. Sorting by descending and ascending should also be supported.
The rule should take into account spreads within Astro elements.
Examples
---
---

{/* ✓ GOOD */}
<Foo a="aaa" b="bb" c="c" />

{/* ✗ BAD */}
<Foo b="bb" c="c" a="aaa" />

Additional comments
No response

Thank you for posting the issue!
It SGTM that we can provide that rule from this plugin.


Simplify learning phase 1 (Python)

Apparently a relict of the C code which can be simplified by NumPy mean and max functions.

True! The T wave identification and RR averaging could also benefit from some "numpyization", I can do this in a future PR.

Thanks @cbrnr!


Czech translation

Hello, I would like to submit czech translation.

Thanks @pfrogond

@pfrogond may I ask you to add the line with the language to https://nunocoracao.github.io/blowfish/docs/configuration/#language-and-i18n do that this gets to the docs?
Thanks

@nunocoracao done

Thanks @pfrogond


Add minimum-stability & prefer-stable to get chullo:dev

GitHub Issue: N/A
Still trying to get correct chullo into Crayfish related to #74 test failures
What does this Pull Request do?

Update all lockfiles to PHP 7.2
Update chullo/crayfish-commons to dev branches
Update travis testing to remove 7.1 and add 7.3 as an allowed failure.

What's new?
How should this be tested?
Travis really.
Interested parties
@Islandora-CLAW/committers

If this looks good, I'll make one to Crayfish-Commons and Chullo to update for 7.2 and test against 7.3


Admin Panel

Description 📜
Admin dashboard where they check all things
Fixes #1577

Type of change 📝
Please delete options that are not relevant. In order to tick the check box just put x inside them for example [x] like this

[x] Add a new project

Domain of Contribution 📊
Please delete options that are not relevant. In order to tick the check box just put x inside them for example [x] like this

[x] Project using HTML, CSS, Bootstrap & JS

Checklist ✅
Please delete options that are not relevant. In order to tick the check box just put x inside them for example [x] like this

[x] I have performed a self-review of my own code or work.
[x] My changes generate no new warnings.
[x] I'm GSSoC'22 contributor

Screenshots / Gif (Recommended) 📸
https://user-images.githubusercontent.com/73753957/167558516-d9fe2da1-720c-47da-94ad-1d76456b11a0.mp4

Responsive bhi hai me record krna bhul gya @Mrjoy832

@khushi-purwar https://startbootstrap.com/previews/sb-admin-2

@Mrjoy832  Are you a mentor to this project?

@Mrjoy832 Are you a mentor to this project?

Yes I am mentor here ...I have also DM you discord kindly check...Suddenly over a Night I am Out from leaderboard...Dont ever know the reason..Kindly elaborate what happened?

@khushi-purwar https://startbootstrap.com/previews/sb-admin-2
We have not lots of active mentor as You, I am also Mentor of LearnCPP and here(assigned 2 days before)...So it's not possible always to check always for every project is that plagarized or that? THough You think I am wrong send some of  mentors here ..I will be going out from here🙂 no issue... but @Suvraneel I am not getting any reason why by over a night from the Top of leaderboard I am just vanish?


myOctocat Challenge

add my octocat

please resolve merge conflicts and submit again

I did it because i could't create pull request after changer in profils in
first time , any way , thank you for all this information , i benefites a
lot , thank you :)
Merged #89 https://github.com/openmindsclub/H4ckT0b3rF3st-2k20/pull/89
into main.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/openmindsclub/H4ckT0b3rF3st-2k20/pull/89#event-3868461922,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARHYU3LMXTJCTYXST3VURNLSKN4DTANCNFSM4SNEYZJA
.


Gemfile: malformed requirement 'blazer', '2.1.0+charcoal'

I was trying to run bundle lock but it fails on this line in the Gemfile.
I believe there are two separate errors here.

The version requirement should be something like '~> 2.1.0+charcoal'. The same apparent error also exists in the grape dependency.
More crucially, bundle doesn't seem to like the +charcoal part of the version number. Should we use .charcoal or something instead?

I'm not familiar enough with Ruby in general or Gemfile in particular to proceed on my own.  The first error should be trivial but the second requires a proper understanding of what version numbers are acceptable.  I recognize the +local convention from Debian but it doesn't seem to be supported in Gemfiles.  Or am I using too old a version of bundle or something, perhaps?  Examples in the Gemfile documentation look like a dot would be an allowed separator here, and brief experiments seem to carry this out (though of course then the version I request cannot be found).

Kicked

Aye, it just didn't like the +


basic contract og images

we still need to properly SSR things for this to actually do anything but it's a start :)

📝 Changed routes:

/api/og/contract

Commit f6a83fd51aec597a6ec93092e79a4c5b45959a1f (https://thirdweb-90yxkc4i3.thirdweb-preview.com).

we still need to properly SSR things for this to actually do anything but it's a start :)

so basically this is code that does nothing for now ? :D


reflex run alters .gitignore file if it already exists

Describe the bug
.gitignore file is altered/sorted if it already exists.  makes comments in the gitignore file displaced.
To Reproduce
Steps to reproduce the behavior:
reflex run
echo -e "# ignore the following and explanation\n.secrets" >> .gitignore
trash .web
reflex run

will result in the comment at top and the .secrets or whatever you might want ignored (or temp ignored) displaced

here is a possible fix that seems like it would make sense and I can PR:
def initialize_gitignore(
    gitignore_file: Path = constants.GitIgnore.FILE,
    files_to_ignore: set[str] = constants.GitIgnore.DEFAULTS,
):
    """Initialize the template .gitignore file.

    Args:
        gitignore_file: The .gitignore file to create.
        files_to_ignore: The files to add to the .gitignore file.
    """
    # Combine with the current ignored files.
    current_ignore: list[str] = []
    if gitignore_file.exists():
        for line in gitignore_file.read_text().splitlines():
            current_ignore.append(line.strip())

    if files_to_ignore == current_ignore:
        console.debug(f"{gitignore_file} already up to date.")
        return

    files_to_ignore = current_ignore + [f for f in files_to_ignore if f not in current_ignore]

    # Write files to the .gitignore file.
    gitignore_file.touch(exist_ok=True)
    console.debug(f"Creating {gitignore_file}")
    gitignore_file.write_text("\n".join(files_to_ignore) + "\n")

basically just use list and dont sort at end

that looks fine! make a PR and we will get it reviewed!


feat: ✨  added translation JSON files extraction

Pull Request Test Coverage Report for Build 240533190

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 99.672%

Totals

Change from base Build 200586007:
0.0%

Covered Lines:
244

Relevant Lines:
244

💛  - Coveralls


Support custom mount directory per each repository using FS storage

Request details
storageProvider: fs --quota 100% --mount /mnt/proxied-repo

Can I assign storageProvider to proxied repo? This would allow reposilite to store upstream caches in a different location rather than mixed with self hosted packages.

@ChanthMiao Currently it's not possible, but it's an interesting idea for a new issue :)

@ChanthMiao Currently it's not possible, but it's an interesting idea for a new issue :)

Thanks for reply. I just open a new issue #913


Dataset extra formats

:warning We can't release a new version of the frontend until the download tool is ready to handle these new fields.


Update Files.txt

Updated with info on starting ysbox.exe and ysgen.exe directly, without going through yserbius.exe

@pchernik I clarified how to use the parameters you indicated. Interesting find! -ZW

Have you figured out what the medallions do? Netherworld, etc?
On Sun, Jun 28, 2020, 9:10 AM Zane Wagner<EMAIL_ADDRESS>wrote:

Merged #2 https://github.com/ZaneDubya/YserbiusData/pull/2 into master.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ZaneDubya/YserbiusData/pull/2#event-3490393739, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AB4ZKU33JOBLG6PTSIZRARDRY5MPRANCNFSM4OKGDXDQ
.

Yes - they don't do much.
Data is here: https://github.com/ZaneDubya/YserbiusData/blob/master/Yserbius/Data/Items.csv
The MonGroup and MonEffect fields from that data are the only thing that I think could encode some kind of effect. Those fields are loaded into memory, but as far as I can tell, those fields are never referenced by the original game's map script or combat handlers.
This is also the case for some of the monster data - that data also has fields that are loaded into memory but never referenced.

If I were to hazard a guess, I would say that those items were intended to increase the damage done to monsters of the type encoded in MonGroup, or to reduce the damage taken from those monsters, or both. But as I wrote, the data is not actually used by the original game.

What do the item flags do? 64 / 96 / 32 / 192
[image: image.png]
On Mon, Jun 29, 2020 at 3:07 PM Zane Wagner<EMAIL_ADDRESS>wrote:

If I were to hazard a guess, I would say that those items were intended to
increase the damage done to monsters of the type encoded in MonGroup, or to
reduce the damage taken from those monsters, or both. But as I wrote, the
data is not actually used by the original game.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ZaneDubya/YserbiusData/pull/2#issuecomment-651304155,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AB4ZKU6A6R76YASCODZDUL3RZDQ6XANCNFSM4OKGDXDQ
.

Resists states: poison, petrify, etc.

Oh! So wouldn't that explain the medallions then, as each one resisting a
different state?
On Mon, Jun 29, 2020 at 8:20 PM Zane Wagner<EMAIL_ADDRESS>wrote:

Resists states: poison, petrify, etc.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ZaneDubya/YserbiusData/pull/2#issuecomment-651438330,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AB4ZKU54BVWAHMC4ZM54FFDRZEVV5ANCNFSM4OKGDXDQ
.

Ah, excellent point! Yes, it would!
The tooltips in the game should reflect that correctly. I haven't looked at the item data fields in over a year, so I admit I'm a little rusty in my recall. :)

Haha... Gotcha. Thanks for the info.
On Mon, Jun 29, 2020 at 8:28 PM Zane Wagner<EMAIL_ADDRESS>wrote:

Ah, excellent point! Yes, it would!
The tooltips in the game should reflect that correctly. I haven't looked
at the item data fields in over a year, so I admit I'm a little rusty in my
recall. :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ZaneDubya/YserbiusData/pull/2#issuecomment-651441584,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AB4ZKU2GM3VBKUWTPPKMRO3RZEWT3ANCNFSM4OKGDXDQ
.


Fact Checks - Filter by Status (Ready to Publish) and Filter by Author is not working

Fact Checks - Filter by Status (Ready to Publish) and Filter by Author is not working

Closing the issue as we are not able to replicate it. Confirmed with @sshankaramanchi that it is working as expected.


Module failures when trying to start the nerdpack

Description
Module not found and module build failed errors when trying to start the nerdpack
Steps to Reproduce
nr1 nerdpack:serve
Relevant Logs / Console output
`  ERROR in ./nerdlets/nr1-command-center-nerdlet/alarms.js
Module not found: Error: Can't resolve 'moment' in '/root/GITLAB/nerdpack/nr1-command-center/nerdlets/nr1-command-center-nerdlet'
@ ./nerdlets/nr1-command-center-nerdlet/alarms.js 17:0-28 489:20-26 758:22-28 759:22-28 806:17-23 806:29-35 995:25-31
@ ./nerdlets/nr1-command-center-nerdlet/index.js
ERROR in ./components/Configurator/index.js
Module not found: Error: Can't resolve 'prop-types' in '/root/GITLAB/nerdpack/nr1-command-center/components/Configurator'
 @ ./components/Configurator/index.js 12:0-35 433:10-19 434:8-17 435:21-30
 @ ./nerdlets/nr1-command-center-nerdlet/alarms.js
 @ ./nerdlets/nr1-command-center-nerdlet/index.js

ERROR in ./components/Configurator/Components/ToolPanel/index.js
Module not found: Error: Can't resolve 'prop-types' in '/root/GITLAB/nerdpack/nr1-command-center/components/Configurator/Components/ToolPanel'
 @ ./components/Configurator/Components/ToolPanel/index.js 10:0-35
 @ ./components/Configurator/index.js
 @ ./nerdlets/nr1-command-center-nerdlet/alarms.js
 @ ./nerdlets/nr1-command-center-nerdlet/index.js

ERROR in ./components/Configurator/Customisations/BaseInput.js
Module not found: Error: Can't resolve 'prop-types' in '/root/GITLAB/nerdpack/nr1-command-center/components/Configurator/Customisations'
 @ ./components/Configurator/Customisations/BaseInput.js 5:0-35 98:8-17 99:17-26 100:11-20 101:14-23 102:14-23 103:14-23 104:15-24 105:14-23 106:12-21 107:13-22
 @ ./components/Configurator/index.js
 @ ./nerdlets/nr1-command-center-nerdlet/alarms.js
 @ ./nerdlets/nr1-command-center-nerdlet/index.js

ERROR in ./nerdlets/nr1-command-center-nerdlet/alarms.js
Module not found: Error: Can't resolve 'prop-types' in '/root/GITLAB/nerdpack/nr1-command-center/nerdlets/nr1-command-center-nerdlet'
 @ ./nerdlets/nr1-command-center-nerdlet/alarms.js 13:0-35 1474:20-29 1475:19-28 1476:9-18 1477:10-19
 @ ./nerdlets/nr1-command-center-nerdlet/index.js

ERROR in ./components/Configurator/index.js
Module not found: Error: Can't resolve 'react-jsonschema-form' in '/root/GITLAB/nerdpack/nr1-command-center/components/Configurator'
 @ ./components/Configurator/index.js 13:0-41 311:41-45
 @ ./nerdlets/nr1-command-center-nerdlet/alarms.js
 @ ./nerdlets/nr1-command-center-nerdlet/index.js

ERROR in ./nerdlets/nr1-command-center-nerdlet/alarms.js
Module not found: Error: Can't resolve 'react-table' in '/root/GITLAB/nerdpack/nr1-command-center/nerdlets/nr1-command-center-nerdlet'
 @ ./nerdlets/nr1-command-center-nerdlet/alarms.js 14:0-37 949:31-41
 @ ./nerdlets/nr1-command-center-nerdlet/index.js

ERROR in ./tmp/d3d845e0-c97c-4acd-99e0-203d6ac6ebc4-styles.1583923439037.scss
Module build failed (from /usr/lib/newrelic-cli/node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from /usr/lib/newrelic-cli/node_modules/fast-sass-loader/lib/index.js):
Error: import file cannot be resolved: "@import '~react-table/react-table.css';" @/root/GITLAB/nerdpack/nr1-command-center/nerdlets/nr1-command-center-nerdlet/styles.scss
    at Object.importReplacer (/usr/lib/newrelic-cli/node_modules/fast-sass-loader/lib/index.js:207:19)
    at importReplacer.throw (<anonymous>)
    at onRejected (/usr/lib/newrelic-cli/node_modules/co/index.js:81:24)
    at process._tickCallback (internal/process/next_tick.js:68:7)
    at runLoaders (/usr/lib/newrelic-cli/node_modules/webpack/lib/NormalModule.js:316:20)
    at /usr/lib/newrelic-cli/node_modules/loader-runner/lib/LoaderRunner.js:367:11
    at /usr/lib/newrelic-cli/node_modules/loader-runner/lib/LoaderRunner.js:233:18
    at context.callback (/usr/lib/newrelic-cli/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at co.then.err (/usr/lib/newrelic-cli/node_modules/fast-sass-loader/lib/index.js:317:5)
    at process._tickCallback (internal/process/next_tick.js:68:7)
Child mini-css-extract-plugin ../../../../usr/lib/newrelic-cli/node_modules/css-loader/dist/cjs.js??ref--5-1!../../../../usr/lib/newrelic-cli/node_modules/postcss-loader/src/index.js??postcss!../../../../usr/lib/newrelic-cli/node_modules/fast-sass-loader/lib/index.js!tmp/d3d845e0-c97c-4acd-99e0-203d6ac6ebc4-styles.1583923439037.scss:
    Entrypoint mini-css-extract-plugin = *
    [../../../../usr/lib/newrelic-cli/node_modules/css-loader/dist/cjs.js?!../../../../usr/lib/newrelic-cli/node_modules/postcss-loader/src/index.js?!../../../../usr/lib/newrelic-cli/node_modules/fast-sass-loader/lib/index.js!./tmp/d3d845e0-c97c-4acd-99e0-203d6ac6ebc4-styles.1583923439037.scss] /usr/lib/newrelic-cli/node_modules/css-loader/dist/cjs.js??ref--5-1!/usr/lib/newrelic-cli/node_modules/postcss-loader/src??postcss!/usr/lib/newrelic-cli/node_modules/fast-sass-loader/lib!./tmp/d3d845e0-c97c-4acd-99e0-203d6ac6ebc4-styles.1583923439037.scss 574 bytes {mini-css-extract-plugin} [built] [failed] [1 error]

    ERROR in ./tmp/d3d845e0-c97c-4acd-99e0-203d6ac6ebc4-styles.1583923439037.scss (/usr/lib/newrelic-cli/node_modules/css-loader/dist/cjs.js??ref--5-1!/usr/lib/newrelic-cli/node_modules/postcss-loader/src??postcss!/usr/lib/newrelic-cli/node_modules/fast-sass-loader/lib!./tmp/d3d845e0-c97c-4acd-99e0-203d6ac6ebc4-styles.1583923439037.scss)
    Module build failed (from /usr/lib/newrelic-cli/node_modules/fast-sass-loader/lib/index.js):
    Error: import file cannot be resolved: "@import '~react-table/react-table.css';" @/root/GITLAB/nerdpack/nr1-command-center/nerdlets/nr1-command-center-nerdlet/styles.scss
        at Object.importReplacer (/usr/lib/newrelic-cli/node_modules/fast-sass-loader/lib/index.js:207:19)
        at importReplacer.throw (<anonymous>)
        at onRejected (/usr/lib/newrelic-cli/node_modules/co/index.js:81:24)
        at process._tickCallback (internal/process/next_tick.js:68:7)
Error: The build failed.
 You can run this command with "--verbose" for more info.`

Similar to #3, I believe an update to the CLI will fix this

Seems to work. Thanks!


chore: bump api version to v10

bumps the api version to the new--v10 api

@TAG-Epic :^)

Thanks! Ill get to merging this locally later!


Add TodoList to Model and ModelManager

Fixes #242
This PR added the TodoList to the Model and ModelManager class.

File changes :

Model class:

Added abstract method related to TodoList

ModelManager:

Added implementation for TodoList

Test classes:

Commented out some of the test that use Model

Task:

isSameTask() now means that both task only have the same name since the other field are now optional

TaskName:

value (String) comparison now ignore the upper/lowercase of the value since for example "read book" and "READ BOOK"
means the same thing

Codecov Report

Merging #243 into master will increase coverage by 0.11%.
The diff coverage is 28.03%.

@@             Coverage Diff              @@
##             master     #243      +/-   ##
============================================
+ Coverage     19.66%   19.77%   +0.11%
- Complexity      299      308       +9
============================================
  Files           196      200       +4
  Lines          3016     3115      +99
  Branches        261      272      +11
============================================
+ Hits            593      616      +23
- Misses         2376     2448      +72
- Partials         47       51       +4

Impacted Files
Coverage Δ
Complexity Δ

src/main/java/seedu/address/MainApp.java
0.00% <0.00%> (ø)
0.00 <0.00> (ø)

src/main/java/seedu/address/model/task/Task.java
0.00% <ø> (ø)
0.00 <0.00> (ø)

.../model/task/exceptions/DuplicateTaskException.java
0.00% <0.00%> (ø)
0.00 <0.00> (?)

...s/model/task/exceptions/TaskNotFoundException.java
0.00% <0.00%> (ø)
0.00 <0.00> (?)

.../java/seedu/address/model/task/UniqueTodoList.java
20.93% <20.93%> (ø)
4.00 <4.00> (?)

...rc/main/java/seedu/address/model/ModelManager.java
49.42% <28.57%> (-12.70%)
18.00 <2.00> (ø)

src/main/java/seedu/address/model/TodoList.java
40.00% <40.00%> (ø)
6.00 <6.00> (?)

src/main/java/seedu/address/model/Model.java
100.00% <100.00%> (ø)
2.00 <0.00> (ø)

src/main/java/seedu/address/model/ContactList.java
45.83% <0.00%> (-4.17%)
5.00% <0.00%> (-1.00%)

... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7900b4f...7f2f2ba. Read the comment docs.


Dev/llamacpp quantization

Methods:

[ ]  make_qkx1_quants
[x]  make_qkx2_quants
[x]  make_qkx3_quants
[x]  make_qx_quants
[x]  make_q3_quants
[ ] quantize_row_iq1_m_impl
[x] imatrix

@deitch Added some quantization resources.

Added a comment.


Add null rate for fake collections

The PR adds support of null rate for fake collections e.g.
List<String> names = new FakeCollection.Builder<String>()
            .suppliers(() -> faker.name().firstName(), () -> faker.name().lastName())
            .nullRate(1d)
            .minLen(3)
            .maxLen(5).build().get();

will generate collection of nulls
or
List<String> names = new FakeCollection.Builder<String>()
            .suppliers(() -> faker.name().firstName(), () -> faker.name().lastName())
            .nullRate(0.3)
            .minLen(3)
            .maxLen(5).build().get();

will generate collection with about 30% of nulls.
By default nullRate is 0, i.e. no nulls will be generated

Codecov Report

Merging #102 (fef23f9) into master (69ca27d) will decrease coverage by 0.07%.
The diff coverage is 90.90%.

@@             Coverage Diff              @@
##             master     #102      +/-   ##
============================================
- Coverage     93.51%   93.44%   -0.08%
  Complexity     1558     1558
============================================
  Files           160      160
  Lines          3394     3402       +8
  Branches        344      345       +1
============================================
+ Hits           3174     3179       +5
- Misses          136      137       +1
- Partials         84       86       +2

Impacted Files
Coverage Δ

src/main/java/net/datafaker/FakeCollection.java
46.91% <90.90%> (+4.44%)
:arrow_up:

...ker/idnumbers/pt/br/IdNumberGeneratorPtBrUtil.java
92.59% <0.00%> (-3.71%)
:arrow_down:

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

Merged as https://github.com/datafaker-net/datafaker/commit/c1296cf4c9537d512302f028e7070312ed3d7b60


Unit info - Show unit FS info

Need to find how FS level increase works.
Zhu Bajie 10450403
Related hit attributes

AXE_HAK_CHR_01_H01_LV01
AXE_HAK_CHR_01_H01_LV01_CHLV02
AXE_HAK_CHR_01_H01_LV01_CHLV03
AXE_HAK_CHR_01_H01_LV02
AXE_HAK_CHR_01_H01_LV02_CHLV02
AXE_HAK_CHR_01_H01_LV02_CHLV03

Related action ID
400205

Source: _BurstAttackId of mode # 24.
Usage: All FS levels?
Hit attributes:

AXE_HAK_CHR_01_H01_LV01

Notes
Charge level advancing mechanism unknown (same action ID). Not using the same one as MH Sarisse.
MH Sarisse 10650202
Related hit attibutes

BOW_MH_CHR_01_H01_LV01
BOW_MH_CHR_01_H01_LV01_CHLV02
BOW_MH_CHR_01_H01_LV01_CHLV03
BOW_MH_CHR_01_H01_LV01_CHLV04
BOW_MH_CHR_01_H01_LV02
BOW_MH_CHR_01_H01_LV02_CHLV02
BOW_MH_CHR_01_H01_LV02_CHLV03
BOW_MH_CHR_01_H01_LV02_CHLV04

Related action ID
698005 (Main FS Root)

Source: _BurstAttack of corresponding character data.
Usage: FS charge level 1
Hit attributes:

BOW_MH_CHR_01_H01_LV01
BOW_MH_CHR_01_H01_LV01
BOW_MH_CHR_01_H01_LV01

All hit attributes have _attenuationRate of 0.3 for each ActionPartsBullet.
All hit attributes have _collisionParams_01 (Length) = 0.5 with _collisionHitInterval = 0.1, which means the bullets can hit up to 5 time.
In this case, the bullets can hit up to 5 times for each bullet x 3 bullets = 15 times in total.
698105

Source: Unknown
Usage: FS charge level 2
Hit attributes:

BOW_MH_CHR_01_H01_LV01_CHLV02
BOW_MH_CHR_01_H01_LV01_CHLV02
BOW_MH_CHR_01_H01_LV01_CHLV02

698205

Source: Unknown
Usage: FS charge level 3
Hit attributes:

BOW_MH_CHR_01_H01_LV01_CHLV03
BOW_MH_CHR_01_H01_LV01_CHLV03
BOW_MH_CHR_01_H01_LV01_CHLV03
BOW_MH_CHR_01_H01_LV01_CHLV03

698305

Source: Unknown
Usage: FS charge level 4
Hit attributes:

BOW_MH_CHR_01_H01_LV01_CHLV04
BOW_MH_CHR_01_H01_LV01_CHLV04
BOW_MH_CHR_01_H01_LV01_CHLV04
BOW_MH_CHR_01_H01_LV01_CHLV04

691129 (Charge Break)

Source: _ChargeBreakId in the mode data # 79.
Usage: Unknown

Notes
Charge level advancing mechanism unknown (uses different action ID for different charge level). Not using the same one as Zhu Bajie.

Investigations

Skill (FS) level advancing mechanism: Same as skills.
Charge level advancing mechanism: Unknown.

Different source of FS action IDs?
Change by ActionPartsSendSignal?
Any other action to change to the next level?

Too complicated so halting this for now.
Check fs branch in both the API definition repo (RaenonX-DL/dragalia-site-api-definitions) and the frontend (this) for the changed related to this issue.


DO NOT MERGE: RHOARDOC-1357 : Added assemblies to runtime guides

Changes to document structure to more closely adhere to modular documentation concepts. New content to provide introductions to the new  assemblies.

@huntley Looks good! Just one question, where can I see the rendered preview of the changes?
Thanks

It's not really working for me at the moment - all I get is Prepare to launch.... But I trust it works :)

Oh, I see! Thanks @ncbaratta @huntley

This PR can not be completed due to low priority and lack of team resources. It will be closed and  can be reopened later.


Update README.md

Summary of your changes
Description

Checklist

[x] My change follows the Contributing Guidelines
[x] I have added only one new link to the list.
[x] I have checked that the link that I added does NOT exist in the project already.
[x] I have sorted the link alphabetically under the related section.

consider my change


Drop patch that is not needed for sagelib 9.5 anymore

SageMath 9.5 has dropped this patch.
I guess we should not yet merge this but wait until the next maxima release. Otherwise sagelib 9.4 might pull in this version of maxima and there will be problems.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.
I do have some suggestions for making it better though...
For recipe:

License is not an SPDX identifier (or a custom LicenseRef) nor an SPDX license expression.

Documentation on acceptable licenses can be found here.

I guess we should not yet merge this but wait until the next maxima release. Otherwise sagelib 9.4 might pull in this version of maxima and there will be problems.

You can add a run_constrained: - sagelib >=9.5 to make sure this version is only used with sagelib>=9.5

@conda-forge-admin, please rerender.


build consent page that allows you to see a patient

This should replace the "request info" buttons already in the templates and turn into a "I verify that I have consent" button that reveals patient information.


ISPN-10074 DefaultDataContainer executeTask() should ignore maxIdle

https://issues.jboss.org/browse/ISPN-10074
In clustered caches, maxIdle expiration should be ignored by
executeTask() and iterator(), and expired entries should be returned
until the purge thread removes them from the container.

Thanks @danberindei


no really, layers first

@nvkelso - I merged locally to fix the conflict. Make sure it looks OK!

Just kidding, this didn't fix the build error. Working on it.


s47029172 - ViT Classification of ADNI dataset

The ViT-Classifier-s4702917 folder contains my implementation of a ViT classifier for the ADNI dataset for Alzheimer’s disease. I have taken a pre-trained model provided by the timm library and done transfer learning to optimise it for the ADNI dataset. The final accuracy I was able to achieve in classifying the test set was only 62.3% after attempting a variety of different hyperparameters and variations on the model, and I believe that this is probably around the best that a pure transformer architecture can do with this dataset.

This is an initial inspection, no action is required at this point
Difficulty: Hard
Readme:
Excellent
Commit messages: Excellent, detailed.
Code:

Uses vision transformer
Well commented
Good model design

Functionality/Performance:

Test ACC: 62.3%
Preprocssing data correctly
Did patient level split.
Well done

Marking
Good Practice (Design/Commenting, TF/Torch Usage)
Adequate design and implementation
Good spacing and comments
Header blocks missing -1
Recognition Problem
Solves problem
Driver Script present
File structure present
Shows Usage & Demo & Visualisation & Data usage
Module present
Commenting
No Data leakage
Difficulty: Hard
Commit Log
Meaningful commit messages
Progressive commits used
Documentation
ReadMe acceptable missing both usage and refs -2
Model/technical explanation
Good Description and Comments
Markdown used and PDF submitted
Pull Request
Successful Pull Request (Working Algorithm Delivered on Time in Correct Branch)
No Feedback required
Request Description good


Revert "Bump Hugo version"

Reverts kubernetes-sigs/kwok#296
The new version of the image does not exist
I add test in #301

/lgtm


regl status

Looks like regl development has been paused since November, which is totally understandable. I'm super impressed this kind of stuff exists at all. What's the plan for regl? Is it only for people that can fix bare-metal bugs or will it be actively maintained?

The project is considered complete. If there are bugs, they will be fixed.
As a general point, recency of commits is a poor indicator as to whether a project is worth using or not. Read the source, read the tests, and determine if the project suits your needs. If so, use it. If not, find something else.


Create the client side order controller

Add the create my order button into the card-component.
The order component will use the mat-stepper component. Ideally, the card-component is the first step, then try to hide the stepper header until the order process has started.
Otherwise, add a separate component and add the related route.

Hide the stepper header is easy, but remove it from the flow is hard because it's a flex container.


What should the default axon shape be: circle or ellipse(morphometrics) ?

As discussed in our previous meeting, we need to have consensus what the default axon shape should be for morphometrics computation . In order to determine that, I have tested the feature (#399) on the example test data as mentioned in RTD (see here).
The dataset consists of

1st SEM test image

image1_SEM
image2_SEM

2nd SEM test image

image1_SEM

1st TEM test image

image1_TEM

Morphometrics Analysis on these images

1st SEM test image (image1_SEM)

  - When axon shape is set as circle.

| gratio | axon_area | myelin_area |   axon_diam |   myelin_thickness | axonmyelin_area
-- | -- | -- | -- | -- | -- | --
23 | 0.76019 | 38.318 | 27.9888 | 6.98484 | 1.101719 | 66.3068
41 | 0.50516 | 2.4108 | 7.0364 | 1.752006 | 0.858107 | 9.4472
44 | 0.694327 | 30.0713 | 32.3057 | 6.187727 | 1.362056 | 62.377
51 | 0.683596 | 14.1463 | 16.1259 | 4.244011 | 0.982176 | 30.2722
72 | 0.669229 | 4.6305 | 5.7085 | 2.428114 | 0.600056 | 10.339
image1_SEM_morphometrics_circle.xlsx
 - When axon shape is set as an ellipse

| gratio | axon_area | myelin_area |   axon_diam |   myelin_thickness  | axonmyelin_area
-- | -- | -- | -- | -- | -- | --
23 | 0.76019 | 38.318 | 27.9888 | 4.617765 | 0.971211 | 66.3068
41 | 0.50516 | 2.4108 | 7.0364 | 1.584517 | 0.842758 | 9.4472
44 | 0.694327 | 30.0713 | 32.3057 | 5.240084 | 1.384566 | 62.377
51 | 0.683596 | 14.1463 | 16.1259 | 3.620902 | 0.881783 | 30.2722
72 | 0.669229 | 4.6305 | 5.7085 | 1.542883 | 0.555395 | 10.339
image1_SEM_morphometrics_ellipse.xlsx

1st SEM test image (image2_SEM)

  - When axon shape is set as circle.

| gratio | axon_area | myelin_area |  axon_diam |   myelin_thickness  | axonmyelin_area
-- | -- | -- | -- | -- | -- | --
95 | 0.631449 | 21.1926 | 31.9579 | 5.194541 | 1.515919 | 53.1505
105 | 0.67661 | 3.0251 | 3.5828 | 1.962569 | 0.469012 | 6.6079
108 | 0.691071 | 44.8188 | 49.0269 | 7.554142 | 1.688458 | 93.8457
123 | 0.598044 | 10.9343 | 19.6378 | 3.731217 | 1.253911 | 30.5721
131 | 0.676415 | 39.2418 | 46.5257 | 7.068537 | 1.690733 | 85.7675
image2_SEM_morphometrics_circle.xlsx
  - When axon shape is set as an ellipse

| gratio | axon_area | myelin_area |   axon_diam |   myelin_thickness | axonmyelin_area
-- | -- | -- | -- | -- | -- | --
95 | 0.631449 | 21.1926 | 31.9579 | 4.679203 | 1.456329 | 53.1505
105 | 0.67661 | 3.0251 | 3.5828 | 1.567248 | 0.469609 | 6.6079
108 | 0.691071 | 44.8188 | 49.0269 | 5.891441 | 1.549287 | 93.8457
123 | 0.598044 | 10.9343 | 19.6378 | 2.244691 | 1.245489 | 30.5721
131 | 0.676415 | 39.2418 | 46.5257 | 5.924539 | 1.623364 | 85.7675
image2_SEM_morphometrics_ellipse.xlsx

1st TEM test image (image1_TEM)

  - When axon shape is set as circle.

| gratio | axon_area | myelin_area |   axon_diam |   myelin_thickness | axonmyelin_area
-- | -- | -- | -- | -- | -- | --
14 | 0.730813 | 0.286975 | 0.250344 | 0.604473 | 0.111326 | 0.537319
16 | 0.718671 | 0.2737 | 0.256225 | 0.590327 | 0.115544 | 0.529925
22 | 0.844741 | 1.3593 | 0.545581 | 1.315566 | 0.120897 | 1.904881
35 | 0.761378 | 0.1833 | 0.1329 | 0.483099 | 0.075704 | 0.3162
39 | 0.640557 | 0.1667 | 0.239575 | 0.460705 | 0.12926 | 0.406275
image1_TEM_morphometrics_circle.xlsx
     - When axon shape is set as an ellipse

| gratio | axon_area | myelin_area |   axon_diam |   myelin_thickness  | axonmyelin_area
-- | -- | -- | -- | -- | -- | --
14 | 0.730813 | 0.286975 | 0.250344 | 0.539991 | 0.106854 | 0.537319
16 | 0.718671 | 0.2737 | 0.256225 | 0.458162 | 0.107747 | 0.529925
22 | 0.844741 | 1.3593 | 0.545581 | 1.19527 | 0.119756 | 1.904881
35 | 0.761378 | 0.1833 | 0.1329 | 0.458095 | 0.083194 | 0.3162
39 | 0.640557 | 0.1667 | 0.239575 | 0.403173 | 0.098707 | 0.406275
image1_TEM_morphometrics_ellipse.xlsx

As you can clearly see that for the columns( axon_diam and myelin thickness), there is indeed a difference in the values when we select axon shape as circle or ellipse. But looking at these values, I am not sure how significant these differences are. So, I need @mathieuboudreau  or @jcohenadad your insights on this.

wow, the difference is quite dramatic. Could you please post the image showing the axons "0" (big change) and "4" (small change) for image1_SEM? I'd like to get a sense of the numbers by comparing with the images.
Also, could you show us the segmented image (with axon numbers) for image1_TEM? there are some diameters that are suspiciously small (0.01µm)

wow, the difference is quite dramatic. Could you please post the image showing the axons "0" (big change) and "4" (small change) for image1_SEM? I'd like to get a sense of the numbers by comparing with the images.
Also, could you show us the segmented image (with axon numbers) for image1_TEM? there are some diameters that are suspiciously small (0.01µm)

wow, the difference is quite dramatic. Could you please post the image showing the axons "0" (big change) and "4" (small change) for image1_SEM? I'd like to get a sense of the numbers by comparing with the images.
Also, could you show us the segmented image (with axon numbers) for image1_TEM? there are some diameters that are suspiciously small (0.01µm)

When I looked at the images of the previous first 5 axon/myelin instances ["0", "1", "2", "3" "4] , I decided to remove them in the embedded table of my previous comment because these instances were mostly present at the top border of the image, which were either very small to look at or were either sliced, and I think this won't be an accurate representation of the morphometrics.
Instead of that, I manually chose 5 instances present mostly in the middle of the images and updated it in the embedded tables of my comment, so that we can look at these instances clearly and decide what's the best choice. ( If you wish to look at the morphometrics of earlier instances ["0", "1", "2", "3" "4], you can refer the excel files. )
I've uploaded the images in my previous commment. The images: image1_SEM and image2_SEM are zoomed segmented images since when I tried to upload the entire image the numbering on individual instances becomes blurry.
Also, in order to understand the complete picture and make a decision regarding the axon shape, I recommend to look at the morphometrics excel sheets as well.

wow, the difference is quite dramatic. Could you please post the image showing the axons "0" (big change) and "4" (small change) for image1_SEM? I'd like to get a sense of the numbers by comparing with the images.
Also, could you show us the segmented image (with axon numbers) for image1_TEM? there are some diameters that are suspiciously small (0.01µm)

When I looked at the images of the previous first 5 axon/myelin instances ["0", "1", "2", "3" "4] , I decided to remove them in the embedded table of my previous comment because these instances were mostly present at the top border of the image, which were either very small to look at or were either sliced, and I think this won't be an accurate representation of the morphometrics.
Instead of that, I manually chose 5 instances present mostly in the middle of the images and updated it in the embedded tables of my comment, so that we can look at these instances clearly and decide what's the best choice. ( If you wish to look at the morphometrics of earlier instances ["0", "1", "2", "3" "4], you can refer the excel files. )
I've uploaded the images in my previous commment. The images: image1_SEM and image2_SEM are zoomed segmented images since when I tried to upload the entire image the numbering on individual instances becomes blurry.
Also, in order to understand the complete picture and make a decision regarding the axon shape, I recommend to look at the morphometrics excel sheets as well.

thank you @vs74 , these number look more reasonable now. I think I would change the default for the "ellipse" based approach, given that it seems this is what most ppl are using. What do you think @mathieuboudreau @mariehbourget ?

thank you @vs74 , these number look more reasonable now. I think I would change the default for the "ellipse" based approach, given that it seems this is what most ppl are using. What do you think @mathieuboudreau @mariehbourget ?

thank you @vs74 , these number look more reasonable now. I think I would change the default for the "ellipse" based approach, given that it seems this is what most ppl are using. What do you think @mathieuboudreau @mariehbourget ?

Yup, I agree with this. I'd like it if we could also add this information in some key locations throughout the project (e.g. README, RTD, Notebooks, and maybe even in some comments in the code) too so that people don't report the wrong information in their publications after using the software.

thank you @vs74 , these number look more reasonable now. I think I would change the default for the "ellipse" based approach, given that it seems this is what most ppl are using. What do you think @mathieuboudreau @mariehbourget ?

Yup, I agree with this. I'd like it if we could also add this information in some key locations throughout the project (e.g. README, RTD, Notebooks, and maybe even in some comments in the code) too so that people don't report the wrong information in their publications after using the software.

I disagree with the default being changed to ellipse. Now, people are using morphometrics with “circle” as the default. From a user point of view, it seems dangerous to suddenly change the default behavior, it could very easily lead to error while reporting results. In my opinion, documentation or warning can’t fully prevent those errors.
For example, if we go with “ellipse” as the default. Someone using the current notebook would have to change the call to “get_axon_morphometrics” to add the axon_shape=”circle”, otherwise, their results will change from previous computation.
What I would suggest is to keep the default as “circle”, which seems to be less used by our current users, but is still a valid approach as suggested by our litterature review on the topic.
I think it would also be essential to add information in the notebook and the code regarding the meaning of the shape for computation i.e. circle=equivalent diameter and ellipse=minor axis.
Later, this information should also be included in RTD when morphometrics are added to CLI in #434.

I disagree with the default being changed to ellipse. Now, people are using morphometrics with “circle” as the default. From a user point of view, it seems dangerous to suddenly change the default behavior, it could very easily lead to error while reporting results. In my opinion, documentation or warning can’t fully prevent those errors.
For example, if we go with “ellipse” as the default. Someone using the current notebook would have to change the call to “get_axon_morphometrics” to add the axon_shape=”circle”, otherwise, their results will change from previous computation.
What I would suggest is to keep the default as “circle”, which seems to be less used by our current users, but is still a valid approach as suggested by our litterature review on the topic.
I think it would also be essential to add information in the notebook and the code regarding the meaning of the shape for computation i.e. circle=equivalent diameter and ellipse=minor axis.
Later, this information should also be included in RTD when morphometrics are added to CLI in #434.

Closing, we kept the default shape circle.


Number of Agent Types Not Updated in the Docs

URL
https://python.langchain.com/api_reference/langchain/agents/langchain.agents.agent_types.AgentType.html
Checklist

[X] I added a very descriptive title to this issue.
[X] I included a link to the documentation page I am referring to (if applicable).

Issue with current documentation:
In the api docs as well as the langchain official documentation, there is mention of nine types of agent types. But in creating, the sql agent using your create_sql_agent class & passing CHAT_ZERO_SHOT_REACT_DESCRIPTION as the agent type. It was showing valur error, only four agent types are supported openai tools openai functions, ZERO_SHOT_REACT_DESCRIPTION etc. Please update the documentation as needed, there is a lot of confusion regarding this.
Idea or request for content:
Changes needed to be made in these documents:
https://python.langchain.com/api_reference/_modules/langchain/agents/agent_types.html#AgentType
https://python.langchain.com/api_reference/langchain/agents/langchain.agents.agent_types.AgentType.html#langchain.agents.agent_types.AgentType.ZERO_SHOT_REACT_DESCRIPTION

@ENUMERA8OR Can I take this issue ?

I am not a maintainer. Please ask a maintainer of the repo...  & Read the contribution guide.


multiple write! on async_std::fs::File can trigger infinite process

By writing two short strings with separate write! invocations we can trigger an infinite process
that will continue writing the start of the second string until the process is killed or the disk is full.
    println!("starting ...");

    let mut file = OpenOptions::new()
                .append(true)
                // .write(true)    // also happens with write, write+truncate
                // .truncate(true)
                .create(true)
                .open(filename).await?;

    write!(
        &mut file,
        "{}",
        a,
    ).await?;
    write!(
        &mut file,
        "{}",
        b,
    ).await?;

    println!("done.");

As long as the second string b is shorter than the first one (a) we can't reproduce the problem, with a longer than 8 bytes we can reliably reproduce the problem.
Full reproduction in this gist: https://gist.github.com/hn3000/100460d1e239f22bf3862f1a8f8cfd92
(Also, I am not sure how to write a failing unit test because the error case does not terminate.)

That PR definitely fixes it.


Sishtiaq fsdoc1

For the record this looks good to me!

Thanks @msprotz! I'll merge as soon as I'm all-green.


the size parameter is always 0 when querying ElasticSearch from spark

What kind an issue is this?
I'm trying to query elasticsearch with the elasticsearch-hadoop connector(5.3.0) but nothing returned

[x] Bug report. If you’ve found a bug, please provide a code snippet or test to reproduce it below.
The easier it is to track down the bug, the faster it is solved.
[ ] Feature Request. Start by telling us what problem you’re trying to solve.
Often a solution already exists! Don’t send pull requests to implement new features without
first getting our support. Sometimes we leave features out on purpose to keep the project small.

Issue description
Description
Content can be fetched by accessing the url "/global/target/_search" via browser. How to remove the size parameter in spark? I tried "es.batch.size.entries", "es.scroll.size" and "es.scroll.limit", but still not working.
Steps to reproduce
Code:
JavaRDD esJsonRDD = JavaEsSpark.esJsonRDD(javaSparkContext, "global/target").values();
Test/code snippet

Strack trace:
According the debug log, the size is set as 0.
17/04/21 14:58:31 DEBUG header: >> "GET /global/target/_search?size=0&preference=_shards:0 HTTP/1.1[\r][\n]"
Stack trace goes here

Version Info
OS:         :  CentOs6
JVM         :  1.7.0_80
Hadoop/Spark:  spark-2.1.0-bin-hadoop2.7
ES-Hadoop   :  5.3.0
ES          :  5.3.0

Feature description

@cereusxing Could you link your settings that you are using in your spark context? I'll work on trying to get a reproduction of this.

es.batch.size.entries=20
es.http.timeout=2m
es.index.auto.create=true
es.nodes=<IP_ADDRESS>
es.nodes.discovery=false
es.nodes.wan.only=false
es.port=9200
es.resource=global/target
es.scroll.limit=100
es.scroll.size=60
spark.app.id=application_1490948832657_0302
spark.app.name=Spark-ElasticsSearch Integration
spark.driver.appUIAddress=http://<IP_ADDRESS>:4040
spark.driver.extraClassPath=/home/cereus/data/spark/lib/*
spark.driver.host=<IP_ADDRESS>
spark.driver.memory=1G
spark.driver.port=54923
spark.executor.extraClassPath=/home/cereus/data/spark/lib/*
spark.executor.id=driver
spark.executor.memory=1g
spark.jars=file:/home/cereus/software/test/SparkExample-1.0.jar
spark.master=yarn
spark.org.apache.hadoop.yarn.server.webproxy.amfilter.AmIpFilter.param.PROXY_HOSTS=node01
spark.org.apache.hadoop.yarn.server.webproxy.amfilter.AmIpFilter.param.PROXY_URI_BASES=http://node01:8088/proxy/application_1490948832657_0302
spark.serializer=org.apache.spark.serializer.KryoSerializer
spark.submit.deployMode=client
spark.ui.filters=org.apache.hadoop.yarn.server.webproxy.amfilter.AmIpFilter

@cereusxing I'm not having any luck reproducing this locally. How do you have your logging set up that it retrieved that request line at DEBUG level? ES-Hadoop only logs that line in CommonsHttpTransport at TRACE level. Is it possible that you have some other client that is not pulling things correctly?

Closing this out since there has been no further activity.


Support per-job stream selection

Currently the plugin only supports notifying one global stream.
We use "jenkins," but this gets messy as everyone looks to the one central stream.
It'd be nicer if we could have different Jenkins jobs routing their updates to different Humbug streams, like with the GitHub hook.

Any progress on this? It's a feature that would be nice to have.

No; a PR for this would be welcome though!

PR #8 allows you to configure dfferent stream for each job.

Closing as fixed by #8.


Setting or function to prohibit process termination

I would like to use clap's easy syntax for different stages in my program then just command line argument parsing. E.g. to parse remote commands with arguments read from sockets. I can already utilize clap using get_matches_from. But even get_matches_from_safe terminates my program when --help or --version gets passed to. I would like to have either an even safer _safe method or an app-setting, that completely blocks any terminate inside the clap crate and some kind of indication, if parsing did succeed or it should have terminated.
Would that be possible?
Best regards,
Drakulix

This is possible, we'll have to look at the best naming and such in order to implement. The work-around is simple, but somewhat hacky at the moment.
Simply define your own --help and --version flags as part of your valid arguments. If you provide a flag with the long of help or version then clap will not auto-generate those and leave the implementation up to you (i.e. you decide whether to terminate or not, and what should be done).
The same applies to subcommands with the name of help.

Thanks for looking into this. That workaround will probably be enough for the moment.

One other thing to note (although I haven't  tested it) is also setting the help and version flags to hidden (if you'd rather not see them, or they aren't applicable to your program).

How about having an option for default help or version?

Or the opposite of having an option to disable default help and version?
Since I'd assume most would want it.
On Thu, Sep 17, 2015, 8:37 PM SungRim Huh<EMAIL_ADDRESS>wrote:

How about having an option for default help or version?
—
Reply to this email directly or view it on GitHub
https://github.com/kbknapp/clap-rs/issues/256#issuecomment-141296225.

That works too. I took a brief look at the app/app.rs file, but I couldn't find where the code is adding the help and version, and where the code is terminating.

@sru Also a brief look at the same file. Grep style.

https://github.com/kbknapp/clap-rs/blob/master/src/app/app.rs#L1949 << "get_matches_from"
https://github.com/kbknapp/clap-rs/blob/master/src/app/app.rs#L2324
https://github.com/kbknapp/clap-rs/blob/master/src/app/app.rs#L2753
https://github.com/kbknapp/clap-rs/blob/master/src/app/app.rs#L2761
https://github.com/kbknapp/clap-rs/blob/master/src/app/app.rs#L2783
https://github.com/kbknapp/clap-rs/blob/master/src/app/app.rs#L2795

~kbknapp/clap-rs $ grep -in exit src/app/app.rs
346:    /// Allows specifying that if no subcommand is present at runtime, error and exit gracefully
505:    /// Specifies that the help text sould be displayed (and then exit gracefully), if no
630:    /// exiting
659:    /// Specifies that the help text sould be displayed (and then exit gracefully), if no
669:    /// still be displayed and exit. If this is *not* the desired result, consider using
1146:    /// failure (graceful exit).
1210:    /// failure (graceful exit).
1842:    // Prints the version to the user and exits if quit=true
1949:                process::exit(1);
2324:                            process::exit(0);
2575:                    e.exit();
2753:                process::exit(0);
2761:                process::exit(0);
2783:            process::exit(0);
2795:            process::exit(0);

Spelling mistakes detected at 505, 659. ;-)

@james-darkfox Wow. I didn't think of using grep. I should try to actually use these things.
@kbknapp I have several other ideas as well concerning the general process termination (not the help and version specific).
Just like the title of this issue, we could have a setting to prohibit process termination and wrap every process::exit(...) with ifs.
I am a bit wary with the process::exit() because the documentation says:

Note that because this function never returns, and that it terminates the process, no destructors on the current stack or any other thread's stack will be run.

So, another idea is that let the user handle the error entirely. In this case, we could delegate the error message to ClapError or add helper methods in ClapError to simulate same functionality.

@sru I also vote towards ClapError. +1

I also vote for ClapError. I do not need to disable the help and version flags and returning a ClapError instead of Process-Termination is just what I need to handle that special case.

We could move it to ClapError, the only downside I see is if the user uses ClapError::exit() it will get printed to stderr. Perhaps using a private bool ClapError::is_fatal() to determine if it shoudl go to stderr or stdout similiar to what I've seen in some of BurntSushi's projects?
Thoughts?

@kbknapp Is there an example in clap on non-fatal errors?

is_fatal() is from the BurntSushi examples, we'd probably adopt it to something like use_stderr()

@kbknapp I meant to say how does clap determine if the error should go to stderr or stdout. Or is it like user chooses where the error output should go?

@sru One fatal context I've noticed is SubcommandRequiredElseHelp. I'm pretty sure the usage here goes to stderr. However prof --help should go to stdout.

@james-darkfox yep that's the intention I had.

@Drakulix sorry this has taken literally forever - #326 implements this. See the PR for details :wink:

Thanks. This is exactly the behavior I expected at first, when using the safe-function. Hopefully this will  be also more intuitive and useful to other users as well. Looking forward to the actual merge!


'Undefined' when copying Ajax result to clipboard

Firstly, I want to say thanks for the great library.
I'm trying to copy an Ajax result to clipboard.  I'm getting 'undefined' when I click the button first time but when I click it a second time, it copies the Ajax result correctly. It seems I always have to click the button twice for it to work correctly.
Here's a very basic working example so you can see what's happening http://goo.gl/oNKFyL
I'd be grateful if someone could point me in the right direction.
Windows 8.1
Chrome 40.0.2214.115 m
Is Flash enabled? true
Flash version? 16.0.0
Using Pepper Flash? true
Using ActiveX? false
ZeroClipboard v2.2.0

From docs/instructions.md#synchronicity-required-during-copy:

Synchronicity Required During copy

If a handler of copy event intends to modify the pending data for clipboard injection, it MUST operate synchronously in order to maintain the temporarily elevated permissions granted by the user's click event. The most common "gotcha" for this restriction is if someone wants to make an asynchronous XMLHttpRequest in response to the copy event to get the data to inject — this will not work. You must make it a synchronous XMLHttpRequest instead, or do the work in advance before the copy event is fired.

Finally got it working. Here's the code for others:
var client = new ZeroClipboard( $('#btn1, #btn2, #btn3') );
ZeroClipboard.config( { swfPath: "/js/ZeroClipboard.swf" } );

client.on( 'ready', function(event) {
	client.on( 'copy', function(event) {
		var bid = event.target.id; //button id
		$.ajax({
			type: "GET",
			url: "response.php?bid="+bid,
			async: false,
		    success: function(data) {
			   console.log('Ajax result received: ' + data);
			   event.clipboardData.setData('text/plain', data);
		   }
		});
	});
	client.on( 'aftercopy', function(event) {
		console.log('Copied text to clipboard: ' + event.data['text/plain']);
	});
});

Tá fáilte romhaibh.


Fix ClassNotFoundError accessing ImagePicker problem

Android PluginManager was enumerating ImagePicker as cordova-plugin-telerik-imagepicker which is not an instantiable class name.  This provides the correct data to allow the image picker to be used in Android (perhaps with v7.1?).
This problem has been occurring on cordova-android 7.1.0.

Looks like that sneaked in there via another PR. Thanks for correcting that. 👍


IOS safari 11.4- Back camera opening issue

Hi,
I am using Instascan and facing issue with ios safari.
No error is given by instascan but it is not opening back camera. Every time it is opening front camera.
Same code is working fine with Android(Chrome, Firefox).

var self;
isQRScannerInitialised = false;
function testQrCode(textBoxId,DivWidth){
	self = initialiseQRScanner(DivWidth);

	self.scanner.addListener('scan', function (content, image) {
		 if(textBoxId == $("#hiddenTextBox").val()){
				audio.play();
				var code = content;
		        $("#"+textBoxId).val(code);
		    	isQRScannerInitialised = false;

			}

    }, false);

}

function initialiseQRScanner(DivWidth){

	self = this;

    if(isQRScannerInitialised == false){

    	var tempVideo = document.getElementsByTagName("video")[0];
    	tempVideo.width=DivWidth;
    	tempVideo.height=480;

    	self.scanner = new Instascan.Scanner({ video: document.getElementsByTagName("video")[0],mirror:false, scanPeriod: 1});

		Instascan.Camera.getCameras().then(function (cameras) {
		    self.cameras = cameras;
		    if (self.cameras.length > 0) {
		    	 if(cameras[0].name.match(/back/) || cameras[0].name.match(/Back/)){
		    		self.activeCameraId = cameras[0].id;
			    	self.scanner.start(cameras[0]);
		    	} else if(cameras[1].name.match(/back/) || cameras[1].name.match(/Back/)){
		    		self.activeCameraId = cameras[1].id;
			    	self.scanner.start(cameras[1]);
		    	}
		    	isQRScannerInitialised = true;

		    } else {

		    	alert('No cameras found.');
		    	isQRScannerInitialised = false;
		    	return;
		    }
		  }).catch(function (e) {
				isQRScannerInitialised = false;
				alert("QR error name:-"+e.name + " & QR error message:-"+e.message); console.error(e);
			});

	}
	return self;
}

Do you have access to the apple device? Do you know if the demo is working?

I was trying the demo out on an iPhone, it did not work.

i had added playsinline attribute indside  and also mentioned

i had added playsinline attribute inside video tag and mentioned meta tag also.

Someone had actually fixed this in one of the threads. I'm trying that out right now but have to wait for someone with an iPhone to come to work.

Hey, I got this to work but there's still the issue, despite choosing cameras, the default will always be the back rear camera. So if you try to pick the front camera, you're screwed. :(

Here's what I did, I added the meta tag.
<meta name="apple-mobile-web-app-capable" content="yes">
Added this attribute:
<video id="scanner" class="video-back" playsinline></video>
Added this JS file:
''
And then packaged this to release: https://github.com/JoseCDB/instascan/tree/ios-rear-camera. Not sure if you know how to use Gulp with node.js but it's easy. I'm using this persons version of Instascan. Good luck.

I have used same meta tag, video tag and adapter-latest.js.
And i am using instscan.min.js and don't know how can use the ".js - scanner.js - camara.js" separately.

This is a great product and it has been really useful, so thank you for making it wonderful.  Here is the issue with this instascan from my research:

The class Camera when calling the getCameras returns a collection of  Camera objects that are created from the MediaDeviceInfo objects collected through a call to navigator.mediaDevices.enumerateDevices().  These are NOT MediaStream objects which contain the actual stream from the camera used when starting the scanner.  These MediaDeviceInfo objects contain id and name properties and nothing more.  They are used to create an array of Camera objects.

When you call scanner.start(camera), you are passing in a Camera object that will call the camera.start() method  on the camera.

The camera.start() method THEN calls the navigator.mediaDevices.getUserMedia(contraints), which returns an Arrary of MediaStream objects based on the given constraints listed in the method.

scanner.start() calls _scanner.enableScan(camera) giving it the First MediaStream object returned from the call above in camera.  It sets the  src element to this media stream object.
                **This Part Is the Disconnect and what is messing it all up!**

The Constraint Issue:
The Camera object passed in uses its id in the constraints as "mandatory" for the searching of the devices.  If it is not found, no video will show.  Also other "mandatory" constraints are set.
Different devices DO NOT SUPPORT the constraints used!
Run this link on the device you want to use and it will tell you what Constraints it supports:
https://developer.mozilla.org/en-US/docs/Web/API/Media_Streams_API/Constraints
Run this link on the device you want to use and enter a constraint.  It will tell you if it is supported:
https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackSupportedConstraints/deviceId
Ipad/Iphone/IOS supported Constraints:
aspectRatio, facingMode, deviceId*** , height, width, aspectRatio and others.
_When I tested this, deviceId will be ignored as a constraint.  Try this out in the above link for constraints and you will see it sets the deviceId = "".  When I grabbed it in javascript and displayed it, the iphone always returned a blank deviceId.
So, To grab the back camera on the Iphone, you have to use the facingMode and NOT use deviceId.
Android supported Constraints:
deviceId, facingMode***, aspectRatio, height, width, and many others.
I tested this, on a samsung tablet and android phone. The facingMode defaulted to the "user" front camera.  I experimented with this code and found that for some reason yet discovered, the facingMode for android is not working.  Yet it works in the above link.  I am going to continue to investigate that portion and possibly fix this code to work properly with facingMode and android.
To grab the back camera on the Android with this instascan code, you can use the deviceId.
Make sure deviceId is a video constraint like
video: {
  devideId: this.id
}

Camera Constraint Code:
Here is the Code from the project that sets the constraints and gets the MediaStream objects
The reason why this code doesn't work properly is that sourceId of the video constraint is not supported for Android or Iphone.  This has to be changed to deviceId.  Also all of the mandatory items need to go if they are not what your device handles.

async start() {
    let constraints;
    var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;

    if (iOS) {
      constraints = {
        audio: false,
        video: {
          facingMode: 'environment',
          mandatory: {
            sourceId: this.id,
            minWidth: 600,
            maxWidth: 800,
            minAspectRatio: 1.6
          },
          optional: []
        }
      };
    } else {
      constraints = {
        audio: false,
        video: {
          mandatory: {
            sourceId: this.id,
            minWidth: 600,
            maxWidth: 800,
            minAspectRatio: 1.6
          },
          optional: []
        }
      };
    }

    this._stream = await Camera._wrapErrors(async () => {
      return await navigator.mediaDevices.getUserMedia(constraints);
});

How to modify InstaScan and minify it:
to get this and change it, I have been using VSCode.

Install Node.js and vsCode.

at a terminal in the directory you want it to download run:
git clone https://github.com/JoseCDB/instascan.git

at the terminal cd to the instascan directory:
cd instascan

change the javascript and run gulp to release the code:
gulp release

This will give you a new minified instascan.min.js item in the dist folder.

I am going to figure out this Android issue hopefully this weekend.  I hope this gives you enough insight for any future projects with this awesome library.

This worked on iOS.
https://github30.github.io/instascan/

Hi, this should be worked well.
First, add adapter.js from https://github.com/webrtc/adapter.
After that clone this:
git clone https://github.com/quocthai95/instascan.git
Run:
npm i
to install necessaries
Use gulp to release final code:
gulp release
I've checked on Iphone 6 plus (iOS 11.4) & Iphone 8 plus (iOS 11.3) and it worked well. You can swap cameras normally.
Hope you can solve your problem.

Any chance the constraint fixes will be merged back to schmich's repo?

Any chance the constraint fixes will be merged back to schmich's repo?

I've created new pull request. Wait for accepting ^^

@quocthai95 hi, ive followed your steps from https://github.com/schmich/instascan/issues/182#issuecomment-447198290.
i was wondering, im getting front camera as default on my android chrome. wondering how can i make back camera a default?

@fariskas ,
Use regexp to test whether it matches /back/ then start it, so you can have back camera as default.
`Instascan.Camera.getCameras().then(function (cameras) {
if(cameras[0].name.match(/back/i)){
scanner.start(cameras[0]);
} else if(cameras[1].name.match(/back/i)){
scanner.start(cameras[1]);
}
}

This might be usefull: I am using a for-loop to find "back" in cameras[i].name but I was unsuccessful and unable to select the back camera on iPad until I wrote cameras[i].name to console.log and foud out that I had to look for "achterzijde" (which is "back" in Dutch).
So if you are unsuccessful trying to select the back camera in iOS, try translating "back" or write cameras[i].name to console.log to find out what is the back camera's name.

I can confirm the demo only works with the front facing camera. This is with Safari on iOS 12.2

Has anyone figured out how to use the back camera with Safari on iOS 12+?

Has anyone figured out how to use the back camera with Safari on iOS 12+?

I have been using a modified version of this library for about 7 months now on over 30+ types ios and android phones and tablets.  Look at the comments I left above about a modified version to get any camera from the os you are working with.  The comments keep talking about adding the webrtc after, which i found to be the whole issue of this library.
I removed webrtc from the project altogether and recompiled it.  webrtc is not needed any more with this code when transpiled to es5 or above.  The use of webrtc in the library and how it was coded did not  allow the correct camera to be retrieved.
I have included the fixed and transpiled regular and minified js files that I have been using for a while now.  I use it for school attendance with QrCodes across any phones students and teachers have, which have been about 30+ models at this point.  It can grab any camera.
I hope this helps.
Back Camera code
               scanner = new Instascan.Scanner({ video: video, scanPeriod: 4, mirror:false })                    .then(handleSuccess)                    .catch(handleError);
instascan.min.zip
https://github.com/schmich/instascan/issues/182#issuecomment-443388022

Hi,
I am using Instascan and facing issue with ios safari.
No error is given by instascan but it is not opening back camera. Every time it is opening front camera.
Same code is working fine with Android(Chrome, Firefox).
var self;
isQRScannerInitialised = false;
function testQrCode(textBoxId,DivWidth){
self = initialiseQRScanner(DivWidth);
self.scanner.addListener('scan', function (content, image) {
if(textBoxId == $("#hiddenTextBox").val()){
audio.play();
var code = content;
$("#"+textBoxId).val(code);
isQRScannerInitialised = false;
  	}

}, false);

}
function initialiseQRScanner(DivWidth){
self = this;
if(isQRScannerInitialised == false){

	var tempVideo = document.getElementsByTagName("video")[0];
	tempVideo.width=DivWidth;
	tempVideo.height=480;

	self.scanner = new Instascan.Scanner({ video: document.getElementsByTagName("video")[0],mirror:false, scanPeriod: 1});

  Instascan.Camera.getCameras().then(function (cameras) {
      self.cameras = cameras;
      if (self.cameras.length > 0) {
      	 if(cameras[0].name.match(/back/) || cameras[0].name.match(/Back/)){
      		self.activeCameraId = cameras[0].id;
  	    	self.scanner.start(cameras[0]);
      	} else if(cameras[1].name.match(/back/) || cameras[1].name.match(/Back/)){
      		self.activeCameraId = cameras[1].id;
  	    	self.scanner.start(cameras[1]);
      	}
      	isQRScannerInitialised = true;

      } else {

      	alert('No cameras found.');
      	isQRScannerInitialised = false;
      	return;
      }
    }).catch(function (e) {
  		isQRScannerInitialised = false;
  		alert("QR error name:-"+e.name + " & QR error message:-"+e.message); console.error(e);
  	});

}
return self;
}

I followed above steps then edit file camera.js (at line 29) as below
facingMode: { exact: "environment" },
It work for me. Thank you @apchandler

This is a great product and it has been really useful, so thank you for making it wonderful. Here is the issue with this instascan from my research:

The class Camera when calling the getCameras returns a collection of  Camera objects that are created from the MediaDeviceInfo objects collected through a call to navigator.mediaDevices.enumerateDevices().  These are NOT MediaStream objects which contain the actual stream from the camera used when starting the scanner.  These MediaDeviceInfo objects contain id and name properties and nothing more.  They are used to create an array of Camera objects.

When you call scanner.start(camera), you are passing in a Camera object that will call the camera.start() method on the camera.

The camera.start() method THEN calls the navigator.mediaDevices.getUserMedia(contraints), which returns an Arrary of MediaStream objects based on the given constraints listed in the method.
scanner.start() calls _scanner.enableScan(camera) giving it the First MediaStream object returned from the call above in camera.  It sets the  src element to this media stream object.                **This Part Is the Disconnect and what is messing it all up!**

The Constraint Issue:
The Camera object passed in uses its id in the constraints as "mandatory" for the searching of the devices. If it is not found, no video will show. Also other "mandatory" constraints are set.
Different devices DO NOT SUPPORT the constraints used!
Run this link on the device you want to use and it will tell you what Constraints it supports:
https://developer.mozilla.org/en-US/docs/Web/API/Media_Streams_API/Constraints
Run this link on the device you want to use and enter a constraint. It will tell you if it is supported:
https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackSupportedConstraints/deviceId
Ipad/Iphone/IOS supported Constraints:
aspectRatio, facingMode, deviceId*** , height, width, aspectRatio and others.
_When I tested this, deviceId will be ignored as a constraint. Try this out in the above link for constraints and you will see it sets the deviceId = "". When I grabbed it in javascript and displayed it, the iphone always returned a blank deviceId.
So, To grab the back camera on the Iphone, you have to use the facingMode and NOT use deviceId.
Android supported Constraints:
deviceId, facingMode***, aspectRatio, height, width, and many others.
I tested this, on a samsung tablet and android phone. The facingMode defaulted to the "user" front camera. I experimented with this code and found that for some reason yet discovered, the facingMode for android is not working. Yet it works in the above link. I am going to continue to investigate that portion and possibly fix this code to work properly with facingMode and android.
** ANSWER TO ANDROID ISSUE* **
The Gulp build of this project includes the webrtc-adapter version ^1.4.0 which messes up the facingMode on Android Chrome. Looking through the code it actually deleted the facing mode.

To fix in this project - in index.js, remove the line 2 require('webrtc-adapter');  Then follow the build procedures below.  When I tested on a tablet and 4 different android phones on Chrome it all worked again to grab the back camera.

To grab the back camera on the Android with this instascan code, you can use the deviceId.
Make sure deviceId is a video constraint like
video: {
  devideId: this.id
}

Camera Constraint Code:
Here is the Code from the project that sets the constraints and gets the MediaStream objects
The reason why this code doesn't work properly is that sourceId of the video constraint is not supported for Android or Iphone. This has to be changed to deviceId. Also all of the mandatory items need to go if they are not what your device handles.

async start() {
    let constraints;
    var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;

    if (iOS) {
      constraints = {
        audio: false,
        video: {
          facingMode: 'environment',
          mandatory: {
            sourceId: this.id,
            minWidth: 600,
            maxWidth: 800,
            minAspectRatio: 1.6
          },
          optional: []
        }
      };
    } else {
      constraints = {
        audio: false,
        video: {
          mandatory: {
            sourceId: this.id,
            minWidth: 600,
            maxWidth: 800,
            minAspectRatio: 1.6
          },
          optional: []
        }
      };
    }

    this._stream = await Camera._wrapErrors(async () => {
      return await navigator.mediaDevices.getUserMedia(constraints);
});

How to modify InstaScan and minify it:
to get this and change it, I have been using VSCode.

Install Node.js and vsCode.
at a terminal in the directory you want it to download run:
git clone https://github.com/JoseCDB/instascan.git
at the terminal cd to the instascan directory:
cd instascan
change the javascript and run gulp to release the code:
gulp release
This will give you a new minified instascan.min.js item in the dist folder.

I am going to figure out this Android issue hopefully this weekend. I hope this gives you enough insight for any future projects with this awesome library.

I followed above steps then edit file camera.js (at line 29) as below
facingMode: { exact: "environment" },
It work for me. Thank you @apchandler

I am glad you got something to work for you! Thanks for posting this fix too!

Unfortunately these solutions do not work on iOS 13. It is simply blank (not even black).

Has anyone figured out how to use the back camera with Safari on iOS 12+?

I have been using a modified version of this library for about 7 months now on over 30+ types ios and android phones and tablets. Look at the comments I left above about a modified version to get any camera from the os you are working with. The comments keep talking about adding the webrtc after, which i found to be the whole issue of this library.
I removed webrtc from the project altogether and recompiled it. webrtc is not needed any more with this code when transpiled to es5 or above. The use of webrtc in the library and how it was coded did not allow the correct camera to be retrieved.
I have included the fixed and transpiled regular and minified js files that I have been using for a while now. I use it for school attendance with QrCodes across any phones students and teachers have, which have been about 30+ models at this point. It can grab any camera.
I hope this helps.
Back Camera code
scanner = new Instascan.Scanner({ video: video, scanPeriod: 4, mirror:false })
                .then(handleSuccess)
                .catch(handleError);
             //Start scanning
             scanner.addListener('scan', foundCode);

             Instascan.Camera.getCameras().then(function (cameras) {
                 if (cameras.length > 0) {
                     scanner.start(cameras[0]);
                 }
                 else {
            ...
                 }
             }).catch (function (e) {
              ...
             });

instascan.min.zip
#182 (comment)

This solves my problem, thank you very much.

@apchandler Hi, Do you know if exists a way for select the 'main' back camera?
I have a website where my users wilI scan QR CODES using instascan. I amb developing the website and doing some tests I access to the website using my mobiIe phone which has 4 back cameras (HUAWEI P30 PRO).
I have tried the $.each and with the first back camera selected I can't scan anything because the vision is so fuzzy and with a lot of zoom.
But, if I select the cameras[2] I am able to scan everything.
Exists a generic way to select the 'main' back camera?
I mean, my webapp is going to be used by so many users that with differents mobile phones, different number of cameras and the order of the cameras will be different.
Or you recommend to do a select with all the cameras and then let the user to pick up the one that works perfectly for him.

@apchandler Hi, Do you know if exists a way for selecting the 'main' back camera?
I have a website where my users wilI scan QR CODES using instascan. I amb developing the website and doing some tests I access to the website using my mobiIe phone which has 4 back cameras (HUAWEI P30 PRO).
I have tried the $.each and with the first back camera selected I can't scan anything because the vision is so fuzzy and with a lot of zoom.
But, if I select the cameras[2] I am able to scan everything.
Exists a generic way to select the 'main' back camera?
I mean, my webapp is going to be used by so many users with differents mobile phones, different number of cameras and the order of the cameras will be also different.
Or do you recommend to do a select with all the cameras and then let the user to pick up the one that works perfectly for him?
Thanks

I am sorry. I do not know any value that specifies as a ‘main’ camera when multiple are present. You can give the select camera function the criteria object specifying that it must be at least a certain resolution and other specs. That could at least give you a minimum ability camera.  Otherwise your solution sounds good for how you want to approach it.

@apchandler Hi, Do you know if exists a way for selecting the 'main' back camera?
I have a website where my users wilI scan QR CODES using instascan. I amb developing the website and doing some tests I access to the website using my mobiIe phone which has 4 back cameras (HUAWEI P30 PRO).
I have tried the $.each and with the first back camera selected I can't scan anything because the vision is so fuzzy and with a lot of zoom.
But, if I select the cameras[2] I am able to scan everything.
Exists a generic way to select the 'main' back camera?
I mean, my webapp is going to be used by so many users with differents mobile phones, different number of cameras and the order of the cameras will be also different.
Or do you recommend to do a select with all the cameras and then let the user to pick up the one that works perfectly for him?
Thanks

I am sorry. I do not know any value that specifies as a ‘main’ camera when multiple are present. You can give the select camera function the criteria object specifying that it must be at least a certain resolution and other specs. That could at least give you a minimum ability camera. Otherwise your solution sounds good for how you want to approach it.

Thanks a lot for you answer! I will try with the resolution.

According to the methods provided by @glorynguyen and @apchandler.
Can now turn on the rear camera

Has anyone figured out how to use the back camera with Safari on iOS 12+?

I have been using a modified version of this library for about 7 months now on over 30+ types ios and android phones and tablets. Look at the comments I left above about a modified version to get any camera from the os you are working with. The comments keep talking about adding the webrtc after, which i found to be the whole issue of this library.
I removed webrtc from the project altogether and recompiled it. webrtc is not needed any more with this code when transpiled to es5 or above. The use of webrtc in the library and how it was coded did not allow the correct camera to be retrieved.
I have included the fixed and transpiled regular and minified js files that I have been using for a while now. I use it for school attendance with QrCodes across any phones students and teachers have, which have been about 30+ models at this point. It can grab any camera.
I hope this helps.
Back Camera code
scanner = new Instascan.Scanner({ video: video, scanPeriod: 4, mirror:false })
                .then(handleSuccess)
                .catch(handleError);
             //Start scanning
             scanner.addListener('scan', foundCode);

             Instascan.Camera.getCameras().then(function (cameras) {
                 if (cameras.length > 0) {
                     scanner.start(cameras[0]);
                 }
                 else {
            ...
                 }
             }).catch (function (e) {
              ...
             });

instascan.min.zip
#182 (comment)

You sir has just saved the job of a junior dev, you have got yourself a lifetime fan.

Thanks.  I was right where you were when I saw this code.  Had a deadline and needed the cameras from 30 different types. I am glad they wrote this.

Hi,
I am also facing back camera issue with IOS like as other person. My back camera is not opening on iPhone, default front camera is running.  Please help me if anyone have resolved this issue with updated version(13.xx. xx) of safari.

Has anyone figured out how to use the back camera with Safari on iOS 12+?

I have been using a modified version of this library for about 7 months now on over 30+ types ios and android phones and tablets. Look at the comments I left above about a modified version to get any camera from the os you are working with. The comments keep talking about adding the webrtc after, which i found to be the whole issue of this library.
I removed webrtc from the project altogether and recompiled it. webrtc is not needed any more with this code when transpiled to es5 or above. The use of webrtc in the library and how it was coded did not allow the correct camera to be retrieved.
I have included the fixed and transpiled regular and minified js files that I have been using for a while now. I use it for school attendance with QrCodes across any phones students and teachers have, which have been about 30+ models at this point. It can grab any camera.
I hope this helps.
Back Camera code
scanner = new Instascan.Scanner({ video: video, scanPeriod: 4, mirror:false })
                .then(handleSuccess)
                .catch(handleError);
             //Start scanning
             scanner.addListener('scan', foundCode);

             Instascan.Camera.getCameras().then(function (cameras) {
                 if (cameras.length > 0) {
                     scanner.start(cameras[0]);
                 }
                 else {
            ...
                 }
             }).catch (function (e) {
              ...
             });

instascan.min.zip
#182 (comment)

worked like a charm on both Android and iOS! I just downloaded the original instascan master branch, put your files into the "dist" folder, and that's it!  thank you very much sir !

worked like a charm on both Android and iOS! I just downloaded the original instascan master branch, put your files into the "dist" folder, and that's it! thank you very much sir !

@antworks-hub did you use the whole code from the branch or the minified js?

worked like a charm on both Android and iOS! I just downloaded the original instascan master branch, put your files into the "dist" folder, and that's it! thank you very much sir !

@antworks-hub did you use the whole code from the branch or the minified js?
where did you get the "dist" folder from?

@Sandi2211 I guess I created a "dist" folder in the root of the original instascan master branch and put the content of the instasca,min.zip file into that folder.

Has anyone figured out how to use the back camera with Safari on iOS 12+?

I have been using a modified version of this library for about 7 months now on over 30+ types ios and android phones and tablets. Look at the comments I left above about a modified version to get any camera from the os you are working with. The comments keep talking about adding the webrtc after, which i found to be the whole issue of this library.
I removed webrtc from the project altogether and recompiled it. webrtc is not needed any more with this code when transpiled to es5 or above. The use of webrtc in the library and how it was coded did not allow the correct camera to be retrieved.
I have included the fixed and transpiled regular and minified js files that I have been using for a while now. I use it for school attendance with QrCodes across any phones students and teachers have, which have been about 30+ models at this point. It can grab any camera.
I hope this helps.
Back Camera code
scanner = new Instascan.Scanner({ video: video, scanPeriod: 4, mirror:false })
                .then(handleSuccess)
                .catch(handleError);
             //Start scanning
             scanner.addListener('scan', foundCode);

             Instascan.Camera.getCameras().then(function (cameras) {
                 if (cameras.length > 0) {
                     scanner.start(cameras[0]);
                 }
                 else {
            ...
                 }
             }).catch (function (e) {
              ...
             });

instascan.min.zip
#182 (comment)

This solves my problem, thank you very much.

Thanks man, my is work well, just add your new js.

Has anyone figured out how to use the back camera with Safari on iOS 12+?

I have been using a modified version of this library for about 7 months now on over 30+ types ios and android phones and tablets. Look at the comments I left above about a modified version to get any camera from the os you are working with. The comments keep talking about adding the webrtc after, which i found to be the whole issue of this library.
I removed webrtc from the project altogether and recompiled it. webrtc is not needed any more with this code when transpiled to es5 or above. The use of webrtc in the library and how it was coded did not allow the correct camera to be retrieved.
I have included the fixed and transpiled regular and minified js files that I have been using for a while now. I use it for school attendance with QrCodes across any phones students and teachers have, which have been about 30+ models at this point. It can grab any camera.
I hope this helps.
Back Camera code
scanner = new Instascan.Scanner({ video: video, scanPeriod: 4, mirror:false })
                .then(handleSuccess)
                .catch(handleError);
             //Start scanning
             scanner.addListener('scan', foundCode);

             Instascan.Camera.getCameras().then(function (cameras) {
                 if (cameras.length > 0) {
                     scanner.start(cameras[0]);
                 }
                 else {
            ...
                 }
             }).catch (function (e) {
              ...
             });

instascan.min.zip
#182 (comment)

Tks, @apchandler11! You saved my work. god dms!

the solution from chatGPT
// if ios default use back camera
scanButton.addEventListener('click', function() {
if (mobileDevice && /iPhone|iPad|iPod/i.test(navigator.userAgent)) {
// Use getUserMedia directly for iOS devices to specify the facingMode
const constraints = {
video: { facingMode: 'environment' }
};
navigator.mediaDevices.getUserMedia(constraints).then(function(stream) {
preview.srcObject = stream;
scanner.start();
}).catch(function(error) {
console.error('Error accessing the camera: ', error);
});
} else {
// For other devices, use Instascan's default camera selection
Instascan.Camera.getCameras().then(function(cameras) {
if (cameras.length > 0) {
scanner.start(cameras[0]);
} else {
console.error('No cameras found.');
}
}).catch(function(e) {
console.error(e);
});
}
previewContainer.style.display = 'block';
scanButton.style.display = 'none';
switchCameraButton.style.display = 'inline-block';
});