Train model & Tensorflow version

I get an error while training the model:
lib/data_utils.py", line 160, in numpy_fillna
out[mask] = np.concatenate(data)
ValueError: all the input arrays must have same number of dimensions
By the way can you tell us which version of Tensorflow you use?
Thanks for your great work!

Hello Alex! I could not replicate the error... I added a requirements.txt file that worked for running the pretrained model, I hope that can help you! Note that I did not use the gpu version for that, so you might want to change that if you're going to train a model

Hi Charles, thank you so much for your fast answer, better with a requirement.txt :)
This is the error I get when using pre-trained data, I tried from my mac and from my RHEL server and same error.
Using model: lstm
Training: False
processing sentence: test sentence
Loading model /tmp/checkpoints/lstm...
Traceback (most recent call last):
  File "main.py", line 25, in <module>
    network.predict_sentences(args.sentences)
  File "/home/ec2-user/bitmood-core/SentimentAnalysis/DeepLearning/lib_model/char_lstm.py", line 292, in predict_sentences
    saver.restore(sess, SAVE_PATH)
  File "/home/ec2-user/Project1/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1560, in restore
    {self.saver_def.filename_tensor_name: save_path})
  File "/home/ec2-user/Project1/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 895, in run
    run_metadata_ptr)
  File "/home/ec2-user/Project1/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1124, in _run
    feed_dict_tensor, options, run_metadata)
  File "/home/ec2-user/Project1/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1321, in _do_run
    options, run_metadata)
  File "/home/ec2-user/Project1/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1340, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.NotFoundError: Key LSTM/rnn/basic_lstm_cell/bias not found in checkpoint
	 [[Node: save/RestoreV2_4 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_arg_save/Const_0_0, save/RestoreV2_4/tensor_names, save/RestoreV2_4/shape_and_slices)]]

Caused by op u'save/RestoreV2_4', defined at:
  File "main.py", line 25, in <module>
    network.predict_sentences(args.sentences)
  File "/home/ec2-user/bitmood-core/SentimentAnalysis/DeepLearning/lib_model/char_lstm.py", line 288, in predict_sentences
    saver = tf.train.Saver()
  File "/home/ec2-user/Project1/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1140, in __init__
    self.build()
  File "/home/ec2-user/Project1/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1172, in build
    filename=self._filename)
  File "/home/ec2-user/Project1/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 688, in build
    restore_sequentially, reshape)
  File "/home/ec2-user/Project1/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 407, in _AddRestoreOps
    tensors = self.restore_op(filename_tensor, saveable, preferred_shard)
  File "/home/ec2-user/Project1/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 247, in restore_op
    [spec.tensor.dtype])[0])
  File "/home/ec2-user/Project1/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_io_ops.py", line 663, in restore_v2
    dtypes=dtypes, name=name)
  File "/home/ec2-user/Project1/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 767, in apply_op
    op_def=op_def)
  File "/home/ec2-user/Project1/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2630, in create_op
    original_op=self._default_original_op, op_def=op_def)
  File "/home/ec2-user/Project1/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1204, in __init__
    self._traceback = self._graph._extract_stack()  # pylint: disable=protected-access

NotFoundError (see above for traceback): Key LSTM/rnn/basic_lstm_cell/bias not found in checkpoint
	 [[Node: save/RestoreV2_4 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_arg_save/Const_0_0, save/RestoreV2_4/tensor_names, save/RestoreV2_4/shape_and_slices)]]

Hello Alex, this is weird I get the same error, I can confirm the checkpoints files were working when I uploaded them so something must be wrong with the requirements.txt file (I uploaded the file I found on my server, but I did not play with this model in a while...) my guess is the tensorflow version is not the right one if I have some time this week I'll try to fix it but meanwhile, you can try the different versions of tensorflow and see if you can get it to work (see https://pypi.python.org/pypi/yolk/0.4.3).

Thanks, I will also make some test in the upcoming week.
Fyi I also get this error after training the model for a few minutes:

Yeah, it has to be a problem with the requirements.txt file, I can't believe I forgot to add it initially, I'll try to fix it this week, thanks for the heads up! By the way, if you manage to find the right packages before I do, please let me know hah!

I made some tests and it seems that the Stanford dataset is faulty. I took a small batch of it, convert it in UTF-8 from another file (with BBEdit) and then launch the training, with a few modification as the batch was smaller. Then it goes till the end and I was then able to make sentiment analysis with --sentences.
Now I made the same thing with the full dataset and the training is running, would see if it will work till the end.

I made some tests and it seems that the Stanford dataset is faulty. I took a small batch out of it, converted to UTF-8 from another file (with BBEdit) and then launched the training, with a few modifications as the batch was smaller. It completed and I was able to make sentiment analysis using --sentences.
Now I made the same thing with the full dataset and the training is running. I'll let you know if it works.

Hello Alex! I fixed the issue, you can clone the new version now. Keep in mind that I only tested it using tensorflow-gpu==1.1.0. I also changed some stuff in data_utils.py to fix the problem when loading the datasets

Hello, i am also getting this error. I am using tensorflow cpu i don't know if that's the problem or if its the dataset that causes this.

@andresiggesjo Hey, can you open a new issue with the complete output of the error you're getting? Thanks!


Fix CORS add AccessControl allowing methods and headers

Codecov Report

Merging #17 into master will increase coverage by 0.16%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master      #17      +/-   ##
==========================================
+ Coverage   94.87%   95.04%   +0.16%
==========================================
  Files           4        4
  Lines         117      121       +4
==========================================
+ Hits          111      115       +4
  Misses          3        3
  Partials        3        3

Impacted Files
Coverage Δ

internal/server.go
100% <100%> (ø)
:arrow_up:

Continue to review full report at Codecov.

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


Error uploading to HTTP S3 endpoints

If trying to upload to an HTTP endpoint, you get the following error:

When DisablePayloadSigning is true, the request must be sent over HTTPS., retrying in 1 second.

Presumably we actually do want payload signing to be on by default. So we're going to need to make disabling it optional with a CLI arg.

Further issues were:

When DisablePayloadSigning is true, the request must be sent over HTTPS., retrying in 1 second. <-- not sure what this error message means. We have an internal s3 that's exposed over http. does it mean I have to sign the package before I upload it if I want to not use https? I do have to look into signing too, so I guess I'll do that first...

because using Minio with HTTP only

The SSL connection could not be established, see inner exception., retrying in 1 second.
is there a way to see the inner exception?
[13:51:19 FTL] The SSL connection could not be established, see inner exception.
HttpRequestException: The SSL connection could not be established, see inner exception.
AuthenticationException: The remote certificate is invalid according to the validation procedure: RemoteCertificateNameMismatch

Because SSL turned on but not trusted? Probably also this:

May need to support the bucket path syntax instead of DNS prefix


Add Z axis on drumsticks

value proposition
We want to enable Z axis on drumsticks
technical roadmap

[ ]  copy what's being done on the mic
[ ]  verify collision with drums
[ ] better interaction between drums and sticks

validation criteria
Z axis works on drumsticks

After adding Z axis to drumsticks, we observed that playing drums felt better without drumsticks because drums are on a 2d plane.


vision tab still uses 7.06 map

the vision tab still uses the  7.06 mini map instead of the new 7.07 map.

do we have a new map image to use?

