MSVC error upon compiling simple main.cpp

Hello! I'm trying to use your library to parse intraday and daily stock data and I get the following errors. (I removed some of my file paths)
[main] Building folder: avapi avapi_test
[build] Starting build
[proc] Executing command: ".../cmake.EXE" --build .../avapi/build --config Debug --target avapi_test -- /maxcpucount:14
[build] Microsoft (R) Build Engine version 16.8.3+39993bd9d for .NET Framework
[build] Copyright (C) Microsoft Corporation. All rights reserved.
[build]
[build]   main.cpp
[build] .../rapidcsv.h(1199,47): error C2589: '(': illegal token on right side of '::'
[build] .../rapidcsv.h(1199,1): error C2062: type 'unknown-type' unexpected
[build] .../rapidcsv.h(1199,1): error C2059: syntax error: ')'
[build] Build finished with exit code 1
[main] Failed to prepare executable target with name 'undefined'

Here is the main.cpp I tried to compile for parsing the intraday data.
#include "../inc/avapi.h"
#include "../inc/rapidcsv.h"
#include <vector>

int main()
{
    rapidcsv::Document doc("../../data/intraday_data.csv");

    std::vector<float> col = doc.GetColumn<float>("open");

    for (auto &i : col) {
    std::cout << i << '\n';
    }
    std::cout << std::endl;
    return 0;
}

Here is the main.cpp I tried to compile for parsing the daily data.
#include "../inc/avapi.h"
#include "../inc/rapidcsv.h"
#include <vector>

int main()
{
    rapidcsv::Document doc("../../data/daily_data.csv",
                           rapidcsv::LabelParams(0, 0));

    std::vector<float> close = doc.GetRow<float>("2021-02-12");
    std::cout << "Read " << close.size() << " values." << std::endl;
    return 0;
}

And here is the CMakeLists.txt
cmake_minimum_required(VERSION 3.0.0)

project(avapi_test LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(CURL CONFIG REQUIRED)

set(PROJECT_SOURCES
        src/main.cpp
        src/avapi.cpp
        inc/avapi.h
        inc/rapidcsv.h
)

add_executable(avapi_test ${PROJECT_SOURCES})
target_link_libraries(avapi_test PRIVATE CURL::libcurl)

I just realized that clang-format ran on your header file when I saved it. Would that mess anything up in this case?

Hello @DavidM-Fox - thanks for the detailed description.
I tried a stripped down version of your cmake project along with the files you provided and I cannot reproduce any compilation error - neither with original rapidcsv.h nor if I run clang-format on it before building.
For reference - the commands I used to build were:
mkdir build
cd build
cmake ..
devenv avapi_test.sln /build

My test was done with VS2017, as it's the version I have installed on my Windows system currently. I'll see if I get a chance to try install and test VS2019.
Meanwhile could you try building with an unmodified copy of rapidcsv.h and provide the error messages if there still are build errors? With error messages from a clang-format'ed file, the line numbers may not match the original line numbers. Thanks!

FYI - I did a quick test under VS 2019 here as well, and I cannot reproduce any build error.

I believe I have found the problem. However, I'm not too sure what could be causing it. It compiles completely normally and passes the above tests when I comment out the inclusion of my avapi library. All of the code in my library is wrapped in an "avapi" namespace and works fine with a different csv header library.  I'm going to try to rewrite my library step by step tommorow to see at which point your library errors.
Including it produces the same error: (Note: All of these warnings coming from csv-parser are present without your header. I'd rather do without them!)
[main] Building folder: avapi
[build] Starting build
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --build c:/github/avapi/build --config Debug --target ALL_BUILD -- /maxcpucount:14
[build] Microsoft (R) Build Engine version 16.8.3+39993bd9d for .NET Framework
[build] Copyright (C) Microsoft Corporation. All rights reserved.
[build]
[build]   Checking Build System
[build]   Building Custom Rule C:/github/avapi/CMakeLists.txt
[build]   main.cpp
[build] C:\github\avapi\src\../inc/rapidcsv.h(1249,43): error C2589: '(': illegal token on right side of '::' [C:\github\avapi\build\avapi_test.vcxproj]
[build] C:\github\avapi\src\../inc/rapidcsv.h(1249,1): error C2062: type 'unknown-type' unexpected [C:\github\avapi\build\avapi_test.vcxproj]
[build] C:\github\avapi\src\../inc/rapidcsv.h(1249,1): error C2059: syntax error: ')' [C:\github\avapi\build\avapi_test.vcxproj]
[build]   avapi.cpp
[build] C:\github\avapi\src\../inc/csv-parser.h(912,42): warning C4244: 'return': conversion from 'int64_t' to 'size_t', possible loss of data [C:\github\avapi\build\avapi_test.vcxproj]
[build] C:\github\avapi\src\../inc/csv-parser.h(936,61): warning C4244: 'argument': conversion from 'const int64_t' to 'size_t', possible loss of data [C:\github\avapi\build\avapi_test.vcxproj]
[build] C:\github\avapi\src\../inc/csv-parser.h(952,9): warning C4244: 'argument': conversion from 'const int64_t' to 'SIZE_T', possible loss of data [C:\github\avapi\build\avapi_test.vcxproj]
[build] C:\github\avapi\src\../inc/csv-parser.h(7140,16): warning C4244: 'return': conversion from 'std::streamoff' to 'size_t', possible loss of data [C:\github\avapi\build\avapi_test.vcxproj]
[build] C:\github\avapi\src\../inc/csv-parser.h(8294,17): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\github\avapi\build\avapi_test.vcxproj]
[build] C:\github\avapi\src\avapi.cpp(111,14): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\github\avapi\build\avapi_test.vcxproj]
[build] C:\github\avapi\src\../inc/csv-parser.h(6450,31): warning C4244: '=': conversion from 'std::streamoff' to 'size_t', possible loss of data [C:\github\avapi\build\avapi_test.vcxproj]
[build] C:\github\avapi\src\../inc/csv-parser.h(6437): message : while compiling class template member function 'void csv::internals::StreamParser<std::stringstream>::next(size_t)' [C:\github\avapi\build\avapi_test.vcxproj]
[build] C:\github\avapi\src\../inc/csv-parser.h(7574): message : see reference to function template instantiation 'void csv::internals::StreamParser<std::stringstream>::next(size_t)' being compiled [C:\github\avapi\build\avapi_test.vcxproj]
[build] C:\github\avapi\src\../inc/csv-parser.h(7572): message : see reference to class template instantiation 'csv::internals::StreamParser<std::stringstream>' being compiled [C:\github\avapi\build\avapi_test.vcxproj]
[build] C:\github\avapi\src\../inc/csv-parser.h(6458,35): warning C4244: '=': conversion from 'std::streamoff' to 'size_t', possible loss of data [C:\github\avapi\build\avapi_test.vcxproj]
[build] C:\github\avapi\src\../inc/csv-parser.h(598,29): warning C4244: 'argument': conversion from 'int64_t' to 'const mio::basic_mmap<mio::access_mode::read,char>::size_type', possible loss of data [C:\github\avapi\build\avapi_test.vcxproj]
[build] C:\github\avapi\src\../inc/csv-parser.h(614): message : see reference to function template instantiation 'MMap mio::make_mmap<mio::mmap_source,MappingToken>(const MappingToken &,int64_t,int64_t,std::error_code &)' being compiled [C:\github\avapi\build\avapi_test.vcxproj]
[build]           with
[build]           [
[build]               MMap=mio::mmap_source,
[build]               MappingToken=std::string
[build]           ]
[build] C:\github\avapi\src\../inc/csv-parser.h(7154): message : see reference to function template instantiation 'mio::mmap_source mio::make_mmap_source<std::string>(const MappingToken &,mio::basic_mmap<mio::access_mode::read,char>::size_type,mio::basic_mmap<mio::access_mode::read,char>::size_type,std::error_code &)' being compiled [C:\github\avapi\build\avapi_test.vcxproj]
[build]           with
[build]           [
[build]               MappingToken=std::string
[build]           ]
[build] C:\github\avapi\src\../inc/csv-parser.h(598,21): warning C4244: 'argument': conversion from 'int64_t' to 'const mio::basic_mmap<mio::access_mode::read,char>::size_type', possible loss of data [C:\github\avapi\build\avapi_test.vcxproj]
[build] C:\github\avapi\src\../inc/csv-parser.h(1111,22): warning C4244: '=': conversion from 'const int64_t' to 'mio::basic_mmap<mio::access_mode::read,char>::size_type', possible loss of data [C:\github\avapi\build\avapi_test.vcxproj]
[build] C:\github\avapi\src\../inc/csv-parser.h(1080): message : while compiling class template member function 'void mio::basic_mmap<mio::access_mode::read,char>::map(const mio::basic_mmap<mio::access_mode::read,char>::handle_type,const mio::basic_mmap<mio::access_mode::read,char>::size_type,const mio::basic_mmap<mio::access_mode::read,char>::size_type,std::error_code &)' [C:\github\avapi\build\avapi_test.vcxproj]
[build] C:\github\avapi\src\../inc/csv-parser.h(1068): message : see reference to function template instantiation 'void mio::basic_mmap<mio::access_mode::read,char>::map(const mio::basic_mmap<mio::access_mode::read,char>::handle_type,const mio::basic_mmap<mio::access_mode::read,char>::size_type,const mio::basic_mmap<mio::access_mode::read,char>::size_type,std::error_code &)' being compiled [C:\github\avapi\build\avapi_test.vcxproj]
[build] C:\github\avapi\src\../inc/csv-parser.h(992): message : while compiling class template member function 'mio::basic_mmap<mio::access_mode::read,char>::basic_mmap(mio::basic_mmap<mio::access_mode::read,char> &&)' [C:\github\avapi\build\avapi_test.vcxproj]
[build] C:\github\avapi\src\../inc/csv-parser.h(599): message : see reference to function template instantiation 'mio::basic_mmap<mio::access_mode::read,char>::basic_mmap(mio::basic_mmap<mio::access_mode::read,char> &&)' being compiled [C:\github\avapi\build\avapi_test.vcxproj]
[build] C:\github\avapi\src\../inc/csv-parser.h(1151): message : while compiling class template member function 'void mio::basic_mmap<mio::access_mode::read,char>::unmap(void)' [C:\github\avapi\build\avapi_test.vcxproj]
[build] C:\github\avapi\src\../inc/csv-parser.h(987): message : see reference to function template instantiation 'void mio::basic_mmap<mio::access_mode::read,char>::unmap(void)' being compiled [C:\github\avapi\build\avapi_test.vcxproj]
[build] C:\github\avapi\src\../inc/csv-parser.h(985): message : while compiling class template member function 'mio::basic_mmap<mio::access_mode::read,char>::~basic_mmap(void)' [C:\github\avapi\build\avapi_test.vcxproj]
[build] C:\github\avapi\src\../inc/csv-parser.h(7154): message : see reference to function template instantiation 'mio::basic_mmap<mio::access_mode::read,char>::~basic_mmap(void)' being compiled [C:\github\avapi\build\avapi_test.vcxproj]
[build] C:\github\avapi\src\../inc/csv-parser.h(611): message : see reference to class template instantiation 'mio::basic_mmap<mio::access_mode::read,char>' being compiled [C:\github\avapi\build\avapi_test.vcxproj]
[build] C:\github\avapi\src\../inc/csv-parser.h(1112,29): warning C4244: '=': conversion from 'const int64_t' to 'mio::basic_mmap<mio::access_mode::read,char>::size_type', possible loss of data [C:\github\avapi\build\avapi_test.vcxproj]
[build]   Generating Code...
[build] Build finished with exit code 1

