RuntimeError: "exp_cuda" not implemented for 'ComplexFloat'

These errors continue to occur, but is there a solution?
%cd /content/drive/MyDrive/MB-iSTFT-VITS
!python train_latest.py -c configs/ljs_mb_istft_vits.json -m ljs_mb_istft_vits
/content/drive/MyDrive/MB-iSTFT-VITS
[INFO] {'train': {'log_interval': 200, 'eval_interval': 100000, 'seed': 1234, 'epochs': 20000, 'learning_rate': 0.0002, 'betas': [0.8, 0.99], 'eps': 1e-09, 'batch_size': 32, 'fp16_run': True, 'lr_decay': 0.999875, 'segment_size': 8192, 'init_lr_ratio': 1, 'warmup_epochs': 0, 'c_mel': 45, 'c_kl': 1.0, 'fft_sizes': [384, 683, 171], 'hop_sizes': [30, 60, 10], 'win_lengths': [150, 300, 60], 'window': 'hann_window'}, 'data': {'training_files': 'filelists/ljs_audio_text_train_filelist.txt.cleaned', 'validation_files': 'filelists/ljs_audio_text_val_filelist.txt.cleaned', 'text_cleaners': ['english_cleaners2'], 'max_wav_value': 32768.0, 'sampling_rate': 22050, 'filter_length': 1024, 'hop_length': 256, 'win_length': 1024, 'n_mel_channels': 80, 'mel_fmin': 0.0, 'mel_fmax': None, 'add_blank': True, 'n_speakers': 0, 'cleaned_text': True}, 'model': {'ms_istft_vits': False, 'mb_istft_vits': True, 'istft_vits': False, 'subbands': 4, 'gen_istft_n_fft': 16, 'gen_istft_hop_size': 4, 'inter_channels': 192, 'hidden_channels': 192, 'filter_channels': 768, 'n_heads': 2, 'n_layers': 6, 'kernel_size': 3, 'p_dropout': 0.1, 'resblock': '1', 'resblock_kernel_sizes': [3, 7, 11], 'resblock_dilation_sizes': [[1, 3, 5], [1, 3, 5], [1, 3, 5]], 'upsample_rates': [4, 4], 'upsample_initial_channel': 512, 'upsample_kernel_sizes': [16, 16], 'n_layers_q': 3, 'use_spectral_norm': False, 'use_sdp': False}, 'model_dir': './logs/ljs_mb_istft_vits'}
2023-02-26 06:50:56.900862: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/tensorboard/compat/init.py", line 47, in tf
from tensorboard.compat import notf
ImportError: cannot import name 'notf' from 'tensorboard.compat' (/usr/local/lib/python3.8/dist-packages/tensorboard/compat/init.py)
During handling of the above exception, another exception occurred:
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
Mutli-band iSTFT VITS
Traceback (most recent call last):
File "train_latest.py", line 312, in
main()
File "train_latest.py", line 53, in main
mp.spawn(run, nprocs=n_gpus, args=(n_gpus, hps,))
File "/usr/local/lib/python3.8/dist-packages/torch/multiprocessing/spawn.py", line 200, in spawn
return start_processes(fn, args, nprocs, join, daemon, start_method='spawn')
File "/usr/local/lib/python3.8/dist-packages/torch/multiprocessing/spawn.py", line 158, in start_processes
while not context.join():
File "/usr/local/lib/python3.8/dist-packages/torch/multiprocessing/spawn.py", line 119, in join
raise Exception(msg)
Exception:
-- Process 0 terminated with the following error:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/torch/multiprocessing/spawn.py", line 20, in _wrap
fn(i, *args)
File "/content/drive/MyDrive/MB-iSTFT-VITS/train_latest.py", line 120, in run
train_and_evaluate(rank, epoch, hps, [net_g, net_d], [optim_g, optim_d], [scheduler_g, scheduler_d], scaler, [train_loader, eval_loader], logger, [writer, writer_eval])
File "/content/drive/MyDrive/MB-iSTFT-VITS/train_latest.py", line 148, in train_and_evaluate
(z, z_p, m_p, logs_p, m_q, logs_q) = net_g(x, x_lengths, spec, spec_lengths)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/parallel/distributed.py", line 511, in forward
output = self.module(*inputs[0], **kwargs[0])
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/content/drive/MyDrive/MB-iSTFT-VITS/models.py", line 692, in forward
o, o_mb = self.dec(z_slice, g=g)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/content/drive/MyDrive/MB-iSTFT-VITS/models.py", line 369, in forward
y_mb_hat = stft.inverse(torch.reshape(spec, (spec.shape[0]*self.subbands, self.gen_istft_n_fft // 2 + 1, spec.shape[-1])), torch.reshape(phase, (phase.shape[0]*self.subbands, self.gen_istft_n_fft // 2 + 1, phase.shape[-1])))
File "/content/drive/MyDrive/MB-iSTFT-VITS/stft.py", line 199, in inverse
magnitude * torch.exp(phase * 1j),
RuntimeError: "exp_cuda" not implemented for 'ComplexFloat'

Hi! @kdrkdrkdr
Thank you for the question.
I think this problem may be caused by pytorch version.
Please try upgrading the torch version (e.g., pip install torch==1.12.0).
Probably, this issue helps you.

Solved! Thanks!


Get a reference from PyRef with 'p lifetime

Currently the implementation of Deref for PyRef<'p, T> will produce a reference that live as long as the PyRef instance. However, the reference to the underlying type instance should be available as long as the GIL is hold (if I understand it correctly). Currently it's impossible to obtain a &'p T reference from an PyRef<'p, T> instance.
I encounter this problem because I want to get and store (temporarily) a reference to a custom pyclass from &PyAny. The only way I found is to convert &PyAny to PyRef<MyClass> first, and then get the reference &MyClass from PyRef<MyClass>. The problem is that the reference &MyClass cannot live longer than PyRef<MyClass> currently, which basically means I have to store PyRef<MyClass> instead? (Although there might be other ways to obtain the reference to the Rust type, I still think it make sense to add this capability to PyRef and PyRefMut).
I create a solution here, which adds a method to PyRef that returns &'p T. I'm not sure if this is a reasonable change, but it seems to solve the problem.

I found the issue in this change, the PyCell borrow checker will not work correctly in this way. So maybe the solution is still to store the PyRef instance.

If your class is #[pyclass(frozen)] and Sync then it should be safe to convert &PyAny to &PyCell<T> and then to &T using PyCell::get.
(I think will also work the same with &Bound<PyAny> -> &Bound<T> -> &T with Bound::get, but that's not implemented yet.)


C++: Hide that IR DataFlow::Node is Instruction

@rdmarsh2 and @dave-bartolomeo, we've talked about making this change a couple of times. Here's what it would look like. What do you think?

Having DataFlow::Node be a subclass of Instruction is extremely convenient, and in an ideal world we could keep that property without sacrificing analysis quality. So far, everything that we want to be a DataFlow::Node, we've also wanted to be an Instruction for the sake of non-dataflow IR queries, and that may continue to be the case. On the other hand, the worst case scenario is that we keep the current behavior for a year, lots of external queries take dependencies on it, and then we find a strong reason to change to a separate IPA type, and have to either break the interface or ignore some major analysis improvement we could make.

Our conclusion at this morning's meeting was that we will probably want DataFlow::Node to be an IPA type including Operand at some point. I'll go ahead with the full review.


Google Couldn't sign you in Yakyak

The project run correctly but when i tried to sign in show this problem:

You are trying to sign in from a browser or app that doesn't allow us to keep your account secure.
Try using a different browser.

https://support.google.com/accounts/answer/6010255?hl=en
You'll want to enable less secure apps logging in. It'll work just fine then.

Is it possible Google changed something recently?  Even when enabling less secure apps, it's not working.

Been reading around the internet, and apparently this is a recent change that Google has implemented to block embedded browsers:
https://security.googleblog.com/2019/04/better-protection-against-man-in-middle.html

Any work around for this yet?

https://support.google.com/accounts/answer/6010255?hl=en
You'll want to enable less secure apps logging in. It'll work just fine then.

This doesn't work if your account has 2-Step Verification:

This setting is not available for accounts with 2-Step Verification enabled. Such accounts require an application-specific password for less secure apps access. Learn More

#1087 (comment)

https://support.google.com/accounts/answer/6010255?hl=en
You'll want to enable less secure apps logging in. It'll work just fine then.

This doesn't work if your account has 2-Step Verification:

This setting is not available for accounts with 2-Step Verification enabled. Such accounts require an application-specific password for less secure apps access. Learn More

I have enabled less secure apps and do not have 2FA, and it does not work just fine.

I have hit the same problem, anyone who resolved this issue?

yMine worked after getting the above message. I just closed and reopened Yakyak. But in case it still doesn't work for you, go to accounts.google.com and create an App password. Save it in your password safe of choice, I don't think you can show that password again. It would need to be regenerated if you lose that password.

App password didn't work for me, either. :(

Ditto. I actually tried an app password before commenting and got the same message. I will try a few more things today.

Anyone who resolved this?

Anyone able to find a workaround?

I'm experiencing the same issue. Linux Mint 19.2
I've followed all the steps in previous posts and have not had any luck.

Experiencing this issue as well, App Passwords, Allowing Less Secure Apps, etc. did not help.

Does YakYak use OAuth 2? I'm wondering if this is the issue.

If you update the user agent it works again.  Google Music Desktop Player also ran into this

If you update the user agent it works again. Google Music Desktop Player also ran into this

Is that a coding thing, or can I do that somehow as an end user?

I may have also deleted the cookies.json file in AppData like #831

Has anyone had any luck logging in? I tried clearing my cookies.json. I am not sure how to update the user agent like @Stoom suggested...
Thanks!

Wicked hack, but it did work for me.
Replace the /Applications/YakYak.app/Contents/Resources/app/login.js file with the contents found here https://pastebin.com/raw/xk0XHpHr
All it does is add a options object with the hacked user agent to the mainWindow.loadURL call.

@Jhall1990 this is dumb, but could you post that into the ticket or into a github gist? My corporate network blocks pastebin. -_-

@ryantiger658 Haha no problem
Try this: https://gist.githubusercontent.com/Jhall1990/74b58bc7b81e702547c8fd40e021f52c/raw/ef2e5cd006aeab5cfdfdcbd821550eddbe71b5cf/login.js

Works for me on Ubuntu 18.04

Works (Arch and Windows 10)!

Wicked hack, but it did work for me.
Replace the /Applications/YakYak.app/Contents/Resources/app/login.js (mac location, probably somewhere in appdata on windows, unsure about linux) file with the contents found here https://pastebin.com/raw/xk0XHpHr
All it does is add an options object with the hacked user agent to the mainWindow.loadURL call.

Success! Thank you!

Wicked hack, but it did work for me.
Replace the /Applications/YakYak.app/Contents/Resources/app/login.js (mac location, probably somewhere in appdata on windows, unsure about linux) file with the contents found here https://pastebin.com/raw/xk0XHpHr
All it does is add an options object with the hacked user agent to the mainWindow.loadURL call.

Works for me on Linux Mint 19.2. Thanks!
Login.js is located at /opt/yakyak/resources/app on Mint just in case anyone were to wonder.

Is it insane to send up a PR for this? I am sure others will be thankful.

Works on Linux Manjaro (Arch).
Not sure how the maintainers feel about it but it would be nice if someone created a PR for this fix.

I assume there is a proper way to fix this (I'm not sure what that might be however) with that in mind I won't be creating a PR for it, but someone else is welcome to if they want.

Wicked hack, but it did work for me.
Replace the /Applications/YakYak.app/Contents/Resources/app/login.js (mac location, probably somewhere in appdata on windows, unsure about linux) file with the contents found here https://pastebin.com/raw/xk0XHpHr
All it does is add an options object with the hacked user agent to the mainWindow.loadURL call.

I tried replacing login.js with yours but now I get this error: "The browser you're using doesn't support JavaScript, or has JavaScript turned off"
I'm on  macos catalina.

Works for me on Ubuntu 18.04

Where i put the file on ubuntu? .config/yakyak/ dosnt have Resources directory?

Works for me on Ubuntu 18.04

Where i put the file on ubuntu? .config/yakyak/ dosnt have Resources directory?

@survivor303 , should be in the same place as Linux Mint.
/opt/yakyak/resources/app
Works here on Mint 19.3. Thanks for the work around.

I just had a rarely used computer ask me to sign in for YakYak and it
worked. Since i have 2factor auth set up, I for sure do NOT have "less
secure app sign-in" enabled. The two features are not compatible.
On Thu, Dec 12, 2019, 11:41 AM Ryan Bolyard<EMAIL_ADDRESS>wrote:

Has anyone had any luck logging in? I tried clearing my cookies.json. I am
not sure how to update the user agent like @Stoom
https://github.com/Stoom suggested...
Thanks!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/yakyak/yakyak/issues/1087?email_source=notifications&email_token=AAXQVE3QPWD22VOGPI2AQRLQYJSS5A5CNFSM4JSPCUW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGXIODA#issuecomment-565085964,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAXQVE5IYTMXBDY6O6QRNYDQYJSS5ANCNFSM4JSPCUWQ
.

Thank you @Jhall1990 for the fix, I've created PR #1092 with your idea. You're awesome!
Maintainers @averissimo or @maxkueng, thank you so much for Yakyak and all your hard work! Please accept the PR or let me know what edits are required.


Bug: Event

Bug Type
Handler
Bugged Function
module.exports = {
name: "İsim Log",
type: "memberUpdate",
channel: "1242748212209647716",
code:
`
$title[Kullanıcı İsmi Değiştirildi]
$color[Orange]
$footer[$formatDate[$datestamp;DD/MM/YYYY - $hour:$minute]]
$timezone[Turkey]

$addField[Değiştirilme Zamanı;<t:$truncate[$divide[$datestamp;1000]]:R>]
$addField[Eski Nick;$oldMember[nick]]
$addField[Yeni Nick;$newMember[nick]]
$addField[Kullanıcı;$username[$get[id]] | <@$get[id]>]

$let[id;$newMember[id]]
`
}

Version of aoi.js
v6.8.0
Version of Node.js
v21.4.0 (Current)
Excepted Output
Old Name - New Name log

Relevant log output
No response
Code of Conduct

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

i still don't know what the issue actually is @GBlade0607  can you elaborate ?

also there is $onlyif to restrict the cmd trigger to only happen when there is a nickname change , also try adding that

stale, closing


onAfterAction not set

First of all, thanks for the great work.
This:
"public_zone": {
	"navbar_class": "navbar-inverse navbar-fixed-top",
	"pages": [
		{
			"name": "login",
			"template": "login",
			"type": "page",
			"controller_after_action": "console.log(\"Login\");"
		},...

does not translate into
onAfterAction: function() {
    console.log("Login");
}

in the controllers fo both Public and Private pages. This is particularly annoying in the case of the Logout controller, as I want to redirect to the landing page upon logout.
Can't submit a pull request without the code! I can't wait for it to be open sourced =)

@belmarca Hi, I just fixed it and will be available in v0.9.52
Until then, quick fix is to add /*AFTER_FUNCTION*/ into .meteor-kitchen/templates/code/controller_client.js as shown in screenshot.

@perak Thanks for the fix. I can't edit these files though, I don't have access to the CLI.
Are you talking about this repo?

@belmarca No, I am talking about "templates" directory where you installed meteor-kitchen. In linux/macos that's ~/.meteor-kitchen/templates/..., in windows that's dire where you extracted it.

Petar,
As I wrote my comment I fired up terminal and looked for ~/.meteor-kitchen, where I found all of your tempaltes. That's when I deleted my comment. Sorry for the confusion!
Petar Korponaić wrote:

@belmarca https://github.com/belmarca No, I am talking about
"templates" directory where you installed meteor-kitchen. In
linux/macos that's |~/.meteor-kitchen/templates/...|, in windows
that's dire where you extracted it.
—
Reply to this email directly or view it on GitHub
https://github.com/perak/kitchen-site/issues/142#issuecomment-144816931.

@belmarca OK, I replied from e-mail inbox, so I didn't saw you deleted comment. :D :+1:

v0.9.52 is now up and running.


new myVariable.constructor() doesn't compile

class Test {
	num: number;

	constructor(num: number) {
		this.num = num;
	}
}

var t = new Test(1);
var u = new t.constructor(2);

This code throws a compile error, but appears to produce valid code when entered into http://www.typescriptlang.org/Playground.
EDIT:
This code correctly compiles after changing the last line to:
var u = new (<{ new(...args: Array<any>): Test }>t.constructor)(2);

The compiler will still emit code in the presence of errors unless given the --noEmitOnError flag.

This code should be supported on all browsers, given https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/constructor.
I appreciate the --noEmitOnError flag when doing development, but this doesn't help when our CI blocks deploy when there's a compile error, and there's no option to disable errors on lines (a la tslint).
I strongly object to the By Design tag here, since a better design would be to avoid triggering a compile error at all.

I apologize, I misread the original issue. I thought you were suggesting that the code should not have been emitted at all.

The constructor property will only be correct if the constructor function chooses to initialize it. Although TypeScript generates code to do so, it is not a requirement and you can't generally rely on it for an arbitrary constructor function (e.g. one implemented in a JavaScript framework). For that reason TypeScript doesn't strongly type the constructor property.

The constructor property will only be correct if the constructor function chooses to initialize it

I can't find any evidence supporting this. All runtimes seem to hook this up automatically.

This code should be supported on all browsers, given https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/constructor.

I can't find any evidence supporting this, either. The ES spec doesn't define that this property is present as a result of object creation.
http://www.ecma-international.org/ecma-262/6.0/#sec-evaluatenew
http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-construct-argumentslist-newtarget
http://www.ecma-international.org/ecma-262/6.0/#sec-objectcreate

MDN lists the relevant specs at the bottom of the page - this is the most relevant:
http://www.ecma-international.org/ecma-262/6.0/#sec-object.prototype.constructor

@jiaweihli but all that says is that the actual field Object.prototype.constructor points to Object. It doesn't imply anything about whether or not new'd values automatically get a constructor property.

@RyanCavanaugh I believe the spec is a bit unclear here - it says the field Object.prototype.constructor points to %Object%, which I think refers to the constructor, since it's subclassable.
This has been the stance of MDN since the earliest version of that page, so that's most likely their interpretation of the ES1 spec.  The relevant section begins on page 73 here.
I don't necessarily have the knowledge needed to resolve this ambiguity, but I think it's worth looking into this since a lot of freely available documentation lists the behavior I mentioned above.  Anecdotally, the code has worked for me in several different environments, and is also supported by all major browsers.

@jiaweihli appears to be right. Given the following in Chrome 44:
class A {
    constructor () {
        console.log('I was called');
    }
}

let a = new A();
let aa = new a.constructor();

a.constructor references A and works as expected.

I get that this works in many runtimes, but I'm still not seeing it being spec'd behavior. Why does the fact that Object.prototype.constructor === Object mean that a.constructor === A ?

Correct me if I am wrong, but doesn't %Object% refer to the intrinsic value of the current realm, ergo the current execution context, therefore a.constructor === A:

<IP_ADDRESS> Object.prototype.constructor
The initial value of Object.prototype.constructor is the intrinsic object %Object%.

And intrinsic objects are described as:

Within this specification a reference such as %name% means the intrinsic object, associated with the current Realm, corresponding to the name.

Pinging @bterlson for this one.

I think you can strongly type constructor for ES6 classes. The constructor property is added to the C.prototype in ClassDefinitionEvaluation step 18. It is configurable, though, so users could presumably delete it (GeneratorFunction instances, notably, do not have a constructor property on their [[prototype]] for reasons users might also find compelling - not leaking a reference to the constructor when vending instances IIUC).
People above are also correct that Object.prototype has a constructor property that points to Object (and thus any object with Object.prototype in its prototype chain and no other constructor properties will have a .constructor property pointing to Object). But I don't think this has any bearing on whether you can strongly type the .constructor property of class instances.

Duplicate of #3841

Reopening since #3841 is for the static side whereas this is for the instance side

Let's track at #4586


the pixi files under /bin/ are different then the ones hosted from cdn

this was a crazy debugging ride, my thing in production uses pixi 3.10 from the cdn,
(https://cdnjs.cloudflare.com/ajax/libs/pixi.js/3.0.10/pixi.js)
locally I am using the pixi 3.10 from this bin folder.
(https://raw.githubusercontent.com/pixijs/pixi.js/master/bin/pixi.js)
both are version 3.10
however:

could those at the cdn be similar to the ones here?

oh and btw this is also a bit weird

the latest version of 3.10 is found at cdn under pixi.js/3.0.11/pixi.js

Hi there! this should be sorted now that we have kicked out v4 👍


Pagination below 0

If you set the maxPages parameter of the pagination widget to 5, you start getting negative pages when you click on 5.
(By the way, I know I should probably open another issue for this, but I thought this was a way to set the padding of the pagination which is why I tried such a low value. Could we also expose the padding as an option?)

What do you mean by "padding of the pagination"?

The padding being the max number of pages to the right and the left of the current one.

Ah ok, I see that this option may actually be more useful than the maxPages (because we could guess the max pages by reading the helper configuration)

Padding is cool, maxpages is to limit the number of pages even if there are more results

Actually padding is already available as an option @Jerskouille: https://github.com/algolia/instantsearch.js#pagination

You can safely rely on the readme for all things documentation on widgets, we keep it updated.

Oh you're right, I relied on the example/app.js more than on the README, my bad.


Measure-DbaBackupThroughput is inaccurate

Is this:
Just place "x" to indicate selection (e.g. "[x]")

[ ] feature
[x] bug:

Details
It's hard for me to fix this one because

I'm bad at math
All of the backups in my lab are so fast, I assumed the results were correct

Trying this in a prod environment showed that it just..doesn't work. Can someone who knows math and has fat backups please fix?

checking....

😻

yup. TotalsizeMB is not a property anymore of get-dbadatabasehistory. This cmdlet is in need of some love because get-dbabackuphistory slightly changed

ohhh so it did used to work! man, we need tests. Once it's fixed, I'll add a lil test to appveyor to ensure that stays right.


Expand on the failure step text a bit

fix https://github.com/microsoft/pxt-microbit/issues/5102
expanded on the text a bit:

open to any suggestions if it's still not clear; would prefer to avoid making it any longer / adding pictures if possible as kids in the user testing were very much distracted on this step when there were images /  didn't read the lengthy spots of text.

Okay, cleaned up a bit:


When loading a gist, do not show "mandelbrot.f90"

The name of the file should not be "mandelbrot.f90" when loading from gist.

In https://github.com/lfortran/lcompilers_frontend/pull/105,
By default whether loading from gist or not, we just name it main.f90. I think this is helpful as one can simply start editing in it and the name main.f90 seems to be in sync.
If gist or code are not provided, then the main.f90 contains mandelbrot source code.

Yes, that's fine. Thanks!


[sailfish-secrets] Initialize passwordagent once accepted. Contributes to JB#36797

We build both a "normal" and a "test" version of various plugins.
Upon daemon startup, we load all plugins, and then unload any which
don't match the current mode (autotest = true/false).
This has the unfortunate side effect that the test version of the
passwordagent plugin will overwrite the socket file originally
created by the normal version of the password agent plugin, before
being unloaded.
This commit ensures that we allow plugins to perform initialization
in a specific initialize() method which is only called once the
plugin has been "accepted" for use by the daemon according to the
current mode.
Contributes to JB#36797

LGTM


Clear AJAX queue if new request is made.

Currently, if you alternnatively click on two menu items, you end up seeing the pages lternatively appear and disappear long after you're done clicking. To fix this:

Stop the exisiting AJAX query if the requeted URL is different.
Ensure it doesn't break the existing lack of duplicate requests on same URL.

We also have to ensure that the settimeout is properly cleared on success/failure.

Hi, can I work on this?

Hey! Thanks for your interest in this, and sure!
The relevant function is: https://github.com/crux-bphc/fest-manager/blob/pearl/public/static/scripts/index.js#L41 which is called as manager.route("/somewhere"); in the codebase.


Could not compute path to class / interface definition

Seems that classes and interface definitions are expected to be in single source files named by id. While this is good practice - this is not always the case, could this logic be expanded to link to the parsed source file - irrespective of whether it matches the id ?
https://github.com/demike/TsUML2/blob/master/src/core/model.ts#L65
export class NamedType {
    public name: string;
    public id: string;

    constructor(options: {name: string, id: string}) {
        this.name = options.name;
        this.id = options.id;
    }

    getRelativeFilePath(fromFile: string) {
        const rx = /"(.*)"/;
        const result = rx.exec(this.id);
        if(!result) {
            console.log(chalk.redBright("Could not compute path to class / interface definition: " + this.id));
            return "";
        }
        fromFile = resolve(dirname(fromFile));
        const toFile = resolve(result[1] + '.ts');

        let rel = relative(fromFile,toFile);

        return rel;

    }
}

Hm Interfaces / Classes can be in atbiteaty named files not linked to the class name itself
Working Example:
https://github.com/demike/TsUML2/blob/28c56177bf692fd5baf1c56970dec2b087fd62ca/src/demo/interfaces.ts
The error you see is related to the link creation for the svg elements. Is the target svg outside of the project tree?
Because this would result in an error when creating a relative path.
This festure is ment for documentation purpose where the resulting svg is part of your docs (inside the project/repo)

@jcurtis-cc can you post the full error string? So that I can see the id of the class/interface that produces the error?

In my case the problem was when I use alias (as) to resolve name conflict, besides of that I got "out.svg" on my root folder.

Ok I can check the 'as' problem but I am not shure about the out.svg on root folder problem

@demike Hello, I am sorry about writng here, but is there any way to chat you privately (some questions)? It is related with node-opcua, websocket support, and your PR.

In my case the problem was when I use alias (as) to resolve name conflict, besides of that I got "out.svg" on my root folder.

@lesimoes where did you use the alias. For a base class
class SomeClass extends Alias {}

or
class SomeClass implements Alias {}

or as an attribute ( this should work tried it in the examples):
class SomeClass {
   a: Alias
}

or ...

in my case there were only enums without export directly but using export default with a different name. Can i help somehow?

@TheoOliveira it would be great if you could provide an example that reproduces this behaviour. Debugging the problem should be easy then.

I can confirm this occurs when not exporting an interface within a file that consumes it. Exporting that interface, even if I don't consume it anywhere else, "fixes" the issue. Setting typeLinks to false also removes the error.

@circlenaut thanks for explaining the error. I think I have fixed your specific issue in version 0.12.1.
Would be great if you could try the new version.
@TheoOliveira does version 0.12.1 improve / fix your scenario?


chore: redirect uris

revert to previous uri regex test

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 71.37%. Comparing base (ca0c745) to head (3232369).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1208      +/-   ##
==========================================
- Coverage   71.38%   71.37%   -0.02%
==========================================
  Files         302      302
  Lines       10421    10423       +2
  Branches     2426     2427       +1
==========================================
  Hits         7439     7439
- Misses       2982     2984       +2

Flag
Coverage Δ

unitests
71.37% <100.00%> (-0.02%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Lookup: JdbcCacheGenerator fails if keyColumn is reserved keyword

Hi,
I am using following config to create Lookup.
{
  "__default": {
    "job_state": {
      "version": "v0",
      "lookupExtractorFactory": {
        "type": "cachedNamespace",
        "extractionNamespace": {
          "type": "jdbc",
          "namespace": "queue_status_lookup",
          "connectorConfig": {
            "connectURI": "jdbc:sqlserver://myserver:1433;Database=mydb;Trusted_Connection=True",
            "user": "myuser",
            "password": "mypasswd"
          },
          "table": "Queues",
          "keyColumn": "Key",
          "valueColumn": "Status",
          "tsColumn": "EndTime",
          "pollPeriod": 600000
        },
        "firstCacheTimeout": 120000,
        "injective": true
      }
    }
  }
}

But getting following error in historical:
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'Key'.
As Key is reserved keyword in SQL.
I tried using [Key] which work while executing the query but as we are using the same while extracting the results, the code will look for [Key] in the result whereas result will contain only Key. So, we will get following error:
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The column name [Key] is not valid.
I think, this will be solved if we take keyColumnAlias and valueColumnAlias in the input.
I will be able to submit patch for the same. Just wanted to check that there is no solution to this problem (Generally, we avoid naming table fields with keywords but this is a third party table and don't have any control over it).

Hello, same issue for MySQL.
The generated SQL query looks like:
SELECT myKeyColumn AS key, myValueColumn AS value FROM myTable

this generates the following error:
SQL Error [1064] [42000]: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key, myValueColumn AS value FROM myTable'

It should encapsulate aliases with backquote:
SELECT myKeyColumn AS `key`, myValueColumn AS `value` FROM myTable

Is there a way to achive protected keyword encapsulation/protection, or any alias configuration?


route example for Edge Module was incomplete - fixed it

The route example mentioned has incomplete mention of module output path. It was mentioned as FROM /messages/modules/publisher. This needs to be changed to FROM /messages/modules/publisherFROM /messages/modules/publisher/* to indicate all outputs from the opc publisher module

@alkreddy '/messages/modules/publisher' for the routing as mentioned in the documentation was tested, and works correctly. It was recommended by the Azure IoT Edge Engineering group.

No change necessary. Was tested as documented and worked correctly


Tiled Glass doesn't have any recipe

There is nothing in JEI

JEI doesn't show stonecutting recipes yet #13
You can make tiled glass in the stonecutter.

Aw, I see


create timer

creating the countdown timer to start at 60 seconds. it'll start on the 'start game' on-click event

done


Manage empty layouts

We need to design an experience for managing empty layouts
Related to #224

Closing as obsolete since we never tackled it.


Fix typos: BasicBlock.as_schedule_seconds

The documentation for BasicBlock#as_schedule_seconds is incorrect; the method has only one non-receiver argument.

Closed by https://github.com/rigetti/quil-rs/pull/364


Rule proposal: warn when using constructor for hashtables

Creating a hashtable via the constructor without specifying an IEqualityComparer results in using the default IEqualityComparer (which uses Object::Equals), which means that strings are compared in a case-sensitive way. This may be confusing and unexpected to PowerShell scripters who are accustomed to case-insensitive hashtables.

Basically, I think you should warn people if you see:
New-Object System.Collections.Hashtable
[hashtable]::new()

Or any variation on those: (System.Collections.Hashtable = Collections.Hashtable = Hashtable) with or without parameters (unless the parameters include a custom IEqualityComparer).
The warning should recommend creating hashtables with the literal initializer @{} for speed (over New-Object) and case-sensitivity reasons as cited above.

As an example, this is the case currently in the PowerShellGet module where Find-Module returns a Microsoft.PowerShell.Commands.PSRepositoryItemInfo object that has a case-sensitive hashtable on it's AdditionalMetadata property (although it has other hashtable properties which are not case-sensitive).


Allow supplying custom threadExecutor for Options

There is currently no way to change NATS thread names or join NATS threads in single thread group.
This is useful because currently NATS threads dont have "nats" in thread name and connectionName-003:20 as hardly a meaningful name.
This PR adds Options.threadFactory() that can override the use of DefaultThreadFactory.
I removed some stray whitespace to be closer to codeStyle and questionable comparison(not .equals?)
(this.connectionName != null && this.connectionName != "")
A test is included.

The checks seems to fail for me missing some keys. I dont know what are these and there is no CONTRIBUTING.md to inquire:
The command "openssl aes-256-cbc -K $encrypted_f07928735f08_key -iv $encrypted_f07928735f08_iv -in .travis/nats.travis.gpg.enc -out .travis/nats.travis.gpg -d" failed and exited with 1 during .

Please ignore the missing checks for now.
I have a method to set the executor executor() in the options, you can use this to set up a thread factory. The current default is:
this.executor = new ThreadPoolExecutor(0, Integer.MAX_VALUE,
                                                        500L, TimeUnit.MILLISECONDS,
                                                        new SynchronousQueue<Runnable>(),
                                                        new DefaultThreadFactory(threadPrefix));

but you could do whatever. I do use a short timeout to prevent long delays on shutdown.


loading pretrained model

Thank you for these awesome resources!
I downloaded the 'ResNet-50 | Global Pooling' .pth file from your model zoo to my_path.
I assume I could load the model like this:
model = ???
model.load_state_dict(torch.load(my_path, map_location='cpu')
However I do not know how to initialize the ResNet model structure (see the "???").
I failed with using:
import torchvision.models as models
model = models.resnet50(pretrained=False)
Could you specify how to load the model? That would help me a lot.

When testing, you can load the model like this:
python tools/test_predictor.py
--config configs/attribute_predict/roi_predictor_vgg_attr.py
--checkpoint [Pretrained model here]
For initialization,
python tools/train_predictor.py
--config [your config file]
--resume_from [Pretrained model here]

Thank you for your reply. I would like to load the model without having to rely on nested mmfashion helper functions (they are difficult to follow/debug for pytorch beginners). Instead I tried the code below. It seems to work, but the model always predicts very extreme numbers and after applying softmax the top5 label predictions are always the same (regardless of the input image). Do you know what is going on? Am I maybe using the wrong network structure?
#CODE
import numpy as np
import torch
import torchvision
path = MY_PATH
#i found this network structure somewhere but cannot find it again in the mmfashion files
class ResNet(torchvision.models.resnet.ResNet):
def init(self, *args, **kwargs):
super(ResNet, self).init(*args, **kwargs)
def forward(self, x):
    x = self.conv1(x)
    x = self.bn1(x)
    x = self.relu(x)
    x = self.maxpool(x)

    x = self.layer1(x)
    x = self.layer2(x)
    x = self.layer3(x)
    x = self.layer4(x)

    x = self.avgpool(x)
    x = x.view(int(x.size(0)), -1)  # << This fix again
    x = self.fc(x)
    return x

model = ResNet(torchvision.models.resnet.Bottleneck, [3, 4, 6, 3])
model.load_state_dict(torch.load(path, map_location='cpu')['state_dict'], strict = False)
model.eval()
#load my own fashion images
inp = np.load('preprocessed_data.npy')
#change to channels first
inp = np.moveaxis(inp, 3,1)
#convert to double to prevent errors
inp = torch.from_numpy(inp).type('torch.DoubleTensor')
model = model.double()
#predict example image
pred = model(inp[108].unsqueeze(0))
#apply softmax as done in mmfashion issue
probs = torch.nn.functional.softmax(pred[0], dim=0)
top5 = torch.topk(probs, 5)
attr_cloth_file = open('C:/Users/rosenbus/surfdrive/pythanalytics/fashion labeling/list_attr_cloth.txt').readlines()
attr_idx2name = {}
for i, line in enumerate(attr_cloth_file[2:]):
attr_idx2name[i] = line.strip('\n').split()[0]
for (i, v) in zip(top5[1], top5[0]):
print(f"Label: {attr_idx2name[i.item()]}, Probs: {v.item()}.")
#output:
#Label: monroe, Probs: 1.0.
#Label: regime, Probs: 1.624687763424871e-92.
#Label: leopard, Probs: 2.7042922381237e-156.
#Label: hem, Probs: 3.910733863565495e-183.
#Label: pleated, Probs: 4.5121563790374856e-206.


this._rootNode ends up being null, causing cannot read property 'contains' of null errors

downshift version: ^1.10.1
node version: 8.9.*
npm (or yarn) version: 5.7.1

What you did:
Not sure why this happens, but sometimes under heavy load (for example on page load on a rather data heavy application) this._rootNode ends up being null which fails on the mouseUp handler
What happened:
Uncaught TypeError: Cannot read property 'contains' of null
    at onMouseUp (downshift.esm.js:780)
    at wrapped (build.umd.js:1306)
onMouseUp	@	downshift.esm.js:780
wrapped	@	build.umd.js:1306

Suggested solution:
I guess adding a null check in the lines below would be enough:
https://github.com/paypal/downshift/blob/68499b42eff38474947e55e9ea636a340984608e/src/downshift.js#L838-L843
(event.target === this._rootNode || (this.rootNode && !this._rootNode.contains(event.target))

Not sure what the actual cause at this point is though 🤔

Weird. So the real problem is that this._rootNode could ever be null. Could you figure out why it's ever null?

At least I figured out what causes the error now, its not heavy load, it happens to me when I switch a (sub) route so that a certain DownshiftInput unmounts and then switch back so the route the error starts occurring.
I guess the issue is that the cleanup is not being called when it should, but I guess it could be an application error on my side too (the logic is rather complex there).

Interesting. Well, I'm pretty sure that there's something else going on here. It would help if you could reproduce the issue here: http://kcd.im/ds-example then we can see whether a change within downshift is necessary.

For sure! I'll see if I get down to the issue tomorrow!

This is getting super weird: the issue only occurs if the route with Downshift is mounted on first render, but does not occur if its not.
Tried to replicate the issue in here https://codesandbox.io/s/q9ynk5rj89  (with something close to my setup, with react router and styled-components` to no avail.

I think we can go ahead and do a null check. I'm fine with that :+1:

FWIW I just started to dig around the issue again to check if the null-check fixes the issue properly and while it fixes the issue (as in Downshift works after the error), the onMouseUp handler still stays alive and gets called with the null rootNode.
I wish I could replicate this on some easier setup to get to the root cause.

If you find anything concrete we can do please let me know. Thanks!


influx-cli is broken with latest changes

As of the InfluxDB 44d4346 change, this tool is now broken. Installing or trying to run the tool results in the following:
./influx-cli.go:51: undefined: client.ClientConfig
./influx-cli.go:57: undefined: client.Series
./influx-cli.go:176: undefined: client.Series
./influx-cli.go:262: undefined: client.ClientConfig
./influx-cli.go:273: multiple-value cl.Ping() in single-value context
./influx-cli.go:518: cl.DisableCompression undefined (type *client.Client has no field or method DisableCompression)
./influx-cli.go:548: cl.CreateClusterAdmin undefined (type *client.Client has no field or method CreateClusterAdmin)
./influx-cli.go:562: cl.UpdateClusterAdmin undefined (type *client.Client has no field or method UpdateClusterAdmin)
./influx-cli.go:574: cl.GetClusterAdminList undefined (type *client.Client has no field or method GetClusterAdminList)
./influx-cli.go:592: cl.GetDatabaseList undefined (type *client.Client has no field or method GetDatabaseList)
./influx-cli.go:592: too many errors

I was able to work around it by running the following at the command line:
cd $GOPATH/src/github.com/influxdb/influxdb
git checkout v0.8.8

Effectively this just changes the version of the InfluxDB library to v0.8.8. But a more permanent fix would be necessary.

+1

the fix is simple, we have to vendor in that library at the last good 0.8 version
i'm on holiday, but if anyone wants to submit a PR that uses godep or maybe https://github.com/mjibson/party and verify that it works, i'll merge it

This is still broken @Dieterbe. You back from vacation yet?

+1
andrew@andrew-office:~$ go get github.com/Dieterbe/influx-cli
# github.com/Dieterbe/influx-cli
go/src/github.com/Dieterbe/influx-cli/influx-cli.go:51: undefined: client.ClientConfig
go/src/github.com/Dieterbe/influx-cli/influx-cli.go:57: undefined: client.Series
go/src/github.com/Dieterbe/influx-cli/influx-cli.go:176: undefined: client.Series
go/src/github.com/Dieterbe/influx-cli/influx-cli.go:262: undefined: client.ClientConfig
go/src/github.com/Dieterbe/influx-cli/influx-cli.go:273: multiple-value cl.Ping() in single-value context
go/src/github.com/Dieterbe/influx-cli/influx-cli.go:518: cl.DisableCompression undefined (type *client.Client has no field or method DisableCompression)
go/src/github.com/Dieterbe/influx-cli/influx-cli.go:548: cl.CreateClusterAdmin undefined (type *client.Client has no field or method CreateClusterAdmin)
go/src/github.com/Dieterbe/influx-cli/influx-cli.go:562: cl.UpdateClusterAdmin undefined (type *client.Client has no field or method UpdateClusterAdmin)
go/src/github.com/Dieterbe/influx-cli/influx-cli.go:574: cl.GetClusterAdminList undefined (type *client.Client has no field or method GetClusterAdminList)
go/src/github.com/Dieterbe/influx-cli/influx-cli.go:592: cl.GetDatabaseList undefined (type *client.Client has no field or method GetDatabaseList)
go/src/github.com/Dieterbe/influx-cli/influx-cli.go:592: too many errors


新增对Telegram 自定义代理域名的设置

新增对Telegram 自定义代理域名的设置
Added support for custom Telegram proxy domain names

@C-Y-X I noticed you've updated the locales for non-English languages. These will be overwritten during the sync from our translation tool Crowdin. If you'd like to contribute your translations, please visit https://crowdin.com/project/gitea. Please revert the changes done on these files. :tea:

And don't update translations directly.


CLOUD-56738 ambari restart works again

@schfeca75 @keyki pls review

Refer to this link for build results (access rights to CI server needed):
http://ci.sequenceiq.com//job/cloudbreak-pull-request/2725/

Refer to this link for build results (access rights to CI server needed):
http://ci.sequenceiq.com//job/mock-integration-test/216/

Refer to this link for build results (access rights to CI server needed):
http://ci.sequenceiq.com//job/cloudbreak-pull-request/2726/

Refer to this link for build results (access rights to CI server needed):
http://ci.sequenceiq.com//job/mock-integration-test/217/

Refer to this link for build results (access rights to CI server needed):
http://ci.sequenceiq.com//job/cloudbreak-pull-request/2729/

Refer to this link for build results (access rights to CI server needed):
http://ci.sequenceiq.com//job/cloudbreak-pull-request/2730/

Refer to this link for build results (access rights to CI server needed):
http://ci.sequenceiq.com//job/mock-integration-test/220/

Refer to this link for build results (access rights to CI server needed):
http://ci.sequenceiq.com//job/mock-integration-test/221/


Fix sql projects not using OutputPath in sqlproj for publishing

This PR fixes #19918. The sql database projects extension would always look for the dacpac at the default location of .\bin\Debug when publishing, but there's an OutputPath property that can be specified in a .sqlproj, so the dacpac will be created at that location if it's provided.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

9 of 9 (100.0%)  changed or added relevant lines in 2 files are covered.
4 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.004%) to 42.242%

Files with Coverage Reduction
New Missed Lines
%

extensions/notebook/src/jupyter/serverInstance.ts
4
75.13%

Totals

Change from base Build<PHONE_NUMBER>:
-0.004%

Covered Lines:
28166

Relevant Lines:
62313

💛  - Coveralls

If user sets <Configuration>Release</Configuration>, it would build to ./bin/Release. Do we also have logic to handle that?

Nope - good catch, I'll add it!
I tried specifying <Configuration>Release</Configuration> in an SDK style project, but the dacpac still got built in ./bin/Debug. For the legacy style project, it got built in ./bin/Release as expected when this was added. Is this a bug for SDK-style projects?

Changes here look good. I think you can address the configuration issue in a separate PR if you like. I'm not sure how common of a scenario that is anyway.

opened #20027 to track adding support for this later


Add prod subgraph link whenever it's up

update with the correct link when prod subgraph is back:
https://github.com/yearn/yearn-devdocs/blob/master/docs/resources/links.md?plain=1#L41

https://github.com/yearn/yearn-devdocs/pull/281


[Ionic 4] Missing Methods on ion-content

Ionic 4
It seems that there are many missing methods on ion-content compared to previous versions - are these work in progress or has approach changed?
e.g
getContentDimensions() is missing.
Is there a new ionic 4 way of getting the dimensions?

why do you need getContentDimensions()?  in ionic 4 ion-content has been simplied and now the layout uses flex.

@manucorporat I also need getContentDimensions() to tie the dimensions of a descendant fixed component. How should we proceed in Ionic 4 ?

contentEl.offsetHeight
contentEl.offsetWidth

?
You can use slot="fixed" to place element that does not scroll with content

@manucorporat But then how to access the native element of a ionic component ? (There is no Ion base class anymore...)

@manucorporat Maybe I did not phrase my question correctly. So let me try again.
In v3, I was using content.getContentDimensions().contentHeight in order to compute the available height and tie some other elements on this height.
Now content.getScrollElement().clientHeight seems to be what I need but it does return undefined every time (and content.getScrollElement().scrollHeight returns NaN).
What am I supposed to use ? Thanks in advance for your help.

Hi! I'm also having the same issue.
If I do a console.debug of content.getScrollElement() I get:
ZoneAwarePromise {__zone_symbol__state: null, __zone_symbol__value: Array(0)}
__zone_symbol__state: true
__zone_symbol__value: div.inner-scroll.scroll-y
__proto__: Object

If I use:
this.content.getScrollElement().then((element: HTMLElement) => {
  // element...
});

It "works", but until I run ionic serve again (and thus the compiler run, and throws an error since HTMLElement is not a promise).
Anyone knows how to access to the equivalent nativeElement ?
Thanks!

Yep, observed the same as @enzonotario.

@ptitjes I'm following this tutorial: https://www.joshmorony.com/creating-a-custom-scroll-vanish-directive-with-ionic-web-components/ and, with some modifications, it works:
home.page.html
<ion-content #scrollArea> </ion-content>

home.page.ts
import {Component, OnInit, ViewChild} from '@angular/core';
import {Content} from "@ionic/angular";

@Component({
  selector: 'app-home',
  templateUrl: './home.page.html',
  styleUrls: ['./home.page.scss'],
})
export class HomePage implements OnInit {
  @ViewChild('scrollArea') content: Content;

  constructor() { }

  ngOnInit() {
    console.debug('content', this.content);

    let mutationObserver = new MutationObserver(() => {
      let scrollElement = this.content.nativeElement.getScrollElement();

      console.debug('scrollElement', scrollElement);
    });

    mutationObserver.observe(this.content.nativeElement.shadowRoot, {
      childList: true
    });
  }
}

@ganySA in that way, you can use scrollElement.clientHeight and such attributes...

@enzonotario Well using that, tsc says:
ERROR in src/app/toolkit/components/scroll-to-top.component.ts(76,43): error TS2339: Property 'nativeElement' does not exist on type 'Content'.

And my browser says:
ERROR TypeError: Cannot read property 'shadowRoot' of undefined

+1
Also this.content.ScrollToTop() method is not present in the latest Ionic 4, Not sure on how to make the page scrollToTop or scrollToBottom :(

@Chethannp, yes it is present since beta.3. Note that it is spelled scrollToTop with a small 's'.

@Chethannp, I did manually update the package.json file.

@Chethannp also the viewchild might not be correct
@ViewChild(Content, { read: Content }) private content: Content;

Issue 1:
Hey @peterpeterparker -
Its still the same, I am not getting any options relating to scroll.

and I am getting the below error for including Content in the imports.
ERROR Error: Uncaught (in promise): Error: Cannot find module 'tslib'
Error: Cannot find module 'tslib'
Issue 2:
Also any idea on how to access ion-scroll via shadow Dom? My App has drag and drop elements. So when the user starts dragging an item I want to disable or hide the overflow on the scroll content, The earlier version (Ionic 3) I was just adding a dynamic class to ion-content and then write a CSS like
ion-content.no-scroll .scroll-content{overflow:hidden;} but with this latest approach scroll-content is not there and ion-scroll inside shadow DOM not sure on how to catch hold of this :(
Fyi:

@manucorporat, @enzonotario I did dig the code a little. The implementation of the Angular proxy for getScrollElement() does indeed return a promise for an HTMLElement. (See https://github.com/ionic-team/ionic/blob/master/angular/src/directives/proxies.ts#L17-L29)
I did a PR (#15250) to change the signature of the getScrollElement() method in the core web component so that it returns a Promise, as are all Stencil @Method-annotated component methods.
With that PR, you would have to do
let scrollElement = await this.content.getScrollElement();

or depending on you tastes
this.content.getScrollElement().then(scrollElement => {
  // ...
});

@ViewChild(Content, { read: Content }) private content: Content;

const scrollElement = await this.content.getScrollElement();

should work.
@ptitjes i don't understand what fixes that PR, can you try the code adobe without your fix? it should just work.
All methods in angular now return a promise.

@manucorporat Absolutely, using await works. But as the signature in the interface doesn't return a Promise<HTMLElement> but a HTMLElement, a decent IDE (or ngc) will not accept that you use then() on it. And completion is not good either...

@manucorporat To be more precise, the Content interface (from @ionic/angular) extends the StencilComponents.IonContent interface (from @ionic/core) which itself defines the getScrollElement() method as:
'getScrollElement': () => HTMLElement;

Finally, the backing implementation in content.tsx defines the method as:
@Method() getScrollElement(): HTMLElement { }

My pull request makes those definitions to return a Promise<HTMLElement> instead, which is what proxyMethod(...) (generated by Stencil) seems to expect.

Until the API return type is fixed, here's what I did to work around the compile error: (this.content.getScrollElement() as any).then(el => this.scrollElement = el);
I'm using a view child for referencing this.content and then in my ngAfterViewInit() I am using this code to get a reference to the scroll element. This way I can use the scrollElement's scrollTop position in my scrollHandlers, I found no other way since the $event passed in the (ionScroll) handler does not have the scrollTop position anymore (its always set to 0 because the ion-content itself does not have a scrollTop, but instead the scroll element which is inside the shadow dom of ion-content is what has the scrollTop.

@daem0ndev Both the signature of getScrollElement() and the event details' scrollTop/scrollLeft are fixed in beta.5.

@ganySA, @manucorporat I think this issue can be closed.

Can you confirm that this actually works now in beta11 ?
I can't get my content attribute
@ViewChild(Content, { read: Content }) private content: Content;
const scrollElement = await this.content.getScrollElement(); // this.content is undefined

@olivier-po Your problem comes from your ViewChild() expression. It has to be defined in the component that contains the ion-content tag. Please read about ViewChild in the Angular documentation.

@olivier-po { read: Content } used to be needed for a ViewChild for one or two early betas but since a couple of releases it shouldn't be use anymore, try
@ViewChild(Content) private content: Content;

@peterpeterparker Out of curiosity, can you please tell me why the { read: Content } was necessary and since what change in Ionic it is now useless ?

@ptitjes see following https://github.com/ionic-team/ionic/issues/15046
according the comments in that issue read was needed but after an update in Stencil which was then included in Ionic a month ago this isn't needed anymore

@peterpeterparker Thanks !

I'm going to close this as from the comments the original issue seems to be resolved, please let me know if this is incorrect. Thanks!


Unexpected result when using DEFAULT during creating table

CrateDB version
CrateDB 5.8.0-SNAPSHOT built 7a1ca39
CrateDB setup information
Manual build following the instructions here: https://github.com/crate/crate/blob/master/devs/docs/basics.rst
Problem description
Consider the following test case. A discrepancy is observed when filtering results using a boolean comparison in a WHERE clause. The boolean condition (t1.c1 >= 1)=((t1.c1 = t1.c1)AND(t0.c1 <= t0.c1)) evaluates to TRUE when selected directly, but fails to return any rows when used in the WHERE clause.
Steps to Reproduce
DROP TABLE IF EXISTS t0;
DROP TABLE IF EXISTS t1;

CREATE TABLE  t0 (c1 INT NOT NULL DEFAULT 1);
CREATE TABLE  t1 (c1 INTEGER);
INSERT INTO t0(c1) VALUES (1);
INSERT INTO t1(c1) VALUES (2);
REFRESH TABLE t0;
REFRESH TABLE t1;

SELECT * FROM t0, t1; -- 1 2
SELECT (t1.c1 >= 1)=((t1.c1 = t1.c1)AND(t0.c1 <= t0.c1)) FROM t0, t1; -- TRUE
SELECT * FROM t0, t1 WHERE (t1.c1 >= 1)=((t1.c1 = t1.c1)AND(t0.c1 <= t0.c1));
-- Expected: 1 2
-- Actual: Empty table

if removing the DEFAULT, I will get
CREATE TABLE  t0 (c1 INT);
-- ...
SELECT * FROM t0, t1 WHERE (t1.c1 >= 1)=((t1.c1 = t1.c1)AND(t0.c1 <= t0.c1));
-- UnsupportedFeatureException[Can't handle Symbol [SimpleReference: c1]]

Not sure if it's expected.
Actual Result
Empty table
Expected Result
1 2

Thanks for reporting @suyZhong!
It's a regression introduced in 5.6.3.
Workaround for CrateDB>=5.6.3: disable hash join by SET enable_hashjoin = false.


convert to Tinyint

how can I convert data to a "tinyint" type column in table,
                    SurName = Convert.ToString(dr[1]), //-->this is ok
                    ReportTo = Convert.ToInt32(dr[6])      //-->this is ok
                    Gender = Convert.ToByte(dr[3]),      //--> this is not working. how can I convert.
                    MaritalStatus = (byte)(dr[4]),       //-->not worked. how can I convert.

MaritalStatus and Gender types are tinyint in database.

Gender = Convert.ToByte(dr[3]),   --> this is also not working.

MaritalStatus and Gender types are tinyint in database.

Solved it


frr rip/ospf router metric

I have multiple routers in parallel, but they don't all have the same performance. For example, I have one router that can do 300mbps over VPN, and a second that can do 1000mbps over VPN. I'm using a combination of RIP and OSPF to share routes between multiple locations over these VPN tunnels. The problem is that the backup VPN (the 300mbps) keeps taking over instead of having the faster primary VPN (the 1000mbps) acting as primary.
The only issue is that they're both reporting the exact same route metric, with no way to configure it currently.
And no, these routers are not handling "default router" traffic, only a few select private IP ranges between multiple co-locations, so any metric setting that applies to sharing just the "default router" I dont think would be appropriate for this.
http://docs.frrouting.org/en/latest/ripd.html#rip-metric-manipulation
http://docs.frrouting.org/en/latest/ospfd.html

Doesnt ospf cost fix this?

There is a cost for a default route, but this isn't a default route.
There is a cost for interfaces (separate from routes), but it doesn't appear to actually effect the route metric at all.

Can you post the config and sh ip stuff please? From your post it's not rellay clear which protocol runs over VPN? As ospd has a higher AD metric over RIP would not help.
If you can evaluate via CLI that a metric parameter fixes your issue I can add one

I'm use OSPF over ZeroTier, and this appears to be working fine, but I'm using RIP to distribute the OSPF information to a local router, and all metrics are showing up exactly the same in RIP regardless or router metric, OSPF metric, latency, number or hops, or anything else.
300mbps router:
`Building configuration...

Current configuration:
!
frr version 6.0.2
frr defaults traditional
hostname router-3.saturn
log syslog warnings
!
interface zte9mjkamp8ogi3
ip ospf cost 1
!
interface zte9mjkampfutdp
ip ospf cost 1
!
router rip
version 2
redistribute ospf
network <IP_ADDRESS>/24
network <IP_ADDRESS>/24
passive-interface igb3
passive-interface igb2
passive-interface igb0
passive-interface zte9mjkamp8ogi3
!
router ospf
passive-interface igb0
passive-interface igb2
passive-interface igb3
network <IP_ADDRESS>/22 area <IP_ADDRESS>
network <IP_ADDRESS>/22 area <IP_ADDRESS>
network <IP_ADDRESS>/24 area <IP_ADDRESS>
network <IP_ADDRESS>/24 area <IP_ADDRESS>
!
line vty
!
end`
I'm using a layer-3 switch which only supports RIP to receive the routes from the pair of OPNsense routers, but as mentioned, both OPNsense routers are showing the exact same metric over RIP to the layer-3 switch. The layer-3 switch is my default gateway for the LAN, and then things get routed out from there as needed.
OSPF does appear to be using the route metrics properly, where the 300mbps router is forwarding packets through the 1000mbps router before going out across the wire. But this still means the clients on the network are running through the slower 300mbps link.

This is what the layer-3 switch sees. <IP_ADDRESS>/24 is the local LAN. <IP_ADDRESS>/24 is directly attached to the two OPNsense boxes, this is my ZeroTier network. <IP_ADDRESS>/24 and <IP_ADDRESS>/24 are both far networks beyond ZeroTier (multiple hops away). However, all of these networks are showing up as the same distance over RIP sent from OPNsense/FRR.
<IP_ADDRESS> and <IP_ADDRESS> are both 300mbps routers (yes, there are actually two of these, not one), and they are the ones the layer-3 switch are preferring, just because they advertised first.

Trace route:
<IP_ADDRESS> (layer-3 switch)
<IP_ADDRESS> (300mbps OPNsense router)
<IP_ADDRESS> (1000mbps OPNsense router)
<IP_ADDRESS> (1000mbps OPNsense router in other co-location)
<IP_ADDRESS> (destination)
If I can get RIP to accurately report the cost of each of the local OPNsense routing paths, that should solve this, since after further investigation, it looks like OSPF is doing its proper job.

Just an FYI: this perfectly solved the issue. Routes are propagating correctly through OSPF>RIP now with proper metrics and router priority. Thanks!


SFTP commands replaced with SCP but don't support reusing session

It looks like version 3.0.0 retired all the SFTP commands, but did so in a way that makes them inefficient with auth.
Example, New-SCPItem needs credentials passed to each call.  This means that, unlike the previous SFTP commands, you can't create a session and reuse that.  If one wants to loop through a list of files for audit purposes, instead of uploading the folder they live in, it makes this process a bit inefficient on connections.  I don't see anywhere in the documentation that notes a way to get a 1:1 replacement of the SFTP file upload commands without handling auth within an upload loop.
Also, the cmdlets were removed, but the documentation for those cmdlets are still in the package.

I just did a clean install of version 3.0 and the SFTP command are there under PowerShell 5.1.  SCP was ob version 2.x it is another protocols since some system may not have SFTP. If you do a import-module posh-ssh with -verbose -force does it show the SFTP commands being loaded?

I ended up doing a clean uninstall and forced a reinstall of 2.3.0, which had me back up and running.  Server patching for August seemed to have broken something with the .NET library this module relies on.  I opted not to refactor my code to use New-ScpItem because of the way it requires auth on a per-command basis, vs. Set-SftpItem which could reuse an existing established session.  My process needs audit logging to cover each file upload, so I wanted to ensure that at least the session management stayed efficient, even if I do have to loop through each file.

A refactor was not needed because

SFTP cmdlets where not removed
SCP cmdlets did not replace it and they are not even knew.

Um, the change log says otherwise.  Also, when attempting to use a clean install of 3.0.0, it was saying the cmdlets my script was calling don't exist.
From https://github.com/darkoperator/Posh-SSH/blob/master/CHANGELOG.md
Set-SFTPFile and Set-SFTPFolder cmdlets removed (use Set-SCPItem instead).

use Set-SCPItem instead

read this carefully :)

A typo in the changelog the command is now set-sftpitem
Sent from my iPhone

On Sep 6, 2021, at 9:53 PM, Paul @.***> wrote:

Um, the change log says otherwise. Also, when attempting to use a clean install of 3.0.0, it was saying the cmdlets my script was calling don't exist.
From https://github.com/darkoperator/Posh-SSH/blob/master/CHANGELOG.md
Set-SFTPFile and Set-SFTPFolder cmdlets removed (use Set-SCPItem instead).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

OK, and I see that this command does take an existing Session object/ID, so that should cover my session efficiency concerns.

Reopen the issue if there are still problems, making the changes to the changelog


Psuedo-selector behavior differs when newlines present in selector in DOM

Bug: Psuedo-selector behavior differs when newlines present in selector in DOM
Important pieces:

pseudo-selector is required to exhibit behavior
newlines in selector (without commas) are required to exhibit behavior
styled-component references work cleanly, but were removed to keep the example concise. See proof at end. [1]
a Styled Component div that styles children is being used

Environment

npx envinfo --system --binaries --npmPackages styled-components,babel-plugin-styled-components --markdown --clipboard
root@fc813044d77f:/w/styled-components-bug# npx envinfo --system --binaries --npmPackages styled-components,babel-plugin-styled-components --markdown --clipboard
npx: installed 1 in 3.208s

*** Clipboard option removed - use clipboardy or clipboard-cli directly ***

## System:
 - OS: Linux 4.14 Debian GNU/Linux 9 (stretch) 9 (stretch)
 - CPU: (3) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
 - Memory: 1.19 GB / 7.79 GB
 - Container: Yes
 - Shell: 4.4.12 - /bin/bash
## Binaries:
 - Node: 11.14.0 - /usr/local/bin/node
 - Yarn: 1.15.2 - /usr/local/bin/yarn
 - npm: 6.7.0 - /usr/local/bin/npm
## npmPackages:
 - styled-components: ^4.4.1 => 4.4.1

Reproduction
Here is a codesandbox, note that it auto-formats the css which fixes the bug when it moves this test case's simple selector to one line because it fits. Copy/paste the relevant portion from the sample below to properly re-produce in codesandbox:
https://codesandbox.io/s/focused-glitter-uyiy4
Here's a near identical single-script vanilla node.js demo of how it is the nesting:
root@fc813044d77f:/w/styled-components-bug# cat index.js
var {default: styled, ServerStyleSheet, StyleSheetManager } = require('styled-components');
var reactDOM = require('react-dom/server');
const { renderToString } = reactDOM;
const { createElement } = require('react');

const SomeStyledComponent = styled.div`
  color: red;
`;

const SoapNoteFormStyle = styled.div`

  .a:not(.b) .b .c {
    color: red;
  }

  .a:not(.b)
   .b
    .c {
    color: green;
  }

  .a .b .c {
    color: darkred;
  }

  .a
   .b
    .c {
    color: darkgreen;
  }

`;

console.log("rules:");
console.log(SoapNoteFormStyle.componentStyle.rules.join(''));

let sheet = new ServerStyleSheet();

let dummyInner = createElement("div", null, "Dummy");
let dummy = createElement(SoapNoteFormStyle, null, dummyInner);

try {
  const html = renderToString(
    createElement(StyleSheetManager, {sheet: sheet.instance}, dummy)  )
  const styleTags = sheet.getStyleTags() // or sheet.getStyleElement();

console.log("styles:");
console.log(styleTags);

} catch (error) {
  // handle error
  console.error(error)
} finally {
  sheet.seal()
}

Steps to reproduce
codesandbox

Visit sandbox (see above for URL)
Copy/paste the relevant portion from the sample above to fix formatter
Look at console output
Ctrl+f for "red" or "green" and look at corresponding sandbox's generated

I forgot to  mention this in the post itself, but here are some related issues:

https://github.com/styled-components/styled-components/issues/2504

Forwarded to stylis. I do not think this issue is stylis' fault. See the output that parses correctly. Although it was removed, see also the proof of involving styled-components. Those work in the outputted style. I could be wrong here though. I think this has more to do with the div as styled component itself. I did not test it here, but I am curious how this would behavior around a global style element.

This is likely an issue with how stylis perceives your input there. I believe the upgrade to stylis@4 may fix this though once it's dropped into styled-components. For now, I'll go ahead and close this, since there's not much we can do to fix this on our end. But rest assured, you're not doing anything wrong, it's likely stylis that in v3 can't parse this.


Integrations, game finder and philosophy...

today on client: (2.0.12 Beta - December 12, 2019)
1º: Integrations

"exists" but don't find(and important for PC): gog, discord, riot(!!!), gmg, amazon(now exists "amazon games too"), fanatical, eso(but bethesda works for same),weplay,blade(b&s), pathofexile(but steam works for same), twitch(great possibilites*)
auto disconect: epic and rockstar
sugests add: Glyph(Arche Age and others), Game Center(Lost Ark RU), Valofe (Icarus "not steam" and others), mixer(if has twitch need mixer too if pretend use stream conections*),

2º: game finder

I used "find games" on my directory "games" and client dont find noting more... but after i add maually: Black Desert Online(from Red Fox), Honkay Impact 3rd a Magic: The Gathering Arena... all in this same directory

3º: Other suggestion: add mark "cross-plataform" filter. Example: Fortinite, Dauntless, Dota Underlords and Others
*focus: i see other suggestions over integrations with nexus(addons, templates), twitch has game database but has born "amazon games",  need review this type integration an principaly: Need delcare for all: GoG Galaxy is ONLY for games only or for add ALL? (mods, addons, skins, streams, and all).
PS.: Need review Friend List "intelligence" for auto organization/unification
tanks for patience ;)

@vmwinckler thanks for your feedback.
I have to close this as too general and mostly unrelated to this project, but could you please report your issues separately here?
1º , 3º is for platform ids and community integrations (see link above)
2º Quick answer: "find games" works for GOG games releases only. Adding manually works for any executable.


SQLAlchemy: relationship and on delete cascade.

Hi at all,
Today I tried to modify the knowledge module to support automatically cascade deletion of KnwKBDDEF and KnwKBRVAL when I'll try to remove a row in KnwKB table.
First, I modified the database model:
diff --git a/invenio/modules/knowledge/models.py b/invenio/modules/knowledge/models.py
index d4542a5..8c0bff6 100644
--- a/invenio/modules/knowledge/models.py
+++ b/invenio/modules/knowledge/models.py
@@ -51,13 +51,18 @@ class KnwKBDDEF(db.Model):

     __tablename__ = 'knwKBDDEF'
     id_knwKB = db.Column(db.MediumInteger(8, unsigned=True),
                          db.ForeignKey(KnwKB.id), nullable=False,
                          primary_key=True)
     id_collection = db.Column(db.MediumInteger(9, unsigned=True),
                               db.ForeignKey(Collection.id), nullable=True)
     output_tag = db.Column(db.Text, nullable=True)
     search_expression = db.Column(db.Text, nullable=True)
-    kb = db.relationship(KnwKB, backref='kbdefs')
+    kb = db.relationship(
+        KnwKB,
+        backref=db.backref('kbdefs',
+                           cascade="all, delete-orphan"),
+        uselist=True)
     collection = db.relationship(Collection, backref='kbdefs')

     def to_dict(self):
@@ -65,7 +70,8 @@ class KnwKBDDEF(db.Model):
         return {'field': self.output_tag,
                 'expression': self.search_expression,
                 'coll_id': self.id_collection,
                 'collection': self.collection.name if self.collection else None}

 class KnwKBRVAL(db.Model):
@@ -80,7 +86,10 @@ class KnwKBRVAL(db.Model):
     m_value = db.Column(db.Text(30), nullable=False, index=True)
     id_knwKB = db.Column(db.MediumInteger(8), db.ForeignKey(KnwKB.id),
                          nullable=False, server_default='0')
-    kb = db.relationship(KnwKB, backref='kbrvals')
+    kb = db.relationship(
+        KnwKB,
+        backref=db.backref('kbrvals',
+                           cascade="all, delete-orphan"))

     def to_dict(self):
         """ Return a dict representation of KnwKBRVAL."""

Then, I executed:
KnwKB.query.filter_by(id=1).delete()
db.session.commit()

And it remove only the row in KnwKB table.
Instead, I used:
db.session.delete(KnwKB.query.filter_by(id=2).one())
db.session.commit()

And it works!
I looked to understand why and I found this post: http://stackoverflow.com/questions/19243964/python-sql-alchemy-cascade-delete
At the end you can read this:

Otherwise, you may wish to look at setting up the cascade for your database as well.

And follow the link: http://docs.sqlalchemy.org/en/rel_0_9/core/constraints.html#on-update-and-on-delete
I opened and I read the final note (note: we use MyISAM engine!):

Note that these clauses are not supported on SQLite, and require InnoDB tables when used with MySQL. They may also not be supported on other databases.

And finally, we arrived to the real question: I should be careful how the query is constructed or exist a solution at all problems?
Thanks, :)
Leo

I could be misinterpreting the issue here, but I am not sure if the correct approach was taken in #3239.
The problem with cascade (as quoted in https://github.com/inveniosoftware/invenio/issues/2419#issuecomment-59476170) is that the backend is unaware of this SQLAlchemy construct. One has to inform the model of this explicitly. Here is an example:
class Workflow(db.Model):  # Parent
    __tablename__ = "bwlWORKFLOW"
    uuid = db.Column(...)
    child_logs = db.relationship("DbWorkflowEngineLog",
                                  backref='bwlWORKFLOW', cascade="all, delete-orphan")

class DbWorkflowEngineLog(db.Model):  # Children
    __tablename__ = "bwlWORKFLOWLOGGING"
    id_workflow = db.Column(db.String(36),
                            db.ForeignKey("bwlWORKFLOW.uuid", ondelete='CASCADE'),  # <---
                             nullable=True)

In fact, ondelete='CASCADE' is neccessary with InnoDB as it enforces the constraints.

We use the MyISAM engine that doesn't support the cascade action:

Note that these clauses are not supported on SQLite, and require InnoDB tables when used with MySQL. They may also not be supported on other databases.

I see. It was on InnoDB which we use at INSPIRE that this appeared and fixed as above. This is going to get messy when #3243 and my patches land since I would rather stick to ondelete.
Either way, #3239 is probably fine in that case.

Superseded by Invenio 3.

How to delete two tables data combine using flask sqlalchemy query.
My tables and end points are:
class User(db.Model):
uid = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(20), nullable=False)
email = db.Column(db.String(120), unique=True, nullable=False)
username = db.Column(db.String(20), unique=True, nullable=False)
password = db.Column(db.String(60), nullable=False)
confirm = db.Column(db.String(60), nullable=False)
class Record(db.Model):
rid = db.Column(db.Integer(), primary_key=True, autoincrement=True, nullable=True)
title = db.Column(db.String(50), nullable=False)
author = db.Column(db.String(128), nullable=False)
description = db.Column(db.String(200), nullable=False)
date = db.Column(db.Date(), nullable=True)
user_uid = db.Column(db.Integer, db.ForeignKey('user.uid', ondelete='CASCADE'))
@app.route('/delete_account', methods=['GET', 'POST'])
def delete_account():
if request.method == 'POST':
try:
username = request.form['username']
delete_account = Record.query.join(User, User.uid==Record.user_uid).filter_by(username=username).first()
db.session.delete(delete_account)
db.session.commit()
flash(username+' ''your account deleted successfully')
return redirect(url_for('login'))
except:
flash('Wrong username or Invalid account')
return render_template('delete_account.html', title='delete_account')

My problem is that my Record table data is delete but User table data is not delete. When I input username in my GUI.


Bus end

Includes commits from https://github.com/baconjs/bacon.js/pull/573

Hmm.. the "Bacon.Bus does not plug after end(), second variant" test is still failing.

To me it seems that the test is wrong:
  it "does not plug after end(), second variant", ->
    failed = false
    busA = new Bacon.Bus()
    busB = new Bacon.Bus()
    busB.onValue(-> failed = true;)
    busB.plug(busA)
    busA.push('foo')
    busB.end()
    expect(failed).to.equal(false)

You plug busA before ending busB, so it's correct to pass the "foo" event through, right?

Ah seems, I swapped the lines when "cleaning up the mess".

Fixed.


Caching S3

Can add object caching from S3 to reduce traffic with Amazon?

I would suggest putting a caching proxy infront of this service to do it, instead of adding a bunch of complicated code and ram usage to this project.

I would suggest putting a caching proxy infront of this service to do it, instead of adding a bunch of complicated code and ram usage to this project.


completed my assignment_2

What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)
I am adding the mlm.fit method because the model is multivariate, meaning it uses multiple independent variables to predict the dependent variable.
##What did you learn from the changes you have made?
I learned that data quality and consistency are crucial for model fitting. Ensuring that the column names are correctly referenced in the DataFrame can prevent runtime errors.
##Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
I considered implementing additional error handling to manage various potential issues when accessing DataFrame columns.
##Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
The assignment_2 was easy, but I am trying to work more with real data to understand how to handle these questions effectively.
##How were these changes tested?
I tested the changes by running the modified code with a sample dataset. I confirmed that the model fit correctly. Additionally, I verified that the output coefficients were as expected.
##A reference to a related issue in your repository (if applicable)
This change is related to issue Regression2  in the repository, where multiple errors were reported regarding incorrect column names during model fitting. Also, the book that Holly suggested to us, Statistical Learning with Python, was very helpful.
Checklist

[ ] I can confirm that my changes are working as intended

A2: Complete
Great work!
I would suggest you take a closer look at Q1 part (iv) as there are 8 variables and you have listed 6. I would try playing around with the data to identify which two columns may have been missed

Hi Kasra,
Thank you for your message.
I deleted two independent variables (name and origin) because they are
categorical. In regression models, both the predicted and independent
variables typically need to be numerical, like integers, rather than
categorical. However, categorical variables like origin can be included
if they are properly encoded, for example, by converting them into dummy
variables. On the other hand, name doesn't add much value for prediction
and is often omitted from the model.
Would you like me to re-include origin and convert it to dummy variables,
then rerun the model?
On Wed, Oct 9, 2024 at 5:44 PM Melokazz @.***> wrote:

A2: Complete
Great work!
I would suggest you take a closer look at Q1 part (iv) as there are 8
variables and you have listed 6. I would try playing around with the data
to identify which two columns may have been missed
—
Reply to this email directly, view it on GitHub
https://github.com/marjanrajabi437/applying_statistical_concepts/pull/2#issuecomment-2403485727,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BKSZRP6K5R6GZWIRPA3Y2LTZ2WPUNAVCNFSM6AAAAABPNPD72KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBTGQ4DKNZSG4
.
You are receiving this because you authored the thread.Message ID:
@.***
com>

--
Marjan Rajabi
PhD in Statistics
Statistical Researcher & Data Scientist
Phone:<PHONE_NUMBER>


Ordinal ordering of classes, interfaces, members and fields

Currently, default string ordering is used which can lead to inconsistent ordering depending on the environment in which the API diff is generated. Ideally ordering of classes, interfaces, members and fields should be done using the StringComparison.Ordinal ordering rules.

@danielmarbach is there a reason you chose Ordinal rather than OrdinalIgnoreCase?
I'm updating Castle to use the newest version and found heaps of types/members move around because of this change. Any chance you'll change to ignore case, or should I just push forward with everything moving around?

The previous version used culture aware ordering that did not ignore casing as far as I remember. Used Ordinal to sort the type ordering issue and make it consistent over windows and linux environments. I have no crystal ball but currently the plan is to leave as is unless strong reasons are presented

The previous version used culture aware ordering that did not ignore casing as far as I remember.

At least from our usage with Castle (using English cultures) it has sorted, for example:

GetArguments then GetArgumentValue
CreateInterfaceProxyTypeWithoutTarget then CreateInterfaceProxyTypeWithTarget
InvalidMixinConfigurationException then IProxyBuilder

These changes flip them around, so uppercase letters come first. Everything is still there, was just an unexpected change, however good to know at least a stable sort has been chosen.

I have no crystal ball but currently the plan is to leave as is unless strong reasons are presented

Thanks, wanted to know it was a conscious decision and isn't likely to change.

Whenever the API output changes I bump the major.

I also prefer OrdinalIgnoreCase. It makes things hard to find alphabetically when scanning when VSTS is sorted before VisualStudio because S < i, or when ShouldlyConfiguration is sorted under ShouldThrowTaskExtensions because T < l.
Ordinal puts all lowercase letters after all uppercase letters and that doesn't make sense to me.

10 is currently in beta. Now would be the chance to fix...

I am against this, because order can become non-deterministic:
VisualStudioHelper
VisualSTUDIOhelper
visualstudiohelper

It makes things hard to find alphabetically when scanning

Is this a real task that often arises? You can always find by search.

Ordinal puts all lowercase letters after all uppercase letters and that doesn't make sense to me.

It is deterministic so it makes sense to me.

I don't think it's non-deterministic. Even if case is not already used as a tiebreaker, it's easy to add.

Is this a real task that often arises? You can always find by search.

No, but I do read through them. It's just annoying to look at and would be a significant factor for me when considering which tool to use. I like my APIs to look nice.
Also, I'm updating Shouldly from v8 and things are jumping around. If this was changed to a deterministic ordinal ignore-case sort in v10, nothing would jump.

You're right that OrdinalIgnoreCase is non-deterministic, but you could replace StringComparer.OrdinalIgnoreCase with DeterministicOrdinalIgnoreCaseComparer.Instance and that problem would be solved:
public sealed class DeterministicOrdinalIgnoreCaseComparer : IComparer<string>
{
    public static DeterministicOrdinalIgnoreCaseComparer Instance { get; }

    private DeterministicOrdinalIgnoreCaseComparer() { }

    public int Compare(string x, string y)
    {
        var comparison = string.Compare(x, y, StringComparison.OrdinalIgnoreCase);
        if (comparison == 0) comparison = string.Compare(x, y, StringComparison.Ordinal);
        return comparison;
    }
}

That's better

I don't want to step on anyone's toes because ultimately the arguments presented so far here are subjective. The most important part is the determinstic sorting across across OSS and culture. Thats what we achieved and that is good enough. Some peopld might definitely want a more intuitive sorting that follows a certain way of of thinking while others just want deterministic output and do not care about the sorting as long as it is comparable with differs. Given that discussions around topics like that can go back and forth and become heated I'm leaning towards locking this down


moment.duration().format is not a function

Description of the Issue and Steps to Reproduce:
moment.duration(123, "seconds").format() it gives me an error moment.duration().format is not a function
Please include the values of all variables used.
123, 192.343
Environment:
Examples: Chrome 49 on OSX, Internet Explorer 10 on Windows 7, Node.JS 4.4.4 on Ubuntu 16.0.4
Chrome 59 on OSX NodeJS 6.10
Both the browser and the OS are important to us, particularly if you have an unsual environment like an IOT application.
Other information that may be helpful:

The time zone setting of the machine the code is running on
The time and date at which the code was run
Other libraries in use (TypeScript, Immutable.js, etc)

If you are reporting an issue, please run the following code in the environment you are using and include the output:
console.log( (new Date()).toString())
console.log((new Date()).toLocaleString())
console.log( (new Date()).getTimezoneOffset())
console.log( navigator.userAgent)
console.log(moment.version)

Ensure your issue is isolated to moment. Issues involving third party tools will be closed unless submitted by the tool's author/maintainer.

That function does not exist, so calling it results in an error.
Many people want that function to exist, and for the most comprehensive overview of that, see #1048.


Refactor and Tests

This refactor fixes a few long-standing issues with this project:

Obj objects and groups were getting merged automatically based on material, which should be left as an optional optimization for gltf-pipeline. The gltf converted here is very true to the original obj.
Trouble with large loading large models. This will now load obj files that are about 1 GB. Due to node memory limitations, it can't get much higher than that. In the future we can look into out-of-core loading, but the simplicity here is nice.
Some material improvements, especially for textured models without normals.
Added documentation and tests

To-do:

[ ] More testing - most models convert well when using --bypassPipeline, so there are some issues to look into for gltf-pipeline

Fixes #2 - power plant converts with the --bypassPipeline flag
Fixes #17 - no longer combines by material unless optimize is set.
Fixes #29 - speeds should improve since gltf-pipeline optimizations are disabled be default. Also --bypassPipeline is an available option for the fastest conversion.
Fixes #22 - same as above
Partial fix for #32 - using --bypassPipeline no techniques or shaders are generated. A material is still generated and this is required by the gltf 1.0 spec, but that will change in 2.0.
Fixes #34 - lighting should be improved for models without normals
Fixes #37 - however .mtl file had to change Tr 0 to Tr 1
Fixes #47 - normalization bugs have been fixed in https://github.com/AnalyticalGraphicsInc/cesium/pull/5032

Due to node memory limitations, it can't get much higher than that.

Can you elaborate on this?  Because even without out-of-core processing, this seems like an architectural issue somewhere in the code.

Yes maybe, I'm doing some more tests but the actual numbers do look better than that.

Maybe obj size isn't the best metric, but I ran through two highly tessellated spheres, one with smooth normals and one with face normals, both 3.2 GB. The first one converts while the second has enough triangles that the index array exceeds the maximum allowable typed array length. This could be solved by splitting primitives, something I was trying to avoid - also maybe future work because I want to get these changes in pretty soon.
I actually don't think I have any "real" objs that fail at the moment, @shehzan10 had one that I still need to try out sometime tomorrow.

Thanks, that makes sense and sounds like a perfectly fine limitation until we need to handle massive obj files.

@likangning93 can you please review this?

https://github.com/AnalyticalGraphicsInc/obj2gltf/pull/49/commits/41956dd70d1ab98d180a7944fedaf82592fc97a7 allows @shehzan10's model to be converted, but --separateTextures should be set. The problem before was there were enough images base64 encoded in the glTF that JSON.stringify fails (due to the same limitations that Node has on string sizes - can only be 192 MB or less)

Ready now.

Updated. The uri handling is better now.

On a ~470  MB obj with textures, I'm getting:

Same thing when running with -s

Ah. It put the bin and images in a the output directory. Herm.

Ok that should be fixed now.

Updated.

New changes look good to me, I think that covers everything I saw.

@mramato should reading images/mtl files from absolute paths be disallowed for security reasons? Are there other security issues to handle?

@mramato should reading images/mtl files from absolute paths be disallowed for security reasons? Are there other security issues to handle?

It depends on the use case:

For client-side desktop usage, I see no reason we shouldn't read any file that the user running it has access to.
For server-side usage, having a way to disallow absolute paths (or more specifically, not allow the model to index outside of the directory of it's source files) is ideal.  The goal here would be to avoid leaking data outside of the source input (model and textures) to a client.

Was testing out this branch and ran the following command.
./bin/obj2gltf.js -i ../obj2gltf/specs/data/box-textured/box-textured.obj -o
/C/Data/Foo/test.glb

However, instead of test.glb, it output /C/Data/Foo/box-textured.glb.
Is the documentation wrong, or the is there a bug?

It must be a bug, because ommiting the filename just crashes obj2gltf (which is actually a second bug)
./bin/obj2gltf.js -i ../obj2gltf/specs/data/box-textured/box-textured.obj -o /C/Data/Foo/

Is the documentation wrong, or the is there a bug?

Yeah that's a bug. Fixed now.

ommiting the filename just crashes obj2gltf (which is actually a second bug)

The error handling for this is better now, but it still throws an error as it expects the output to be a file path and not a directory.

OK, that's all I have for the first go around.  Given the size of this PR, there are definitely things we should do as separate PRs after this is merged, but let's make sure we write issues so nothing drops on the floor.
Thanks @lilleyse!

Thanks for the thorough review @mramato, I'll get to these soon.

I got through a lot of the comments here. I may briefly scan everything again but I believe this is ready.
Some things I haven't addressed in this PR but will handle in others:

Better regexes with capture groups for loadMtl and loadObj
Simple validation (for obj, mtl, and images)

Use Check in all functions

Renaming files
Rethinking loadMtl and loadObj local functions approach.
Better logger messages https://github.com/AnalyticalGraphicsInc/obj2gltf/pull/49#discussion_r110651528
Add ability to find external files: https://github.com/AnalyticalGraphicsInc/obj2gltf/issues/54

Breaking change index.js will just export the convert function. Projects including obj2gltf do not need to call require('obj2gltf').convert(), just require('obj2gltf')().

Thanks @lilleyse!  This is all good with me.  I don't have commit access to this repository so someone else needs to his the merge button. (CC @pjcozzi)
Some of the future PR issues will make great beginner issues.

@lilleyse please make sure there are issues for everything in https://github.com/AnalyticalGraphicsInc/obj2gltf/pull/49#issuecomment-293406766.

@lilleyse please comment close all the issues in https://github.com/AnalyticalGraphicsInc/obj2gltf/pull/49#issuecomment-286470171.

@lilleyse when you get a chance, it would be great to publish a new version to npm as well.


Vue-meta and generate (static website)

I've generated a Nuxt website wuth yarn run generate.
From the index /, the title is updated when I go to another route. However when I reload the destination page, the title value becomes the one in /index.html.
Do you know how to avoid this behavior?
Plus, it seems I can't add a hid property to title with vue-meta. Does it mean it replaces the default one automatically?

Hi @lucpotage,
Can you post some code snippets to see how you change your title in the page component, please?

Sure, here is an example for one of my page:
export default {
  head: {
    title: 'Lorem ipsum',
    meta: [
      { hid: 'description', name: 'description', content: 'Lorem ipsum' },
      { hid: 'og:url', property: 'og:url', content: 'http://lorem-ipsum.com/lorem-ipsum' },
      { hid: 'og:title', property: 'og:title', content: 'Lorem ipsum | Acme' },
      { hid: 'og:description', property: 'og:description', content: 'Lorem ipsum' },
      { hid: 'twitter:title', property: 'twitter:title', content: 'Lorem ipsum | Acme' },
      { hid: 'twitter:description', property: 'twitter:description', content: 'Lorem ipsum' }
    ]
  },
  …
}

Does it mean the rule explained here is not applicable to all meta tags? In my case, my Twitter and Open Graph tags must also be replaced because they are different from the index.
In your source code, the properties are inside return { }. Is it recommended, like for Vue data property?

Why you close this issue? Can't believe it.
Dynamic meta tags still doesn't work on initial page load!
@lucpotage did you fix this?
@alexchopin you should reopen this topic, you answer is have nothing to do with the question.

Sorry, I found my error.

Hi there @hackuun
What was your error?


SAK-41356 use null-safe equals checks

This is a BIG bug because the LTI 1.3 regressed LTI 1.1.   This is a good fix.   I had one in progress - but this one is fine.


No Password Length Requirement when creating user

Parameters for min and max length added to class UserCreate - password

Added additional password parameters including complexity requirements. Added through class UserCreate


Bug: Folder size isn't shown in the recycle bin

Description
When Calculate folder size is on recycle bin folder still show empty
Steps To Reproduce

Go to Files settings > Folder > Turn on calculate folder size
Delete a folder with content
Go to recycle bin and se the size column is blank

Steps to fix

Show size of a folder in the recycle bin

Files Version
<IP_ADDRESS>
Windows Version
10.0.22621.1105
Relevant Assets/Logs
debug.log

Turns out File explorer will show the Folder size information in the recycle bin.

This should be quite straightforward to fix, can you approve this @yaira2 ?

Sorry, I'm stupid, this is not as trivial as i once thought, as i misinterpreted the issue as recycle bin size does not show in properties. Nevertheless, i'll look into it

This issue is fixed in the main branch.