yeah there is a new one.
you can find for example at the dota 2 wiki:
https://dota2.gamepedia.com/Minimap
https://dota2.gamepedia.com/File:Minimap_7.07.png
-----Ursprüngliche Mitteilung-----
Von: Howard Chung<EMAIL_ADDRESS>An: odota/ui<EMAIL_ADDRESS>Cc: tobyfloyd<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Verschickt: So, 5. Nov 2017 11:46
Betreff: Re: [odota/ui] vision tab still uses 7.06 map (#1299)
do we have a new map image to use?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.


Error while processing form response! (class java.lang.Integer cannot be cast to class java.lang.Boolean)

(velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)
adoptium java 21
error: https://paste.gg/p/anonymous/77fd98a18918441bac7c4afbff5b886f/files/0c4f9a0d18bf42c291dac93eb02dce18/raw

I think this is because the wrong value was received in the packet.

This would be an error in the Geyser implementation of the settings form; please open an issue on GeyserMC/geyser instead. Thanks!


DMC LOOSE = NO ALL

Describe the bug
Stuck at loading save bar, not tried new game btw
Identify the REFramework version
1.5.7
To Reproduce
skip pak validation in fluffy options enabled
enable loose files loading
install mods
not all mods will bug the game (announcer voices silent...), playable characters skin for sure (e.g: presentable dante...) will

https://discord.com/channels/552893824075300865/970432547102277670


Feat/eip4844

Motivation
Handle EIP-4844 related block parameters
Solution
Added two parameters excess_blob_gas and blob_gas_used in the block schema
PR Checklist

[~] Added Tests
Adapted current tests, can add more test if needed. Tested on Sepolia & Mainnet and it worked well
[ ] Added Documentation
[ ] Breaking changes
There should be no breaking change

I don't really understand why the CI fails, it works on my computer

the lint job fails with error "Unable to create clippy annotations! Reason: HttpError: Resource not accessible by integration"


Reduce size even more: generate s-box table?

Hi :)
First a HUGE thanks for making this and releasing it publically this way, really awesomely useful :))
I'm implementing this on a tiny uC and I'm trying to reduce (compiled) code size as much as possible. As suggested in the readme, I'm only using CTR.
The aes.c file mentions this:
// The lookup-tables are marked const so they can be placed in read-only storage instead of RAM
// The numbers below can be computed dynamically trading ROM for RAM -
// This can be useful in (embedded) bootloader applications, where ROM is often limited.
static const uint8_t sbox[256] = {

I've been looking around the net for a way to generate this tables (I'm not using rsbox since I'm only using CTR), the best I could find is this: https://crypto.stackexchange.com/questions/98396/how-does-this-code-calculating-aes-s-box-work
But I am not sure how to get the value of p from the polynomial 1 + x + x^3 + x^4 + x^8  in C code?
Thank you!

Nervermind I found it in the comments, p is set to the polynomial with x=2, i.e. p=283.
So putting sbox in RAM and adding this function reduces the code size by 212 bytes :)
(but obviously increases the RAM usage by 265 bytes)
void AES_generateSbox(void) {
	uint32_t p = 283;

	uint32_t t[256];
	uint32_t x = 1;
	for (int i = 0; i < 256; i ++) {
		t[i] = x;
		x ^= (x << 1) ^ ((x >> 7) * p);
	}

	sbox[0] = 0x63;
	for (int i = 0; i < 255; i ++) {
		x = t[255 - i];
		x |= x << 8;
		x ^= (x >> 4) ^ (x >> 5) ^ (x >> 6) ^ (x >> 7);
		sbox[t[i]] = (x ^ 0x63) & 0xFF;
	}
}

I checked and the generated sbox is correct.
If anybody has any ideas on how to reduce the function's code size, I'm happy to hear it :)

Just FYI I found a few more minor optimizations, when compiling for a 32-bit processor. All the operations are byte-based, while for a 32-bit processor doing operations as 32-bit words (when possible) is much more efficient, saving both space and computing time. Fortunately the compiler optimizes already most of the possible ones, and there are many which are not optimizable (for example when working on 4 non-adjacent bytes).
Replacing all the uint8_t i with uint32_t i saved a couple of bytes.
Since I'm using only CTR most of the functions benefit from being inlined, so I added a bunch of "inline" on these functions' declaration... Only to find out that the compiler was inlining them already :D
This las optimization, in KeyExpansion() saved a few more (about 30?):
	// The first round key is the key itself.
	for (i = 0; i < Nk; ++i)
	{
		((uint32_t*)roundKey)[i] = ((uint32_t*)AES_key)[i]; // optimized version of the commented 4 lines below
		/*roundKey[(i * 4) + 0] = AES_key[(i * 4) + 0];
		roundKey[(i * 4) + 1] = AES_key[(i * 4) + 1];
		roundKey[(i * 4) + 2] = AES_key[(i * 4) + 2];
		roundKey[(i * 4) + 3] = AES_key[(i * 4) + 3];*/
	}

With that, and removing the AES_ctx structure since I'm using one key only, I got the size down to 944 bytes.

Nice. It’d be great if you sent a merge/pull request.

there are a few more cases where the code could be optimized for speed and maybe code size, assuming the buffers are DW aligned. the block structure can be represented by array of 2 uint64_t. uint64_t will be emulated with 32 bit operations on 32 bit machine and utilize power of 64 machine.

memcpy - all data movement are limited to 16 bytes ( AES_BLOCKLEN):

void aes_memcpy(uint8_t *to, const uint8_t *from, size_t len){
// always copies 16 bytes
    uint64_t *to64, *from64;
    from64 = (uint64_t *)from;
    to64   = (uint64_t *)to;
    to64[0] = from64[0];
    to64[1] = from64[1];
}

XOR with Iv  can be recoded as :

static void XorWithIv(uint8_t* buf, const uint8_t* Iv){
    uint64_t *buf_ptr, *Iv_ptr;
    buf_ptr = (uint64_t *) buf;
    Iv_ptr = (uint64_t *) Iv;
    buf_ptr[0] ^= Iv_ptr[0];
    buf_ptr[1] ^= Iv_ptr[1];
}

finally : (there is no need to worry about 8 bit counters overflow and again Xor'ing can be speed up)

void AES_CTR_xcrypt_buffer(struct AES_ctx* ctx, uint8_t* buf, size_t length){

  uint8_t buffer[AES_BLOCKLEN];
  uint64_t *buffer64, *buf64;

  size_t i;
  int bi;

  buffer64 = (uint64_t *) buffer;
  buf64 = (uint64_t *) buf;

  for (i = 0; i < length; i += AES_BLOCKLEN){

      aes_memcpy(buffer, ctx->Iv, AES_BLOCKLEN);
      Cipher((state_t*)buffer,ctx->RoundKey);

      /* Increment Iv and handle overflow */
      for (bi = (AES_BLOCKLEN - 1); bi >= 0; --bi){
        ctx->Iv[bi]++;
        if(ctx->Iv[bi]) { break; }
      }

      buf64[0] ^= buffer64[0];
      buf64[1] ^= buffer64[1];
      buf64 += 2;
  }
}

Probably 4/8 byte operations could be enforced more elegantly having a union in AES_ctx buffers with byte and DW arrays.

Hi @Midronome :smile:

First a HUGE thanks for making this and releasing it publically this way, really awesomely useful :))

You're very welcome! And thanks a lot, I really appreciate the kind words :blush: :+1:
It looks like you found the answer to your original question already (how to generate the s-box table) ?

there are a few more cases where the code could be optimized for speed and maybe code size

Yes definitely, both speed & size I'd say. There are some size optimizations easily available if you are willing to compromise on portability (e.g. targeting 32-bit MCUs) or flexibility (e.g. hard-coding key and IV).
W.r.t. speed, there is much that can be improved - this library is honestly quite slow compared to other implementations (e.g. with table-lookups) because of the focus on small binary size.

Nice. It’d be great if you sent a merge/pull request.

To be frank I would reject it if targeting main/master. I would perhaps be more positively inclined if the work was made available in a new branch instead.
A write-up / tutorial in a markdown-document would be much preferable IMO. I have been wanting a writeup of usage-examples for some times. Something that demonstrates various ways to use or (slightly) mold the code to various use-cases.
The main focus of this library, is to make AES available on machines where traditional implementations require too many resources (RAM/ROM). I originally wrote this library for an 8-bit processor many years ago, because I couldn't find anything I could fit on the chip :laughing:

Awesome :) I would love to hear about those specific optimization removing portability (32-bit MCUs only) and flexibility (hard-coding key + IV). Just like you, I have no concerns about execution speed, only about small binary size (actually in my case there is plenty RAM but ROM is extremely limited).
Thank you :)


Font and Text Size Selection

Add an option in the article view to change the relative font size.
Additionally provide some fonts to choose from:

System default
Sans Serif: Open Sans? Inter?
Serif: Vollkhorn?

@serrq I think the font in your screenshot is Roboto. I believe OnePlus comes with it built-in. I updated the headline font on the article list to be bold so it should look similar now if not the same.

I would recommend Atkinson Hyperlegible for Sans Serif, it's easier to read, specially for people with visual impairments (without being ugly like Open Dyslexic)

@ez-me Took a look at the Atkinson Hyperlegible font. Seems like a great option. I'm working on adding it to #201. Here's a sneak peek

Yep! Code is ready, I'm fixing some other  things before adding it to a new
release.
On Thu, Jul 25, 2024, 12:02 AM serrq @.***> wrote:

What is the Github one? It looks very comfortable.
1000115934.jpg (view on web)
https://github.com/user-attachments/assets/fce900fe-486f-4c55-8c95-3cf5326d84ee
—
Reply to this email directly, view it on GitHub
https://github.com/jocmp/capyreader/issues/158#issuecomment-2249432416,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACIUO4TCCFB5X2Y25ZRZKCTZOCBF3AVCNFSM6AAAAABKU6U2N6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBZGQZTENBRGY
.
You are receiving this because you modified the open/close state.Message
ID: @.***>