Thanks for the update! Yes, your plan sounds good. If you'd like some help you could create a branch in your avapi repository with your current rapidcsv integration (which is failing). This way I could probably easier reproduce your exact build error and try see what is going wrong.

I believe I have found a fix! I made a new branch and started an overhaul of my library design. I tried running it again and received the same error.
[build] ...rapidcsv.h(1249,43): error C2589: '(': illegal token on right side of '::'
[build] ...rapidcsv.h(1249,1): error C2062: type 'unknown-type' unexpected
[build] ...rapidcsv.h(1249,1): error C2059: syntax error: ')'

these errors reference this
std::streamsize readLength = std::min(p_FileLength, bufLength);

I changed std::min to (std::min) and it has begun to work perfectly.  I referenced this stack overflow article https://stackoverflow.com/questions/5004858/why-is-stdmin-failing-when-windows-h-is-included. I don't know how this fixes it, but it did!

Good finding, thanks for sharing!
Let me see how/if I can integrate a portable fix in rapidcsv to cater for this.

Thanks again for sharing the findings. I've committed a fix now, and a test to cover this as well.


Documentation regarding automatic light sleep (IDFGH-11537)

Answers checklist.

[X] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
[X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
[X] I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report
I can't seem to find elaborate information on how automatic light sleep works. For example, if I enable automatic light sleep by calling esp_pm_configure, the code simply stops running. Every time I use a wakeup-source (such as a button for example), a few more characters are printed in the terminal. Once the entire log-message is printed and visible, the application keeps running as normal.
So, from first to last, this happens when I press the button.
I (983) pm: Frequency switching config: CPU_MAX: 240, APB_MAX: 80, APB_MIN: 80, Light sleep: ENABLED
I (1003) sleep: Code start at 0x42000020, t

Press
I (983) main: Boot exited.
I (983) pm: Frequency switching config: CPU_MAX: 240, APB_MAX: 80, APB_MIN: 80, Light sleep: ENABLED
I (1003) sleep: Code start at 0x42000020, total

Press
I (983) pm: Frequency switching config: CPU_MAX: 240, APB_MAX: 80, APB_MIN: 80, Light sleep: ENABLED
I (1003) sleep: Code start at 0x42000020, total 1009351, da

Press
I (983) pm: Frequency switching config: CPU_MAX: 240, APB_MAX: 80, APB_MIN: 80, Light sleep: ENABLED
I (1003) sleep: Code start at 0x42000020, total 1009351, data start at 0x3c000000, total 33554432 Bytes
I (1003)

Am I supposed to take the ESP_PM_NO_LIGHT_SLEEP in this case? What should I do? Is this expected?

Hi @JVKran, the logic used by the power management module is described here. If automatic light sleep is enabled, the system will automatically wake up if there is a task ready to run, or a software timer (esp_timer) ready to execute. If neither of these conditions are true, the system will stay in light sleep mode.

Every time I use a wakeup-source (such as a button for example), a few more characters are printed in the terminal.

I think what is happening is that before the system went to sleep the first time, some data was placed into UART FIFO. When the system enters light sleep, UART is suspended (and the peripheral is clock-gated). Each time the system wakes up, a few more characters get sent out from the FIFO before the system goes to sleep again.
However, note that the system will not enter light sleep while there is a task which is ready to run (i.e. not blocked on an RTOS synchronization primitive).

Am I supposed to take the ESP_PM_NO_LIGHT_SLEEP in this case? What should I do? Is this expected?

This depends on what you are trying to achieve. If you can attach the source code you are trying to run, it would help us give you a suggestion.

I think what is happening is that before the system went to sleep the first time, some data was placed into UART FIFO. When the system enters light sleep, UART is suspended (and the peripheral is clock-gated). Each time the system wakes up, a few more characters get sent out from the FIFO before the system goes to sleep again.
Thanks to you putting it like this, I understand what's happening. It's a combination of application behaviour and the terminal not representing the most recent state. Thanks. Everything was defined.

Reopening as I've found the time to find the cause for this behaviour.
Starting a REPL for the esp_console results in the behaviour described above. When I comment this line, the behaviour described above does not occur anymore.
esp_console_new_repl_uart(&m_uart_config, &m_repl_config, &m_repl);

I'm not necesarilly interested in a console over UART, but I do need to be able to execute commands to esp_console_run. Is there an example that shows how to start the console but without REPL? Even better would be to have the REPL being able to work with automatic light sleep.
Best regards,
Jochem

@JVKran As far as I see esp_console_run should work fine without the REPL, see this test-case for an example.
Regarding console+light sleep you can read/get more information in https://github.com/espressif/esp-idf/issues/14137

Marking this one as resolved, for any further questions regarding console + light sleep we can take that in the thread linked above


Detect an error when posting activity

Is it possible to detect that the postActivity() results in an error?  I tried intercepting the postActivity() method and subscribing to the activity before returning it, but for some reason this results in a double-send of the message.
Is there a recommended way of doing this?  I can't find anything in the documentation here or in the WebChat repo.
Thanks.

Hello @gareththackeray, seen from the code, when resulting in error, the postActivity func throws, in some case (expired token, some http errors), "retry" as result, as well as some other errors.
In our project, we've already tested to chain a .subscribe(...) after postActivity :

when everything's going well, I got the current conversatsion Id (? or maybe activity id, I forgot the detail),
in case of errors, I'll get "retry" as string, or other things.

I don't know whether that's gonna help.

@jacyuan is correct. The postActivity method returns an Observable that you can subscribe to. When the activity is sent successfully, it will return the activity id, and when there is an error, it will prompt you to retry sending the message.
https://github.com/microsoft/BotFramework-DirectLineJS/blob/048651f8254caffe9b6661e5fa771adab793bd92/src/directLine.ts#L386

@jacyuan do you think you could send me a code snippet of you chaining onto the subscribe?  The way I'm doing it causes a duplicate message to be sent to the bot.  Many thanks.

Hi @gareththackeray , I've done nothing more than
.postActivity(....)
.subscribe(x=>
//if the value of x is 'retry', do your retry logic here
//else, some other logic here
)
I don't think adding a subscribe will send twice the message, but maybe somewhere else (the way you do your retry, or maybe a global exception catcher ?).


Why can't I download the extension in VsCode? Can it be used in China?

Melty extension is deprecated. You can use standalone vscode fork version of Melty.


IPython notebook justifying gamma approximation in allele fraction model

This closes half of issue #538.  @samuelklee can you take a look?

looks good to me!  maybe add a few more plots with "edge cases" (i.e., f -> 0, a = 0, r = 0) to demonstrate that nothing funky happens here.
also, i like to do a fresh reevaluation of all cells before committing an ipython notebook, just so the cell numbers are in order (but this is just ocd on my part...)
if #538 automatically closes, be sure to open a new issue for @mbabadi's half.


[Doc] List all internal packages + npm versions in main README

Is it possible to list all internal packages + their npm versions with a badge in a table ?
Can submit a PR if you want.

good idea :) looking forward to a PR :)
I think if we use an npm badges the should always show the latest version right? I just want to avoid the need to manually update the version number 😀🙏

Result visible here : https://github.com/vogloblinsky/open-wc/tree/main-readme-list-internal-packages-badges


edx_notes postgres password not updating automatically

Consul template doesn't always seem to be monitoring the lease associated with the postgres password for edx_notes. After 30 days these messages show up:
compose-notes_api-1  | 2023-02-08 19:52:55,853 ERROR 9 [django.request] log.py:224 - Internal Server Error: /api/v1/annotations/
compose-notes_api-1  | Traceback (most recent call last):
compose-notes_api-1  |   File "/app/.local/lib/python3.8/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
compose-notes_api-1  |     self.connect()
compose-notes_api-1  |   File "/app/.local/lib/python3.8/site-packages/django/utils/asyncio.py", line 33, in inner
compose-notes_api-1  |     return func(*args, **kwargs)
compose-notes_api-1  |   File "/app/.local/lib/python3.8/site-packages/django/db/backends/base/base.py", line 200, in connect
compose-notes_api-1  |     self.connection = self.get_new_connection(conn_params)
compose-notes_api-1  |   File "/app/.local/lib/python3.8/site-packages/django/utils/asyncio.py", line 33, in inner
compose-notes_api-1  |     return func(*args, **kwargs)
compose-notes_api-1  |   File "/app/.local/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 234, in get_new_connection
compose-notes_api-1  |     connection = Database.connect(**conn_params)
compose-notes_api-1  |   File "/app/.local/lib/python3.8/site-packages/MySQLdb/__init__.py", line 123, in Connect
compose-notes_api-1  |     return Connection(*args, **kwargs)
compose-notes_api-1  |   File "/app/.local/lib/python3.8/site-packages/MySQLdb/connections.py", line 185, in __init__
compose-notes_api-1  |     super().__init__(*args, **kwargs2)
compose-notes_api-1  | MySQLdb.OperationalError: (1045, "Access denied for user<EMAIL_ADDRESS>(using password: YES)")
compose-notes_api-1  |

Can be resolved with pkill -9 consul-template or just initiating an instance refresh. Either way that is 👎 so we should figure out why consul-template isn't doing the needful and keeping an eye on those leases. Maybe only vault-template monitors leases? That would be ... extremely disappointing if true.

FYI @cachob

Maybe related?
https://github.com/hashicorp/consul-template/issues/1161
https://github.com/hashicorp/consul-template/issues/1224
https://github.com/hashicorp/consul-template/pull/1269


install SDK on Jetson TX2 Ubuntu18.04

Is it right to add repository with "sudo add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo $(lsb_release -cs) main" -u"?  After I add this repository, it always says that"the repository does not have a release file". So, I can't install SDK on Jetson TX2 Ubuntu18.04. Thank you very much!

Hi @karry-yuan  Jetson boards have their own dedicated installation instructions page at the link below.
https://dev.intelrealsense.com/docs/nvidia-jetson-tx2-installation
That page states a 2-step process for package installation on Jetson.

Register the server's public key.

sudo apt-key adv --keyserver keys.gnupg.net --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE

Add the server to the list of repositories using the instruction below for Ubuntu 18.04.

sudo add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo bionic main" -u

I did it with your way. But there are still errors.
`
kumar@nv-tx2:~$ sudo add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo bionic main" -u
Get:1 http://mirrors.ustc.edu.cn/ros/ubuntu bionic InRelease [4,680 B]
Hit:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic InRelease
Hit:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-updates InRelease
Hit:4 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-backports InRelease
Err:1 http://mirrors.ustc.edu.cn/ros/ubuntu bionic InRelease
The following signatures were invalid: EXPKEYSIG F42ED6FBAB17C654 Open Robotics<EMAIL_ADDRESS>Get:5 https://librealsense.intel.com/Debian/apt-repo bionic InRelease [3,251 B]
Hit:6 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-security InRelease
Get:7 https://librealsense.intel.com/Debian/apt-repo bionic/main arm64 Packages [20.9 kB]
Reading package lists... Done
W: GPG error: http://mirrors.ustc.edu.cn/ros/ubuntu bionic InRelease: The following signatures were invalid: EXPKEYSIG F42ED6FBAB17C654 Open Robotics<EMAIL_ADDRESS>E: The repository 'http://mirrors.ustc.edu.cn/ros/ubuntu bionic InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
`

