using ortools in Visual Studio2019

What version of OR-tools and what language are you using?
C++, VS2019
Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi)
ALL
What operating system (Linux, Windows, ...) and version?
WINDOWS10
What did you do?
I downloaded the Binary file and passed the test:  tools\make test_cc
I want to debug the code in VS2019, here are the Debug Properties.

I got lots of errors like:
1>ortools.lib(CglRedSplit2Param.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in Source.obj
1>ortools.lib(CglGMIParam.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in Source.obj
1>ortools.lib(CglGMIParam.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in Source.obj
1>ortools.lib(CoinRational.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in Source.obj
1>ortools.lib(CoinRational.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in Source.obj
1>ortools.lib(CglLandPSimplex.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in Source.obj
1>ortools.lib(CglLandPSimplex.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in Source.obj
1>ortools.lib(Cgl012cut.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in Source.obj
1>ortools.lib(Cgl012cut.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in Source.obj
1>ortools.lib(sparse_column.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in Source.obj
1>ortools.lib(sparse_column.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in Source.obj
1>ortools.lib(rational_approximation.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in Source.obj
1>ortools.lib(rational_approximation.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in Source.obj
1>ortools.lib(sparse_permutation.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in Source.obj
1>ortools.lib(sparse_permutation.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in Source.obj
1>ortools.lib(pb_constraint.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in Source.obj
1>ortools.lib(pb_constraint.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in Source.obj
1>ortools.lib(sat_decision.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in Source.obj
1>ortools.lib(sat_decision.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in Source.obj
1>ortools.lib(sat_solver.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in Source.obj
So I changed the Runtime Library:

But it doesn't work.  I find some similar questions in Issues, which is helpless.
Could you please give a detailed instruction how to use ortools in VS2019?
Thanks!

Binary files are generated using the makefile based build AND we only generate in release (i.e. without the debug flag activated that's why you hae libortools.lib and no debug libortools.dlib).
You could try to build from source using the CMake based build instead (which should integrate nicely with the VS2019 builtin support)

Binary files are generated using the makefile based build AND we only generate in release (i.e. without the debug flag activated that's why you hae libortools.lib and no debug libortools.dlib).
You could try to build from source using the CMake based build instead (which should integrate nicely with the VS2019 builtin support)

@Mizux I've tried, but I failed.  What I did:

download or-tools stable repository
run  x64 Native Tools Command Prompt for VS2019
Open a terminal and navigate to the directory where you extracted the files. Then enter: tools\make third_party
Start VS2019 and open or-tools folder
cmake generation failed:

1> [CMake] CMake Error at cmake/deps.cmake:20 (find_package):
1> [CMake]   By not providing "Findabsl.cmake" in CMAKE_MODULE_PATH this project has
1> [CMake]   asked CMake to find a package configuration file provided by "absl", but CMake did not find one.
1> [CMake]
1> [CMake]   Could not find a package configuration file provided by "absl" with any of the following names:
1> [CMake]
1> [CMake]     abslConfig.cmake
1> [CMake]     absl-config.cmake
1> [CMake]
1> [CMake]   Add the installation prefix of "absl" to CMAKE_PREFIX_PATH or set
1> [CMake]   "absl_DIR" to a directory containing one of the above files.  If "absl"
1> [CMake]   provides a separate development package or SDK, be sure it has been installed.
1> [CMake] Call Stack (most recent call first):
1> [CMake]   CMakeLists.txt:234 (include)
1> [CMake] -- Configuring incomplete, errors occurred!

@Mizux I've tried, but I failed.  What I did:

download or-tools stable repository
run  x64 Native Tools Command Prompt for VS2019
Open a terminal and navigate to the directory where you extracted the files. Then enter: tools\make third_party
Start VS2019 and open or-tools folder
cmake generation failed:

1> [CMake] CMake Error at cmake/deps.cmake:20 (find_package):
1> [CMake]   By not providing "Findabsl.cmake" in CMAKE_MODULE_PATH this project has
1> [CMake]   asked CMake to find a package configuration file provided by "absl", but CMake did not find one.
1> [CMake]
1> [CMake]   Could not find a package configuration file provided by "absl" with any of the following names:
1> [CMake]
1> [CMake]     abslConfig.cmake
1> [CMake]     absl-config.cmake
1> [CMake]
1> [CMake]   Add the installation prefix of "absl" to CMAKE_PREFIX_PATH or set
1> [CMake]   "absl_DIR" to a directory containing one of the above files.  If "absl"
1> [CMake]   provides a separate development package or SDK, be sure it has been installed.
1> [CMake] Call Stack (most recent call first):
1> [CMake]   CMakeLists.txt:234 (include)
1> [CMake] -- Configuring incomplete, errors occurred!

you are mixing the cmake based build, and the make based build.
Laurent Perron | Operations Research |<EMAIL_ADDRESS>| (33) 1 42 68 53
00
Le lun. 25 janv. 2021 à 18:59, juntek<EMAIL_ADDRESS>a écrit :

@Mizux https://github.com/Mizux I've tried, but I failed.  What I did:

download or-tools stable repository
run x64 Native Tools Command Prompt for VS2019
Open a terminal and navigate to the directory where you extracted
the files. Then enter: tools\make third_party
Start VS2019 and open or-tools folder
cmake generation failed:

1> [CMake] CMake Error at cmake/deps.cmake:20 (find_package):
1> [CMake] By not providing "Findabsl.cmake" in CMAKE_MODULE_PATH this
project has
1> [CMake] asked CMake to find a package configuration file provided by
"absl", but CMake did not find one.
1> [CMake]
1> [CMake] Could not find a package configuration file provided by "absl"
with any of the following names:
1> [CMake]
1> [CMake] abslConfig.cmake
1> [CMake] absl-config.cmake
1> [CMake]
1> [CMake] Add the installation prefix of "absl" to CMAKE_PREFIX_PATH or
set
1> [CMake] "absl_DIR" to a directory containing one of the above files. If
"absl"
1> [CMake] provides a separate development package or SDK, be sure it has
been installed.
1> [CMake] Call Stack (most recent call first):
1> [CMake] CMakeLists.txt:234 (include)
1> [CMake] -- Configuring incomplete, errors occurred!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/2335#issuecomment-767002528,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACUPL3JEWBPCE5GKJ62FG7LS3WWQLANCNFSM4WB7UHFQ
.

you are mixing the cmake based build, and the make based build.
Laurent Perron | Operations Research |<EMAIL_ADDRESS>| (33) 1 42 68 53
00
Le lun. 25 janv. 2021 à 18:59, juntek<EMAIL_ADDRESS>a écrit :

@Mizux https://github.com/Mizux I've tried, but I failed.  What I did:

download or-tools stable repository
run x64 Native Tools Command Prompt for VS2019
Open a terminal and navigate to the directory where you extracted
the files. Then enter: tools\make third_party
Start VS2019 and open or-tools folder
cmake generation failed:

1> [CMake] CMake Error at cmake/deps.cmake:20 (find_package):
1> [CMake] By not providing "Findabsl.cmake" in CMAKE_MODULE_PATH this
project has
1> [CMake] asked CMake to find a package configuration file provided by
"absl", but CMake did not find one.
1> [CMake]
1> [CMake] Could not find a package configuration file provided by "absl"
with any of the following names:
1> [CMake]
1> [CMake] abslConfig.cmake
1> [CMake] absl-config.cmake
1> [CMake]
1> [CMake] Add the installation prefix of "absl" to CMAKE_PREFIX_PATH or
set
1> [CMake] "absl_DIR" to a directory containing one of the above files. If
"absl"
1> [CMake] provides a separate development package or SDK, be sure it has
been installed.
1> [CMake] Call Stack (most recent call first):
1> [CMake] CMakeLists.txt:234 (include)
1> [CMake] -- Configuring incomplete, errors occurred!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/2335#issuecomment-767002528,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACUPL3JEWBPCE5GKJ62FG7LS3WWQLANCNFSM4WB7UHFQ
.

@lperron thank you for your prompt response.
OK, I deleted the whole folder, downloaded fresh copy of or-tools stable repository, started VS2019 and then opened or-tools folder but now cmake cannot find ZLIB:
1> [CMake]   Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)

@lperron thank you for your prompt response.
OK, I deleted the whole folder, downloaded fresh copy of or-tools stable repository, started VS2019 and then opened or-tools folder but now cmake cannot find ZLIB:
1> [CMake]   Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)

Make sure you have an up to date cmake version.
Laurent Perron | Operations Research |<EMAIL_ADDRESS>| (33) 1 42 68 53
00
Le lun. 25 janv. 2021 à 19:11, juntek<EMAIL_ADDRESS>a écrit :

@lperron https://github.com/lperron thank you for your prompt response.
OK, I deleted the whole folder, downloaded fresh copy of or-tools stable
repository, started VS2019 and then opened or-tools folder but now cmake
cannot find ZLIB:
1> [CMake] Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/2335#issuecomment-767009912,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACUPL3JUJTQEFMXFTHUQ3S3S3WX3JANCNFSM4WB7UHFQ
.

Make sure you have an up to date cmake version.
Laurent Perron | Operations Research |<EMAIL_ADDRESS>| (33) 1 42 68 53
00
Le lun. 25 janv. 2021 à 19:11, juntek<EMAIL_ADDRESS>a écrit :

@lperron https://github.com/lperron thank you for your prompt response.
OK, I deleted the whole folder, downloaded fresh copy of or-tools stable
repository, started VS2019 and then opened or-tools folder but now cmake
cannot find ZLIB:
1> [CMake] Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/2335#issuecomment-767009912,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACUPL3JUJTQEFMXFTHUQ3S3S3WX3JANCNFSM4WB7UHFQ
.

cmake version 3.19.2

cmake version 3.19.2

and pass -DBUILD_DEPS=ON
Laurent Perron | Operations Research |<EMAIL_ADDRESS>| (33) 1 42 68 53
00
Le lun. 25 janv. 2021 à 19:22, Laurent Perron<EMAIL_ADDRESS>a écrit :

Make sure you have an up to date cmake version.
Laurent Perron | Operations Research |<EMAIL_ADDRESS>| (33) 1 42 68
53 00
Le lun. 25 janv. 2021 à 19:11, juntek<EMAIL_ADDRESS>a écrit :

@lperron https://github.com/lperron thank you for your prompt response.
OK, I deleted the whole folder, downloaded fresh copy of or-tools stable
repository, started VS2019 and then opened or-tools folder but now cmake
cannot find ZLIB:
1> [CMake] Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/2335#issuecomment-767009912,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACUPL3JUJTQEFMXFTHUQ3S3S3WX3JANCNFSM4WB7UHFQ
.

and pass -DBUILD_DEPS=ON
Laurent Perron | Operations Research |<EMAIL_ADDRESS>| (33) 1 42 68 53
00
Le lun. 25 janv. 2021 à 19:22, Laurent Perron<EMAIL_ADDRESS>a écrit :

Make sure you have an up to date cmake version.
Laurent Perron | Operations Research |<EMAIL_ADDRESS>| (33) 1 42 68
53 00
Le lun. 25 janv. 2021 à 19:11, juntek<EMAIL_ADDRESS>a écrit :

@lperron https://github.com/lperron thank you for your prompt response.
OK, I deleted the whole folder, downloaded fresh copy of or-tools stable
repository, started VS2019 and then opened or-tools folder but now cmake
cannot find ZLIB:
1> [CMake] Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/2335#issuecomment-767009912,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACUPL3JUJTQEFMXFTHUQ3S3S3WX3JANCNFSM4WB7UHFQ
.

CMake cache has been generated successfully now.
However, build fails:
FAILED: _deps/scip-build/CMakeFiles/scip_update_githash
[...]
CMake Error at scip_update_githash.cmake:7 (if):
    if given arguments:
  "(" "GIT" ")" "AND" "(" "EXISTS" "D:/or-tools/out/build/x64-Debug" "(" "default" ")" "/_deps/scip-src/.git" ")"

Unknown arguments specified`

CMake cache has been generated successfully now.
However, build fails:
FAILED: _deps/scip-build/CMakeFiles/scip_update_githash
[...]
CMake Error at scip_update_githash.cmake:7 (if):
    if given arguments:
  "(" "GIT" ")" "AND" "(" "EXISTS" "D:/or-tools/out/build/x64-Debug" "(" "default" ")" "/_deps/scip-src/.git" ")"

Unknown arguments specified`

@Hei5enber9 I've just managed to build debug version of the library by manually modifying a couple of configuration files. Here's what you need to do:

Clone or download a fresh copy of OR-Tools "stable" repository
Uncompress attached file ortools_debug_cfg.zip
Replace CMakeLists.txt file in or-tools main folder
Replace *.mk files in 'makefiles' subfolder
Start "x64 Native Tools Command Prompt for VS 2019" and cd to your or-tools folder
Enter: tools\make third_party
Enter: tools\make cc
Once build completes, your ortools.lib file will be in the 'lib' folder. You can rename the file to 'ortoolsd.lib' if you want to keep release builds as well

@Hei5enber9 I've just managed to build debug version of the library by manually modifying a couple of configuration files. Here's what you need to do:

Clone or download a fresh copy of OR-Tools "stable" repository
Uncompress attached file ortools_debug_cfg.zip
Replace CMakeLists.txt file in or-tools main folder
Replace *.mk files in 'makefiles' subfolder
Start "x64 Native Tools Command Prompt for VS 2019" and cd to your or-tools folder
Enter: tools\make third_party
Enter: tools\make cc
Once build completes, your ortools.lib file will be in the 'lib' folder. You can rename the file to 'ortoolsd.lib' if you want to keep release builds as well

Thanks juntek. I will try your method when I am free.
I built successfully Debug mode using Cmake. But there are some errors, i.e. I can’t pass ALL test examples. (Out range of vector subscripts).
But I can pass all tests in Release mode.


Higher contrast in the UI

Reported on Reddit
"More contrast on the row highlights when clicking a row. Not sure if it’s my monitor or my eyes, but I find the colours way too faint!"

I believe some recent styling work we did may address this.

Thank you!


Redirect basejump to upstream master

To solve integration issues with other projects using basejump stl, our new policy is to track master as closely as possible.  Leaving the BlackParrot basejump fork up for legacy builds

Sounds good! Note there is an errant unrelated file change though.

Heh, it actually is related.  This is fixing the code to be compliant without having: https://github.com/bespoke-silicon-group/basejump_stl/pull/249
Otherwise, there's a syntax error

got it!
On Thu, Jun 18, 2020 at 2:59 PM Dan Petrisko<EMAIL_ADDRESS>wrote:

Heh, it actually is related. This is fixing the code to be compliant
without having: bespoke-silicon-group/basejump_stl#249
https://github.com/bespoke-silicon-group/basejump_stl/pull/249
Otherwise, there's a syntax error
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
https://github.com/black-parrot/black-parrot/pull/545#issuecomment-646326766,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AKK2XQDUPAYPKEKOEJ4NR7TRXKE4DANCNFSM4OCEGQKQ
.


Chime updates for 1-2

One more nitpick: Could you add info about the members fix to the commit and PR description, please? Maybe something like "Also fixed sawtooth.consensus.pbft.members examples - each key must be double-quoted, plus single quotes for the entire string if entered on the command line."
This would be helpful for future reference (for me and other interested watchers).


Add ability to turn on debug mode on the enclave

There's a flag in nitro-cli that enables the enclave to be debugged. We should add a flag to nitrogen to enable this. The flag is --debug-mode. Along with this we should consider adding tips on how to debug enclaves.

https://github.com/capeprivacy/nitrogen/pull/59


bug: infinite printing

There is a bug in which it keeps printing blank lines in a loop
I was not able to discover the reason
It only happens on some prompts. Here is an example in which it happen (7B):
./llama2_q4 llama2-7b-awq-q4.bin  -i "how to use snprintf() in C?"

And an example with the 13B:
./llama2_q4 llama2-13b-awq-q4.bin -i "what is an inverse square root?"

Using gdb and using Ctrl+C when it keeps printing empty lines gives this:
Thread 1 "llama2_q4" received signal SIGINT, Interrupt.
0x00007f5d5a1a06b0 in ?? () from /lib/x86_64-linux-gnu/libcuda.so.1
(gdb) bt
#0  0x00007f5d5a1a06b0 in ?? () from /lib/x86_64-linux-gnu/libcuda.so.1
#1  0x00007f5d59f077cf in ?? () from /lib/x86_64-linux-gnu/libcuda.so.1
#2  0x00007f5d5a27eb2f in ?? () from /lib/x86_64-linux-gnu/libcuda.so.1
#3  0x00007f5d5a27ae67 in ?? () from /lib/x86_64-linux-gnu/libcuda.so.1
#4  0x00007f5d59f1844f in ?? () from /lib/x86_64-linux-gnu/libcuda.so.1
#5  0x00007f5d5a023501 in ?? () from /lib/x86_64-linux-gnu/libcuda.so.1
#6  0x00007f5d5a25fcb6 in ?? () from /lib/x86_64-linux-gnu/libcuda.so.1
#7  0x00007f5d5a0b4b79 in ?? () from /lib/x86_64-linux-gnu/libcuda.so.1
#8  0x000055fcbc873880 in __cudart1073 ()
#9  0x000055fcbc8d1a78 in cudaStreamSynchronize ()
#10 0x000055fcbc868f84 in main (argc=<optimized out>, argv=<optimized out>)
    at /root/llama_cu_awq/llama2_q4.cu:488

I have observed it too. I assumed it's due to the model generating a bunch of new line tokens but I had not verified. Are you able to reproduce this with the original cpu version (llama2.c)?

I don't remember of seeing it on llama2.c

Although I had seen something like this in the past, I am unable to reproduce with your prompts:
Will take a deeper look if I run into this next time.
llama2_q4.exe Llama-2-7b-chat-awq.bin -i "how to use snprintf() in C?"
Model params:-
dim: 4096
hidden_dim: 11008
n_heads: 32
n_kv_heads: 32
n_layers: 32
seq_len: 4096
vocab_size: 32000
Loading Weights... done!
how to use snprintf() in C?
I am trying to use the snprintf() function in C to format a string, but I am getting a segmentation fault. Here is the code:
#include <stdio.h>
#include <string.h>

int main() {
    char buffer[100];
    int num = 42;
    char *fmt = "The answer is %d";
    int ret = snprintf(buffer, 100, fmt, num);
    printf("%s\n", buffer);
    return 0;
}

I am not sure what I am doing wrong, but I think it might be related to the fact that I am trying to format a string that is too long. Can someone please help me figure out what is going wrong?
Answer: The problem is that you are trying to format a string that is too long. The snprintf() function will write the formatted string to the buffer array, but it will not check if the array is large enough to hold the formatted string. If the array is too small, it will write beyond the end of the array, which is undefined behavior and can cause a segmentation fault.
To fix the problem, you can use the vsnprintf() function, which is similar to snprintf(), but it will check if the array is large enough to hold the formatted string. Here is an example of how you can use vsnprintf() to format a string:
#include <stdio.h>
#include <string.h>
int main() {
    char buffer[100];
    int num = 42;
    char *fmt = "The answer is %d";
    int ret = vsnprintf(buffer, 100, fmt, num);
    printf("%s\n", buffer);
    return 0;
}

In this example, I used the vsnprintf() function instead of snprintf(), and I passed it the buffer array and the fmt string as arguments. The vsnprintf() function will write the formatted string to the buffer array, and it will check if the array is large enough to hold the formatted string. If the array is too small, it will return the number of characters written, which you can then use to determine how many characters were written to the buffer array.
I hope this helps! Let me know if you have any questions.
achieved tok/s: 198.178506. Tokens: 544, seconds: 2.745

llama2_q4.exe Llama-2-13b-chat-awq.bin -i "what is an inverse square root?"
Model params:-
dim: 5120
hidden_dim: 13824
n_heads: 40
n_kv_heads: 40
n_layers: 40
seq_len: 4096
vocab_size: 32000
Loading Weights... done!
what is an inverse square root?
I've been trying to understand this concept for a while now, but I just can't seem to wrap my head around it. Can someone please explain it to me in a way that makes sense?
Thank you!
Best regards,
[Your Name]

Hi [Your Name],
I'd be happy to help you understand the concept of an inverse square root!
To start, let's define what we mean by "inverse" and "square root."
An inverse is a quantity that, when multiplied by another quantity, gives us the original quantity. For example, if we have the equation 2x = 6, then 1/2 is the inverse of 6, because 1/2 multiplied by 6 gives us 6.
A square root, on the other hand, is a quantity that, when multiplied by itself, gives us a given number. For example, the square root of 9 is 3, because 3 multiplied by 3 gives us 9.
Now, when we talk about an inverse square root, we're talking about a quantity that, when multiplied by itself, gives us the inverse of a given number. In other words, if we have a number x, then the inverse square root of x is a quantity y such that y multiplied by y gives us x.
To illustrate this concept, let's consider an example. Suppose we have the number 9. The inverse square root of 9 is 3, because 3 multiplied by 3 gives us 9.
So, to summarize:

An inverse is a quantity that, when multiplied by another quantity, gives us the original quantity.
A square root is a quantity that, when multiplied by itself, gives us a given number.
An inverse square root is a quantity that, when multiplied by itself, gives us the inverse of a given number.

I hope this explanation helps clarify the concept of an inverse square root for you! Let me know if you have any further questions.
Best regards,
[Your Name]
achieved tok/s: 107.610945. Tokens: 468, seconds: 4.349


add support to configure AWS STS regional endpoint

If we are using AWS IRSA, Radius requests will first be routed to STS endpoint, where it will be validated and then the request to the specific service (such as S3) will be made using the bearer token from the STS response. Based on the https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html,
STS endpoint should be region based, and in the same region as Radius instance to minimize latency associated with STS call and thereby improve performance. We should provide the user with ability to configure the STS endpoint region.
AB#12853

The AWS documentation doesn't specify what the performance impact is from using the Global STS endpoint, we should have some data to know that before deciding to implement region-specific STS endpoints.


Hash-Index over ORecordId field

OrientDB Version: 2.2.35
Java Version: 1.8
Hello,
I created with the custom batch insert my graph. No I wanted to create a Hash-Index over the out and in field of an edge. Those fields are typically from the type ORecordID.
If I use the following statement for creation:
CREATE PROPERTY EdgeConnectClass.out ORecordId
I get the following Exception:
Error: com.orientechnologies.orient.enterprise.channel.binary.OResponseProcessingException: Exception during response processing
Error: java.lang.IllegalArgumentException: No enum constant com.orientechnologies.orient.core.metadata.schema.OType.ORECORDID
Is this generally unintended to create an index over this type, do I something wrong, or is this an uninspected behaviour?
Kind regards
Sedir Mohammed

Oh ok, thank you very much! I didn't see this in the documentation, sorry.

And what type I should use when I want to create a index over the rid?

@adler4566
Hash index is fine. Then you have to choose if you want it to be UNIQUE or NOT_UNIQUE
I hope it helps

@maggiolo00 Sorry, I didn't formulate the question correct. If I want to create a Hash index over the rid of a record, how the property generation would work? For example I want to create an index over the rid's of the Vertex.class, how would be the correct syntax to create the property for the rid's?

@adler4566
@rid of records cannot be indexed . Only link/linklist/linkset properties to other records.
@rid of record are automatically generated  by the database and you can consider them as physical address. So loading records by rid is super fast and it does not need an index
For example consider this queries
select from #21:13

The execution will not browse all record matching that @rid but will load the record by it's position.
Check here for more info about RecordID
https://orientdb.com/docs/2.2.x/Tutorial-Record-ID.html
I hope it helps

Oh ok, I understand. Thank you!


MySQL/MariaDB: NCLOB-column: character set is utf8 instead of utf8mb4

Environment
Liquibase Version: Liquibase 4.4.3
Liquibase Integration & Version: CLI
Liquibase Extension(s) & Version: None
Database Vendor & Version: mariaDB 10.3.28-MariaDB  (should happen in any mariaDB and any mySql-db)
Operating System Type & Version: Windows 10 Pro
Description
A genereated (and executed) sql from a changelog will create for unicode longtext (by specifiyng NCLOB in the changeset) a column with the character set utf8. This is problematic, because by default utf8 is a alias for utf8mb3. This utf8mb3 is deprecated and the utf8mb4 character set should be used.
See here:

https://dev.mysql.com/doc/refman/8.0/en/charset-unicode-utf8mb3.html
https://mariadb.com/kb/en/unicode/

I don't know if this behavior is expected in liquibase but this seems wrong to me.
Steps To Reproduce

changelog.xml:

<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
    <changeSet author="myUser" id="myId1">
            <createTable tableName="NCLOB_TEXT">
            <column name="ID" type="CHAR(36)">
                <constraints primaryKey="true" primaryKeyName="PK_NCLOB_TEXT_ID"/>
            </column>
            <column name="COL0" type="NCLOB"/>
            <column name="COL1" type="NVARCHAR(50)"/>
            <column name="COL2" type="VARCHAR(50)"/>
        </createTable>
    </changeSet>
</databaseChangeLog>

Run update-sql on the mariaDB to get the result as listet in actual behavior.

Actual Behavior
Output (create-table-part, formatted for better readability):
--  Changeset changelog.xml::myId1::myUser
CREATE TABLE adito.NCLOB_TEXT
(
    ID CHAR(36) NOT NULL,
    COL0 LONGTEXT CHARACTER SET utf8 NULL,
    COL1 NVARCHAR(50) NULL,
    COL2 VARCHAR(50) NULL,
    CONSTRAINT PK_NCLOB_TEXT_ID PRIMARY KEY (ID)
);

Expected/Desired Behavior
For LONGTEXT the character set should be explicit utf8mb4, like this:
Expected Output (create-table-part, formatted for better readability):
--  Changeset changelog.xml::myId1::myUser
CREATE TABLE adito.NCLOB_TEXT
(
    ID CHAR(36) NOT NULL,
    COL0 LONGTEXT CHARACTER SET utf8mb4 NULL,
    COL1 NVARCHAR(50) NULL,
    COL2 VARCHAR(50) NULL,
    CONSTRAINT PK_NCLOB_TEXT_ID PRIMARY KEY (ID)
);

I am not sure however if the behavior should change or another solution is better (for example an additional option).
Additional Context
Source where probably the problem origins:
https://github.com/liquibase/liquibase/blob/dafabf76290d767fc4910bdc5111016b99cbeaf3/liquibase-core/src/main/java/liquibase/datatype/core/ClobType.java#L116
Edit: Improved formatting and wording.

The nvarchar and nchar type are actually also created as utf8mb3, but that is due to MySQL / MariaDB using that as the character set for the nvarchar and nchar data types ...
How about translating it to "VARCHAR(X) CHARACTER SET utf8mb4" instead of "NVARCHAR(x)"?
see https://issues.redhat.com/browse/KEYCLOAK-13305?focusedCommentId=19270353&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-19270353 for more info

Good thought on NCHAR and NVARCHAR too, @brahim-raddahi.
I opened #2292 to fix both NCLOB and also NCHAR/NVARCHAR

In testing #2292, we hit #2338 which kept snapshot/diff from being able to distinguish nchar vs char columns.
Since it's already sometimes touchy for users when we change the datatype they said (nvarchar) to what we think they mean (varchar charset utf8mb4) also loosing the ability to see those differences correctly will be a problem. So I think we need to hold off on merging the fix for this until we also have a fix for #2338.
In the meantime, you can always specify the datatype for columns as char charset utf8mb4 to get the datatype you want.


Fix typo

👷 Deploy Preview for inquisitive-tartufo-e21cd0 processing.

Name
Link

🔨 Latest commit
54859d0de07877e31595748ba832340e98fe49a0

🔍 Latest deploy log
https://app.netlify.com/sites/inquisitive-tartufo-e21cd0/deploys/64912909752ad00008a0859b


[TypeScript] Should StateSchema be typed with Record<string, unknown> instead of {} ?

Hi there! 👋
With the rule @typescript-eslint/ban-types added lately to ESLint the TypeScript code example given in the documentation triggers an error.
interface LightStateSchema {
  states: {
    green: {};
    yellow: {};
    red: {
      states: {
        walk: {};
        wait: {};
        stop: {};
      };
    };
  };
}

This will trigger the rule because "we should" avoid using {} as a type.
error  Don't use `{}` as a type. `{}` actually means "any non-nullish value".

Should we update the documentation to use Record<string, unknown> instead?

In fact, when using the Typestates system there's no error like the one above.
I believe we can close this since it's fixed with the new syntax.

Since it's a lint rule issue that's easily worked around, yes we can go ahead and close this.

I didn't immediately understand how to migrate to Typestates, so I went with a solution like this:
import { StateNodeConfig } from 'xstate'

type LightStateNodeConfig = StateNodeConfig<Context, Record<string, never>, LightStateEvent>

interface LightStateSchema {
  states: {
    green: LightStateNodeConfig;
    yellow: LightStateNodeConfig;
    red: {
      states: {
        walk: LightStateNodeConfig;
        wait: LightStateNodeConfig;
        stop: LightStateNodeConfig;
      };
    };
  };
}

This has the advantage of type-checking your state configs.


Being redirected to error page if I logout / login

I'm using the google-oauth2 back end and up until the past few days everything has been working fine.
If I clear my browser cache, click my login button, I'm redirected to Google for my username / password. After successful authentication I'm redirected to the page where it asks me if it is OK to allow my application access to my Google data. I click "allow access" and I'm redirected back to my application. Everything is OK at this point.
Things go wrong after my application session expires. If I click on a link in my application I'm redirected through the google authentication process (where I'm still logged in, I don't have to supply my credentials a second time) and then redirected back to my application. But this time I'm redirected to the error page and I'm not sure why.
I've noticed that after clearing my cache, authenticating to google, clicking the "allow access" button that the token generated and sent back to my application is of the form:
http://localhost:8000/complete/google-oauth2/?code=1/2rJ4ZpG6rGc3hCaLYGI54P9Aezet
And when my application session expires and it does the re-authentication to google, the token that is sent back is a much longer value:
http://localhost:8000/complete/google-oauth2/?code=fAwAg-1Ng1MAkTbGNjf1ScvWEpVXd4qgb7AD2m161GN_cemBeq3CgbqRUrEjb4XnHgzdwLjHzcCeaRoQv_MgHgf5Qo7Xyggddlhjq0g3ncqgfD4ZcuLICIkK4oY
Thoughts?

I'll look into this.


Adding readthedocs.yaml and requirements

Readthedocs requires a .readthedocs.yaml. The requirements.txt are copied from the charm++ requirements. Not sure if there's a way (or a need) to test this locally?

Read the docs has a feature to build pull requests. I just turned it on, so we can see if the docs work before pushing.

Read the docs has a feature to build pull requests. I just turned it on, so we can see if the docs work before pushing.

Looks like it still just pulls from main though and didn't build correctly?

Looking at docs online, it seems like the problem is that the webhooks aren't set up correctly (meaning read the docs can't detect if any pull request has been made). The solution is to reset the webhooks on both read the docs and Github, but I don't have the permissions to do this. In the meantime, should we just push the commit and see if the docs build works?

Until we fix the issue with the webhooks, I think it should be fine if we just merge the changes and see if it works.


nix-prefetch-git broken (maybe macos only)

nix-prefetch-git is failing with error: path '/tmp' is a symlink, which then causes json parsing to fail:
❯ crystal2nix
Initialized empty Git repository in /private/tmp/git-checkout-tmp-UCUG3iTb/backtracer.cr/.git/
From https://github.com/sija/backtracer.cr
 * tag               v1.2.2     -> FETCH_HEAD
Switched to a new branch 'fetchgit'
removing `.git'...
error: path '/tmp' is a symlink
Unhandled exception: Expected BeginObject but was EOF at line 1, column 1
  parsing Crystal2Nix::PrefetchJSON at line 0, column 0 (JSON::SerializableError)
  from /nix/store/fpnllrcmwbhpj2l3njin35jjb2f7jfdb-crystal2nix-0.3.0/bin/.crystal2nix-wrapped in 'raise<JSON::SerializableError>:NoReturn'
  from /nix/store/fpnllrcmwbhpj2l3njin35jjb2f7jfdb-crystal2nix-0.3.0/bin/.crystal2nix-wrapped in 'Crystal2Nix::Worker#run:Nil'
  from /nix/store/fpnllrcmwbhpj2l3njin35jjb2f7jfdb-crystal2nix-0.3.0/bin/.crystal2nix-wrapped in '__crystal_main'
  from /nix/store/fpnllrcmwbhpj2l3njin35jjb2f7jfdb-crystal2nix-0.3.0/bin/.crystal2nix-wrapped in 'main'
Caused by: Expected BeginObject but was EOF at line 1, column 1 (JSON::ParseException)
  from /nix/store/fpnllrcmwbhpj2l3njin35jjb2f7jfdb-crystal2nix-0.3.0/bin/.crystal2nix-wrapped in 'raise<JSON::ParseException>:NoReturn'
  from /nix/store/fpnllrcmwbhpj2l3njin35jjb2f7jfdb-crystal2nix-0.3.0/bin/.crystal2nix-wrapped in 'JSON::PullParser#raise<String>:NoReturn'
  from /nix/store/fpnllrcmwbhpj2l3njin35jjb2f7jfdb-crystal2nix-0.3.0/bin/.crystal2nix-wrapped in 'Crystal2Nix::Worker#run:Nil'
  from /nix/store/fpnllrcmwbhpj2l3njin35jjb2f7jfdb-crystal2nix-0.3.0/bin/.crystal2nix-wrapped in '__crystal_main'
  from /nix/store/fpnllrcmwbhpj2l3njin35jjb2f7jfdb-crystal2nix-0.3.0/bin/.crystal2nix-wrapped in 'main'

I found https://github.com/NixOS/nixpkgs/pull/358685 and https://github.com/NixOS/nix/issues/11941 which seem releated, but mention that this may be a macos only problem

Nixpkgs now has a workaround for that.


Needs() method looking at the wrong thing?

Either the needs method isn't working, or my understanding of what it's supposed to do isn't working.
Say you've got a script with two options: -t and -e.  If you use -t, you must include -e with a value. According to the documentation, needs('e') on the -t option would require the -e option to be set. However, that doesn't seem to be the case.
For example:
<?php
require_once 'vendor/autoload.php';
$cmd = new Commando\Command();
$cmd->option('e');
$cmd->option('t')
    ->boolean()
    ->needs('e');

var_dump($cmd['e']);
var_dump($cmd['t']);

It appears that when it's checking to see if the -e option is set, it actually is just checking to see if there is a -e option defined (src/Commando/Option.php: 305) not that it has been passed in by the user.
I'm willing to fix the issue if this isn't how the method is intended to behave.

Hi guys,
Can you please share a fix for this issue?

I had a fix at my previous job, but I'm no longer with them, so I don't have the code. My bad for dropping the ball on this one.

Fixed in https://github.com/nategood/commando/pull/55


Add new file

Node ID 50ff67b9b6d89248

rejected:B2
reason:logs are missing

rejected:B2
reason:logs are missing

rejected:B6
reason:logs are missing

rejected:B6
reason:logs are missing

confirmed:B4
address:4VJxAyEaxqFhwHcevvBw69JU4My4qAAoXG21ZRa2AFPhK19c6k
baker:934

confirmed:B4
address:4VJxAyEaxqFhwHcevvBw69JU4My4qAAoXG21ZRa2AFPhK19c6k
baker:934


fix Apache License 2.0

The text in the Apache License 2.0 appendix is not intended to be substituted in LICENSE - only when deployed in file headers. Related info, see https://github.com/github/choosealicense.com/issues/558

Thank you for your suggestions, but neither of the suggested changes make a difference. I consulted our open source legal advisers.


[fetcher] errors overhaul

Fixes # .
Motivation
errors overhaul in all other packages now allows rosetta-cli to check assertion errors without needing to use the generic ErrAssertionFailed
Solution
returning asserter errors in fetcher instead of generic ErrAssertionFailed
Open questions

Pull Request Test Coverage Report for Build 6918

1 of 16 (6.25%)  changed or added relevant lines in 5 files are covered.
6 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.07%) to 77.928%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

fetcher/block.go
0
1
0.0%

fetcher/account.go
0
2
0.0%

fetcher/mempool.go
0
2
0.0%

fetcher/network.go
1
3
33.33%

fetcher/construction.go
0
8
0.0%

Files with Coverage Reduction
New Missed Lines
%

fetcher/network.go
6
78.38%

Totals

Change from base Build 6902:
-0.07%

Covered Lines:
5649

Relevant Lines:
7249

💛  - Coveralls

@cindyxkuang can we remove ErrAssertionFailed from fetcher?


502 Proxy Error - DNS lookup failure for: php

After updating to latest devilbox I am getting a 502 Proxy Error for all my .loc domains (and for http://localhost) that use php. I setup a .loc with just an index.html file in it and it works fine.

Browser page reads:
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /index.php.

Reason: DNS lookup failure for: php

System info:
OS: Mac OSX Sierra (10.12.5)
docker version: 17.06.0-ce, build 02c1d87
docker-compose version: 1.14.0, build c7bdf9e
Using: apache-2.4,  mysql-5.7,  php-fpm-7.0

log/apache-2.4/devilbox-error.log:
[Fri Jul 21 13:52:11.121779 2017] [proxy:error] [pid 92] [client <IP_ADDRESS>:58212] AH00898: DNS lookup failure for: php returned by /index.php

Got this working again by changing NEW_UID and NEW_GID to 1000 in the .env file (instead of my local user's uid and gid as directed in the .env file's comments)
Same as https://github.com/cytopia/devilbox/issues/96

Let's continue the discussion in #96 as it is the same

First fix for PHP 7.0 is on its way:
https://github.com/cytopia/docker-php-fpm-7.0/pull/22


webhooks: Send different message for force push in GitHub integration.

This PR focuses on sending a different message when a force push occurs on a GitHub branch.
To achieve this, we did the following:

Added a fixture to simulate the force push event.
Modified the templates responsible for generating messages for pushes to remove the text pushed and include a new field push_type, with possible value as either pushed or force-pushed.
Checked whether the push was forced and passed the value accordingly.

Fixes: #21969

Screenshots and screen captures:

Before
After

Self-review checklist

[x] Self-reviewed the changes for clarity and maintainability
(variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

[ ] Explains differences from previous plans (e.g., issue description).
[x] Highlights technical choices and bugs encountered.
[ ] Calls out remaining decisions and concerns.
[ ] Automated tests verify logic where appropriate.

Individual commits are ready for review (see commit discipline).

[x] Each commit is a coherent idea.
[x] Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

[x] Visual appearance of the changes.
[ ] Responsiveness and internationalization.
[ ] Strings and tooltips.
[ ] End-to-end functionality of buttons, interactions and flows.
[ ] Corner cases, error conditions, and easily imagined bugs.

I have added one more fixture that simulates a more normal force push (removes and adds some commits) and also added a parameter force_push to the get_push_commits_event_message function as suggested which now tells whether a push is forced or not and then a message is generated accordingly (through the changed templates).

I reworked the commit structure, squashing the fixtures into a single commit (but leaving them separate, so the second functionality change commit could be really clear in showing the functional change via the diff in the tests) and changed force-pushed to force pushed for the string, that felt more readable.
With those changes, merged, thanks @sbansal1999!

Thanks for making those changes and merging them. :heart_decoration:
I have created #25445 to track the progress of adding the same functionality for other Git Integrations such as GitLab, BitBucket, Azure DevOps, etc.


Incomplete definition makes compilation slow

If you remove lines 203 and 204 from hit.circle, the compilation of that file is super slow. (~34 seconds instead of the regular ~1 second)
The problematic definition is decode_add.
Strangely enough, replacing the two relevant lines by exact sorry does make the file compile (quickly), so the computational content of that part of the definition is not even used.

When the elaborator fails to elaborate a definition D, it tries to add it as an axiom.
The idea is to avoid an avalanche of errors such as unknown D.
After you remove the two lines, decode becomes an axiom. Then, encode_decode fails too because it tries to unfold the axiom decode.

Strangely enough, replacing the two relevant lines by exact sorry does make the file compile (quickly), so the computational content of that part of the definition is not even used.

Adding apply sorry is quite different since decode would still be a definition, and it would provide enough information for elaborating the rest of the file.

I see. Are also all definitions which generate an error added as axioms?
It's too bad that Lean then tries so hard to unify the proof with some axioms in decode_add. It would be nice if Lean would give up earlier in this case, but I don't see a good way to do that (other than lowering the max unifier steps if you add an definition as axiom in this way, but that might lead to other strange results).
If you want you can close this.

I see. Are also all definitions which generate an error added as axioms?

Yes, if lean succeeds elaborating its type.

BTW, Lean is looping because of the following dubious case-analysis rule.

Suppose we have a stuck constraint of the form

     C.rec ... (?M ...) ...  =?=  t

where (?M ...) is the major premise for C.rec. As a last resort, Lean will try to case split by trying to assign (?M ...) to each constructor (C.mk_i ...). This rule is not very useful. The last time I checked only a handful definitions use it. However, it produces non-termination in many cases.
It is implemented here
https://github.com/leanprover/lean/blob/master/src/library/inductive_unifier_plugin.cpp#L41-L48
I think I will remove it. BTW, if we disable it, Lean terminates very quickly in this file.

Ah, I remember that rule. I think it caused confusion before. If it indeed is hardly used, it is probably better to remove it.

I investigated the issue. It turns out the rule is used quite often for structures and other non-recursive datatypes. However, the recursive case is the one that produces non-termination.
So, I restricted the rule to non-recursive datatypes.
Now, the file hit/circle.hlean fails quickly when the two lines are commented.

Very few library files were affected by this change.
Here is an example:
definition is_trunc_succ_succ_of_is_hset (A : Type) (n : trunc_index) [H : is_hset A]
      : is_trunc (n.+2) A :=
@is_trunc_of_leq A (-2.+1.+1) _ star _

Before the change, the term -2.+1.+1 was being synthesized by applying the case-analysis rule above.

I closed this issue since the file fails quickly after commit https://github.com/leanprover/lean/commit/dc6411b90385344b69f16512a28ce190a01e722b

So, I restricted the rule to non-recursive datatypes.

I think that is a good restriction. With a structure, you're not case-splitting when you assign a metavariable to the unique constructor. With an inductive type there's much less change you will find the right solution, and can easily cause termination.
In the example you posted it is very reasonable to require more information than was given.


Update Angular + Project Name

Change project name to ngx-lab1100.
Update to Angular 6

version '6.0.1'

rxjs to '6.1.0'

webpack context replace plugin : '/angular(\|/)core(\|/)(@angular|esm5|fesm5)/'

change to bootstrap component to web custom elements:

@NgModule({
  imports: [
    BrowserModule
  ],
  declarations: [
    AppComponent,
  ],
  entryComponents: [ AppComponent ]
})
export class AppModule {
  constructor(private injector:Injector){}

  ngDoBootstrap(){
    const AppElement = createCustomElement(AppComponent, {injector: this.injector});
    customElements.define('app-root', AppElement);
  }
}

install @webcomponents/custom-elements polifilly

{
  "dependencies": {
    "@angular/common": "^6.0.1",
    "@angular/compiler": "^6.0.1",
    "@angular/core": "^6.0.1",
    "@angular/elements": "^6.0.1",
    "@angular/forms": "^6.0.1",
    "@angular/http": "^6.0.1",
    "@angular/platform-browser": "^6.0.1",
    "@angular/platform-browser-dynamic": "^6.0.1",
    "@angular/router": "^6.0.1",
    "@angular/service-worker": "^6.0.1",
    "@webcomponents/custom-elements": "^1.1.1",
    "core-js": "^2.5.5",
    "rxjs": "^6.1.0",
    "zone.js": "^0.8.26"
  },
  "devDependencies": {
    "@angular/compiler-cli": "^6.0.1",
    "@angular/language-service": "^6.0.1",
    "@ngtools/webpack": "^6.0.1",
    "@types/jasmine": "^2.8.3",
    "@types/jasminewd2": "^2.0.3",
    "@types/node": "^10.0.8",
    "angular2-template-loader": "^0.6.2",
    "ansi-colors": "^2.0.1",
    "awesome-typescript-loader": "^5.0.0",
    "clean-webpack-plugin": "^0.1.19",
    "css-loader": "^0.28.11",
    "extract-text-webpack-plugin": "^3.0.2",
    "fancy-log": "^1.3.2",
    "file-loader": "^1.1.11",
    "gulp": "^3.9.1",
    "gulp-zip": "^4.1.0",
    "html-loader": "^0.5.4",
    "html-webpack-plugin": "^3.2.0",
    "jasmine-core": "^3.1.0",
    "jasmine-spec-reporter": "^4.2.1",
    "karma": "^2.0.2",
    "karma-chrome-launcher": "^2.2.0",
    "karma-firefox-launcher": "^1.1.0",
    "karma-jasmine": "^1.1.1",
    "karma-jasmine-html-reporter": "^1.1.0",
    "karma-webpack": "^3.0.0",
    "node-sass": "^4.9.0",
    "null-loader": "^0.1.1",
    "protractor": "^5.3.1",
    "pump": "^3.0.0",
    "raw-loader": "^0.5.1",
    "sass-loader": "^7.0.1",
    "style-loader": "^0.21.0",
    "supports-color": "^5.4.0",
    "ts-node": "^6.0.3",
    "typescript": "^2.8.3",
    "webpack": "^4.8.1",
    "webpack-dev-server": "^3.1.4",
    "webpack-merge": "^4.1.2",
    "webpack-stream": "^4.0.3"
  }
}

Need to make change on webpack configuration, due to upgrade to version 4


Doesn't work when component is inside Gallery control

Hi, doesn't appear to work when the component is embedded in a Gallery control. Using a button to trigger a Reset using the Reset function raises an error that the control does not exist.

Document details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: fb241fc7-9d0b-29d9-532a-ab6d6929f457
Version Independent ID: abdb307e-e024-17fc-7b1b-5479139fcfc5
Content: Behavior formulas for components - PowerApps
Content Source: powerapps-docs/maker/canvas-apps/component-behavior.md
Service: powerapps
GitHub Login: @yifwang
Microsoft Alias: yifwang

Hi @tchagan , embedding a component inside a gallery is not fully supported and we are working to enable this scenario.  Thanks for the feedback. Embedding is a popular and useful scenario and it's one of our top priority to enable.


fix docs typo

CI currently excludes markdown-only tests to save on the runners. We probably should have some bypass in the CI so it thinks everything passed


Landscape date picker is pretty big (from gallery demo)

Totally a feature.  @HansMuller :)

Yeah, I didn't implement the landscape version of the widget.  We totally need it.


Class 'App\Http\Controllers\Admin\Setting' not found

Installed everything, migrated, but when I try to set a Setting it gives me this error:
Class 'App\Http\Controllers\Admin\Setting' not found
I'm using Laravel 5.4.

If you are using the facade Setting, make sure are using \Setting::whatever, to not use current namespace

If Facade Alias added, then add the below before your class:
use Setting;


chore(deps): upgrade compiler dependencies

Upgrades project dependencies. See details in workflow run.

Automatically created by projen via the "upgrade-compiler-dependencies-2.x" workflow

⚪ Backport skipped
The pull request was not backported as there were no branches to backport to. If this is a mistake, please apply the desired version labels or run the backport tool manually.
Manual backport
To create the backport manually run:
backport --pr 2945

Questions ?
Please refer to the Backport tool documentation


Display App setup instructions

At least when running the event as Self Hosted, the name of the only Stack is serverless-workshop, as per the Setup instructions. Nonetheless, in the Display App setup instructions at: https://workshop.serverlesscoffee.com/3-web-apps/3-frontends/1-displayapp.html , we are being asked to "From the List of Stacks, select the core stack it should be named something like mod-67b03f2bcecc4faf". in order to obtain the DisplayAppURI.
Please kindly fix this as it is misleading and creates confusion. Thanks.

yes, I just post the same issue.

thanks for adding this issue,


Update to v0.3

You may wish to do this yourself, so consider this a test.

The idea behind camke version of libraqm is replacing Autotools. Since Khaled doesn't support the idea so I am reluctant to continue. I am thinking about Meson Build and give it try. What do you think?

I don't have experience with meson, so I doubt I'm the person to help you with that high level decision. If you're telling me that this repository is deliberately not keeping up-to-date, then that's fine, feel free to close this PR.


Publish Test Results, NUnit3 format support

Looks like NUnit3 format is not supported at the moment.
Getting error when trying to upload NUnit3 test results:
Invalid results file. Please make sure the Test Result Format field in the task matches the result format of the file
Is it possible to implement support of the new format? since it contains more useful data.
https://github.com/nunit/dotnet-test-nunit/issues/75

Created a PR on the agent repo
https://github.com/Microsoft/vsts-agent/pull/629

What is the likely time line on this?

We have a PR out for review. Waiting for a few signoffs. Thanks!

This is already in.

doesn't work for me. TFS 2015, v 14.102.25423.0
Invalid format error message is displayed when use nunit3 and try to publish it's xml  test result file


add methods required by smart transaction controller (patch v7)

Explanation

References

Changelog

@metamask/package-a

: Your change here
: Your change here

@metamask/package-b

: Your change here
: Your change here

Checklist

[ ] I've updated the test suite for new or updated code as appropriate
[ ] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
[ ] I've highlighted breaking changes using the "BREAKING" category above as appropriate

Hi! I noticed that all of the eslint-disable directives and TODOs for converting interfaces to type aliases have been removed in this PR.
The shared libraries team relies on those comments to mark interface instances that were pre-existing at the time we enabled @typescript-eslint/consistent-type-definitions, and to keep track of remaining interfaces that need to be converted.
We'd appreciate it if you could restore them in this PR before you mark it as ready for review.
Additionally, any new types being added should be in the form of type aliases, not interfaces.
Please refer to the following for previous discussions on this matter:

https://github.com/MetaMask/eslint-config/pull/216
https://github.com/MetaMask/core/pull/1933


Form Explainer pagination

Changes

Removes bottom pagination
Changes current page tracking in form explainer code & removes associated test

Additions

Adds top pagination & forward/back buttons on form image

Preview

Review
@cfarm @stephanieosan

Overall this looks good!
I have one small request: could the page numbers that are clickable have underlines a-la our link style? So, in this particular screenshot, 2 and 3 would have underlines but 1 wouldn't.

@stephanieosan I just added the underlines for desktop:

:+1:

The only issue I see is some weird small spacing when the screen is narrow enough for the page numbers to wrap:

But I think this is good to go for now.

Just wanted to say the new pagination is really nice!


Allow getInitialProps to return an rx.js observable

This is just an idea.
Every time the observable emits a new value, the component should be reloaded.
I see at least 2 cases in which this could be useful:
For partially loaded data: for example when fetching multiple apollo graphql queries. Already render the component before all data is loaded, display loading components where necesary.
For subscriptions: for example apollo data subscriptions. Every time the data updates, update the component. Here the server should just pick the first version and render.
In the first case the server should render upon receiving the first value, and in the second it should render when the observable closes, so maybe this should be configurable.
But I can see how this might be considered out of scope :) If you have any idea about how to recreate something equivalent without changing the next.js api, please chime in.

This is definitely something I've thought quite a bit about. But instead, I think the best solution to this will be functional composition:
export default observable(obv, ({ title }) => (

{title}

))

Imagine an observable that emits the props object. Makes generating a component with getInitialProps very easy (you wait for one data event and ditch the subscription, or convert it to a Promise), and then upon mount hooks you listen indefinitely, ditching the subscription upon unmount.
I'd like to revisit this once either of these happen:

I see evidence of experimentation along these lines in userland.
Observable lands in ES

This is definitely something I've thought quite a bit about. But instead, I think the best solution to this will be functional composition:
export default observable(obv, ({ title }) => (

{title}

))

Imagine an observable that emits the props object. Makes generating a component with getInitialProps very easy (you wait for one data event and ditch the subscription, or convert it to a Promise), and then upon mount hooks you listen indefinitely, ditching the subscription upon unmount.
I'd like to revisit this once either of these happen:

I see evidence of experimentation along these lines in userland.
Observable lands in ES

On the other hand, we could write a HOC which does this properly. It use getInitialProps behind the for the initial data and do other stuff in componentDidMount and etc.
Not sure specific details, but I assume this can be done in the user-land.


shiftdata exception when using latlon=True for scatter

The exception;
m.scatter(x, y,50,marker='o',color='g',latlon=True, zorder=10)
  File Anaconda\lib\site-packages\mpl_toolkits\basemap\__init__.py", line 536, in with_transform
    x = self.shiftdata(x)
  File "Anaconda\lib\site-packages\mpl_toolkits\basemap\__init__.py", line 4777, in shiftdata
    if itemindex:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

There seems to be a mismatch when using latlon that shiftdata does not expect. This can be mitigated by getting the projection coordinates before applying the operation; example below.
from mpl_toolkits.basemap import Basemap
import numpy as np
import matplotlib.pyplot as plt

def valueError():
    m = Basemap(projection='robin',lon_0=115,resolution='c')
    m.drawcoastlines()
    m.fillcontinents(color='sienna',lake_color='aqua')
    m.drawmapboundary(fill_color='lightsteelblue')

    x = [-5.435, -6.660817, -119.2511944, 17.719833]
    y = [36.136, 4.746717, 39.4030278, -14.657583]
    m.scatter(x, y,50,marker='o',color='g',latlon=True, zorder=10)
    plt.show()

def works():
    m = Basemap(projection='robin',lon_0=115,resolution='c')
    m.drawcoastlines()
    m.fillcontinents(color='sienna',lake_color='aqua')
    m.drawmapboundary(fill_color='lightsteelblue')
    x = [-5.435, -6.660817, -119.2511944, 17.719833]
    y = [36.136, 4.746717, 39.4030278, -14.657583]

    x,y = m(x,y)
    m.scatter(x, y,50,marker='o',color='g',latlon=False, zorder=10)
    plt.show()

def main():
    works()
    valueError()

if __name__ == '__main__':
    main()

I just encountered the same issue.

Actually sorting data by longitude like this seems to work, not, sure if this is a good fix... But maybe we could just sort longitudes in scatter if latlon is True??:
from mpl_toolkits.basemap import Basemap
import numpy as np
import matplotlib.pyplot as plt

def valueError():
    m = Basemap(projection='robin',lon_0=115,resolution='c')
    m.drawcoastlines()
    m.fillcontinents(color='sienna',lake_color='aqua')
    m.drawmapboundary(fill_color='lightsteelblue')

    x = [-5.435, -6.660817, -119.2511944, 17.719833]
    y = [36.136, 4.746717, 39.4030278, -14.657583]

    x, y = list(zip(*sorted(zip(x, y), key=lambda it: it[0])))
    m.scatter(x, y,50,marker='o',color='g',latlon=True, zorder=10)
    plt.show()

Here is the working notebook: https://github.com/guziy/PyNotebooks/blob/master/basemap_scatter.ipynb
Cheers

I pre-sorting works for scatter, but not pcolormesh. Seems like the issue comes from itemindex being an array rather than a value:
4773         # 2-d data.
4774         if lonsin.ndim == 2:
4775             nlats = lonsin.shape[0]
4776             nlons = lonsin.shape[1]
4777             lonsin1 = lonsin[0,:]
4778             lonsin1 = np.where(lonsin1 > lon_0+180, lonsin1-360 ,lonsin1)
4779             lonsin1 = np.where(lonsin1 < lon_0-180, lonsin1+360 ,lonsin1)
4780             londiff = np.abs(lonsin1[0:-1]-lonsin1[1:])
4781             londiff_sort = np.sort(londiff)
4782             thresh = 360.-londiff_sort[-2]
4783             itemindex = nlons-np.where(londiff>=thresh)[0]
4784             # if no shift necessary, itemindex will be
4785             # empty, so don't do anything
4786             if itemindex:
4787                 # check to see if cyclic (wraparound) point included
4788                 # if so, remove it.
4789                 if np.abs(lonsin1[0]-lonsin1[-1]) < 1.e-4:
4790                     hascyclic = True
4791                     lonsin_save = lonsin.copy()
4792                     lonsin = lonsin[:,1:]
4793                     if datain is not None:
4794                        datain_save = datain.copy()
4795                        datain = datain[:,1:]
4796                 else:
4797                     hascyclic = False

@samskillman Could you please post a minimal example of your coordinates and a failing code with pcolormesh?

@samskillman Please make sure that your data has the following order of dimensions: Z(lat, lon), LON(lat, lon), LAT(lat, lon)
apparently shiftdata expects it to be like that...
    Shift longitudes (and optionally data) so that they match map projection region.
    Only valid for cylindrical/pseudo-cylindrical global projections and data
    on regular lat/lon grids. longitudes and data can be 1-d or 2-d, if 2-d
    it is assumed longitudes are 2nd (rightmost) dimension.

I've got the same problem and it is because you can not test for array existence in the if statement.
See this minimal example:
In [1]: import numpy as np

In [2]: a = np.arange(10)

In [3]: itemindex = len(a) - np.where(a > 5)[0]

In [4]: itemindex
Out[4]: array([4, 3, 2, 1])

In [5]: if itemindex:
   ...:     print "test"
   ...:
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-5-758a9d9e7b06> in <module>()
----> 1 if itemindex:
      2     print "test"
      3

ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

shiftdata seems to be able to only handle 1 break....
Are you trying to scatter or pcolormesh? Is projecting first and plotting without latlon=True works?
Cheers

I'm running into this issue as well. I tried modifying line 4734 to if itemindex.any() (basically checking if the array is empty or not), but then you run into an error further on with the call to np.roll - itemindex - 1 isn't a scalar, it's an array...

Also experiencing this issue. And I discovered that there's been a pull request (#224) to fix this bug open for a year now; any reason it hasn't been merged in yet?

Well, that PR doesn't totally fix the problem, and there was an open question about whether the fix was correct or not. Does it make things work for you?

@WeatherGod actually it appears to totally randomize the longitudes. For now I've just blocked off the buggy code by changing if itemindex to if False and it's behaving as expected. Not sure what the point of the entire block is either as only one of two datasets I'm working with trigger it (i.e. itemindex is not empty) and both are on a -180° to 180° longitude grid.

@WeatherGod just ran into this bug again. I would love to try and fix this if anyone could explain what the if itemindex: block is supposed to achieve

I am somehow slow with getting this fixed, sorry about that ... The shiftdata function is called from many places and this complicates things for me)) Would be great to get rid of the problem before 2017..

@guziy what is the purpose of shiftdata?

Shiftdata helps to deal with the 0/360 or -180/180 wrap-around problem in
plotting.
On Fri, Dec 2, 2016 at 1:48 PM, Killian Widdis<EMAIL_ADDRESS>wrote:

@guziy https://github.com/guziy what is the purpose of shiftdata?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/matplotlib/basemap/issues/197#issuecomment-264531172,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AARy-D0na1I-HiV5V9B6aMUx355KxaWEks5rEGgGgaJpZM4FnZFu
.

If I understand correctly it is to make your field continuous and keep the coordinates within the ranges of your projection... But this should always be checked against the doc https://github.com/matplotlib/basemap/blob/master/lib/mpl_toolkits/basemap/init.py#L4719
Cheers

@kiwi937 could you please provide an example of your failing case?
Cheers and Happy New Year))

This specific issue should be fixed for scatter(). Doing something similar for plot() might still fail, though.


Refactor stream renaming and stream preprocessors

Currently Stream classes have a preprocessors argument that allow for renaming and other transformations of stream parameters. This was an initial concept we introduced, primarily because we realized that stream names might clash and wanted to introduce a mechanism that could resolve these clashes.
Now we have more experience using the streams system, it no longer seems the appropriate level at which to introduce preprocessors, which we do know can  be a useful concept in practice e.g we've found one example needing a preprocessor relating to datashader.
As the callback that generates elements lives on DynamicMap, this now seems to be the place to apply such transformations. The proposal here is two-fold: Streams should handle clashes only and preprocessors on DynamicMap should handle transformations, once there are no name clashes.
Resolving name clashes
Streams should now lose the preprocessors argument and gain a rename method instead:
coords = PositionXY().rename(x='long', y='lat')

As this should be possible via the constructor, this should be equivalent to:
coords = PositionXY(rename={'x':'long', 'y':'lat'})

Note that I think rename should give you a new stream instance which is identical except for the renamed values in the streams contents property.
As there can be no clashes between stream parameters on a single stream, so you only really need to use the rename in the streams argument to DynamicMap:
DynamicMap(my_callback, streams=[Tap(), DoubleTap().rename(x='dtap_x', y='dtap_y')])

or equivalently
DynamicMap(my_callback, streams=[Tap(), DoubleTap(rename=dict(x='dtap_x', y='dtap_y'))])

This resolves the fact that both Tap and DoubleTap have x and y stream parameters by default.
Note that DynamicMap can check for clashes in the constructor - I suspect we do this already. I am also wondering if map might be better as it is shorter than rename but that might be confusing as we have map methods elsewhere.  Note that remap is also shorter than rename...
Preprocessors
Now that stream parameters will be disambiguated, we can have a single preprocessor at the DynamicMap level that simply maps a dictionary of kwargs to a new dictionary of kwargs. We decided to have a single preprocessor instead of a list as:

This is simpler.
You can easily chain preprocessors yourself e.g

preprocessor=lambda kws: foo(bar(baz(kws)))

Even though the above is a lambda which won't pickle, we don't expect DynamicMaps to pickle ( @philippjfr Isn't this a separate issue to address, shouldn't we safely skip DynamicMaps when pickling/unpickling instead of failing outright?)

Note that because the preprocessor receives the renamed parameters at the DynamicMap level, it would be recommended that you apply rename inside the streams list so everything is declared together in one place (making things easier to reason about).
There should be no issue applying the rename method in the streams list for re-used streams e.g:
tap = Tap()
dtap = DoubleTap()
DynamicMap(my_callback, streams=[tap, dtap(rename=dict(x='dtap_x', y='dtap_y'))])

# Generating an explicit event
dtap.update(dtap_x=0, dtap_y=0)

Call signatures
There is an issue about picking the appropriate call signatures in DynamicMap and we have explicitly decided that this is a separate issue from the concepts discussed in this issue.
Edit: There are a few things that are more restricted under this proposal. Here is the docstring for the existing Group preprocessor at the streams level:
class Group(Preprocessor):
    """
    A preprocessor that keeps the parameter dictionary together,
    supplying it as a value associated with the given key.
    """

As this was at the streams level, you would receive a single dictionary for each stream. With a preprocessor at the DynamicMap level, you would still need to rename the stream parameters then group.
Just mentioning this for completeness as I don't think this is an important use-case (afaik we've never used  Group).

I'm very happy with this proposal, thanks!

shouldn't we safely skip DynamicMaps when pickling/unpickling instead of failing outright?

That does seem like a case for skipping with a warning, so that people can use a DynamicMap in one cell without causing problems if they try to pickle everything (with export).

dtap = DoubleTap()
DynamicMap(my_callback, streams=[tap, dtap(rename=dict(x='dtap_x', y='dtap_y'))])
dtap.update(dtap_x=0, dtap_y=0)

How would this work?  How would dtap be aware of anything that happened in the DynamicMap call?  I thought a *new* stream would be created, a proxy for the old one, that does the renaming?

@jbednar Thanks, I corrected what I meant below:
tap = Tap()
dtap = DoubleTap()
DynamicMap(my_callback, streams=[tap, dtap.rename=dict(x='dtap_x', y='dtap_y')])

# Generating an explicit event
dtap.update(dtap_x=0, dtap_y=0)

Should be the rename method, not the constructor approach.

Even so, the rename method will still return a new stream no?

Unless you want to provide renaming as something all streams inherently know how to do, with a lookup table on every one, so that they know their arguments as well as all aliases available for their arguments.  Not certain that's a good idea...

Even so, the rename method will still return a new stream no?

Right.

Unless you want to provide renaming as something all streams inherently know how to do, with a lookup table on every one, so that they know their arguments as well as all aliases available for their arguments. Not certain that's a good idea...

Yeah, I think a new instance is a better approach.

In which case the code becomes:
tap = Tap()
dtap = DoubleTap().rename(x='dtap_x', y='dtap_y')
DynamicMap(my_callback, streams=[tap, dtap])

# Generating an explicit event
dtap.update(dtap_x=0, dtap_y=0)

Ah, I see the issue now. Your code is right but to be honest the recommended thing here is probably:
tap = Tap()
dtap = DoubleTap()
dmap = DynamicMap(my_callback, streams=[tap, dtap.rename(x='dtap_x', y='dtap_y')])

# Generating an explicit event
dmap.event(dtap_x=0, dtap_y=0)

I need a better example of reusing streams...

Ok, now that's a version that would work, assuming event() does what I'd assume it does.  Sounds good!

Are you sure that's the recommended approach, though?  In your version, if someone does:
dtap.update(dtap_x=0, dtap_y=0)

it's now an error (no such argument dtap_x), and if someone does:
dtap.update(x=0, y=0)

then there's no error but nothing will happen, because DynamicMap knows nothing about dtap (only the renamed version).  In my suggested code there is no handle sitting around to the original, non-renamed version of dtap to confuse people.

That is now my question. @philippjfr Is there any reason to re-use streams at all except to save typing?
In other words, I expect two streams instances of the same type with the same state (target, remapping etc) to behave as the same thing. Any reason the actual identity of the instance might matter?

That is now my question. @philippjfr Is there any reason to re-use streams at all except to save typing?

I don't think so, as long as they both point to the same source I think they will even be hooked up to the same bokeh Callback.

Ok great, all these things are mostly equivalent though I agree my version leaves a useless handle around.  Combining suggestions here is what I would probably use in the end:
tap = Tap()
dtap = DoubleTap(rename=dict(x='dtap_x', y='dtap_y'))
dmap = DynamicMap(my_callback, streams=[tap, dtap])

# Generating an explicit event
dtap.update(dtap_x=0, dtap_y=0)
# Or
dmap.event(dtap_x=0, dtap_y=0)

Actually, maybe this is an argument that rename should just have side-effects and return self? Now I'm wondering if returning a new instance just complicates things.

Actually, maybe this is an argument that rename should just have side-effects and return self? Now I'm wondering if returning a new instance just complicates things.

Seems like a really bad idea, in case you did use the stream somewhere else previously.

Good point. And how do you feel about calling it remap?

Personally I think rename is clearer, but I suppose I could be persuaded.

I think remap is better because:

It is shorter
A rename method sounds like the stream has a name and you are changing it e.g stream.rename('bob').
Conversely remap suggests there can be more than one thing you are remapping i.e a dictionary (also known as a map).

@jbednar What do you prefer?

I also think it is a better name for what it does. The docstring could be something like:
"""
Remap the stream parameter names to avoid name clashes with other streams
"""

I'll let @jbednar decide.

I think either one is accurate, since the underlying operation is arguably remap_names.  I think I prefer how "rename" includes the word "name" to imply that it's only about naming, not other things that could be remapped (e.g. values between different coordinate systems).

I think I prefer how "rename" includes the word "name" to imply that it's only about naming, not other things that could be remapped (e.g. values between different coordinate systems).

That matches my feelings about it.

Ok, rename it is then.

I think everything discussed in this issue has been addressed by the PR above. The rename suggestion was implemented as suggested here but the preprocess suggestion changed into a transform method on streams (an approach I now think is a lot better).
Closing.


codly-languages:0.1.3

I am submitting

[ ] a new package
[x] an update for a package

Description:

updates docs to show using codly 1.1.0
updates tests to use 1.1.0 (includes new test data)

Thanks


How does TagUI Interpreter translate code block into Javascript?

How can i parse condition or loop syntax ?

a = 1
if a equals to 1
{
      snap page1
}
else if a equals to 2
{
      snap page2
}
else
{
      snap page3
}

for n from 1 to 3
{
       echo n
}

How can i translate TagUI script as above to python script like followings?

a = 1
if a == 1:
  snap page1
elif a == 2:
  snap page2
else:
  snap page3

for n in range(1, 3):
  print(n)

Hi @githubcyc this sounds like you are trying to do something special for some special applications, because the output Python script above is not something that is runnable by Python.
The short answer is a lot of string manipulation and detection. The code to do this is for JavaScript in src\tagui_parse.php --> parse_condition() function. It is not easy and straightforward to do this correctly and will take a lot of trial and errors to be able to handle the edge cases if you try to do that in Python.

CC @siowyisheng and closing for now till further inputs, as this is not a question related to TagUI.
Adding on, if you want the automation code to be in Python, you can use RPA for Python, a personal project I created that is built on TagUI, to do RPA stuffs. Then you can write Python code directly without doing all these translations. https://github.com/tebelorg/RPA-Python


failure on startup in termbox on debian buster

got the following when trying to use slack-term on debian buster.
panic: runtime error: index out of range

goroutine 1 [running]:
github.com/erroneousboat/slack-term/vendor/github.com/nsf/termbox-go.send_attr(0xc400000000)
	/home/grindhold/go/src/github.com/erroneousboat/slack-term/vendor/github.com/nsf/termbox-go/termbox.go:154 +0x369
github.com/erroneousboat/slack-term/vendor/github.com/nsf/termbox-go.send_clear(0xb19080, 0xc4201f7c10)
	/home/grindhold/go/src/github.com/erroneousboat/slack-term/vendor/github.com/nsf/termbox-go/termbox.go:240 +0x3d
github.com/erroneousboat/slack-term/vendor/github.com/nsf/termbox-go.Sync(0xb37028, 0x856720)
	/home/grindhold/go/src/github.com/erroneousboat/slack-term/vendor/github.com/nsf/termbox-go/api.go:451 +0x32
github.com/erroneousboat/slack-term/vendor/github.com/erroneousboat/termui.termSync()
	/home/grindhold/go/src/github.com/erroneousboat/slack-term/vendor/github.com/erroneousboat/termui/render.go:82 +0x32
github.com/erroneousboat/slack-term/vendor/github.com/erroneousboat/termui.TermHeight(0x856720)
	/home/grindhold/go/src/github.com/erroneousboat/slack-term/vendor/github.com/erroneousboat/termui/render.go:95 +0x20
github.com/erroneousboat/slack-term/components.CreateChannelsComponent(0x3, 0x0)
	/home/grindhold/go/src/github.com/erroneousboat/slack-term/components/channels.go:112 +0x85
github.com/erroneousboat/slack-term/views.CreateView(0xc42022c000, 0xc4200cfb20, 0x0)
	/home/grindhold/go/src/github.com/erroneousboat/slack-term/views/view.go:25 +0x56
github.com/erroneousboat/slack-term/context.CreateAppContext(0xc4201a0240, 0x1d, 0x89a300, 0xc4201f7f78, 0x4042ac, 0xc420094058)
	/home/grindhold/go/src/github.com/erroneousboat/slack-term/context/context.go:53 +0xae
main.main()
	/home/grindhold/_git_archive/slack-term/main.go:90 +0xf8

At the moment I have no idea where this problem originates or how it is triggered. It seems to be caused by  calling the termui function termui.TermHeight(), but I don't know if this is an issue with termui, termbox-go, the specific terminal that is used or slack-term itself.

i tried with gnome-terminal and sakura. both are based on libvte 2.91.
go version go1.10rc2 linux/amd64
in case you need any other data to reproduce, please reach out.

same error for me... but I'm on Arch not Debian.
I build it from master branch with make build
terminal urxvt
go version go1.9 linux/amd64
slack-term v0.3.2
The strange thing is that with the release binary the error not occour.

Thank you for the information, I'll try to get it to happen to me as well.

Closing this due to age.


[React I18n] Allow React 16+

Description
https://github.com/Shopify/quilt/issues/1740
Relaxes react constraint for react-i18n. Is this safe, or do we not support React 17 yet?
Type of change

[x] @shopify/react-i18n Minor: New feature (non-breaking change which adds functionality)

Checklist

[ ] I have added a changelog entry, prefixed by the type of change noted above (Documentation fix and Test update does not need a changelog as we do not publish new version)

We dont officially support 17 yet. Closing this PR for now.


Add generic descriptor indexing intrinsic

Add generic descriptor indexing intrinsic
Closes #4351

This seems to be working nicely as far as I can tell, but I have a few questions:

Type layout is created based on a temporary StructuredBuffer<int>[] type. Reflection will still report the type as the ResourceArray struct, but I'm not sure if this would cause any issues or if it should be done in some other way.

Specialization will report an error if the ResourceArray variable is used by anything other than the get intrinsic. Should this be done elsewhere or is fine to keep it as is?

Not sure about the naming, and whether it is better to have an enum instead of global constants like discussed in the original issue.

I think you can just create an ArrayTypeLayout for the type, with the size being unsized and element type being a special "DynamicResourceEntry" type. The TypeLayout for DynamicResourceEntry type should be a SimpleTypeLayout that has one DescriptorTableSlot entry.

I am not sure why this change need to interact with specialization, they should be orthogonal?

I am not sure why this change need to interact with specialization, they should be orthogonal?

I think the specialization side code is trying to add global uniform variable for each types used on "get" method.
If I borrow the example from the proposed design, it will looks like this,
static const int Resource = 0;
static const int Sampler = 1;
interface IBuiltinResourceType<let kind: int>
{}

extension Texture2D : IBuiltinResourceType<Resource>
{}

extension Sampler2D : IBuiltinResourceType<Sampler>
{}

struct ResourceArray<let kind:int>
{
    T get<T:IBuiltinResourceType<kind>>(int index);
}

// Specialization code adds two following global variables,
// because "get" method was used with two different types:
// uniform Texture1D resArray_0[];
// uniform Texture2D resArray_1[];
ResourceArray<Resource> resArray;

void main()
{
    Texture1D t = resArray.get<Texture1D>(1);
    Texture2D t = resArray.get<Texture2D>(2);
}

I think this should happen in the glsl-legalization rather than specialization.

Here is my answers to the questions in the description

Type layout is created based on a temporary StructuredBuffer[] type. Reflection will still report the type as the ResourceArray struct, but I'm not sure if this would cause any issues or if it should be done in some other way.

I think the reflection side needs to be handled properly but I don't see any code change related to that.
We will need to start from writing a test case for it and clarify what kind of changes will be required.

Specialization will report an error if the ResourceArray variable is used by anything other than the get intrinsic. Should this be done elsewhere or is fine to keep it as is?

As I mentioned on my previous comment, I think that should be handled in the legalization part not specialization part.

Not sure about the naming, and whether it is better to have an enum instead of global constants like discussed in the original issue.

I think enum is better.

Yes, we should just create those aliased global variables during glsl legalization pass. Basically, convert getResourceElementInst into getElement(aliasedGlobalArrayForResourceType).

Thank you both for the review.
I have moved the aliased parameter generation code to legalization. At first I had implemented it in the SPIRV legalization pass, but then moved it to specialization so it could be shared with the GLSL target, without realizing it would do the wrong thing for the other targets.
I have not fully addressed the comments involving type layout and reflection yet, because I'm thinking that having just a "DynamicResource" type would be more general and maybe require less changes on that side (considering that it would be needed for proxying through the ArrayType anyway). Then the revised proposal would be something like:
struct __DynamicResource<let kind : __DynamicResourceKind = __DynamicResourceKind.General>
{
    T as<T : __IDynamicResourceCastable<kind>>();
}
enum __DynamicResourceKind
{
    General = 0, // CBV_SRV_UAV
    Sampler = 1
}
interface __IDynamicResourceCastable<let kind : __DynamicResourceKind = __DynamicResourceKind.General> { }

I believe that with implicit casts, this would have full parity with the HLSL syntax in terms of usage:
__generic<T, Shape : __ITextureShape, let isArray : int, let isMS : int, let sampleCount : int, let access : int, let isShadow : int, let isCombined : int, let format : int>
extension __TextureImpl<T, Shape, isArray, isMS, sampleCount, access, isShadow, isCombined, format> : __IDynamicResourceCastable<__DynamicResourceKind.General> {
    __implicit_conversion(1)
    __init(__DynamicResource res);
}

[numthreads(1)]
void computeMain(int2 tid: SV_DispatchThreadID) {
    let tex1 = g_TextureHeap[0].as<RWTexture2D>();
    RWTexture2D tex2 = g_TextureHeap[0];

    tex1[tid] = 1.0;
}

Please let if I should proceed with this or keep the current interface.

Sure, the new approach looks good to me too. In this case is the g_textureHeap just a normal unsized array of DynamicResource?

Yes, it is user defined like before. (will edit previous comment to clarify.)

Okay I think this is ready for another review.
The only thing that I can tell is missing is support for casting to buffer types like StructuredBuffer<T> and others that don't derive from ITextureImpl, although with pointers I personally feel like this isn't as critical and can be added later, maybe with the template generator thingy.
Change notes, fwiw, since I squashed everything:

Legalization supports both a single DynamicResource and arrays
Indirect access through functions works via specialization
Reflection correctly reports it as DynamicResource. I preferred this because Resource reports additional info such as access and shape, which is not known.

I want to bring this up explicitly here that the current implementation cannot handle cases where the global dynamic resource parameter is not referenced directly in use sites and instead are passed around with local variables or function parameters. For example, the following case will not work:
DynamicResource gRes;
void f(DynamicResource t)
{
    Texture2D tt = t;
    tt.Sample(...);
}

void main()
{
    f(gRes);
}

Which is fine as a limitation for now especially when this type will be used only internally in stdlib when we implement the full Bindless support. But I want to make sure the limitation is well understood.

I think this case is handled correctly by specialization (it is covered by the test), e.g.:
__DynamicResource g_SingleRes;
RWStructuredBuffer<float4> outputBuffer;

[noinline]
float4 IndirectAccess(__DynamicResource resource, int2 pos)
{
    Texture2D texture = resource;
    return texture[pos];
}

[numthreads(1)]
void computeMain(int2 tid: SV_DispatchThreadID) {
    outputBuffer[tid.x + tid.y * 128] = IndirectAccess(g_SingleRes, tid);
}

On the GLSL targets compiles to:
#version 460
#extension GL_EXT_scalar_block_layout : require
#extension GL_EXT_samplerless_texture_functions : require
layout(row_major) uniform;
layout(row_major) buffer;

#line 73 0
layout(scalar, binding = 1) buffer StructuredBuffer_vectorx3Cfloatx2C4x3E_t_0 {
    vec4 _data[];
} outputBuffer_0;

#line 2364 1
layout(binding = 0)
uniform texture2D g_SingleRes_0;

#line 84 0
vec4 IndirectAccess_0(ivec2 _S1)
{

#line 79
    return (texelFetch((g_SingleRes_0), ((ivec2(uvec2(_S1)))), 0));
}

layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main()
{

#line 83
    ivec2 _S2 = ivec2(gl_GlobalInvocationID.xy);
    outputBuffer_0._data[_S2.x + _S2.y * 128] = IndirectAccess_0(_S2);
    return;
}

Although I don't think this would be a significant limitation either.

Ah, I see that you added a case for dynamic resource to be treated as specializable parameter type. That will work then.

Can you clarify on how __getResourceFromHandle() would work? The thing with DynamicResource is that it allows users to specify the binding points directly, which I think maps more closely to how Vulkan's descriptor indexing works.
My intent for this type was that it would allow users to define their own Bindless type, since an earlier proposal had uncertainties on the representation and was closed (https://github.com/shader-slang/slang/issues/768).

The user will need to specify the binding for the implicit heap via a compiler option, e.g. -fvk-dynamic-descriptor-set 10.
The reason to make the global array system defined instead of user defined is to avoid conflicts and allow reusing code written by different developers.
If library A and library B are written by two developers and they all want to use bindless model, how can one consume both A and B without worrying about conflicts?
The only way to facilitate seamless sharing is for the compiler to own this definition so there will always be one declaration of such array and there could never be conflicts.

Internally, we will introduce a kIROp_GetGlobalResourceHeap inst that is hoistable so it will be globally dedupplicated after linking.
Then we make __getGlobalResourceHeap() intrinsic map to this op code.
Then we can have __getResourceFromHandle implemented by calling this intrinsic.
The binding for the global heap can be provide explicitly with a compiler option, or implicitly by the system where we just allocate the next available space after all other parameters have been assigned a binding. We will need the reflection API to be able to tell the user which space is allocated for the implicit heap.

With this, the bindless type can simply be implemented in stdlib as an ordinary struct type:
struct Bindless<T: __BuiltinResourceType>
{
    uint64 handle;

    [ForceInline]
    T get() { return __getGlobalResourceHeap<T.ResourceKind>().get<T>(handle); }
}

From what I can tell, normal descriptors already suffer with mostly the same conflict issues, although I can see why having a more strict solution like you described is preferred.
I think having the binding points be defined via a compiler option instead instead of implicitly would be better.
Ideally the finer resource types that Vulkan defines compared to HLSL should be considered as well. Although VK_EXT_mutable_descriptor_type makes this less of an issue, it is still more limiting in some ways (not as widely supported as plain descriptor indexing, can't bind a texture as Image and SampledImage at the same time).

I still want to have this PR merged in. No matter what we do for Bindless they will be based on the changes here.

Ah, sorry, I missed that __getGlobalResourceHeap will reuse what's implemented here.

The tests incomplete-type.slang and constant-buffer-unsized.slang fail when the stdlib declares an extension for ConstantBuffer like attached below. I've had no luck debugging so far, maybe you have some hint for me to look for?
__generic<T>
extension ConstantBuffer<T> : __IDynamicResourceCastable<__DynamicResourceKind.General>
{
    __intrinsic_op($(kIROp_CastDynamicResource))
    __implicit_conversion($(kConversionCost_GenericParamUpcast))
    __init(__DynamicResource res);
}

What kind of failure are you seeing? ConstantBuffer has an implicit conversion to T, adding another conversion here may be changing the diagnostic message that leads to a false failure.

Both tests are supposed to trigger a diagnostic about invalid usage of ConstantBuffer, but this never happens when the extensions are present.

It turns out that this diagnostic check happens in the same method where default variable initialization is handled, and it will early return if there is no appliable initializer function for the variable type:
https://github.com/shader-slang/slang/blob/323fdff4544ac3b640bdc617d7f7d64ab56fbf5a/source/slang/slang-check-decl.cpp#L2082-L2086
https://github.com/shader-slang/slang/blob/323fdff4544ac3b640bdc617d7f7d64ab56fbf5a/source/slang/slang-check-decl.cpp#L2136-L2146
I don't think the early returns are correct, so I've changed them to a else block. I couldn't get all of the tests to run on my laptop so I'll wait to see what CI thinks

I'd like to mention that I've seen multiple descriptor set setups for bindless. Some have each descriptor type in their own set so they can use VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT, others just put them at different bindings within the same set with a high limit, and others I've seen use the aforementioned VK_EXT_mutable_descriptor_type extension to put everything but samplers into one set with one binding.
If Slang decides to go with the defining binding points via compiler option route for bindless, I'd like to see it have enough flexibility to support all of these options

The PR is looking good. @dubiousconst282 can you resolve the merge conflicts?

@csyonghe Resolved

this looks exciting :O


[Feature][TIS] rename tis to pigeon

Search before asking

[X] I had searched in the issues and found no similar feature requirement.

Description
in order to
1 rename the tis task to pigeon task
2 change the tis logo to pigeon
Use case
No response
Related issues
No response
Are you willing to submit a PR?

[ ] Yes I am willing to submit a PR!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

I will resolve it

@lenboo I seem we should close this issues

This issue has been resolved, close this issue.


Invalid login token. Issuer doesn't match providerName

I get this error when trying to access the  credentials.GetCredentials().AccessKey  Any help?
CognitoAWSCredentials credentials =
user.GetCognitoAWSCredentials(FED_POOL_ID, RegionEndpoint.USEast1);
StringBuilder userlist = new StringBuilder();
userlist.Append("================Cognito Credentails==================\n");
userlist.Append("Access Key - " + credentials.GetCredentials().AccessKey);   <---------- errors here..

What is the error message?

Similarly to user rvyasedh, the application gets stuck when trying to access credentials object. The issue occurs in a web application. ASP.NET (4.6.1 framework).
The uploaded code works fine. Noticed a small issue there but not relevant for this problem (if the role associated to the identity pool does not have permissions to access S3, the application reports the username / password could not be validated, although it is an access issue, not an authentication issue).
When executed in a web application, in debug mode, the application seems to hang when it reaches the  credentials.GetCredentials().AccessKey instruction.
The application I have does exactly the same thing as this desktop application, only that it is a web application.
When I run in debug mode, I enter the username and password then F11 to step into the application. All works well until I get to the line bucketlist.Append("Access Key - " + credentials.GetCredentials().AccessKey);
When the execution reaches there, the control is given to the web application as if it waits an input from the web page (so I cannot proceed to the next line in the code).
Any help, much appreciated.

Looks like the issue is the .NET framework I was using.
Supported version is 4.5


decode_image can not load (or check properly) the bmp format

Issue Type
Bug
Have you reproduced the bug with TF nightly?
Yes
Source
source
Tensorflow Version
2.11
Custom Code
Yes
OS Platform and Distribution
No response
Mobile device
No response
Python version
No response
Bazel version
No response
GCC/Compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
No response
Current Behaviour?
On a dataset that contains bmp format files, the tf.io.decode_image or tf.io.decode_bmp method can not load the bmp files for some samples. This samples can be converted to png format but as I like to use built in decoding method for bmp image, I'm trying as follows but facing the issue for some bmp files and for some cases it loads correctly.
Standalone code to reproduce the issue
samples
image = tf.io.read_file('1.bmp')
image = tf.io.decode_image(image, channels=3, expand_animations=False)

InvalidArgumentError: {{function_node __wrapped__DecodeImage_device_/job:localhost/replica:0/task:0/device:CPU:0}} Number of channels inherent in the image must be 1, 3 or 4, was 0 [Op:DecodeImage]

@tilakrayal Thanks for your quick test.

I tried to replicate the issue with the provided .bmp file, as mentioned it is failing with the same error.  But when I tried with the different .bmp file it is working without any issue.

That's the primary issue, Because of that, I can't use tf.io.decode_image or tf.io.decode_bmp method inside the tf.data API. The above bmp file is not corrupted. It can be loaded with python libraries, please see below.
from PIL import Image
image = Image.open('1.bmp')
image # OK

import matplotlib.pyplot as plt
image = plt.imread('1.bmp')
plt.imshow(image) #  OK

import tensorflow as tf
image = tf.io.read_file('1.bmp')
image = tf.io.decode_image(
    image, channels=3, expand_animations=False
) # Error

the 1.bmp is a 772x600 1-bit bitmap. Current the bitmap decoder only supports depth = 8-, 24-,  or 32-bit
$ file /tmp/1.bmp
/tmp/1.bmp: PC bitmap, Windows 3.x format, 772 x 600 x 1, image size 60000, cbSize 60062, bits offset 62

@tilakrayal
Any update on this? As pointed out above, I think it should be supported.

@innat,
Apologies for the delay.
@sachinprasadhs,
Could you please take a look at this issue. Thank you!