dtrx: remove p7zip, since it's unsafe

Motivation for this change
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

Passes nixpkgs-review pr 88974 & dtrx --help test & extraction test of a zip file and throws an exception on a 7z archive (not a helpful one, but that is an upstream issue), which is ok, as 7zip support is removed with this PR. (p7zip is abandonded and marked as insecure).


Improve the Ballista crates.io / docs.rs documentation for the example code

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
I just tried out the official Ballista 0.6.0 release by following the instructions shown here and here.
Overall, this was really great and this is the first Ballista release that is easy to try out via cargo install but I did have to spend some time finding the correct dependencies to add to my Cargo.toml and this could be a burden for someone that is not already familiar with the project.
Describe the solution you'd like
I think we can either just document that it is necessary to add the following dependencies, or we could link to a working example in the repo.
[dependencies]
ballista = "0.6"
datafusion = "6.0"
tokio = "1.0"

Describe alternatives you've considered
None
Additional context
None

Hi, I have created this PR #1346 for this issue.


Got markerIcon nil when changePosition on iOS

I find that markerIcon was nil when calling changePosition function.
https://github.com/liodali/osm_flutter/blob/c0377188c7a90df0c47d59042e28ab307936d112/ios/Classes/MyMapView.swift#L738

on which version you're using ?

in general changeLocation is used to home Marker
so you should setup the markerIcon in OSMFlutter