It looks as though the GitHub version of the Jetson instructions has been updated more recently than the dev.intelrealsense.com version of the instructions.
https://github.com/IntelRealSense/librealsense/blob/master/doc/installation_jetson.md
On that page they recommend using this keyserver instruction first:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE
And then the apt-get instruction that you already used in your opening message.
sudo add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo $(lsb_release -cs) main" -u

The add-apt-repository is OK. But librealsense2-dkms can't be installed.
kumar@nv-tx2:~$ sudo add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo bionic main" -u Hit:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic InRelease         Hit:2 http://mirrors.ustc.edu.cn/ros/ubuntu bionic InRelease                    Hit:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-updates InRelease Ign:4 https://librealsense.intel.com/Debian/apt-repo bionic InRelease           Get:5 https://librealsense.intel.com/Debian/apt-repo bionic Release [2,718 B]   Get:6 https://librealsense.intel.com/Debian/apt-repo bionic Release.gpg [498 B] Hit:7 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-backports InRelease Hit:8 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-security InRelease Fetched 3,216 B in 6s (534 B/s)                                                 Reading package lists... Done kumar@nv-tx2:~$ sudo apt-get install librealsense2-dkms Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package librealsense2-dkms

I have not seen the mirrors.tuna.tsinghua.edu.cn server location before.  If server location is a factor in the error, in that the installation cannot retrieve librealsense2-dkms from those servers, then it may be worth trying to build librealsense from source code instead.  A method for doing so with Jetson boards is described in https://github.com/IntelRealSense/librealsense/issues/6964#issuecomment-707501049

I successfully install the librealsense 2.50.0, and the realsense-viewer can be launched. But the devcie D455 can't be found when I use it with reaalsense-viewer, it says that
kumar@nv-tx2:~$ realsense-viewer   24/11 20:53:24,007 WARNING [547510624272] (ds5-factory.cpp:1152) DS5 group_devices is empty.
When I launch it with realsense-ros-2.3.2, there is the same problem
process[camera/realsense2_camera_manager-2]: started with pid [10228] process[camera/realsense2_camera-3]: started with pid [10229] [ INFO] [1637758745.890108985]: Initializing nodelet with 6 worker threads. [ INFO] [1637758746.264148161]: RealSense ROS v2.3.2 [ INFO] [1637758746.264412291]: Built with LibRealSense v2.50.0 [ INFO] [1637758746.264553124]: Running with LibRealSense v2.50.0 [ WARN] [1637758746.354865111]: No RealSense devices were found!  24/11 20:59:06,354 WARNING [546928845184] (ds5-factory.cpp:1152) DS5 group_devices is empty.
Another, the firmware release of D455 is <IP_ADDRESS>. How can I solve this problem?

What build method did you use to successfully install 250.0 please?

apt install

And you used the apt install package installation method on the Jetson instruction page?
https://github.com/IntelRealSense/librealsense/blob/master/doc/installation_jetson.md
The packages on the distribution_linux.md instruction page are not compatible with Arm devices such as Jetson as they require an x86 / x64 processor like those in desktop and laptop computers.
https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md

Yes, I used the apt install package installation method on the Jetson instruction page.

And the camera cannot be detected in the Viewer if you unplug the USB cable and then plug it back in again?

Hi @karry-yuan  Do you require further assistance with this case, please?  Thanks!

With your help, I solved this problem successfully. Thank you very much!

That's great to hear, @karry-yuan - thanks very much for the update!  As you have achieved a solution, I will close this case.  Thanks again!

how do you solved this problem? I have met the same problem, install librealsense with this tutorial : https://github.com/IntelRealSense/librealsense/blob/master/doc/installation_jetson.md

how do you solved this problem: ? I have met the same problem, install librealsense with this tutorial : https://github.com/IntelRealSense/librealsense/blob/master/doc/installation_jetson.md

I successfully install the librealsense 2.50.0, and the realsense-viewer can be launched. But the devcie D455 can't be found when I use it with reaalsense-viewer, it says that
kumar@nv-tx2:~$ realsense-viewer 24/11 20:53:24,007 WARNING [547510624272] (ds5-factory.cpp:1152) DS5 group_devices is empty.
When I launch it with realsense-ros-2.3.2, there is the same problem
process[camera/realsense2_camera_manager-2]: started with pid [10228] process[camera/realsense2_camera-3]: started with pid [10229] [ INFO] [1637758745.890108985]: Initializing nodelet with 6 worker threads. [ INFO] [1637758746.264148161]: RealSense ROS v2.3.2 [ INFO] [1637758746.264412291]: Built with LibRealSense v2.50.0 [ INFO] [1637758746.264553124]: Running with LibRealSense v2.50.0 [ WARN] [1637758746.354865111]: No RealSense devices were found! 24/11 20:59:06,354 WARNING [546928845184] (ds5-factory.cpp:1152) DS5 group_devices is empty.
Another, the firmware release of D455 is <IP_ADDRESS>. How can I solve this problem?

I can't solve the problem. So I used D435i and reduced the version of librealsense.

I can't solve the problem. So I used D435i and reduced the version of librealsense.

I solved "DS5 group_devices is empty." by refresh my system to jetpack 4.6, use SDK-Manager.

Thanks very much @myxiaojun for your advice to @karry-yuan  :)

I will try it! Thank you! @myxiaojun

Hello, karry-yuan . I used D435i and librealsense v2.50.0 but I met this problem too. "DS5 group_devices is empty"
And I install librealsense by source code.
Jetson TX2
jetpack3.1
ubuntu 18.04

Hi @karry-yuan  Your JetPack version is very old now.  Intel's installation process for building librealsense from source code on Jetson has been tested with JetPack versions as recent as 4.5.1.
https://github.com/IntelRealSense/librealsense/blob/master/doc/installation_jetson.md#building-from-source-using-native-backend
Would it be possible to try updating your JetPack, as Nvidia's JetPack archive states that modern JetPack versions are compatible with TX2.
https://developer.nvidia.com/embedded/jetpack-archive

Wow, thanks! I will try to update my JetPack to a newer version.@MartyG-RealSense

HI，I have already update the version of JetPack and my version is 4.5.1 now. What should I do next？@MartyG-RealSense

@Jsc-Nuaa  Are you able to stream depth successfully in the RealSense Viewer tool (realsense-viewer) after your JetPack version is updated to 4.5.1 please?

Hi, I solved the "DS5 group_devices is empty"  problem.
Thanks!@MartyG-RealSense
But I met new problems.
WARNING548045828112IMU Calibration is not available, default intrinsic and extrinsic will be used!

Hi @Jsc-Nuaa  That's great to hear that the DS5 group_devices is empty issue is resolved for you!
The IMU calibration warning is not necessarily a problem.  It is simply suggesting that the IMU motion tracking component of your D435i may not be calibrated, but the IMU is still usable.
IMU calibration is an optional step.  Once it is performed then an option is unlocked in the Motion Module section of the Viewer to make a correction to IMU data so that the values are adjusted to compensate for known error factors in the IMU component (which does not have in-built calibration).
If you wish to perform it then it can be done with a Python-based IMU calibration tool at the link below.
https://github.com/IntelRealSense/librealsense/tree/master/tools/rs-imu-calibration
An excellent PDF user guide document for the tool is here:
https://dev.intelrealsense.com/docs/imu-calibration-tool-for-intel-realsense-depth-camera

Your help is greatly appreciated!@MartyG-RealSense Thanks!

Hi,  I met new problems. I tried to use realsense-ros. When I installed ROS Melodic and tried to check the version of opencv. And the version is 4.1.1. I could find opencv3.2. What should I do ?
@MartyG-RealSense

When I installed ROS Melodic on my laptop, I could success in finding the version of opencv(3.2.0) after "pkg-config opencv --modversion"


Add test for restrictions of Union

@mfussenegger please review

Current coverage is 80.91% (diff: 100%)

Merging #4256 into union-all will decrease coverage by 0.02%

@@           union-all      #4256   diff @@
===========================================
  Files           1311       1311
  Lines          44631      44632     +1
  Methods            0          0
  Messages           0          0
  Branches        7116       7116
===========================================
- Hits           36127      36115    -12
- Misses          5829       5832     +3
- Partials        2675       2685    +10

Powered by Codecov. Last update 69e5257...87db026

@mfussenegger Please check again


Replace GenericFunctionFilter with GenericFunctionQuery

In order to not use deprecated Lucene classes & methods.
This new GenericFunctionQuery is mostly the same as the
GenericFunctionFilter was except that everything which was handeld by
Lucene classes (Filter, FilteredQuery, RandomAccessFilterStrategy, ...)
has been inlined.

@dobe please review

Current coverage is 81.14% (diff: 71.42%)

Merging #4182 into master will decrease coverage by 0.20%

@@             master      #4182   diff @@
==========================================
  Files          1295       1296     +1
  Lines         44130      44169    +39
  Methods           0          0
  Messages          0          0
  Branches       7036       7049    +13
==========================================
- Hits          35897      35840    -57
- Misses         5597       5681    +84
- Partials       2636       2648    +12

Powered by Codecov. Last update 576e675...378229b


Jobs never complete

I'm running a self hosted confluent and zeebee environment. But for both examples, everything works except i never get to end state, always get stuck on the step just prior to ending, and no apparent error.
Any Idea why this could be?

Hey @socrates-hlapolosa - sorry that I have missed the issue here - could you ask in the forum instead? https://forum.camunda.io/
Feel free to ping me there if there is no answer!


[ENG-5024] feature/insti-dash-improv

Ticket: ENG-5024
Feature flag: n/a

Purpose

Summary of Changes

Screenshot(s)

Side Effects

QA Notes

Pull Request Test Coverage Report for Build<PHONE_NUMBER>5
Details

476 of 539 (88.31%)  changed or added relevant lines in 28 files are covered.
2 unchanged lines in 1 file lost coverage.
Overall coverage increased (+1.2%) to 64.804%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

app/institutions/dashboard/projects/controller.ts
19
20
95.0%

app/institutions/dashboard/registrations/controller.ts
19
20
95.0%

app/institutions/dashboard/route.ts
1
2
50.0%

app/models/institution-user.ts
0
1
0.0%

lib/osf-components/addon/components/osf-layout/component.ts
3
4
75.0%

app/models/index-card.ts
4
8
50.0%

app/packages/osfmap/jsonld.ts
12
16
75.0%

app/models/search-result.ts
15
20
75.0%

app/institutions/dashboard/-components/object-list/component.ts
21
27
77.78%

lib/osf-components/addon/components/index-card-searcher/component.ts
16
22
72.73%

Files with Coverage Reduction
New Missed Lines
%

app/models/search-result.ts
2
66.67%

Totals

Change from base Build<PHONE_NUMBER>4:
1.2%

Covered Lines:
6925

Relevant Lines:
10271

💛  - Coveralls


No useable certificate found

This error occurred after 24 hours of back-office operation and appears to have been caused by the failure to update the certificate?

Check that your clocks are properly set, maybe? Certificates are only valid for up 24 hours, but are rotated every 8 hours.

Time's good. It's the program that's running from backstage that's wrong.

Maybe try https://github.com/DNSCrypt/dnscrypt-server-docker ? It comes with everything already configured.

Or is there a problem with the daemon?

Works for me and for all the public servers.
Unfortunately, a more verbose bug report may be necessary in order to understand and reproduce what you are trying to describe.


Quill Component records setting of non-user initial value in quill history by default

I recently ran into some strange behavior:
I've got a quill component that I'm passing some value (truthy) as a prop to. If I move focus to the editor and key in cmd-z (undo) before keying in any input, the editor is completely cleared of its content, and whatever was there before can't be recovered.
I did some digging, and found that Quill pops the most recent delta object off of the delta array when you key in cmd-z. It doesn't care how that delta ended up in the history. If it's the most recent item in the history, it's just gone.
The real problem then is that react-quill calls setContents on the editor to populate the editor with the value prop we hand it, because Quill records that as an undoable/redoable change, even though the user didn't input it.
Fortunately, this is exactly what the quill history module's userOnly configuration exists for. It ensures that changes are only recorded in the quill history if the user keyed it in themselves.
I fixed the problem in my Quill configuration, including  history: { userOnly: true } in my modules configuration object.
So, while this isn't technically a bug, the behavior was totally unintended and pretty baffling at first. I'm curious if there's a reason that react-quill doesn't set userOnly to true by default, given that it starts off with an invisible non-user change every time it's rendered.
At the very least, this seems like a gotcha that belongs in the docs. I don't mind submitting a PR myself for that, but I was hoping to get some more insight first.
React-Quill version

[x] master

Good point. We've been a bit wary of passing configs that could override or contradict default behavior, but it may be a good idea to make an exception for this (and `clipboard: { matchVisual: false }?).
In any case documenting these caveats is a good start and a PR would be welcome if you would like to submit it.

I've tried to reference this solution in react-quill but it doesn't seem to work when using the react quill referenced editor
https://github.com/quilljs/quill/issues/2008
Is there a way to do this in react-quill?
editor.setContents(...); editor.history.clear();

@andrew1993choi you can try smth like this:
componentDidMount(){
  this.quillRef.getEditor().history.clear();
}
render(){
...
              <ReactQuill
                ref={(el) => { this.quillRef = el }}
...
}


chore(gulp): update gulp summary

概要が短すぎるので、Node.js Streamについて触れている話を追加

[Current coverage][cc-pull] is 96.13%