I'm using this version flutter_osm_plugin: ^0.60.2.
even though I have set the defaultMarker and also tried to add advancedPickerMarker, still got nil error
markerOption: MarkerOption(
  defaultMarker: const MarkerIcon(
    icon: Icon(
      Icons.person_pin_circle,
      color: Colors.green,
      size: 36,
    ),
  ),
  advancedPickerMarker:
      const MarkerIcon(
    icon: Icon(
      Icons.person_pin_circle,
      color: Colors.red,
      size: 36,
    ),
  ),
),```

I have set defaultMarker in markerOption, however still got that nil error.

ok i will fix the issue

do you have any error log while the initialisation of the map ?

Nope, I the initialisation was successfull @liodali

no i tried a lot to reproduce it but without success
in general I will fix the issue, i will try to set default icon if markerIcon is nil


[INLONG-6994][Dashboard] Add MQ type filter box for inlong group and consume list

Prepare a Pull Request

Fixes #6994

@kinfuy please rebase from master and fix the conflict, thanks.


exec sh (shell) with tty not processing escape chars

Current and expected behavior
Current behaviour
I have a code like this
pub async fn connect_to_console() -> Result<(), Box<dyn Error>> {

    let client = get_k8s_client_programmatically().await?;

    let pods_api: Api<Pod> = Api::namespaced(client, "services");

    let console_pod_name = "test";

    let command = vec!["bash"];

    let mut attached = pods_api.exec(
        &console_pod_name,
        command,
        &AttachParams::default()
            .container("console-node")
            .stdin(true)
            .stdout(true)
            .stderr(false)
            .tty(true)
    ).await?;

    let mut user_input;
    let stdin = std::io::stdin();

    let mut stdin_writer = attached.stdin().unwrap();
    let mut stdout_stream = tokio_util::io::ReaderStream::new(attached.stdout().unwrap());

    let mut next_stdout;
    let mut stdout;

    user_input = String::new();

    let rt = Runtime::new().unwrap();
    rt.spawn(async move {
        loop {
            stdin.read_line(&mut user_input).unwrap();
            stdin_writer.write_all(format!("{}", user_input).as_bytes()).await.unwrap();
        }
    });

    loop {
        // Read command output
        next_stdout = stdout_stream.next().await;
        stdout = String::from_utf8(next_stdout.unwrap()?.to_vec()).unwrap();
        print!("{}", stdout);
        std::io::stdout().flush().unwrap();
    }
}

I can connect to the container
nobody@cray-console-node-2:/> ps
    PID TTY          TIME CMD
 385929 pts/470  00:00:00 bash
 385953 pts/470  00:00:00 ps

However, when I press the up arrow key, I don't see the last command used but instead the command prints ^[[A
Expected behaviour
when I run kubectl exec -it ... -- bash I can open an interactive session in bash and use the arrow keys to navigate through the shell history
Possible solution
No response
Additional context
In addition, when I press Ctrl+C my application exists, when I do that in a shell, it just prints ^C but it does not exit kubectl. My impression is that my app is still connected to the pty slave
Environment
$ kubectl version --short
Client Version: v1.22.1
Server Version: v1.20.13
Configuration and features
kube = { version = "0.74.0", features = ["runtime", "derive", "native-tls", "ws"] }
k8s-openapi = { version = "0.15.0", features = ["v1_24"] }

Affected crates
No response
Would you like to work on fixing this bug?
No response

I believe this is out of scope of kube as a library. You can use crates like crossterm in your application to handle them.
I haven't tested, but #983 includes a working example.

Yeah, deferring to crossterm here should be the way to go. The above PR is very nicely plugging into crossterm in an example to do this, so going to close this when that gets merged (because while full handling of escape chars is out of scope for us, we do need to handle terminal size).


Failed to alloc

I ran codes without any change, but error info as follow, could you give some suggestion:

What was the issue here, do you remember? Cheers rr

change theano to 0.70, everything is gonna be perfect


NonNullable behaves differently when passing a property type from this

TypeScript Version:  3.7.2

Search Terms:
NonNullable this this[] this property nonnullable
Code
type SomeType = string | undefined

class Test {
    prop: SomeType

    func1 = (): this['prop'] => {
        return this.prop
    }

    func2 = (): SomeType => {
        return this.prop
    }

    func3 = (): NonNullable<this['prop']> => {
        return this.prop!
    }

    func4 = (): NonNullable<SomeType> => {
        return this.prop!
    }
}

Expected behavior:
This code compiles correctly, this['prop'] and SomeType point to the same type.
Actual behavior:
func3 is not happy with the return statement: Type 'string' is not assignable to type 'NonNullable<this["prop"]>'.
Playground Link: link
Related Issues: none

Workaround,
type SomeType = string | undefined

class Test {
    prop: SomeType

    func3 = (): NonNullable<this['prop']> => {
        const tmp: this["prop"] = this.prop;
        return tmp!
    }

}

@weswigham can you link to the proper duplicate please

Tried v3.8, still seems to not work. I also tried to find the duplicate issue but I couldn't (probably a broader topic)

There's another similar issue to this one to do with this and NonNullable<this> not being compatible, but in this case the issue is that when we do a property access on this, we actually get the constraint of the access (so we report the "current" type rather than this["prop"]), which, when NonNullable'd, then produces a (less precise) result.
#26942 is a dupe with a slightly inaccurate answer (even adding a cast is not sufficient, because of what I described above).

Works since 4.8
https://github.com/microsoft/TypeScript/pull/49119


can this plugin support the pointed directory to use?

In my situation, i download many pictures into a custom directory, and i want to display or control these media by using this plugin. But now , this plugin can not support it.
May this plugin  can be implemented to satisfy this function?
thanks！

We only take control of the full media library. For a specific path, you can use Directory & File ecosystem directly.


Flipboard does not have a Service Worker

Hi, I noticed that https://flipboard.com does not have a service worker and does not load offline. How come it's in the list?

They have it when you’re emulating a proper device or it’s loaded with /?display=standalone (not sure about the latter).

Sure, It’s not the best approach, but still valid.


Example project build failed on Windows 11

Describe the bug
Example project build failed on Windows 11
To Reproduce
Launching lib\main.dart on Windows in debug mode...
Building Windows application...
../lib/src/controls/surfaces/tooltip.dart(321,53): error G7AD6136F: Method 'insert' cannot be called on 'OverlayState?' because it is potentially null. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/surfaces/tooltip.dart(375,30): error G7C168647: Property 'context' cannot be accessed on 'OverlayState?' because it is potentially null. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/surfaces/tooltip.dart(405,18): error G7AD6136F: Method 'insert' cannot be called on 'OverlayState?' because it is potentially null. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/surfaces/snackbar.dart(66,23): error G7AD6136F: Method 'insert' cannot be called on 'OverlayState?' because it is potentially null. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/surfaces/info_bar.dart(91,23): error G7AD6136F: Method 'insert' cannot be called on 'OverlayState?' because it is potentially null. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/surfaces/expander.dart(139,43): error G7AD6136F: Method 'readState' cannot be called on 'PageStorageBucket?' because it is potentially null. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/surfaces/expander.dart(168,29): error G7AD6136F: Method 'writeState' cannot be called on 'PageStorageBucket?' because it is potentially null. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/navigation/navigation_view/view.dart(199,51): error G7AD6136F: Method 'readState' cannot be called on 'PageStorageBucket?' because it is potentially null. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/navigation/navigation_view/view.dart(275,29): error G7AD6136F: Method 'writeState' cannot be called on 'PageStorageBucket?' because it is potentially null. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/navigation/navigation_view/view.dart(437,37): error G7AD6136F: Method 'writeState' cannot be called on 'PageStorageBucket?' because it is potentially null. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/navigation/navigation_view/view.dart(460,61): error G7AD6136F: Method 'readState' cannot be called on 'PageStorageBucket?' because it is potentially null. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/navigation/navigation_view/view.dart(611,64): error G7AD6136F: Method 'readState' cannot be called on 'PageStorageBucket?' because it is potentially null. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/navigation/navigation_view/indicators.dart(263,37): error G7AD6136F: Method 'readState' cannot be called on 'PageStorageBucket?' because it is potentially null. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/navigation/navigation_view/indicators.dart(315,31): error G7AD6136F: Method 'writeState' cannot be called on 'PageStorageBucket?' because it is potentially null. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/navigation/navigation_view/pane.dart(1206,31): error G7AD6136F: Method 'writeState' cannot be called on 'PageStorageBucket?' because it is potentially null. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/navigation/navigation_view/pane_items.dart(657,37): error G7AD6136F: Method 'readState' cannot be called on 'PageStorageBucket?' because it is potentially null. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/navigation/navigation_view/pane_items.dart(691,29): error G7AD6136F: Method 'writeState' cannot be called on 'PageStorageBucket?' because it is potentially null. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/navigation/navigation_view/pane_items.dart(762,37): error G7AD6136F: Method 'readState' cannot be called on 'PageStorageBucket?' because it is potentially null. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/form/text_box.dart(415,9): error G5FE39F1E: Type 'TapRegionCallback' not found. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/form/text_box.dart(511,9): error G5FE39F1E: Type 'EditableTextContextMenuBuilder' not found. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/form/text_box.dart(529,9): error G5FE39F1E: Type 'TextMagnifierConfiguration' not found. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/form/text_box.dart(535,9): error G5FE39F1E: Type 'SpellCheckConfiguration' not found. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/form/text_box.dart(415,9): error G23F24DF4: 'TapRegionCallback' isn't a type. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/form/text_box.dart(511,9): error GBAACFB8E: 'EditableTextContextMenuBuilder' isn't a type. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/form/text_box.dart(529,9): error GAE26ABC1: 'TextMagnifierConfiguration' isn't a type. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/form/text_box.dart(535,9): error G2E8186C2: 'SpellCheckConfiguration' isn't a type. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/form/text_box.dart(971,11): error G2E8186C2: 'SpellCheckConfiguration' isn't a type. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/form/text_box.dart(974,27): error GF7CA4DBF: Couldn't find constructor 'SpellCheckConfiguration.disabled'. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/form/text_box.dart(979,21): error GF7CA4DBF: Couldn't find constructor 'SpellCheckConfiguration.disabled'. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/form/text_box.dart(1014,13): error GC6690633: No named parameter with the name 'onTapOutside'. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/form/selection_controls.dart(23,14): error G5FE39F1E: Type 'ContextMenuButtonItem' not found. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/form/selection_controls.dart(26,9): error G5FE39F1E: Type 'TextSelectionToolbarAnchors' not found. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/form/selection_controls.dart(118,10): error G5FE39F1E: Type 'TextSelectionPoint' not found. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/form/selection_controls.dart(198,14): error G5FE39F1E: Type 'TextSelectionPoint' not found. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/form/selection_controls.dart(23,14): error G83168FCF: 'ContextMenuButtonItem' isn't a type. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/form/selection_controls.dart(26,9): error G1699E17E: 'TextSelectionToolbarAnchors' isn't a type. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/form/selection_controls.dart(46,41): error G4127D1E8: The getter 'contextMenuButtonItems' isn't defined for the class 'EditableTextState'. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/form/selection_controls.dart(47,37): error G4127D1E8: The getter 'contextMenuAnchors' isn't defined for the class 'EditableTextState'. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/form/selection_controls.dart(91,33): error G4127D1E8: The getter 'onPressed' isn't defined for the class 'Object?'. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/form/selection_controls.dart(95,28): error G4127D1E8: The getter 'label' isn't defined for the class 'Object?'. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/form/selection_controls.dart(97,16): error GC2F972A8: The argument type 'List<dynamic>' can't be assigned to the parameter type 'List<Widget>'. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/form/selection_controls.dart(118,10): error G70000D1D: 'TextSelectionPoint' isn't a type. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/form/selection_controls.dart(198,14): error G70000D1D: 'TextSelectionPoint' isn't a type. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
../lib/src/controls/form/auto_suggest_box.dart(548,27): error G7AD6136F: Method 'insert' cannot be called on 'OverlayState?' because it is potentially null. [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(247,5): error MSB8066: ��C:\Users\huget\flutter\fluent_ui\example\build\windows\CMakeFiles\f8597b75c003b9785a883ad6c6d8968e\flutter_windows.dll.rule;C:\Users\huget\flutter\fluent_ui\example\build\windows\CMakeFiles\e81f4e470bf9d1165e83057af4a64ff7\flutter_assemble.rule�����Զ����������˳�������Ϊ 1�� [C:\Users\huget\flutter\fluent_ui\example\build\windows\flutter\flutter_assemble.vcxproj]
Exception: Build process failed.

Upgrade your flutter version. We currently need Flutter 3.7

Upgrade your flutter version. We currently need Flutter 3.7

Thank you


Invalid config key due to label containing a '/'

I like to add a label to the generated secret containing a / in the name. This used to work before 0.7.1
No after the update, I get following error:
Secret "repo-git" is invalid: data[argocd.argoproj.io/secret-type]: Invalid value: "argocd.argoproj.io/secret-type": a valid config key must consist of alphanumeric characters, '-', '_' or '.' (e.g. 'key.name', or 'KEY_NAME', or 'key-name', regex used for validation is '[-._a-zA-Z0-9]+')

having following configuration for the ExternalSecret:
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
  labels:
    app.kubernetes.io/instance: argocd
  name: repo-git
  namespace: argocd
spec:
  data:
    - remoteRef:
        key: git-username
      secretKey: username
    - remoteRef:
        key: git-password
      secretKey: password
  refreshInterval: 24h0m0s
  secretStoreRef:
    kind: ClusterSecretStore
    name: keyvault-cluster-secret-store
  target:
    name: repo-git
    template:
      data:
        name: Git Repo
        password: '{{ .password | toString }}'
        type: git
        url: 'https://the-git.git'
        username: '{{ .username | toString }}'
      metadata:
        labels:
          argocd.argoproj.io/secret-type: repository

Your error message sounds like the indentation was wrong (metadata was under the data node).
Your example looks fine, though, that should work.
I made it work with this here:
apiVersion: external-secrets.io/v1beta1
kind: ClusterSecretStore
metadata:
  name: fake
spec:
  provider:
    fake:
      data:
      - key: "username"
        value: "hihihi"
        version: "v1"
      - key: "password"
        value: "123123123123"
        version: "v1"
---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
  name: example-2
spec:
  refreshInterval: "30s"
  secretStoreRef:
    name: fake
    kind: ClusterSecretStore
  target:
    name: repo-git
    template:
      metadata:
        labels:
          argocd.argoproj.io/secret-type: repository
      data:
        name: Git Repo
        password: '{{ .password | toString }}'
        type: git
        url: 'https://the-git.git'
        username: '{{ .username | toString }}'

  data:
  - secretKey: username
    remoteRef:
      key: username
      version: v1
  - secretKey: password
    remoteRef:
      key: password
      version: v1

which yields:
apiVersion: v1
data:
  name: R2l0IFJlcG8=
  password: MTIzMTIzMTIzMTIz
  type: Z2l0
  url: aHR0cHM6Ly90aGUtZ2l0LmdpdA==
  username: aGloaWhp
immutable: false
kind: Secret
metadata:
  annotations:
    reconcile.external-secrets.io/data-hash: 11d01246d5008c9425667232c6dccbf8
  creationTimestamp: "2023-01-13T17:10:20Z"
  labels:
    argocd.argoproj.io/secret-type: repository
  name: repo-git
  namespace: default
type: Opaque

Thanks for the fast answer.
After trying with your example, I found out that my external secrets used engineVersion: v1 as they are for quite some time there. When updating to engineVersion: v2 it works again.
Additionally, adding engineVersion: v1 to your example leads to the same error described above.
So for me it's ok like that as I can update all secrets to v2.


Using the (pretrained) model on new data

Hi,
First of all many thanks to the whole team for the amazing work. I'm trying to use the pretrained model (on MultiNews) to make inference on new data. At the moment I'm just trying with the test set of Multinews itself.
I instantiate the model as suggested:
tokenizer = AutoTokenizer.from_pretrained(model_path)
config = LongformerEncoderDecoderConfig.from_pretrained(model_path)
model = LongformerEncoderDecoderForConditionalGeneration.from_pretrained(model_path, config=config).to(device)

Then I prepare the input similarly to any other HF model (I set max_input_length=4096):
inputs_dict = tokenizer(input_docs, padding="max_length", max_length=max_input_length, return_tensors="pt", truncation=True)
input_ids = inputs_dict.input_ids.to(device)
attention_mask = inputs_dict.attention_mask.to(device)

At the end I use the following to generate the summary:
predicted_ids = model.generate(input_ids, attention_mask=attention_mask)
text = tokenizer.batch_decode(predicted_ids, skip_special_tokens=True)

However, the summaries are very short if compared with what was expected (at least for MNews). Hereafter an example of the output:
– Voters in 11 states will pick their governors tonight, and Republicans appear on track to increase their
It even seems to be truncated, is there something I'm doing wrong?

I think I got it, I updated the generate call as follows:
predicted_abstract_ids = model.generate(input_ids, attention_mask=attention_mask, max_length=max_output_length, min_length=0, num_beams=5, no_repeat_ngram_size=3)

Is there any suggested value? (I set max_output_length=256 here)

Hi, thanks for your interest in our work!
About the settings we used for different datasets, you can find them in /run_bash/*.sh, and specifically for Multi-News, if you use the non-finetuned model, I would suggest you use max_output_length=256, and if you use fine-tuned model (on Multi-news), you can safely use max_output_length=1024, as the desired length is learned by fine-tuning on the in-domain dataset.
And if you want to apply the model on a new dataset, kindly set max_output_length to any desired length (e.g. avg length of summary in the training set/ or the length that you want the generated summaries to be)


Full screen flickering in the editor

Godot version:
3.2 beta 4 mono
OS/device including version:
Win10 64 Home
Issue description:
With the option "Editor -> Change to fullscreen mode" activated:
A blink occurs when executing a scene.
A blink occurs when the execution window is closed.
A blink occurs when you select another window (for example Chrome) and use two monitors.
In short, a blink occurs when the editor receives or loses focus with the "Editor -> Change to fullscreen mode" option activated.
Steps to reproduce:
Activate the "Editor -> Change to fullscreen mode" option and execute a scene.
Minimal reproduction project:

Similar or duplicate https://github.com/godotengine/godot/issues/21475

Closing as duplicate of #21475.


StreamingRow.getLastCellNum() off-by-one and blank cells

Hi! I think getLastCellNum() may be returning a value 1 more than intended.
With two columns (A and B), it returns a value of 3. (see implementation below - it's returning size() + 1).
With a blank column - let's say we have A populated, B blank, C blank, and D populated - it's not looking for the highest valued column index, just the number of populated columns, so the result there is not correct either.
  /**
   * Gets the index of the last cell contained in this row PLUS ONE.
   *
   * @return short representing the last logical cell in the row PLUS ONE,
   *   or -1 if the row does not contain any cells.
   */
  @Override
  public short getLastCellNum() {
    return (short) (cellMap.size() == 0 ? -1 : cellMap.size() + 1);
  }

Workaround, to get the number of cells in a row with either XLSX streaming or regular POI:
    private int numCellsInRow(Row row) {
        if (row instanceof StreamingRow) {
            List<Integer> colIndexes = new ArrayList<>(((StreamingRow) row).getCellMap().keySet());
            if (colIndexes.size() < 1) {
                return 0;
            }
            colIndexes.sort(null);
            return colIndexes.get(colIndexes.size()-1) + 1;
        }
        else {
            // HSSFRow.getLastCellNum() returns the 1-based index of the last cell, or -1
            return (row.getLastCellNum() < 1) ? 0 : row.getLastCellNum();
        }
    }

Fixed by #61


Update google-cloud-bigquery to 1.127.1

Updates com.google.cloud:google-cloud-bigquery from 1.122.2 to 1.127.1.
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.google.cloud", artifactId = "google-cloud-bigquery" } ]

labels: library-update, semver-minor

Superseded by #178.


Adds missing license header

@Jagrutiti to validate this content.

Description
Classes were created and released without licenses.

Testing done
N/A
### Submitter checklist
- [ ] If an issue exists, it is well described and linked in the description
- [x] The description of this pull request is detailed and explain why this pull request is needed
- [x] The changeset is on a specific branch. Using `feature/` for new feature, or improvements ; Using `fix/` for bug fixes ; Using `docs/` for any documentation changes.
- [ ] If required, the documentation has been updated
- [x] There is automated tests to cover the code change / addition or an explanation why there is no tests in the description.

The years should represent when the license was being licensed up until last edition. As the classes should have been licensed from the start, I propose to retroactively license them.


markdown.copyFiles.destination doesn't escape markdown characters in path

Testing #183682
Set the value to abc)/${fileName}. This is a valid path, but the ) does not get escaped in the markdown link.

Also happens without this setting if the file being pasted contains ( or other special characters. In these cases, we should likely use the [text](<link with special chars>) link syntax instead

Cool, didn't know you could do that


run npm scripts in the active terminal

Npm scripts allways open a new terminal to run it. The expected behavior is that a npm script run in the active terminal. For example, if you have a terminal window splitted in two, and you need to run two npm scripts, each of them has to run in each splitted terminal and not in a new one.

I think this is a dupe of https://github.com/Microsoft/vscode/issues/49737


How to use tcomb in webpage

I'm wondering if I can include the tcomb lib in my webpage like
<script src="tcomb.js">

I can only see the usage from npm, but how can I include it in a regular way? Sorry for my naive question.

Something like webpack or browserify would work. This is an example using webpack:
https://github.com/gcanti/tcomb/blob/benchmark/webpack.config.js
Will output 2 files:

dist/tcomb.js (development)
dist/tcomb.min.js (production) Object.freeze calls and asserts stripped out

Thanks!


LuckPerms not exporting prefixes correctly

Just a little bug, when exporting your permissions, prefix's aren't being exported correctly. For example, the exported prefix looks like this,
/luckperms group developer permission set prefix.10.&8[&5Developer&8] true creative
when it should look like
/luckperms group developer meta addprefix 10 &8[&5Developer&8] creative
It still works, but it will not show the prefix when showing meta info.

I'm curious about this.

It still works, but it will not show the prefix when showing meta info.

Are you sure it doesn't work using the latest dev build? Adding as a permission in that way should still work.

I just updated and tested, it seems it works now (May of been fixed in a previous update, or can only happen in certain circumstances). Although it doesn't really make a difference, I still think it should export using meta commands instead of prefixes.

Yep, I understood that bit.
However, it should still be working. (in other words, this is an enhancement, not a bug)

Can you change the label to enhancement please? I'm not sure how to.

Closed in 046202719a4903d1e0584d86c1f3597e9500843d


Please add tag for 1.0.3 release

In debian we would like to build node modules from their sources. In this particular case, rollup.config.js is missing the npm registry so we can't use that. Please add 1.0.3 tag in the repo so we can use this repo as source for the debian package.

You mean create a new Github release tag 1.0.3?

Thanks!

@pravi please have a minute to test the latest master v2.0.0-alpha1.
Install npm install @thednp/dommatrix. Once tested is successful we release 2.0.0 stable.
Thank you.

@thednp my interest in dommatrix was for packaging pdf.js. So only when pdf.js update their build dependency I will be looking at this module.

Cool, let me know if you need anything.


The website can't work normally in IE

I use Nuxt.js to write a website and it's normal in other browser, like Chrome, Firefox, Safari and so on.But just can't work in IE.
The error like this :

And I have tried to use babel to transform the code, but it does't work, too. My config like this :

someone can answer it or get some suggestions for me? Thank you so much!!!

This question is available on Nuxt community (#c8468)

I also have this problem. When can you solve it?


Amount Conversion doesn't work properly

2.3.1 :022 > client.accounts[1].balance['amount']
 => "4.73257967" # Correct Amount
2.3.1 :023 > client.accounts[1].balance.amount.to_s
 => "0.473257967E1" # Incorrect Amount
###
2.3.1 :026 > client.accounts[4].balance.amount.to_s
 => "0.36772081E0" # Correct Amount
2.3.1 :027 > client.accounts[4].balance['amount']
 => "0.36772081" # Correct Amount

Using version 4.1.0

Hey @parabuzzle, apologies for the slow response here.
The amounts are correct, you're just outputting them in scientific notation (notice the E1 at the end of the second output).
Since amount is a BigDecimal object, calling to_s returns the number formatted in scientific notation. To customize this output, see the documentation for BigDecimal#to_s.


Does VSTS Support Move to CSP?

How about if I want to move VSTS to new csp subscription? Cant find any info on that on this document.

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

ID: 76c1c185-685f-27e0-e634-844b510b1834
Version Independent ID: 09375778-5354-ab44-c5c6-94c2aebe34bc
Content: Move Azure resources to new subscription or resource group
Content Source: articles/azure-resource-manager/resource-group-move-resources.md
Service: azure-resource-manager
GitHub Login: @tfitzmac
Microsoft Alias: tomfitz

@Anmolgan81 Thanks for bringing this to our attention. Your feedback has been shared with the content owner for further review.

@Anmolgan81 - an update to this article will be published soon. VSTS can be moved, but if you have 3rd party extension purchases, you must cancel those purchases before moving VSTS.

@tfitzmac How can we find out 3rd party extension purchases for VSTS?

@tfitzmac Can you tell me in detail the process of moving the VSTS?


PHP message: WordPress database error CREATE command denied to user ... for table ...

Hi,
tried installing this plugin in order to get around the issues with U2F and also in the hopes to get my FIDO2 keys to work. It broke my site until I disabled it again.
When I merely enabled it, everything seemed fine, except that under "Profile" I didn't see any 2FA-related settings anymore.
But the plugin list showed this plugin active and there was also a related setting tab that worked. So I logged off in order to test it and was met with a "critical error" message.
Digging into the server logs I saw the error message mentioned above.
I realize this is owed to the fact that I run a somewhat stricter regime than is perhaps usual for WordPress sites and I also know how to get around the issue with table creation.
However, a slightly more graceful failure would be nice (such as being able to show roughly what is wrong, i.e. table creation without perhaps mentioning too many DB details). And perhaps fail earlier. I.e. when I activate the plugin, not when I try to log back in.
Thanks!

The recovery email I received, contained the following (just in case this helps):
Error Details
=============
An error of type E_ERROR was caused in line 56 of the file /srv/www/mysite/blog/wp-content/plugins/two-factor-provider-webauthn/inc/class-webauthn-user.php. Error message: Uncaught UnexpectedValueException: Unable to save the user handle to the database. in /srv/www/mysite/blog/wp-content/plugins/two-factor-provider-webauthn/inc/class-webauthn-user.php:56
Stack trace:
#0 /srv/www/mysite/blog/wp-content/plugins/two-factor-provider-webauthn/inc/class-webauthn-credential-store.php(102): WildWolf\WordPress\TwoFactorWebAuthn\WebAuthn_User->generate_and_save_handle()
#1 /srv/www/mysite/blog/wp-content/plugins/two-factor-provider-webauthn/inc/class-webauthn-provider.php(162): WildWolf\WordPress\TwoFactorWebAuthn\WebAuthn_Credential_Store::get_user_keys()
#2 /srv/www/mysite/blog/wp-content/plugins/two-factor/class-two-factor-core.php(444): WildWolf\WordPress\TwoFactorWebAuthn\WebAuthn_Provider->is_available_for_user()
#3 /srv/www/mysite/blog/wp-content/plugins/two-factor/class-two-factor-core.php(1699): Two_Factor_Core::get_available_providers_for_user()
#4 /srv/www/mysite/blog/wp-includes/class-wp-hook.php(324): Two_Factor_Core::user_two_factor_options()
#5 /srv/www/mysite/blog/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#6 /srv/www/mysite/blog/wp-includes/plugin.php(517): WP_Hook->do_action()
#7 /srv/www/mysite/blog/wp-admin/user-edit.php(876): do_action()
#8 /srv/www/mysite/blog/wp-admin/profile.php(18): require_once('...')
#9 {main}
  thrown

If you have access to phpMyAdmin or a similar tool:
CREATE TABLE wp_2fa_webauthn_users (
	user_id bigint(20) unsigned NOT NULL,
	user_handle varchar(128) NOT NULL,
	PRIMARY KEY  (user_id),
	UNIQUE KEY user_handle (user_handle)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;

CREATE TABLE wp_2fa_webauthn_credentials (
	id bigint(20) unsigned NOT NULL auto_increment,
	user_handle varchar(128) NOT NULL,
	credential_id varchar(767) CHARSET ascii COLLATE ascii_bin NOT NULL,
	public_key varchar(1024) NOT NULL,
	counter int(11) NOT NULL,
	name varchar(255) NOT NULL,
	added int(11) NOT NULL,
	last_used int(11) NOT NULL,
	u2f tinyint(2) NOT NULL,
	PRIMARY KEY  (id),
	UNIQUE KEY credential_id (credential_id),
	KEY user_handle (user_handle)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;

Please replace wp_ with your prefix ($table_prefix variable from wp-config.php), DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci with what global $wpdb; echo $wpdb->get_charset_collate(); returns.

However, a slightly more graceful failure would be nice (such as being able to show roughly what is wrong, i.e. table creation without perhaps mentioning too many DB details).

Unfortunately, this is handled by WordPress; I don't think I have any control there :-(

And perhaps fail earlier. I.e. when I activate the plugin, not when I try to log back in.

This I hope I can do, thanks!

However, a slightly more graceful failure would be nice (such as being able to show roughly what is wrong, i.e. table creation without perhaps mentioning too many DB details).

Unfortunately, this is handled by WordPress; I don't think I have any control there :-(

Oh, I didn't realize.

And perhaps fail earlier. I.e. when I activate the plugin, not when I try to log back in.

This I hope I can do, thanks!

Would be cool. But I guess whoever runs runs a configuration the way I do, knows how to deal with these issues either way.


add pdb for citadel.

Please provide a description for what this PR is for.
Resolve: https://github.com/istio/istio/issues/16163
The PR for new installer has been merged: https://github.com/istio/installer/pull/245
And to help us figure out who should review this PR, please
put an X in all the areas that this PR affects.
[ ] Configuration Infrastructure
[ ] Docs
[ X ] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure

@morvencao: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

integ-mixer-k8s-tests_istio
165df28927604401c6ddd71e3b9e4c82643bd4d6
link
/test integ-mixer-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Why was this added? Citadel does not support multiple running instances as specified in the docs.
This means that we'll experience Cannot evict pod as it would violate the pod's disruption budget. errors when draining nodes and will only be able to fix it by deleting pdb/istio-citadel.
Please revert this commit.

@jmagnusson Citadel support multiple instances since https://github.com/istio/istio/pull/14961


enable Reproducible Builds

see https://maven.apache.org/guides/mini/guide-reproducible-builds.html

CLA signed https://github.com/finos/open-developer-platform/pull/334


fix: prefer asynchronous fs operations

This seems to be a duplicate of #582

Yes, just merge any of the two.
BTW your code fails in jest testing environments because it doesn't cache javascript requires but does caches native object.
Which means it defineProperty multiple times on same object and causing crashes.


Automative checking available models for the specific tasks.

Hold on

We close this one now, it is not related to the main feature.


Don't hijack cmd+1/2

Hi! GREAT redesign. Very beautiful :heart:
Just one thing. Please don't hijack cmd+1/2. I'm always switching tabs with cmd+#num and this means that I can't keep js2.coffee in an open tab because it breaks my workflow :cry:

:+1:

:+1:

+1, really annoying


Mastodon link on top navbar

Twitter link was removed from the navbar and replaced by mastodon. Now, the twitter link is only on footbar, with mastodon link.
As said in #151

Thank you @minktusk. This PR will take some time to review as we will be discussing Twitter vs X vs Mastodon in our upcoming Contributor meeting in September.


[FLINK-18070][table-planner-blink] Don't materialize time attribute in SubGraphOptimize

What is the purpose of the change

Do not materialize time attribute in StreamCommonSubGraphBasedOptimizer.

Brief change log

StreamOptimizeContext.needFinalTimeIndicatorConversion always return false.

Verifying this change
This change added tests and can be verified as follows:

Add test which have 2 sink after createTemporaryView and table had Proctime, it was thow execption before bacause TimeAttribute have been materialize as Timestamp(3). After this fix can generate right plan.

Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): (yes / no)
The public API, i.e., is any changed class annotated with @Public(Evolving): (yes / no)
The serializers: (yes / no / don't know)
The runtime per-record code paths (performance sensitive): (yes / no / don't know)
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (yes / no / don't know)
The S3 file system connector: (yes / no / don't know)

Documentation

Does this pull request introduce a new feature? (yes / no)
If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

@flinkbot run azure

@libenchao Hi, could you have a look for this. Thanks

@liuyufei9527 I'm not sure whether the pr will break other features. @godfreyhe Could you take a look at this pr?

@flinkbot run azure


TreeView selected item default binding mode is now TwoWay

fixes #814 .

Hmm, interesting: this should already be inheriting the two way default binding from the property on SelectedItemsControl - looks like we have a bug there!
Also, I notice SelectedIndex doesn't have two-way binding by default on either SelectingItemsControl or TreeView.

I remember seeing someone else say they couldn't get SelectedItem to update when using it from code behind, not sure if it was via binding, perhaps it could be related.

Current coverage is 63.74% (diff: 100%)

Merging #815 into master will not change coverage

@@             master       #815   diff @@
==========================================
  Files           499        499
  Lines         19249      19249
  Methods        5323       5323
  Messages          0          0
  Branches       2708       2708
==========================================
  Hits          12270      12270
  Misses         6091       6091
  Partials        888        888

Powered by Codecov. Last update 15de038...1fed357

Closing this as I believe #830 is the correct fix.


ASIM File Event schema parser with its sample and test data for SentinelOne

Required items, please complete
Change(s):

Added ASIM File Event schema parser for SentinelOne based on API Data

Reason for Change(s):

Initial version ASIM File Event Parser

Version Updated:

Initial version

Testing Completed:

Yes

Checked that the validations are passing and have addressed any issues that are present:

Yes

Hi @jayeshprajapaticrest
Thank you for raising Pull Request with us! We will review it internally and get back to you by shortly.

ETA for review is 18th Aug

Hi @jayeshprajapaticrest, hope you are doing well. Just wanted to check if you got a chance to look at the suggestions shared. Please feel free to reach out to us for any queries or support. Thanks!

Hi @jayeshprajapaticrest, we are waiting for your response.

The current validation fails due to not found the table with the name of the file event parser(i.e. vimFileEventSentinelOne) and as part of certification we do not have to add anything related to the above.

Hi @jayeshprajapaticrest,
KQL validations are failing for the items mentioned below. Please have a look at them. Thanks

@v-atulyadav
As mentioned above this error is not from because of our committed code. It should be resolved from the Microsoft's side.
@vakohl
Can you please take a look into the current kql validation error which is related to unifying parser?

Noted @jayeshprajapaticrest,
Thanks

Hello @jayeshprajapaticrest, please respond to the above comments. Thanks!

@vakohl we have added below remaining inspection fields from the Alerts logs.
ThreatConfidence
ThreatOriginalConfidence

@v-sudkharat @vakohl
FYI,
The current KqlValidation is because of not finding the "vimFileEventMicrosoftWindowsEvent" table and not because of our code implementation.

@v-sudkharat @vakohl FYI, The current KqlValidation fails because of not finding the "vimFileEventMicrosoftWindowsEvent" table and not because of our code implementation.

@jayeshprajapaticrest seems like github validation expects asim files for all parsers to be present if referenced in asim union parser. Please try keeping only empty and sentinelone asim file under 'ParserQuery' property. Let me know if the error still persists.
https://github.com/Azure/Azure-Sentinel/blob/21f01935f4de3f63d9eafcdf1f9e52467f03538c/Parsers/ASimFileEvent/Parsers/ASimFileEvent.yaml

@v-sudkharat @vakohl FYI, The current KqlValidation fails because of not finding the "vimFileEventMicrosoftWindowsEvent" table and not because of our code implementation.

@jayeshprajapaticrest seems like github validation expects asim files for all parsers to be present if referenced in asim union parser. Please try keeping only empty and sentinelone asim file under 'ParserQuery' property. Let me know if the error still persists. https://github.com/Azure/Azure-Sentinel/blob/21f01935f4de3f63d9eafcdf1f9e52467f03538c/Parsers/ASimFileEvent/Parsers/ASimFileEvent.yaml

@vakohl Did as above then other file validation error fixed. But it shows for the SentinelOne.

Hi @jayeshprajapaticrest, could you please have a look at the suggested changes. Thanks!

Hi @jayeshprajapaticrest, could you please have a look at the suggested changes. Thanks!
@v-atulyadav
Fixed.


[GOBBLIN-994] fix wrong import org.testng.collections.Lists

Dear Gobblin maintainers,
Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
JIRA

[ ] My PR addresses the following Gobblin JIRA issues and references them in the PR title. For example, "[GOBBLIN-XXX] My Gobblin PR"

https://issues.apache.org/jira/browse/GOBBLIN-994

Description

[ ] Here are some details about my PR, including screenshots (if applicable):
remote wrong import of org.testng.collections.Lists in UnixTimestampRecursiveCopyableDataset

Tests

[ ] My PR adds the following unit tests OR does not need testing for this extremely good reason:

Commits

[ ] My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":

Subject is separated from body by a blank line
Subject is limited to 50 characters
Subject does not end with a period
Subject uses the imperative mood ("add", not "adding")
Body wraps at 72 characters
Body explains "what" and "why", not "how"

Codecov Report

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

@@            Coverage Diff            @@
##             master    #2838   +/-   ##
=========================================
  Coverage     45.61%   45.61%
+ Complexity     8972     8971    -1
=========================================
  Files          1903     1903
  Lines         71315    71315
  Branches       7868     7868
=========================================
  Hits          32531    32531
- Misses        35785    35788    +3
+ Partials       2999     2996    -3

Impacted Files
Coverage Δ
Complexity Δ

...nt/copy/UnixTimestampRecursiveCopyableDataset.java
85% <ø> (ø)
8 <0> (ø)
:arrow_down:

.../org/apache/gobblin/cluster/GobblinTaskRunner.java
63.42% <0%> (-1.39%)
27% <0%> (-1%)

...lin/elasticsearch/writer/FutureCallbackHolder.java
62.85% <0%> (+1.42%)
4% <0%> (ø)
:arrow_down:

.../org/apache/gobblin/metrics/RootMetricContext.java
79.68% <0%> (+1.56%)
16% <0%> (+1%)
:arrow_up:

...lin/util/filesystem/FileSystemInstrumentation.java
92.85% <0%> (+7.14%)
3% <0%> (ø)
:arrow_down:

Continue to review full report at Codecov.

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


Opting out for super call requirement?

TypeScript Version:  master branch
Code
class EVE extends HTMLElement {
  constructor() {
    return document.createElement("sn-eve"); // Error
  }
}

let eve: EVE;
eve = document.createElement("sn-eve"); // No error

Expected behavior:
It should work if a constructor function return an object which is structurally compatible with the declared class.
Actual behavior:
Error: Constructors for derived classes must contain a 'super' call.
Workaround:
class EVE extends HTMLElement {
  constructor() {
    if ({} === undefined) {
      super();
    }
    return document.createElement("sn-eve");
  }
}

In plain JavaScript:
class EVE extends HTMLElement {
  constructor() {
    super(); // TypeError: Illegal Constructor
    return document.createElement("sn-eve");
  }
}

let eve1 = new EVE();

let eve2 = document.createElement("sn-eve");

So not only is it "unwanted", if super() is called, it will throw, so TypeScript is requiring invalid ES6 syntax.

What's the point of making EVE a class when you cannot add methods or properties to it, or even extend it? It is not sufficient for a class constructor to create an object that is structurally compatible with the class's interface. At a minimum, the class's prototype must be in the prototype chain of the constructed object, i.e. eve1 instanceof EVE should be true.

@MattiasBuelens I can:
class EVE extends HTMLElement {
  constructor() {
    if ({} === undefined) {
      super();
    }
    const tempThis = document.createElement("sn-eve");
    Object.setPrototypeOf(tempThis, EVE.prototype);
    return tempThis;
  }
  eve() {
    return 3;
  }
}

console.log(new EVE().eve()) // 3

@SaschaNaz Okay, I guess that works. What about a subclass of EVE that needs to the super constructor, and then do some other things in its own constructor? How would this work:
class DerivedEVE extends EVE {
    constructor() {
        super();
        this.foo = "bar";
    }
}
```