Merging [#98][cc-pull] into [master][cc-base-branch] will decrease coverage by <.01%

@@             master        #98   diff @@
==========================================
  Files             6          6
  Lines          1033       1034     +1
  Methods           0          0
  Messages         39         40     +1
  Branches          0          0
==========================================
  Hits            994        994
- Misses           39         40     +1
  Partials          0          0

Powered by Codecov. Last updated by [30d037d...faed95b][cc-compare]
[cc-base-branch]: https://codecov.io/gh/azu/JavaScript-Plugin-Architecture/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/azu/JavaScript-Plugin-Architecture/compare/30d037da6943f48c6ac5d9311955a68968aedc6f...faed95bbe6aa892b7e0cfd4c67d43be29fa9d5d2
[cc-pull]: https://codecov.io/gh/azu/JavaScript-Plugin-Architecture/pull/98?src=pr


Display folder path in other views

If the user has the setting toggled, show the folder path not just in the file view but in all other views 😁
Creating the issue for tracking - I have the feature first draft ready with thumbnails view ✅

This can probably be closed with #166! 😄

Thank you Cal for #166 🙇


Fork Concourse windows image build pipeline for MBR

Adds MBR builds as a separate pipeline to be run ad-hoc

/assign zmarano

/assign bkatyl

Question for Brian and Zach: Does it make sense to define the pipeline assuming that only the "testing" env will ever be passed in? I had removed alot of the branching logic from the original pipeline that stemmed from there being 4 publishing environments.

As we talked about in chat, lets remove the core images since these will only be for boot tests and we don't need or want to encourage double testing.


Create Report: All the countries in a region organised by largest population to smallest.

AB#17

As a Customer
I want all the countries in a region organised by largest population to smallest
So that the user can access and use the data with ease


Revert "feat(engine): add support for new license format"

This reverts commit 0ae70e674c37aeab1077c2fd2e03e4d44f67fbd7.
Related to CAM-10667, CAM-11137

Closed, since we will build new patch release artifacts. Reverting is not needed anymore.


using icon grid and not icons

What feature do you want to get added on the base engine?
Like in KE a icon grid will look nice and it will give it a vanilla engine feel
EDIT:
alr dont get mad i did this as a joke i was bored and didnt wanna wait till april 1st and yes i agree the grid is a pain in the ass
To test your sight, and reliability, please select the option of what should NOT be requested.
Thing that would not cause problems

this is the worst suggestion ever

literally its easier for ppl to add icons in the current way than it is to add them into an icon grid

Why do you want life to be harder

F U C K I N G  N O

in week 7 update, they made it like psych engine icons style, so it's already vanilla

Why do you want life to be harder

well like you can edit either like in mic'd up

A grid is already a pain in the ass to begin with on top of making any mod not made as a pack just as painful
Also
🤡🤡

YOU STUPID RONHERELMAO IT IS HORRIBLE AND DID YOU HAVE A BRAIN

I think he means like in mods/images the regular iconGrid style could be easier to use, so like in the icon type box put like bruhGrid/1,2 or 3,4 so on and so forth
Would make KE porting easier and could better manage icons so it isn't a bad idea

no

What
It's not a bad idea at all

bruh yeah im stupid

I think he means like in mods/images the regular iconGrid style could be easier to use, so like in the icon type box put like bruhGrid/1,2 or 3,4 so on and so forth
Would make KE porting easier and could better manage icons so it isn't a bad idea

in KE, they're using the system of separate icons too

everyone is making things easier like the week 7 update, that did the separate icons thingies

I think he means like in mods/images the regular iconGrid style could be easier to use, so like in the icon type box put like bruhGrid/1,2 or 3,4 so on and so forth
Would make KE porting easier and could better manage icons so it isn't a bad idea

in KE, they're using the system of separate icons too

Nobody uses newer KE

I think he means like in mods/images the regular iconGrid style could be easier to use, so like in the icon type box put like bruhGrid/1,2 or 3,4 so on and so forth
Would make KE porting easier and could better manage icons so it isn't a bad idea

in KE, they're using the system of separate icons too

Nobody uses newer KE

yeah. But i still think it's not a good idea for the main psych engine yknow, cuz the separate icons makes it easier to code characters for the game, and the objective of Psych is to make everything easier for modders
maybe he could code the grid himself, or just wait till someone makes it, idk

I think he means like in mods/images the regular iconGrid style could be easier to use, so like in the icon type box put like bruhGrid/1,2 or 3,4 so on and so forth
Would make KE porting easier and could better manage icons so it isn't a bad idea

now i think of it yeah this may not be a bad idea maybe a option for icongrid but eh this was all a joke

the way it works now is already easier and actually straightforward, we don't need a grid

I think he means like in mods/images the regular iconGrid style could be easier to use, so like in the icon type box put like bruhGrid/1,2 or 3,4 so on and so forth
Would make KE porting easier and could better manage icons so it isn't a bad idea

now i think of it yeah this may not be a bad idea maybe a option for icongrid but eh this was all a joke

I mean in mods. This can be used in mods especially cuz all char icons can be packed in one file and it'd be more convenient

no


feat(Topology/Maps): add *.of_subsingleton and *.of_isEmpty

Also use OpenEmbedding.of_subsingleton
to golf AlgebraicGeometry.isOpenImmersion_of_isEmpty.

Thanks!
bors merge


Added Card for Aaryan Garg

Added the required block of code for adding my card to the website.

Kindly merge this pr as a part of Hacktoberfest 2021


Unable to add package using SPM in XCode12.

Expected Behavior
Able to add package.
Actual Behavior
Fails at "Resolving package dependencies"

because no versions of BartyCrouch match the requirement 4.2.1..<5.0.0 and package bartycrouch is required using a version-based requirement and it depends on unversion package swift-toml, BartyCrouch >=4.2.0 is forbidden.
And because root depends on BartyCrouch 4.2.0..<5.0.0, version solving failed.

Steps to Reproduce the Problem

New -> Swift Packages -> Add Package Dependency
Choose Project
Add "https://github.com/Flinesoft/BartyCrouch.git" then default Rule (Version)

Specifications

Version:
Platform: macOS 11.0 (Big Sur)
IDE Version: XCode 12

@robinatrune Why are you trying to add this as a package? Are you trying to use the BartyCrouchKit product? Please note that BartyCrouch is not intended to be used via SwiftPM, at least I'm not aware of a feature that command line tools (what this is) are supposed to be installed via SwiftPM. I'm closing this as I think this is a misunderstanding, but I'll reopen if you explain your use case.


Issue segmenting big cells

Congrats on your placement in the challenge!
I am really interested in trying out your model.
I tried out ginoro_CpnResNeXt101UNet-fbe875f1a3e5ce2c on my data and it is really good at picking out the nuclei (Blue stain),
however I want to segment the green stain.

Do you think there is some preprocessing I can do to accomplish this or is my image too different from the training sets?

Ok, resizing my image to 512 x 512 massive improves detection:

Any other ideas for RGB setup or normalization?

Thanks! Also an interesting use case!
If I understand you correctly, you can try segmenting only the green channel of your RGB image.
You may also want to try different resolutions when applying the model.
Then you can easily scale the contours to fit the original resolution.
Here's an example for a screenshot of your image:

Not yet perfect, but possibly closer to what you are looking for.

Oh wow! Thats a gamechanger, thank you so much!

@ericup could you give me some more details on how you accomplished this? Would you just resize the input to 1000 x 1000 and then scale_contours((1000,1000),(2048,2048),contours)?

Exactly! For me the screenshot was about 940x940, so you could do something like this:
original_size = img.shape[:2]
img = cv2.resize(img, (940, 940))
img = cv2.cvtColor(img[..., 1], cv2.COLOR_GRAY2RGB)

... # apply model

contours = cd.ops.cpn.scale_contours(img.shape[:2], original_size, contours)


[BUG] - Styles are all messed up when attempting to use nextUI with Bun & a monorepo (repro included)

NextUI Version
2.4.6
Describe the bug
As you can see here: https://cm-mono-web.vercel.app/quote/0, the nextUI styles are completely broken.
I'm not sure why because I followed all the instructions on installing nextUI into my project, including properly pointing my ROOT node_modules in my tailwind.config file.
Here's a repo that reproduces the issue:
https://github.com/anomalylabsinc/cm-mono
Your Example Website or App
https://cm-mono-web.vercel.app/quote/0
Steps to Reproduce the Bug or Issue

Go to website here: https://cm-mono-web.vercel.app/quote/0
See completely broken styles
See repo that implements nextUI according to docs here: https://github.com/anomalylabsinc/cm-mono

Expected behavior
I expect nextUI to look as advertised in my website when i install it on a fresh project.
Screenshots or Videos

Operating System Version
macOS
Browser
Chrome

please contact me at discord. my id is same as my github one.


Z3 encoding of policy sets

The following test currently fails on the sasha/python branch:
    def test_options_policy_set_combining(self):
        # access env=prod or env=stage with ttl=20min
        a = Policy(
            name="a",
            options=OptionsSet(
                Options(Options.max_session_ttl < Duration.new(minutes=20))
            ),
            allow=Rules(
                Node((Node.labels["env"] == "prod") | (Node.labels["env"] == "stage")),
            ),
        )

        # access env=prod with ttl=10min
        b = Policy(
            name="b",
            options=OptionsSet(
                Options(Options.max_session_ttl < Duration.new(minutes=10))
            ),
            allow=Rules(
                Node(Node.labels["env"] == "prod"),
            ),
        )

        p = PolicySet([a, b])

        ret, _ = p.check(
            Node(Node.labels["env"] == "prod") &
            Options(Options.max_session_ttl == Duration.new(minutes=10, nanoseconds=-1))
        )
        assert ret is True, "access to env=prod should have ttl=10min"

        ret, _ = p.check(
            Node(Node.labels["env"] == "stage") &
            Options(Options.max_session_ttl == Duration.new(minutes=20, nanoseconds=-1))
        )
        # this assert fails as both options are enforced
        assert ret is True, "access to env=stage should have ttl=20min"

The first assert passes correctly.
In this case, the two options are correctly combined since both policies allow access to env=prod nodes.
The second assert fails incorrectly.
This is because the options from both policies are enforced, even though only one of the them grants access to env=stage nodes.
Why this is happening and what we can do about it
This is how we're encoding policy sets in Z3:
                      ----------------------------------------------     ----------------------------------------------
                     |                policy 1                      |   |                policy 2                      |
 --------------       ----------------------------------------------     ----------------------------------------------
| option rules |     ((option_1,1 AND option_1,2 AND option_1,3 ...) AND (option_2,1 AND option_2,2 AND option_2,3 ...) AND ...)
 --------------       ----------------------------------------------     ----------------------------------------------
| allow rules  | AND ((allow_1,1  OR  allow_1,2  OR  allow_1,3  ...) OR  (allow_2,1  OR  allow_2,2  OR  allow_2,3  ...) OR  ...)
 --------------       ----------------------------------------------     ----------------------------------------------
| deny rules   | AND ((!deny_1,1  AND !deny_1,2  AND !deny_1,3  ...) AND (!deny_2,1  AND !deny_2,2  AND !deny_2,3  ...) AND ...)
 --------------       ----------------------------------------------     ----------------------------------------------

More briefly:
                      --------------------------------     --------------------------------
                     |           policy 1             |   |           policy 2             |
 --------------       --------------------------------     --------------------------------
| option rules |     (reduce(AND, option_list_1)       AND reduce(AND, option_list_2)       AND ...)
 --------------       --------------------------------     --------------------------------
| allow rules  | AND (reduce(OR, allow_list_1)         OR  reduce(OR, allow_list_2)         OR ...)
 --------------       --------------------------------     --------------------------------
| deny rules   | AND (reduce(AND, map(!, deny_list_1)) AND reduce(AND, map(!, deny_list_2)) AND ...)
 --------------       --------------------------------     --------------------------------

Or even more briefly:
 --------------
| option rules |     (o1 AND o2 AND ...)
 --------------
| allow rules  | AND (a1 OR  a1 AND ...)
 --------------
| deny rules   | AND (d1 AND d2 AND ...)
 --------------

Let's ignore deny rules as they're not relevant for this issue.
We're left with:
(o1 AND o2 AND ...) AND (a1 OR a2 OR ...)

Intuitively, this only holds if all options are true and at least one of the allows is true.
This means, for Teleport, if e.g. a user is allowed to access a node due to 1 out of 2 policies, all options from the two policies will be enforced (as shown in the failing test above).
What we want, instead, is to only enforce the options that belong to the policies that allow the access.
For that, we should have instead:
(o1 AND a1) OR (o2 AND a2) OR ...

@vitorenesduarte

This means, for Teleport, if e.g. a user is allowed to access a node due to 1 out of 2 policies, all options from the two policies will be enforced (as shown in the failing test above).

That is correct and matches how our current RBAC works. We merge all options together using (and) and then apply resulting merged set with any of the allows.

This means, for Teleport, if e.g. a user is allowed to access a node due to 1 out of 2 policies, all options from the two policies will be enforced (as shown in the failing test above).

That is correct and matches how our current RBAC works. We merge all options together using (and) and then apply resulting merged set with any of the allows.

I misunderstood then. Thanks!


highstock not work

the main example work for my , but i want to use highstock and this is not work
when i am write only the code :
var ReactHighstock = require('react-highcharts/ReactHighstock.src');
i am get this error:
Cannot resolve module 'react-highcharts/ReactHighstock.src

Is the the file in the actual folder?
try 'react-highcharts/dist/ReactHighstock.src

its work now but i saw now that all it compressed and the tooltip the text in outside
<img src="http://www.interload.co.il/upload/9464211.png">
i didnt caught the tooltip you have any idea what to do ?


LightGBM Category error

When previous model is lightgbm, using sklearn API with LGBMRegressor or LGBMClassifier with several category columns, then directly input perm = PermutationImportance(model, random_state = 42).fit(X_test, y_test) will cause error

ValueError: train and valid dataset categorical_feature do not match.

only if first astype int for all categorical columns and then write categorical_feature = ... in fit function, you can continue calculating.
Should be fixed
THX

anyone...???

Hitting a similar issue here - I recently switched from one-hot encoding to proper Pandas categorical variables and now I can't use show_prediction() to introspect on specific predictions.

@cdrouin , I recently came across this problem too using Pandas categorical, and I happen to find a possible solution based on this thread. When you call on explain_prediction and specify the row of the PD Dataframe, you need to do double square brackets (ie df.iloc[[0]] and not df.iloc[0]).
https://github.com/TeamHG-Memex/eli5/issues/214#issuecomment-453872558
I had the same problem and above did not solve it for me. What worked for me was using `X.iloc[[1]]` instead of `X.iloc[1]`.  The latter form automatically converts a row to a series, which converts the datatypes in the row to "object" type if they differ.

_Originally posted by @agnesvanbelle in https://github.com/TeamHG-Memex/eli5/issues/214#issuecomment-453872558_


Error when train

Hello,

when I train the owner model, I got an error such as below:
DataLossError (see above for traceback): Unable to open table file models/model_0630.data-00000-of-00001: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?
[[Node: save/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]

and I have modify params.py file like below:
self.num_epochs         = 1  ##200
self.batch_size         = 64 #32
self.max_iters          = 2 ## 200000
self.test_every_iter    = 10 ##200
and after the train operation success finished,
model.data-00000-of-00001 has been generated in models folder,
and there has error when to generate the map with this model.

if I want train the model with pb format, is it possible?
I changed the train.py file such as below:
output_graph_def = convert_variables_to_constants(sess, sess.graph_def, ["output"])
with tf.gfile.FastGFile("models\model.pb", "wb") as f:
f.write(output_graph_def.SerializeToString())

but it has error such as:
File "train_hj.py", line 113, in
output_graph_def = convert_variables_to_constants(sess, sess.graph_def, ["class"])
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/graph_util_impl.py", line 202, in convert_variables_to_constants
inference_graph = extract_sub_graph(input_graph_def, output_node_names)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/graph_util_impl.py", line 141, in extract_sub_graph
assert d in name_to_node_map, "%s is not in graph" % d
AssertionError: class is not in graph
would you like to point out where is error?
thanks.

Different TF version.


Add Rap items with Value

currently, the value only shows the valued items, make an option where it adds the rap items aswell. so Value + RAP

comparison between olympic and horizon

comparison between olympic and horizon

Does this only add the rap of the unvalued items, or the rap of all?

Does this only add the rap of the unvalued items, or the rap of all?

Does this only add the rap of the unvalued items, or the rap of all?

rolimons shows different values for different rap items so idk

Does this only add the rap of the unvalued items, or the rap of all?

rolimons shows different values for different rap items so idk


--mount-root option broken in v >= 0.2.45

The --mount-root option no longer works for me in version 0.2.45 and up. If I downgrade to 0.2.44 then the following command runs fine:
$ forklift 273695c4789e sshd --mount-root ~/docker/fs/
mount: /dev/mapper/docker-252:0-4468428-0de707309f72cd745fd4340ad11852346ee7021cfc585de83ff97bffec093baf already mounted or /var/lib/docker/devicemapper/mnt/0de707309f72cd745fd4340ad11852346ee7021cfc585de83ff97bffec093baf/ busy
Traceback (most recent call last):
  File "/usr/local/bin/forklift", line 9, in <module>
    load_entry_point('docker-forklift==0.2.45', 'console_scripts', 'forklift')()
  File "/usr/local/lib/python3.4/dist-packages/forklift/__init__.py", line 338, in main
    return Forklift(sys.argv).main()
  File "/usr/local/lib/python3.4/dist-packages/forklift/__init__.py", line 319, in main
    return driver.run(*command)
  File "/usr/local/lib/python3.4/dist-packages/forklift/drivers.py", line 240, in run
    return self.run_sshd()
  File "/usr/local/lib/python3.4/dist-packages/forklift/drivers.py", line 446, in run_sshd
    self.mount_root(container)
  File "/usr/local/lib/python3.4/dist-packages/forklift/drivers.py", line 365, in mount_root
    container_path])
  File "/usr/lib/python3.4/subprocess.py", line 557, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', 'mount', '-o', 'context=""', '/dev/mapper/docker-252:0-4468428-0de707309f72cd745fd4340ad11852346ee7021cfc585de83ff97bffec093baf', '/var/lib/docker/devicemapper/mnt/0de707309f72cd745fd4340ad11852346ee7021cfc585de83ff97bffec093baf/']' returned non-zero exit status 32

Ubuntu 14.04.3 LTS
Docker version 1.7.1, build 786b29d
Forklift Version: 0.2.45

Hmm. I'm guessing you don't have SELinux and thus we need to omit the 'context' parameter.

I do not SELinux. I gave this a quick shot locally by removing the context argument but I'm still getting the error:
$ forklift 3985400cef6c sshd --mount-root ~/docker/fs/
mount: /dev/mapper/docker-252:0-4468428-56d47997d635cf7fed30b26f5e98df19cabea5b3215dc234e1c9a1f0a062206e already mounted or /var/lib/docker/devicemapper/mnt/56d47997d635cf7fed30b26f5e98df19cabea5b3215dc234e1c9a1f0a062206e/ busy
Traceback (most recent call last):
  File "/usr/local/bin/forklift", line 9, in <module>
    load_entry_point('docker-forklift==0.2.47', 'console_scripts', 'forklift')()
  File "/usr/local/lib/python3.4/dist-packages/forklift/__init__.py", line 338, in main
    return Forklift(sys.argv).main()
  File "/usr/local/lib/python3.4/dist-packages/forklift/__init__.py", line 319, in main
    return driver.run(*command)
  File "/usr/local/lib/python3.4/dist-packages/forklift/drivers.py", line 240, in run
    return self.run_sshd()
  File "/usr/local/lib/python3.4/dist-packages/forklift/drivers.py", line 450, in run_sshd
    self.mount_root(container)
  File "/usr/local/lib/python3.4/dist-packages/forklift/drivers.py", line 369, in mount_root
    subprocess.check_call(args)
  File "/usr/lib/python3.4/subprocess.py", line 557, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', 'mount', '/dev/mapper/docker-252:0-4468428-56d47997d635cf7fed30b26f5e98df19cabea5b3215dc234e1c9a1f0a062206e', '/var/lib/docker/devicemapper/mnt/56d47997d635cf7fed30b26f5e98df19cabea5b3215dc234e1c9a1f0a062206e/']' returned non-zero exit status 32


Updating the documentation

What's done:

Updating documentation

related
https://github.com/saveourtool/save-cli/issues/492

related
#492

will update in next PR


Consider adding $N which would help with documentation

I'd like for us to consider allowing $N to be the equivalent of $(subsec,places=9).  Note Linux's date command uses it, so it follows that precedent, and it gives a one-letter name for the place in code.  For example, I have a 7-element array I use to pass around times, and I can name each place with a one-character label Y, h, m, H, M, S, but not the last one, which I call nanos.  I think it would be useful to have this, and it would be a trivial extension of the spec.

    /**      * parse the ISO8601 time range, like "1998-01-02/1998-01-17", into      * start and stop times, returned in a 14 element array of ints.      * @param stringIn      * @return the time start and stop [ Y,m,d,H,M,S,nano, Y,m,d,H,M,S,nano ]      * @throws ParseException       */

I agree with this addition in principle. For clarity, would you describe a unit test that would go into the formatting.json file? I don't see a subsec example there and use this file more than the actual spect to understand the notation.

I was just looking at those tests.  I can put one in for subsec...  Also note I added "id" which is to be a unique identifier for each test.

I noticed that we do have $N reserved for future use (this use).

This was done sometime during the last year.


unvme_vfio.h typo issue

struct _vfio_device*    dev;        ///< device ownder

struct _vfio_device*    dev;        ///< device owner

Checked in fix along with other updates.  Thanks!


Adding a friend redirects to Idola app in stead of TF app

I tried adding Peter van der Henst as a friend on TFT app. He received a message from me to click on a link, but when he did it redirected him to the Idola app in stead of TFT app (since Idola app is also running on Roger that) - I assume there will be a same issue for people who have the CityApp on their phones

https://github.com/rogerthat-platform/rogerthat-backend/pull/287


rewrite: Initial codegen

This is based on #745 and eddyb's C parsing PR (https://github.com/Friz64/ash/pull/1). This PR will be rebased once these are merged.
I only implemented the most basic of struct outputs to have something to work with, extending that is the next step.
The directory structure used here is inspired by erupt. All Vulkan items still get re-exported into ash::vk though.

This PR is the product of this livestream: https://www.youtube.com/watch?v=wgSMfX_QcSw (very unentertaining content, yet it definitely helped to overcome motivation issues)

This looks very promising.
On that note, I would be happy to assist if there's anything you need, from small testing tasks to implementing some tricky features.

Sure, the next step in my mind would be to actually implement struct/union generation. For that we need lifetime propagation.
I think it would be convenient to be able to discuss this in some kind of group chat for ash development. I'd usually use Discord for this, but I'm open to suggestions as I'm not adamant on it.

@Friz64 there is a gitter instance for this repository. Link should be in the readme, it's using the old repo url because gitter couldn't migrate.
You can use various clients like Matrix to connect.


Moving the camera location with mouse?

Firstly, thank you for such an amazing project. It is exactly what I was looking for doing visualisation of ray-tracing (open source python). I'm going to build the visualiser part of the code around meshcat.
Clicking and dragging in the browser window rotates the camera around it's origin. It is possible to also change the origin point of the camera using the mouse with a keyboard combination pressed?

Try right-clicking and dragging with the mouse. Does that do what you're looking for?

I tried a few combinations, i’ll try again, but nothing seemed to rotate the camera. Will report back ...

It seems on a Mac track pad, holding ‘Ctrl’ and moving the mouse (which is normal a right click) doesn’t not work. You have to use two fingers.


Spell Level (D&D 5e)

So what does this script do?
https://wiki.roll20.net/Script:Spell_Level_(D%26D_5e) is empty.

Here's a link to the script itself. It seems to automatically update spell cantrip damage as players level up.
https://github.com/Roll20/roll20-api-scripts/tree/master/SpellLevel5e

Yeah, it was a script to determine the cantrip damage programmatically.  It's basically been superseded by a math formula that does the same thing without the API.  I should probably remove it...


AWS ElastiCache Redis Cluster & Redisson - OOM

We are currently facing some issues with ElastiCache/Redisson without being able to determine the root cause so far - thus I'm giving it a try here ...
We've set up ElastiCache in cluster-mode (3 Nodes) - and configured Redisson correspondingly.
We are using distributed locks and some RMapCaches. The caches have a max-size (thus LRU-eviction) and TTLs set for both lock as well the cache entries.
During the last few months we ran into a couple of out-of-memory-related outages - that is Redis runs OOM, not the client.
The memory consumption is usually staying constant (limited by the LRU policy and TTL) for weeks but then tanks out of of the blue.  Per "step", the memory consumption does pretty much double. The "step down" in memory takes 1-2 hours before stabilizing on a lower level.
According to our statistics, the number of keys remains constant - less than 100 of which 15 belong to the caches and the rest being TTLed-locks. The number of keys (entries) per cache is also constant - with either well below the size ceiling or the LRU is recognized (=ceiling not exceeded).
I'm wondering whether somebody has seen a similar issue?
With Redisson 3.10, there's a new option to determine the size of an RMap - so we'll use that to investigate further - but I suspect that the size of individual cache entries (which, in theory, could cause this) is not the reason. If we had huge entries, we'd expect to see a recovery after the TTL period, but this is not the case.
Just from gut feeling, it feels as if this is somehow related to a replication - that would at least explain those "steps" to some degree.
Redis version
4.0.10
Redisson version
3.9.0
Redisson configuration
Cluster-mode

I think this is the same issue as https://github.com/redisson/redisson/issues/1941. Could you recheck it with Redisson 3.10.4?


introduce s82

This completes a search query made at https://math.stackexchange.com/questions/3155216/example-limit-point-compact-negcountably-compact-neglindelöf/4744910#4744910

It should not matter for the results.  But do we want to make the number of summands definite, like continuum many, at least in the description, or leave it as is?

Not relevant here, but a question about S42 that this is based on.
https://topology.pi-base.org/spaces/S000042/properties/P000068 Doesn't the mathse reference actually show that the space is Markov Rothberger?

The mathfrak in the name of the space seems a little clunky when trying to do a search in the pi-base search box.  Would it be possible to change the space name to "Sum of continuum-many Right-ordered reals" (even shorter than before without "topological")?
All good otherwise.

Sorry, one last nitpick.  I see that you changed the capitalization in the middle, from "Sum of continuum-many Right-ordered reals" to "Sum of continuum-many right-ordered reals".  I thought capitalizing "Right" in the middle was kind of nice as an indication that we are referring to another space somewhere.  But I am reading too much into this, I can go with the latest.  What do you prefer?

works for me


Add Hongyan's FreeRTOS compat header.

We probably don't want to merge this as-is, but it's a useful starting point.

Superseded by #151


API Keys

Ok, so this is an initial attempt to replicate the ore api key authentication for api requests.

Ok, stuff should be working w/this. Comment with all the issues you fine :+1:

Gonna just develop on one branch


Design the hint button and functionality

We've talked about creating a hint button that will pop up a hint.
There are a few questions we must first answer:

do we want to allow for several hints? Where each time a button is clicked, a progressively more explicit hint is revealed? Or do we just want one good hint per challenge?
do we want to use the toast system, or just reveal the hint below the challenge description, where it can be more conveniently studied, kind of like this: http://codepen.io/oloman/pen/odnqy
keep in mind that these hints may be long or large blocks of code, so it would be nice to be able to style them with HTML like we can the challenge description.

I think we should leave the basic challenge framework so open as possible to allow different kinds of challenges to teach in slightly different ways (while of course still using a similar format).
I suggest we allow multiple hints, by using an array of JSON-strings similar to how the challenge description is stored. I like the idea of having formatting options for the hints as formatted names or code examples sometimes could convey more value than a toaster. If we want to display formatted hints it would probably make sense to add them just below the instructions.
A bonus for this solutions would be that the rendering code for this basically could be the same as what's rendering the description. So it wouldn't be too hard to implement either.

Have you also discussed about how to make the hint feature not-so-tempting? I understand sometimes it is easy to get discouraged in front of a challenging problem, but an abuse of the hint feature kills the learning that happens when you try your best to solve a problem.

Maybe it would be possible to add a cooldown to hint button? If an user presses it, then the user has a cooldown to ALL hint buttons for like 10-30 minutes

I think some thing similar to Codeacademy.com can be done, They show the hint just below the problem description/Detail. But I like the current style of FCC much more then Codeacademy cause it forces me to learn on my own. There should be some kind of penalty system if a user uses a Hint in a problem, i.e one hint per day should be allowed or something like @OFFLlNE  suggested. Users should be discouraged to use the hint.
Or alternatively hint can be a link to some other resource explaining how the problem should be approached.

@nawazishali Thanks for your feedback. Instead of penalizing the user, we could fire a JavaScript notification that a hint was used, and track which challenges people need to use the hints on the most, and see if we can refine those challenges. I don't think we should penalize campers. Alternatively, we could make the hint time-unlocked.
If the camper spends more than 2 minutes working on a challenge, the hint button could become enabled. Of course, if they're clever they could just dig into the console and get the hint immediately. We wouldn't consider that cheating, but the additional effort would sort of automatically discourage this :)
The reason I say this is we want for all the interactions to be as positive as possible - carrots instead of sticks. So we don't want to penalize or discourage campers in any way.
What do you think?

If I can spare my two cents, I don't really like the "timing" approach.
It reminds me of those free-to-play pay-to-win games, where you have to wait for a certain time to have an important item to be available again... unless you pay to have it now.
I'm sure that, as an open source, we don't want to give the impression that we hold information.
Moreover, let's be honest, if a camper would want a straight answer it could just ask for it in chat or Google it.
So in my humble opinion the best kind of hint would be something that helps the camper in getting started in the right direction.
Which is something that, honestly, we do at work as well.
If stuck I often ask some coworker/senior how they would proceed to tackle the problem, to have at least a starting point; which I believe sometimes is the hardest part to do: starting.
So for example in a JS challenge a hint could be:

HINT 1:why don't you start by looping into the array and extract the value into a new variable scoped into the function?
HINT2: have you checked insert useful methods here, it may help you example: dividing the string into single character

In doing so we can also have a common method on writing those hint as consistent as possible,
and still leaving the camper the possibility to ask in chat if those guidance haven't been helpful.

@QuincyLarson I agree that penalizing could have a negative impact on the user but instead of time limitation we can have a quiz type of question related to the exercise so that the user first needs to search out on internet to get the knowledge required to unlock the Hint/Solution, This way we can push the user to get at least some knowledge about that particular exercise before he gets to the solution.
But I think it's gonna take lots of time to build such type of system as we will need to first decide what questions need to be asked that are relevant to the exercise. And yeah with this quiz system we can allow the user to directly see the solution instead of just providing a hint.
What do you Say?

@nawazishali that is a novel idea, and I like the fact that it pushes the learner to seek out information to unlock the hint. This said, you are right - this would be difficult to execute properly, and may just end up making the user experience frustrating.
I agree with @Marmiz that the timed unlock thing could become frustrating. We've made every other aspect of fCC completely accessible. People can jump around between challenges. They don't even need an account. They can even get working solutions from our wiki. Why should we hold back the hints from them?
So I propose we have a hint button, and when clicked, it gives the first hint. As simple as that. The question remaining is, how should we display that hint? Should we have it appear below the lesson?
This is a crude drawing, but basically at the bottom of the challenge instructions, a regular looking link that when clicked pushes everything below it down to make room for the hint.
https://www.evernote.com/l/Ar_CDadzMpJG7anyJtbnTjdsPM0Yw-HG4CQB/image.png