I mean sure, you can probably find some roundabout way to make `this` refer to the return value of the super constructor. But really: would you still describe `EVE` as being a class at that point? Can it be used as a class everywhere?

I just don't see the value of being able to not call `super()` from a constructor for regular ES6-style classes. As for your use case of custom elements: unfortunately it's not as simple as creating an element and messing with its prototype (for example, would you expect `<sn-eve>` to work in HTML code?) [The spec for custom elements](https://www.w3.org/TR/custom-elements/) is still being worked on and it'll probably use ES6 classes in some way, but there's more to it.

<sn-eve> will work as `HTMLUnknownElement on HTML code, and I can freely style it and append any child nodes to serve my purpose. Subclassing it unfortunately requires the same prototype hack.
I have to admit that it's not simple but it still is ES6, and if TypeScript still want to require it then it should do on TSLint not on the compiler.

I think that this a duplicate of #7285, so I'll redirect the convo to there.


feat: add ckb-cli wrapper

support call ckb-cli in js

support ckb-cli downloaded automatically
add import account by kuai-cli
add kuai signer commands

Codecov Report

Merging #301 (9bd41d2) into develop (71a8348) will decrease coverage by 4.33%.
The diff coverage is 20.08%.

@@             Coverage Diff             @@
##           develop     #301      +/-   ##
===========================================
- Coverage    69.97%   65.65%   -4.33%
===========================================
  Files           85       89       +4
  Lines         2528     2766     +238
  Branches       576      610      +34
===========================================
+ Hits          1769     1816      +47
- Misses         685      853     +168
- Partials        74       97      +23

Impacted Files
Coverage Δ

packages/core/src/errors-list.ts
100.00% <ø> (ø)

packages/core/src/util/json.ts
11.90% <11.90%> (ø)

packages/core/src/ckb-cli.ts
14.73% <13.63%> (-22.77%)
:arrow_down:

packages/core/src/download.ts
18.42% <18.42%> (ø)

packages/core/src/builtin-tasks/signer.ts
24.52% <24.52%> (ø)

packages/core/src/util/case.ts
46.15% <46.15%> (ø)

packages/core/src/builtin-tasks/index.ts
100.00% <100.00%> (ø)

packages/core/src/constants.ts
100.00% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

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

How about only wrapping for ckb-cli subcommands but not list all of options? I'm not sure it's better.
When developers enter kuai account -xxx1 -xxx2, we will call ckb-cli -xxx1 -xxx2, we will not care -xxx1 -xxx2, but only transfer these options to ckb-cli.


Can't open lib 'ODBC Driver 13 for SQL Server

I just followed the setup to install php 7.1 drivers on my Mac but I'm having a few issues.  I get two errors when I try to interact with the database.
[Illuminate\Database\QueryException]
  SQLSTATE[01000]: [unixODBC][Driver Manager]Can't open lib 'ODBC Driver 13 for SQL Server' : file not found (SQL: select * from sysobjects where type = 'U' and name = migrations)

  [PDOException]
  SQLSTATE[01000]: [unixODBC][Driver Manager]Can't open lib 'ODBC Driver 13 for SQL Server' : file not found

Just found this and it fixed my issue.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release
brew update
brew install --no-sandbox msodbcsql mssql-tools

Oddly, I'm seeing this error whenever I try to run sqlsrv_connect even though I've followed all the instructions carefully for installing ODBC 17 (because I'm on Debian 9). I can use sqlcmd just fine to talk to the DB, but not PHP. I do notice that I have both PHP 7.1 and PHP 7.2 installed. Could the fact that I have two installs be fouling up something in the ODBC 17 installation process? Thanks.

@elramus sqlcmd is part of mssql-tools, not the ODBC driver. Just to clarify, I assume you are using the msodbcsql and mssql-tools previews available on this page? Also, PHP installs have nothing to do with the ODBC driver install, so that is not the problem.
If the error you are getting says that ODBC driver 13 cannot be found, you can add the Driver keyword to the connection string and specify version 17 as follows:
Driver={ODBC Driver 17 for SQL Server};

or in the connection options in your PHP script,
array("Driver"=>"ODBC Driver 17 for SQL Server");

Please let us know if this fixes the problem.

@mauricio0015 Please follow the instructions on the ODBC install page to install msodbcsql and mssql-tools. If you are using Debian 9 or Ubuntu 17.10, you may need to use the preview versions on this page instead, because their public repositories have not been updated.

In my case on openSUSE I get the following error:
Message: [unixODBC][Driver Manager]Can't open lib 'ODBC Driver 13 for SQL Server' : file not found
I don't know why is trying to use Driver 13. I am testing on PHP 7.2.1

Thanks for the clarifications @david-puglielli. Yes, I got msodbcsql and mssql-tools through the instructions here. For some context, my end goal is to have Laravel framework in a LAMP environment talk to an MS SQL Server database. Found lots of conflicting info on how to get Laravel to talk to MS SQL, so I'm unclear on which PHP driver(s) I need: sqlsrv, pdo_sqlsrv, pdo_odbc, or pdo_dblib.
I tried adding "Driver"=>"ODBC Driver 17 for SQL Server" to the connection options of sqlsrv_connect, but it shows SQLSTATE: IMSSP
Code: -1
Message: Invalid option Driver was passed to sqlsrv_connect.

@elramus I think you may be using the stable version of the sqlsrv driver, which does not support ODBC driver 17. Could you try pecl install sqlsrv-5.2.0RC1 (or download the latest binaries from the releases page) and let us know if the problem is fixed? Thanks!

hi @david-puglielli, I stopped trying with Deb 9 to avoid dealing with ODBC 17 altogether.  Opened a new issue: https://github.com/Microsoft/msphpsql/issues/689. Thanks for your help with this.

@david-puglielli Thanks. Changing the driver name worked.
I was infact trying to access sql data warehouse azure via python notebook in the ML studio. The driver not found error was out puting. The issue is posted on SO as well.
Thanks.

Closing this issue due to inactivity. If any of you still have issues, please create a new issue. Thank you.

Still encountering some issues. Having installed pyodbc with conda, and msodbcsql as per https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server I encounter the same error.
Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'ODBC Driver 13 for SQL Server' : file not found (0) (SQLDriverConnect)")

DId you install ODBC 17 or ODBC 13, @willgdjones ? Which platform?
Assuming you're looking for ODBC 13, please type odbcinst -q -d -n "ODBC Driver 13 for SQL Server" and see if the driver really exists in the path. For example, in CentOS, you may see something like
[ODBC Driver 13 for SQL Server]
Description=Microsoft ODBC Driver 13 for SQL Server
Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.1.so.9.2
UsageCount=1

Check if /opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.1.so.9.2 actually exists.

This is on Mac OSX 10.3.1

Data KUL git:(master) ✗ odbcinst -q -d -n "ODBC Driver 13 for SQL Server"
[ODBC Driver 13 for SQL Server]
Description=Microsoft ODBC Driver 13 for SQL Server
Driver=/usr/local/lib/libmsodbcsql.13.dylib
UsageCount=1

It seems that the driver is installed on my system.

hi @willgdjones , regrettably we don't support anything lower than Mac OS X 10.11
Even if it looks like ODBC 13 is installed, it may not work properly.

Help im trying to connect on cpanel webhost to sql hosted in windows server, but having this problem SQLSTATE [01000] SQLDriverConnect: 0 [unixODBC] [Driver Manager] Can not open lib 'SQL Server': file not found
Please help

@Dkeimerunthe You need to have the ODBC driver installed. Here is the link.

Thanks david-puglielli, i am sorry im not good at this, but i already installed the Microsoft ODBC Driver 17 for sql server in my machine. but still encountering the same problem check my web olympusmuonline.com
it says the error

sudo su
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
-Download appropriate package for the OS version
-Choose only ONE of the following, corresponding to your OS version
Ubuntu 14.04
curl https://packages.microsoft.com/config/ubuntu/14.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
Ubuntu 16.04
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
Ubuntu 17.10
curl https://packages.microsoft.com/config/ubuntu/17.10/prod.list > /etc/apt/sources.list.d/mssql-release.list
Ubuntu 18.04
curl https://packages.microsoft.com/config/ubuntu/18.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
exit
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install msodbcsql17

optional: for bcp and sqlcmd
sudo ACCEPT_EULA=Y apt-get install mssql-tools
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
source ~/.bashrc

optional: for unixODBC development headers
sudo apt-get install unixodbc-dev