@QuincyLarson just came home and started working on a simple demo on my local copy; at least to have some initial screenshot/visuals on how it may looks like.
Hope to have it ready soontm!

@MAF27 Awesome - I'll look forward to seeing it :)

Sorry that took me so long, a cold found me with my guard down 😄
I started with the easiest approach here:
I've designed a new component for the Hint button, so far it toggles the visibility of a child component that handle the rendering of the hint text.
My idea was to split the concern so that: we can add any features to the button (eg: open in a modal / add analytics ..) and let the Children handle fetching the data from the seeds and rendering on the page like the rest of the test: here's how it looks:

@Marmiz Nice work! I like the separation of concerns.
Perhaps the HintButton could allow multiple triggers (Analytics, modal and more) by accepting a callback function fired onClick where the consumer can decide what to do? :blush:

Adding to this issue thread that as part of the hint redesign, MDN links need to be migrated from backup/staging to staging.

Instead of building a hint system and adding hints for every challenge, it would be easier to link people the the Guide article that corresponds to the challenge (if there is one). Currently these are up on https://forum.freecodecamp.com/c/guide and we'll soon have them up on freecodecamp.com/guide/[guide URL]
Once these are live, we can go through and add a "guide" link to each of the challenges in the seed file, or better yet come up with a way of parsing the challenge name so we don't have to hard code these links.


ModuleNotFoundError: No module named 'tf_pose'

(har_venv) C:\Users\VISHALI\Desktop\Realtime-Action-Recognition-master>python src/s5_test.py --model_path model/trained_classifier.pickle --data_type video
--data_path data_test/exercise.avi --output_folder output
Traceback (most recent call last):
File "C:\Users\VISHALI\Desktop\Realtime-Action-Recognition-master\src\s5_test.py", line 57, in
from utils.lib_openpose import SkeletonDetector
File "C:\Users\VISHALI\Desktop\Realtime-Action-Recognition-master\src/..\utils\lib_openpose.py", line 21, in
from tf_pose.networks import get_graph_path, model_wh
ModuleNotFoundError: No module named 'tf_pose'

Sorry I don't have a quick answer now, since it's been many years since I worked on it.
Thanks for reporting the issue anyway

(har_venv) C:\Users\VISHALI\Desktop\Realtime-Action-Recognition-master>python src/s5_test.py --model_path model/trained_classifier.pickle --data_type video --data_path data_test/exercise.avi --output_folder output Traceback (most recent call last): File "C:\Users\VISHALI\Desktop\Realtime-Action-Recognition-master\src\s5_test.py", line 57, in from utils.lib_openpose import SkeletonDetector File "C:\Users\VISHALI\Desktop\Realtime-Action-Recognition-master\src/..\utils\lib_openpose.py", line 21, in from tf_pose.networks import get_graph_path, model_wh ModuleNotFoundError: No module named 'tf_pose'

You need to put the code of tf-pose-estimation into the "src\github".
Have a look at the "lib_openpose.py".
or
Try to put the code"from tf_pose import..." behind the code "sys.append...."

i tried it out by using pip and it worked for me well.
pip install tf-pose


Moved English link

What does this PR do?
Improve repo
For resources
Description
The 'View the English list' link is easy to miss at the top - especially on the https://ebookfoundation.github.io site because the links are much smaller there.
The link is squashed in under the main title and before the Intro title - so skimming the page skips over the link.
But then if you miss this link you come to the title 'In Other Written Languages' which then makes no sense - because you can't see the English list anywhere.
I've create a 'Books' section so that its similar to the 'Free Online Courses' and 'Cheat Sheets' and then put the English link at the top. This seems more logical and easier to skim.
Why is this valuable (or not)?
It's easier to find the main 'English' books link. More logical layout of the page. Consistency of titles.
How do we know it's really free?
For book lists, is it a book? For course lists, is it a course? etc.
Checklist:

[x] Read our contributing guidelines (Your contributing link for PRs is broken it goes to https://github.com/CONTRIBUTING.md instead of https://github.com/EbookFoundation/free-programming-books/blob/master/CONTRIBUTING.md
[x] Search for duplicates.
[x] Include author(s) and platform where appropriate.
[x] Put lists  in alphabetical order, correct spacing.
[x] Add needed indications (PDF, access notes, under construction)

Followup

Check the output of Travis-CI for linter errors!

This is definitely an issue, but I'm going to hold off on merging this in light of #4588 and #5092; your feedback on those would be welcomed!

I think my PR is a lot less ambitious than the other two. I tried to keep this as small as possible.
Also I don't think that you need jump to top links in the README only in the actual book pages.
The split into directories would change the URLs but hopefully moving the link shouldn't impact that too much.
I agree with your comment to split by topic rather than language - it then still matches the README structure you have now.

Great, thanks for merging!


add tooltips to "kubelet" term definition

@kirisakow  please sign CLA first

k8s-ci-robot added the do-not-merge/invalid-commit-message
Keywords which can automatically close issues and at(@) or hashtag(#) mentions are not allowed in commit messages.


Changing Navbar height via Less var @navbarHeight not right…

There is a variable in the variables.less to change the height of the NAv with: '@navbarHeight' however this does not work as it currently only appears in: '.navbar .divider-vertical' in the navbar.less, i think 'height: @navbarHeight;' needs to be added to '.navbar .nav'?

I've added the above and it works, however for those also using the build in navigation links, you also have to adjust the padding in .navbar .nav > li > a.
I've left the line-height on 19px, but for future adjustments I added
padding: (@navbarHeight - 20)/2 10px ((@navbarHeight - 20)/2 + 1);
to replace
padding: 10px 10px 11px;

I also tossed in for the .brand
padding: (((@navbarHeight - 20) / 2) * 0.8) 20px (((@navbarHeight - 20) / 2) * 1.2);
improve its adjustment to changing navbar height.

I think there is still an issue here. After implementing the fixes above I set @navbarHeight to a larger value and the nav links don't line up with the brand anymore. It becomes more obvious the larger you make the height. I haven't been able to figure out why.
v2.0.1

ah that's because there is padding on the li's in the menu that will also need increasing. Really this should be fixed so that they use a a calculation like padding-top: (@navbarHeight - 20) / 2) or something? so that the height increases with the changes to the nav height…

I can't get the navbarHeight to change at all either.

I've tried the above changes provided in 55bb7a0

the line-height change provided by @populearn
the change provided in 4c18238 from #1853 to vertically center the search text input

It works.


cargo verbose = warning as error mode

I saw many times when cargo build -v -v failed, while cargo build work without problems.
For example if you use iron that depend on typemap, with cargo build -v -v you will see:
error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions., #[deny(invalid_type_param_default)] on by default
   --> /home/evgeniy/.cargo/registry/src/github.com-1ecc6299db9ec823/typemap-0.3.3/src/lib.rs:185:18
    |
185 | impl<'a, K: Key, A: ?Sized + UnsafeAnyExt + 'a = UnsafeAny> Entry<'a, K, A> {
    |                  ^

And cargo build failed.
Or for example if you use syntex library, with cargo build -v -v you will see:
error: unused `#[macro_use]` import
  --> /home/evgeniy/.cargo/registry/src/github.com-1ecc6299db9ec823/syntex_errors-0.54.0/src/lib.rs:22:1
   |
22 | #[macro_use]
   | ^^^^^^^^^^^^

error: aborting due to 2 previous errors

So is cargo build -v -v not only make output more verbose, but turn on something like "error on warning mode? Can it be at least documented.

Hm it's definitely not the intention of -v -v to turn warnings to errors, so this is quite surprising! Do you have a reproductio available that I could test out?

@alexcrichton

Do you have a reproductio available that I could test out?

cargo new cargo_verbose add
[dependencies]
iron = "0.4.0"

to Cargo.toml and extern crate iron; to src/lib.rs
$ cargo build -v -v
...
error: build failed

$ cargo --version
cargo-0.17.0-nightly (0bb8047 2017-02-06)
$ rustc --version
rustc 1.16.0-beta.3 (ecbf0b59e 2017-03-02)

My team has also hit this error this past week.

Thanks for the snippet @Dushistov! Looks like -vv isn't properly passing --cap-lints warn, I'll look into fixing this.

Looks like this is not fixed...
+ /usr/bin/cargo build --release -j8
   Compiling bytes v0.3.0 (file:///home/brain/rpmbuild/BUILD/bytes-0.3.0)
     Running `/usr/bin/rustc --crate-name bytes src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=2d4d196649939b42 -C extra-filename=-2d4d196649939b42 --out-dir /home/brain/rpmbuild/BUILD/bytes-0.3.0/target/release/deps -L dependency=/home/brain/rpmbuild/BUILD/bytes-0.3.0/target/release/deps -Copt-level=3 -Cdebuginfo=2 -Clink-arg=-Wl,-z,relro,-z,now`
error: unused import: `ByteStr`
 --> src/buf/byte.rs:2:38
  |
2 | use traits::{Buf, MutBuf, MutBufExt, ByteStr};
  |                                      ^^^^^^^
  |
  = note: #[deny(unused_imports)] implied by #[deny(warnings)]
note: lint level defined here
 --> src/lib.rs:2:9
  |
2 | #![deny(warnings)]
  |         ^^^^^^^^

error: unused import: `Any`
 --> src/str/bytes.rs:4:16
  |
4 | use std::any::{Any, TypeId};
  |                ^^^
  |
  = note: #[deny(unused_imports)] implied by #[deny(warnings)]

error: unused import: `MutBuf`
 --> src/str/small.rs:2:19
  |
2 | use traits::{Buf, MutBuf, ByteStr, ToBytes};
  |                   ^^^^^^
  |
  = note: #[deny(unused_imports)] implied by #[deny(warnings)]

error: aborting due to 3 previous errors

[brain@ignatenko-w541 bytes]$ cargo --version
cargo 0.19.0
[brain@ignatenko-w541 bytes]$ rustc --version
rustc 1.18.0

P.S. I have set
[term]
verbose=True

in .cargo/config


Translation: PL - Polish

I'm going to try my best to translate this to Polish. Feel free to correct any mistakes you can find!

How is it going? Do you need any help?

Completely forgot about this account, hah. Thanks for the reminder.
Unfortunately, I lost any progress I had made in an unfortunate accident involving my laptop, and have since forgotten about this project. Seems like I need to re-read the site involved, eh?
Feel free to try it yourself, I apologize for not being able to provide anyything to work off of.

I chopped it into smaller pieces and created a fork so it's easier for everyone to contribute. If you ever feel like you could give it a go one more time, here is the new issue: https://github.com/ncase/remember/issues/58


Extend README file

Closes #42

Coverage remained the same at 100.0% when pulling 75dc610f73f0f3b3efc1c31dbcd076ba0c1a8144 on 42-readme into ee196041cba556a06118204b570f3319b6ff77bf on master.

Coverage remained the same at 100.0% when pulling a982c5f9f7ed18f5d12003e4dad313bdf46fcb2d on 42-readme into 645edd1c94263e9c5c0bebb2f1b83db1e04e25d2 on master.


Matrix-Vector Performance Gap: Reversible memory management

I feel confused about the Matrix-Vector Performance Gap between my naive implementation and @GiggleLiu implementation
My implementation is as following:
using NiLang
using SparseArrays: SparseMatrixCSC, AbstractSparseMatrix, nonzeros, rowvals, nzrange

@i function mul!(C::StridedVecOrMat, A::AbstractSparseMatrix, B::StridedVector{T}, α::Number, β::Number) where T
    @safe size(A, 2) == size(B, 1) || throw(DimensionMismatch())
    @safe size(A, 1) == size(C, 1) || throw(DimensionMismatch())
    @safe size(B, 2) == size(C, 2) || throw(DimensionMismatch())
    nzv ← nonzeros(A)
    rv ← rowvals(A)
    if (β != 1, ~)
        @safe error("only β = 1 is supported, got β = $(β).")
    end
    # Here, we close the reversibility check inside the loop to increase performance
    @invcheckoff for k = 1:size(C, 2)
        @inbounds for col = 1:size(A, 2)
            αxj ← zero(T)
            αxj += B[col,k] * α
            for j in nzrange(A, col)
                C[rv[j], k] += nzv[j]*αxj
            end
            αxj -= B[col,k] * α
            αxj → zero(T)
        end
    end
    nzv -= nonzeros(A)
    rv -= rowvals(A)
    nzv → zeros(eltype(nzv), size(nzv))
    rv → zeros(eltype(rv), size(rv))
end

I test this implementation and mentor's implementation on my desktop by using the benchmark tools
using SparseArrays: sprand
import SparseArrays
using BenchmarkTools

n = 100
sp1 = sprand(ComplexF64, n, n,0.1)
v = randn(ComplexF64, n)
out = zero(v);

Here is the benchmark results

I guess the performance gap comes from the reversible memory management. I couldn't agree more that we should wrap the allocation of nzv and rv by routine macro. But I feel the code block below just does the same thing as ~routine macro.
    nzv -= nonzeros(A)
    rv -= rowvals(A)
    nzv → zeros(eltype(nzv), size(nzv))
    rv → zeros(eltype(rv), size(rv))

But why such implementation seems to perform poorly?

-    nzv -= nonzeros(A)
-    rv -= rowvals(A)
-    nzv → zeros(eltype(nzv), size(nzv))
-    rv → zeros(eltype(rv), size(rv))
+    nzv → nonzeros(A)
+    rv → rowvals(A)

I'm not sure of it, maybe it's the Julia compiler that figures this nzv -= nonzeros(A) computation cannot be optimized(skiped) away so it actually does the seemingly unneeded computation.
If we take a look at the @macroexpand @i mul!(...) result on both mul! and i_mul!, it is basically identical but has only one extra code section:
            begin
                var"##results#872" = ((MinusEq)(nonzeros))(nzv, A)
                nzv = var"##results#872"[1]
                A = var"##results#872"[2]
            end
            begin
                var"##results#873" = ((MinusEq)(rowvals))(rv, A)
                rv = var"##results#873"[1]
                A = var"##results#873"[2]
            end

to verify it, let's see how much of time they takes:
nzv = nonzeros(sp1);
rv = rowvalues(sp1);

@btime rv - nonzeros(sp1); # 1.373 μs (1 allocation: 15.06 KiB)
@btime nzv - nonzeros(sp1); # 996.300 ns (1 allocation: 15.06 KiB)
@btime zeros(eltype(nzv), size(nzv)); # 936.800 ns (2 allocations: 15.08 KiB)
@btime zeros(eltype(rv), size(rv)); # 675.311 ns (2 allocations: 7.64 KiB)

If we sum these up, we see 3.9 μs (6 allocations: 52.6 KiB) overheads. That seems account for the benchmark gap.

then it's interesting that your slow version actually passes the reversibility check

So far, due to the limitation of macros, I can only read the expression to tell whether a user is accessing the same variable. @jieli-matrix fooled my compiler :P
Hmm, maybe I should copy the target when using left arrows to allocate a variable.
This is the correct version, you can turn off the reversibility check to get a best performance.
julia> @i function mul!(C::StridedVecOrMat, A::AbstractSparseMatrix, B::StridedVector{T}, α::Number, β::Number) where T
           @safe size(A, 2) == size(B, 1) || throw(DimensionMismatch())
           @safe size(A, 1) == size(C, 1) || throw(DimensionMismatch())
           @safe size(B, 2) == size(C, 2) || throw(DimensionMismatch())
           @invcheckoff nzv ← nonzeros(A)
           @invcheckoff rv ← rowvals(A)
           if (β != 1, ~)
               @safe error("only β = 1 is supported, got β = $(β).")
           end
           # Here, we close the reversibility check inside the loop to increase performance
           @invcheckoff for k = 1:size(C, 2)
               @inbounds for col = 1:size(A, 2)
                   αxj ← zero(T)
                   αxj += B[col,k] * α
                   for j in nzrange(A, col)
                       C[rv[j], k] += nzv[j]*αxj
                   end
                   αxj -= B[col,k] * α
                   αxj → zero(T)
               end
           end
           @invcheckoff nzv → nonzeros(A)
           @invcheckoff rv → rowvals(A)
       end

Search for a better way to implement row-oriented Gaxpy
I plan to commit the column-oriented Gaxpy (as listed above) and the row-oriented Gaxpy implementation, however I came to the performance gap again
Here is the official row-oriented Gaxpy implementation in SparseArrays.jl
function mul!(C::StridedVecOrMat, adjA::Adjoint{<:Any,<:AbstractSparseMatrixCSC}, B::Union{StridedVector,AdjOrTransStridedOrTriangularMatrix}, α::Number, β::Number)
    A = adjA.parent
    size(A, 2) == size(C, 1) || throw(DimensionMismatch())
    size(A, 1) == size(B, 1) || throw(DimensionMismatch())
    size(B, 2) == size(C, 2) || throw(DimensionMismatch())
    nzv = nonzeros(A)
    rv = rowvals(A)
    if β != 1
        β != 0 ? rmul!(C, β) : fill!(C, zero(eltype(C)))
    end
    for k = 1:size(C, 2)
        @inbounds for col = 1:size(A, 2)
            tmp = zero(eltype(C))
            for j = getcolptr(A)[col]:(getcolptr(A)[col + 1] - 1)
                tmp += adjoint(nzv[j])*B[rv[j],k] # store results in tmp
            end
            C[col,k] += tmp * α  # only multiply \alpha by once
        end
    end
    C
end

And I test mul! in the same way as I mentioned above
@btime SparseArrays.mul!(copy(out), sp1', v, 0.5+0im, 1)
1.463 μs (2 allocations: 1.81 KiB)

I implemented two version for reversible computing but much slower than the official way...
Version 1
Use tmp variable to store the results also need to deallocate
for (T, t) in ((Adjoint, adjoint), (Transpose, transpose))
    @eval @i function imult!(C::StridedVecOrMat, xA::$T{<:Any,<:AbstractSparseMatrix}, B::DenseInputVecOrMat, α::Number, β::Number)
        @safe size(xA.parent, 2) == size(C, 1) || throw(DimensionMismatch())
        @safe size(xA.parent, 1) == size(B, 1) || throw(DimensionMismatch())
        @safe size(B, 2) == size(C, 2) || throw(DimensionMismatch())
        if (β != 1, ~)
            @safe error("only β = 1 is supported, got β = $(β).")
        end
        for k in 1:size(C, 2)
            @inbounds for col in 1:size(xA.parent, 2)
                @routine begin
                tmp ← zero(eltype(C))
                for j in nzrange(xA.parent, col)
                    @routine begin
                    anc2 ← zero(eltype(xA))
                    anc2 += $t(xA.parent.nzval[j])
                    end
                    tmp += anc2*B[xA.parent.rowval[j],k]
                    ~@routine
                end
                C[col,k] += tmp * α
                end
                ~@routine
            end
        end
    end
end

Test for benchmark results
@btime imult!(copy(out), sp1', v, 0.5+0im, 1)
47.282 μs (3 allocations: 1.91 KiB)

Version 2
Don't use tmp variable
for (T, t) in ((Adjoint, adjoint), (Transpose, transpose))
    @eval @i function imul!(C::StridedVecOrMat, xA::$T{<:Any,<:AbstractSparseMatrix}, B::DenseInputVecOrMat, α::Number, β::Number)
        @safe size(xA.parent, 2) == size(C, 1) || throw(DimensionMismatch())
        @safe size(xA.parent, 1) == size(B, 1) || throw(DimensionMismatch())
        @safe size(B, 2) == size(C, 2) || throw(DimensionMismatch())
        if (β != 1, ~)
            @safe error("only β = 1 is supported, got β = $(β).")
        end
        for k in 1:size(C, 2)
            @inbounds for col in 1:size(xA.parent, 2)
                for j in nzrange(xA.parent, col)
                    anc2 ← zero(eltype(xA))
                    anc2 += $t(xA.parent.nzval[j])
                    C[col,k] += anc2*B[xA.parent.rowval[j],k] * α
                    anc2 -= $t(xA.parent.nzval[j])
                    anc2 → zero(eltype(xA))
                end
            end
        end
    end
end

Test for benchmark results
@btime imul!(copy(out), sp1', v, 0.5+0im, 1)
46.812 μs (3 allocations: 1.91 KiB)

Before running the benchmark tests, I guess the first version would perform better since it uses tmp variables thus avoids to multiply $\alpha$ by too many times. However, it seems the second version is slightly better than the first one (may be time  waste in allocating variables and recomputing procedure?)
Anyway, both of them are really much slower than the official version and I really want to know what accounts for this.
Thank mentors for providing many useful advices~

You need to add @invcheckoff before your for loop...


lineEnding is hardcoded to default to \n

When I run the unit tests on windows I get the following error:
>> injector - customSort
>> Message: should inject files ordered with a custom sorting function.
>> Error: '\r\nvar files = [\r\n/** tagstart /\n  {ext: \'html\', file: \'/component.html\'},\n  {ext: \'js\', file: \'/script.js\'},\n  {ext: \'css\', file: \'/style.css\'},\n/* tagend /\r
\n];\r\n' == '\r\nvar files = [\r\n/* tagstart /\r\n  {ext: \'html\', file: \'/component.html\'},\r\n  {ext: \'js\', file: \'/script.js\'},\r\n  {ext: \'css\', file: \'/style.css\'},\r\n/*
tagend */\r\n];\r\n'
>> at Object.exports.injector.customSort (test\injector_test.js:179:10)
>> at Object.exports.injector.setUp (test\injector_test.js:28:5)

The issue appears to be all the baseline files were created where the lineEnding is set to '\n'. This should default to grunt.util.linefeed to persist OS settings for linefeed and allow the unit tests to pass on Windows.

Thanks for your PR. This is fixed by https://github.com/klei/grunt-injector/pull/36 and will be available in next release


A tool to change user registration source to niche for specific users.

What's this PR do?
Niche users signed up between Aug 11, 2016, 9:01 PM GMT+3 to Aug 12, 2016, 7:16 PM GMT+3 do not have field_user_registration_source_value = niche. This PR provides a tool to change user registration source to niche for specific users.
How should this be reviewed?

Copy csv file from DoSomething/devops#176 to Phoenix folder.
Adjust few uids in the last column of csv to correspond to staging user ids
drush ds-user-niche-reg-source-fix /var/www/dev.dosomething.org/Niche-No-Source.csv
Ensure this users have field_user_registration_source_value set to niche

Relevant tickets
Fixes DoSomething/devops#176
Checklist

[ ] Tested on thor
[ ] Run on production
[ ] Remove this code

cc @mikefantini @justkika @jamjensen @mshmsh5000

🚢