maybe

this is a strawman proposal to generate some discussion about bringing a Maybe type into the core lib, but without forcing it down users' throats

I like this as a start.  It would really be nice if it were an addIndex sort of helper.

but without forcing it down users' throats

I'm all for having a Maybe type in the core lib. However, I'm curious what thoughts are on instead (or even in addition to) going with a "little maybe," more akin to a decorator that abstracts null-checking. Here's a version that comes straight from JavaScript Allonge:
const maybe = (fn) =>
  function (...args) {
    if (args.length === 0) {
      return
    }
    else {
      for (let arg of args) {
        if (arg == null) return;
      }
      return fn.apply(this, args)
    }
  }

maybe((a, b, c) => a + b + c)(1, 2, 3)
  //=> 6

maybe((a, b, c) => a + b + c)(1, null, 3)
  //=> undefined

I'd argue that this is a more natural start for most JS devs coming in, and it certainly wouldn't preclude a "big Maybe" from being added as well. However, two cons that come to mind:

When docs make reference to Maybe types, we'd want to avoid any confusion with the decorator version
There's another version of "little maybe," notably from the Mostly Adequate Guide that is a helper for getting the value out of a Maybe:

//  maybe :: b -> (a -> b) -> Maybe a -> b
var maybe = curry(function(x, f, m) {
  return m.isNothing() ? x : f(m.__value);
});

This looks great though. Looking forward to the discussion!

I would much prefer a "proper" fantasyland compatible implementation. I think that as long as the data type is introduced on its own it really does not pose a problem to anyone who might not fully grasp all of its uses.
To be honest personally I would rather not have Maybe at all than having a "simplified" version.

i'm inclined to agree with @gilligan that if we're in for a penny we should be in for a pound.
It sounds like there's some momentum for this. So then I have this question: Should we expose, e.g. R.Just, on the public API? @scott-christopher has suggested some interesting stuff making use of types internally (e.g. Cons) that we could also expose (or not).

However, I'm curious what thoughts are on instead (or even in addition to) going with a "little maybe," more akin to a decorator that abstracts null-checking. Here's a version that comes straight from JavaScript Allonge

If there was any one thing that served as a primary inspiration for Ramda it was the first edition of Allongé.  It is still one of my most-recommended JS books.  But I don't think we would want to incorporate this into Ramda.  It is a very useful function for certain kinds of application code, but it is a little undisciplined for Ramda.  Moreover, the sort of Maybe suggested by @buzzdecafe would not work together with it; I think it could just lead to confusion.
Where I absolutely could see using lower-case "maybe" would be as a decorator, to wrap an existing function (along with a predicate that has the same input signature) and create a new function that returns a Maybe-fied version of the output.
// head:: [a] -> a | Undefined
// safeHead :: [a] -> Maybe a
const safeHead = maybe(as -> as.length > 0, head);

@buzzdecafe how about adding fromNullable like in data.maybe?

how about adding fromNullable like in data.maybe?

@gilligan that would be simple enough to build out of what i am proposing, e.g.
const fromNullable = R.maybe(R.complement(R.isNil), R.identity);

(cf. https://github.com/folktale/data.maybe/blob/master/lib/maybe.js#L124-L126)

I really think we want to support polyadic functions too.

I was hoping that I could slide that by. Oh well.

I really think we want to support polyadic functions too.

I was hoping that I could slide that by. Oh well.

What?  You don't like find?

What? You don't like find?

Well, find is (a -> Any) -> [Any] -> Any | undefined. So one could simply safeFindThing = maybe(complement(isNil), find(thingPred)), to get safeFindThing :: [Any] -> Maybe Any, right?

OK, I've updated this PR to include the following:

change the API to return a safe function, rather than including a single argument, as requested by @CrossEye
Made Just | Nothing inherit from a (private) Maybe constructor (also at @CrossEye 's request
exposed Just and Nothing as properties on R.maybe, i.e. R.maybe.Just and R.maybe.Nothing
added some more tests

Haven't yet, but intend to, pending approval:

add magic @@type property for Sanctuary-compat
include tests for Functor, Apply, Applicative, Chain to the Maybe impl.
change the name to toMaybe; not as nice, but if we want to add an Either type, we already have an either function. So .....
Move Maybe implementation to internal directory so it may be reused in other functions (or should we start a types directory?)

I think this is close to being ready to merge. I am very interested to hear feedback. ((:bell:))

I like this a lot.  My internet has been down again (the cable company is coming this week to give me an estimate; maybe I'll finally get rid of DSL!) so I haven't been able to play with it, but the code and tests look good.
As to the proposed changes, I think two should probably be done before merging; the other two can wait.  We should probably rename to the less pleasing toMaybe.  And we should add the @@type annotation.  I'm not a fan of magic strings either, but Sanctuary integration is important... unless David has a different magic trick up his sleeve for that.  The additional tests, and ./internal versus ./types can happen now or later; I don't think it matters much.

We should probably rename to the less pleasing toMaybe. And we should add the @@type annotation.

By "we" I assume you mean me? :smiling_imp:
I've updated the PR with those features.

There's a fundamental problem with this approach: it's impossible to define lossless functions in terms of lossy ones.
If R.head(xs) evaluates to undefined, is xs empty? We don't know.
If R.tail(xs) evaluates to [], is xs empty? We don't know.
I'd like Ramda to provide safe equivalents of its unsafe functions. Failing that, though, I think it's best to leave things as they are. Providing a function which derives safe functions from unsafe ones would be making a promise we can't keep.

on the contrary. in order to cover cases in a generic fashion, it made sense to branch on the result of the wrapped function. If instead, you want to create a safe head based on the list length before evaluating head, you can do that for yourself, since Just and Nothing are exposed on the API:
const safeHead2 = xs => ifElse(isEmpty(xs), toMaybe.Nothing(), toMaybe.Just(head(xs)))
This is consistent with treating these things as lists, where undefined as a list element doesn't make sense.

If R.tail(xs) evaluates to [], is xs empty? We don't know.

We didn't ask. We asked, "What is the tail of xs?" If we want to find out if xs is empty, we can ask isEmpty(xs). Seems like a separate problem.

undefined as a list element doesn't make sense

This reminds me of the times Maybe.of(undefined) has been discussed. I agree that arrays don't often contain undefined as one of their values, but undefined is a JavaScript value whether we like it or not (and apparently we like it, since several of our functions use it as a return value).
Which of the following is preferable?
Maybe.of :: a -> Maybe a

Maybe.of :: NotUndefined a => a -> Maybe a

Similarly, which of the following is preferable?
head :: Array a -> Maybe a

head :: NotUndefined a => Array a -> Maybe a

For a concrete example of an array containing undefined, consider the result of evaluating the following:
R.ap([R.head], [[], [1, 2, 3], [], [4, 5, 6]])

If R.tail(xs) evaluates to [], is xs empty? We don't know.

We didn't ask. We asked, "What is the tail of xs?" If we want to find out if xs is empty, we can ask isEmpty(xs). Seems like a separate problem.

It's a matter of data coherence. If we wish to apply a transformation to the head of a list if the list is non-empty, we could write xs.length > 0 ? f(R.head(xs)) : …, but this is an unsafe expression guarded by a predicate. We can see that evaluating the unsafe expression will not result in an exception, though a compiler may not be able to prove this.
Similarly, if we wish to apply a transformation to the tail of a list if the list is non-empty, we could write xs.length > 0 ? g(R.tail(xs)) : ….
Rich Hickey claims data is always simpler than code. I agree. It's better to represent success/failure and the result of the computation (if successful) in a single value, rather than with conditional logic. We can then write S.head(xs).map(f) and S.tail(xs).map(g).

Had a very productive back-channel discussion with @davidchambers .
The basic problem we face, is that some functions should be checked at input (head), others at output (find). I see three ways to deal with this in the context of the current PR:

maybeIn and maybeOut (or some such. But where would Just and Nothing live?)

change toMaybe to take an in and an out test, e.g.
toMaybe :: (...args -> Boolean) -> (a -> Boolean) -> (...args -> a) -> (...args -> Maybe a)
this feels awkward, because you will typically only need one or the other, not both.

pass both the args and the result to the predicate, and let the user decide, i.e.
toMaybe :: ([...args] -> a -> Boolean) -> (...args -> a) -> (...args -> Maybe a)
But then you may waste a call to evaluate the function if the ...args are sufficient to tell you the answer.

Then @davidchambers cut the Gordian Knot: "I think the simplest solution is to provide R.Nothing and R.Just and call it a day."
I agree -- I think we should provide Just and Nothing on R.

:+1: on just providing Just and Nothing from me ;)

dumping this PR. I'll submit another one as described

Perhaps this is for the best.  But it does seem sad that these would have to be done through patterns rather than through a dedicated function (or two of them.)
Obviously, we already have wrap, which can be used for this, but it's simply not as elegant as I would like:
const safeHead = wrap(head, (head, ls) =>
  isEmpty(ls) ? Nothing() : Just(head(ls))
);

safeHead([1, 2, 3]); //=> Just(1)
safeHead([]); //=> Nothing()

const safeFind = wrap(find, (find, pred, ls) => {
  const result = find(pred, ls);
  return isNil(result) ? Nothing() : Just(result);
})

safeFind(whereEq({a: 4}), [{a: 3, b: 1}, {a: 4, b: 1}, {a: 5, b: 9}]);
//=> Just({a: 4, b: 1})
safeFind(whereEq({a: 8}), [{a: 3, b: 1}, {a: 4, b: 1}, {a: 5, b: 9}]);
//=> Nothing()

I still don't see the point of R.wrap, @CrossEye.

const safeHead = wrap(head, (head, ls) =>
  isEmpty(ls) ? Nothing() : Just(head(ls))
);

The above strikes me as a roundabout way of writing:
const safeHead = xs => isEmpty(xs) ? Nothing() : Just(head(xs))

Well, it may simply be the last vestiges in my brain of AOP, but I do reach for it whenever I want to wrap a number of functions in the same wrapper, especially if it does processing both on the input and the output.


add kde filter and chemdiab example

Coverage remained the same at 100.0% when pulling a6e0dc804f2afeb726d9f3532ffa908525204abd on chemdiab_kde into c9ad3372ce32763779e52e9eebaf51afb8b9fc75 on master.


ping neutrino server

btcd0.lightning.computer:18333
faucet.lightning.community

ping btcd0.lightning.computer
it works!


add tokenary

Hi @grachyov - thanks for the submission! I added a few criteria just now based on user feedback from last week, you were 1h too early :)
There's just a few more criteria as you can see here. Do you mind sharing data on the missing ones? Feel free to just write them here as a comment and I can integrate. Sorry about this!

hey @mozrt2 sure, thank you!
configurable: false
autoswitch: true
license: 'OPEN_SOURCE'
walletConnect: false
injected: true
embedded: false
inappBrowser: false
modularity: false

great, thank you! just merged it!


Add Default Suit with Context Properties

@smallcreep the puzzle #30 is still not solved.

@smallcreep the only puzzle #30 is solved here.


Cannot load file attachments

Hi there,
I've been trying to get file attachments through the API, but to no avail. I always end up with the same exception, as soon as I execute the load() method from the FileAttachment class. The exception is as follows:
microsoft.exchange.webservices.data.core.exception.service.remote.ServiceRequestException: The request failed. Precondition for readText is nextEvent().getTypeEventType() == START_ELEMENT (got 4)
The cause of this exception seems to be the getElementText() method, called on EwsXmlReader.java, line 587:
buffer = Base64.decodeBase64(this.xmlReader.getElementText().toString());
After some digging, it seems that the getElementText() method is the same as the one shown here: http://grepcode.com/file/repo1.maven.org/maven2/stax/stax/1.2.0/com/bea/xml/stream/XMLEventReaderBase.java#XMLEventReaderBase.getElementText()
As far as I can tell, the problem comes not from the method itself, but from it's input. Is there anything other thing that I need to do in order to make this work?
Thank you in advance

Is this a general problem with every attachment or with only some of them? Maybe you can also show up with some information on which server and ews-java-api version you are using.

As far as I could infer, it happens when fetching .rpmsg files. The server version is 2010 .
However, I should apologize for keeping this issue open, as we had to give up on using the api and implement every request from scratch ourselves - since it is an Android app, issues regarding different OS versions were arising (apart from the well known api integration issues). Given this, the problem I described here was probably happening due to some incompatibility with Android.
I apologize once more, and thank you for your input!
Best regards

i have the same problem

javax.xml.stream.XMLStreamException: Precondition for readText is nextEvent().getTypeEventType() == START_ELEMENT
weblogic.xml.stax.XMLEventReaderBase.getElementText(XMLEventReaderBase.java:77) ~[com.bea.core.weblogic.stax_<IP_ADDRESS>.jar:<IP_ADDRESS>]
I use weblogic 10.3 and ews-java-api 2.0

I Know is too late but i solve them change sax parser.
I add in weblogic-application.xml :
wls:xml
wls:parser-factory
wls:saxparser-factory
com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
</wls:saxparser-factory>
wls:document-builder-factory
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
</wls:document-builder-factory>
wls:transformer-factory
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
</wls:transformer-factory>
</wls:parser-factory>
</wls:xml>
And add this for library errors
wls:prefer-application-packages
wls:package-nameorg.joda.</wls:package-name>
wls:package-nameorg.apache.</wls:package-name>
</wls:prefer-application-packages>
I Use ews-java-api 2.2

i have tried above code....but still getting same error

javax.xml.stream.XMLStreamException: Precondition for readText is nextEvent().getTypeEventType() == START_ELEMENT
at weblogic.xml.stax.XMLEventReaderBase.getElementText(XMLEventReaderBase.java:77)
this error I am getting and i have used wlfullclient.jar and ews-java-api 2.2
Pls suggest me what can be done

Sorry
I Also modify the folliging class of package microsoft.exchange.webservices.data.core
EwsServiceMultiResponseXmlReader Line 89
EwsServiceXmlWriter Line 110
EwsUtilities Line 560
EwsXmlReader Line 91
This is
weblogic-application.xml
http://ziksys.website/ews/weblogic-application.xml
source:
http://ziksys.website/ews/microsof_srct.zip
Binary:
http://ziksys.website/ews/microsoftews.zip


Added verbose logging for minify

There are a few problems with the html-minfier package.
For instance: https://github.com/ericclemmons/grunt-angular-templates/issues/135
While that issue whould be fixed there, it is hard to get it fixed (if possible)
So i added a verbose logging so that we at leasts know which template is causing the issue...
Otherwise you could be searching for a while :)

Would you be interested in #137?


Add "serverUrl" param to GitlabAuth config

Add new serverUrl param to provide the URL of a self-managed GitLab instance.
Closes #1228

Thanks!


Update simplicity

Updates Simplicity to https://github.com/BlockstreamResearch/simplicity/commit/9c38bc04f5b6fbb62380bc4141ca0c980b4ee417.
~Right now there is a {C,I,A}MR mismatch between Rust and C, which needs to be fixed.~

Fixed


GuiCoreLib should not be documented

There is a useless exposition of the gui_core module that must be hidden.

you mean renaming GuiCoreLib.py to _GuiCoreLib.py ?


API to allow setting socket options on the stream channel connections in the GRPC server side

Currently there is no way for the C++ GRPC server side implementation to set a custom DSCP value for the stream channel connections.  There have been a lot of issues/pull requests created to track this requirement, but I do not see any progress on this.
https://github.com/grpc/grpc/pull/28322 is one of the recent discussions on this.
As documented previously,
grpc::ChannelArguments::SetSocketMutator (grpc_socket_mutator *mutator) is unusable since "grpc_socket_mutator" definition is not included in the libgrpc library. I don't see any other means by which a server implementation can override the socket options for the stream channel connections.
Can someone please let me know if there is any active action item to help with this problem ?

Closing as duplicate. I've responded on the other thread.


Update region tags

Update region tags to match our samples tracker.

CI failure is known -- merging since this PR doesn't involve source changed.


[Docs] Old doc folder removed

Removed doc folder
Changed README to have images/links/etc. from the new docs folder
Added stylesheets doc.
Removed sync state.

Perfect ! Thanks Natalia!
Is it ready to merge in?

I've  checked the removed files and it seems that we're missing the following - still quite accurate docs:

doc/E2E tests.md
doc/Extending vue-storefront-api.md
doc/Extending Express.js server side routes.md
doc/Payment Gateway Integration.md
doc/Upgrade notes.md

@NataliaTepluhina I think these docs are pretty important, can You just move them to the new structure so we could remove /doc once and for all?

@pkarw working on it

@pkarw Please review latest changes

After adding basic docs about modules we are ready to merge this in - I’ve checked the rest and seeems fine

@pkarw done :)


Fix multi-commodity transactions, add preferences

THIS PR SHOULD BE MERGED AFTER #7
This PR has two primary additions:

Input commodity preferences are added (new feature)
Transaction issues are fixed when multiple commodities are requested (a bug fix, for a bug discovered while adding the feature)

Test and test-related files have been updated to test the new functionality and ensure the bug is fixed. There are two tests that are failing because of a bug with resource IDs for the spent fuel. This bug (Issue #9) will be fixed in a later PR. The 2 tests regarding transactions are both passing, and those are the tests for the feature and bug fix in this PR.

Yes. This is ready for review.

Thanks for the review @LukeSeifert. I'll work on making the documentation better. I have made some of the other changes requested.

I have found a bug in the feature added through this PR. The requested material is based more on their ordering in the input file than the defined preferences. This results in errors in how much of the material is accepted if there is not enough to meet a full request. I am working on fixing this bug.

I have updated the doc strings to be more comprehensive. I have also updated the bug for the preferences described in the previous comment. The bug was because of a lack of feature in the Python API in cyclus, so that has been added in.

Thanks for the review. Those print statements were meant for debugging for development and aren't needed in the final version. I'll remove them.

The extra print statements have been removed and pep8 formatting has been enforced.


fix: skeleton card variant size

Thank you for your contribution to the KodaDot - One Stop Shop for Polkadot NFTs.
👇 __ Let's make a quick check before the contribution.
PR Type

[x] Bugfix

Context

[x] Closes #6017

Had issue bounty label?

[x] Fill up your KSM address: Payout

Community participation

[x] Are you at KodaDot Discord?

Screenshot 📸

[x] My fix has changed something on UI; a screenshot is best to understand changes for others.

Copilot Summary

🤖 Generated by Copilot at c387729
Improved the layout and styling of the NFT card skeleton components in NeoNftCard.vue. Added a skeleton for the NFT title and separated the skeleton for the NFT price.

🤖 Generated by Copilot at c387729

Skeletons aligned
nft-media-info class
Winter of the NFT

pay 20 usd

😍 Perfect, I’ve sent the payout
💵 $20 @ 25.99 USD/KSM ~ 0.77 $KSM
🧗 DzUbHCk3Fr3XdCPNKo7uCJvtBH7YfgiFbn4Gr3VmCMiFy1C
🔗 0xbc38aed3a0d434de9c60daeb7a3282774568b3bd02060e2ac9e013e06173d151
🪅 Let’s grab another issue and get rewarded!
🪄 github.com/kodadot/nft-gallery/issues


no space left on device while processing Ocean dataset

Hi, Thanks for the interesting paper and for sharing the code.
I tried to reproduce the Trajectory classification. When I run sh ./exp/scripts/mpsn-flow.sh, there is an error No space left on device as follows. I cannot figure out what uses all the space and what space it is talking about. I have enough disk space and the top command show the memory is not used much.

$ sh ./exp/scripts/mpsn-flow.sh tanh
WARNING:root:The OGB package is out of date. Your version is 1.3.1, while the latest version is 1.3.2.
==========================================================
Using device cuda:0
Fold: None
Seed: 0
======================== Args ===========================
Namespace(batch_size=64, dataset='FLOW', device=0, drop_position='lin2', drop_rate=0.0, dump_curves=True, early_stop=False, emb_dim=64, epochs=100, eval_metric='accuracy', exp_name='flow_mpsn', final_readout='sum', flow_classes=3, flow_points=1000, fold=None, folds=None, fully_orient_invar=False, graph_norm='bn', indrop_rate=0.0, init_method='sum', iso_eps=0.01, jump_mode=None, lr=0.001, lr_scheduler='StepLR', lr_scheduler_decay_rate=0.5, lr_scheduler_decay_steps=20, lr_scheduler_min=1e-05, lr_scheduler_patience=10, max_dim=2, max_ring_size=None, minimize=False, model='edge_orient', nonlinearity='tanh', num_layers=4, num_workers=0, paraid=0, preproc_jobs=4, readout='sum', readout_dims=(0, 1, 2), result_folder='/home/xyz/code/cwn/exp/results', seed=0, simple_features=False, start_seed=0, stop_seed=4, task_type='classification', test_orient='random', train_eval_period=10, train_orient='default', tune=False, untrained=False, use_coboundaries='False', use_edge_features=False)
===================================================
Processing...
0%|                                                                                | 0/1000 [00:00<?, ?it/s]WARNING:root:The OGB package is out of date. Your version is 1.3.1, while the latest version is 1.3.2.
WARNING:root:The OGB package is out of date. Your version is 1.3.1, while the latest version is 1.3.2.
WARNING:root:The OGB package is out of date. Your version is 1.3.1, while the latest version is 1.3.2.
WARNING:root:The OGB package is out of date. Your version is 1.3.1, while the latest version is 1.3.2.
22%|█████████████████████████████▎                                                                                | 224/1000 [00:45<02:37,  4.92it/s]
joblib.externals.loky.process_executor._RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/xyz/miniconda3/envs/cwn/lib/python3.8/site-packages/joblib/numpy_pickle.py", line 480, in dump
NumpyPickler(f, protocol=protocol).dump(value)
File "/home/xyz/miniconda3/envs/cwn/lib/python3.8/pickle.py", line 487, in dump
self.save(obj)
File "/home/xyz/miniconda3/envs/cwn/lib/python3.8/site-packages/joblib/numpy_pickle.py", line 279, in save
wrapper.write_array(obj, self)
File "/home/xyz/miniconda3/envs/cwn/lib/python3.8/site-packages/joblib/numpy_pickle.py", line 103, in write_array
pickler.file_handle.write(chunk.tobytes('C'))
OSError: [Errno 28] No space left on device

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/xyz/miniconda3/envs/cwn/lib/python3.8/site-packages/joblib/externals/loky/backend/queues.py", line 153, in feed
obj = dumps(obj, reducers=reducers)
File "/home/xyz/miniconda3/envs/cwn/lib/python3.8/site-packages/joblib/externals/loky/backend/reduction.py", line 271, in dumps
dump(obj, buf, reducers=reducers, protocol=protocol)
File "/home/xyz/miniconda3/envs/cwn/lib/python3.8/site-packages/joblib/externals/loky/backend/reduction.py", line 264, in dump
_LokyPickler(file, reducers=reducers, protocol=protocol).dump(obj)
File "/home/xyz/miniconda3/envs/cwn/lib/python3.8/site-packages/joblib/externals/cloudpickle/cloudpickle_fast.py", line 563, in dump
return Pickler.dump(self, obj)
File "/home/xyz/miniconda3/envs/cwn/lib/python3.8/site-packages/joblib/_memmapping_reducer.py", line 442, in call
for dumped_filename in dump(a, filename):
File "/home/xyz/miniconda3/envs/cwn/lib/python3.8/site-packages/joblib/numpy_pickle.py", line 480, in dump
NumpyPickler(f, protocol=protocol).dump(value)
OSError: [Errno 28] No space left on device
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/xyz/miniconda3/envs/cwn/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/xyz/miniconda3/envs/cwn/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/xyz/code/cwn/exp/run_mol_exp.py", line 105, in
exp_main(passed_args)
File "/home/xyz/code/cwn/exp/run_mol_exp.py", line 26, in exp_main
curves = main(parsed_args)
File "/home/xyz/code/cwn/exp/run_exp.py", line 77, in main
dataset = load_dataset(args.dataset, max_dim=args.max_dim, fold=args.fold,
File "/home/xyz/code/cwn/data/data_loading.py", line 150, in load_dataset
dataset = FlowDataset(os.path.join(root, name), name, num_points=kwargs['flow_points'],
File "/home/xyz/code/cwn/data/datasets/flow.py", line 24, in init
super(FlowDataset, self).init(root, max_dim=1,
File "/home/xyz/code/cwn/data/datasets/dataset.py", line 140, in init
super(InMemoryComplexDataset, self).init(root, transform, pre_transform, pre_filter,
File "/home/xyz/code/cwn/data/datasets/dataset.py", line 62, in init
super(ComplexDataset, self).init(root, transform, pre_transform, pre_filter)
File "/home/xyz/miniconda3/envs/cwn/lib/python3.8/site-packages/torch_geometric/data/dataset.py", line 92, in init
self._process()
File "/home/xyz/miniconda3/envs/cwn/lib/python3.8/site-packages/torch_geometric/data/dataset.py", line 165, in _process
self.process()
File "/home/xyz/code/cwn/data/datasets/flow.py", line 50, in process
train, val, G = load_flow_dataset(num_points=self._num_points,
File "/home/xyz/code/cwn/data/datasets/flow_utils.py", line 321, in load_flow_dataset
train_samples = parallel(delayed(generate_flow_cochain)(
File "/home/xyz/code/cwn/data/parallel.py", line 14, in call
return Parallel.call(self, *args, **kwargs)
File "/home/xyz/miniconda3/envs/cwn/lib/python3.8/site-packages/joblib/parallel.py", line 1054, in call
self.retrieve()
File "/home/xyz/miniconda3/envs/cwn/lib/python3.8/site-packages/joblib/parallel.py", line 933, in retrieve
self._output.extend(job.get(timeout=self.timeout))
File "/home/xyz/miniconda3/envs/cwn/lib/python3.8/site-packages/joblib/_parallel_backends.py", line 542, in wrap_future_result
return future.result(timeout=timeout)
File "/home/xyz/miniconda3/envs/cwn/lib/python3.8/concurrent/futures/_base.py", line 437, in result
return self.__get_result()
File "/home/xyz/miniconda3/envs/cwn/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
raise self._exception
_pickle.PicklingError: Could not pickle the task to send it to the workers.
ld not pickle the task to send it to the workers.

Hi @cxw-droid! This issue seems to be related to joblib which seems to run out of space for storing intermediate results of the computation. I would suggest trying changing this line: https://github.com/twitter-research/cwn/blob/main/exp/scripts/mpsn-flow.sh#L13 to use a fewer number of preprocessing jobs. In particular, it should work when using 1 job, which should pre-process everything serially without joblib.

Thanks., it works if the job number is changed to 1.
But it does not work even if I change the job number to 2. I am not sure if it is normal. just FYI


fixed documentation issues (verified from generated docs)

Hi Amrita, there are merge conflict, probably because some docstrings already get modified by either me or Wenzhuo, please check and resolve. Thanks


fix: Left pane gets narrower and narrower as you repeatedly collapse …

What does this pull request do?
Fix: Left pane gets narrower and narrower as you repeatedly collapse and return.

Close for the same reason as #81.


[Feature] Conditional comments for more powerful obfuscating parts of code

Conditional comment for additional obfuscating secret logic, that should be obfuscated better than other code.
Sory for such dumb example:
let something = "something"; // Usual code
for(let i=0; i<10; i++){
  console.log(something, i);
}

// javascript-obfuscator:startForce{controlFlowFlatteningThreshold: 1, deadCodeInjectionThreshold: 1, stringArrayThreshold: 1}
let secretToken = 0; // Secret logic, that should be hidden better
for(let i=0; i<something.length; i++){
  secretToken += something.charCodeAt(i) * (i % 3 + 1);
}
secretToken = secretToken.toString(16);
sendSecretToken(secretToken);
// javascript-obfuscator:endForce

startForce is just random idea for naming, it isn't good, i know.
I don't know how to do it better, one of thoughts was to override config using comment. Then we can name this comment like overrideConfig and endOverride.
Other thought was to twice-obfuscating code, so first you obfuscate only that part, and then obfuscate all code.
I think you are more experienced to decide how it will be better=)

This isn't easy to implement. Need to think about how to do this. Not in the nearest future.


Magento/Adobe Commerce 2.4.6 compatibility

When do you plan to release a version compatible with Magento 2.4.6?

Adobe has also dropped PHP 7.4 support and introduced compatibility with PHP 8.2 in Magento / Adobe Commerce 2.4.6 so this must also be catered for in an updated 2.4.6 compatible version of the Zip Magento 2 module.

Testing the latest version of Zip 1.2.2 against Magento 2.4.6 & PHP 8.2 the whole cart / checkout process is broken when the zip payment method is enabled. The following error is thrown in Magento's system.log

cmain.CRITICAL: Deprecated Functionality: Creation of dynamic property Zip\ZipPayment\Model\Config::$_urlBuilder is deprecated in /var/www/html/vendor/zip/magento2/Model/Config.php on line 306 [] []

I've Tweeted about the issue, here is the answer I've got:
Hi
@Magenable
👋
Thank you for reaching out, I've passed on your interest to our team.
Keep an eye out for notifications regarding our app updates 👀
If you would like to chat further regarding this, please feel free to reach out via private message 📨
Thanks,
Kyle 😁

Not really encouraging :(

Hi Zip team
any updates, when may we expect the fix?

Here is a patch I did for version 1.2.2 to fix issues with magento 2.4.6.
zip-money.patch
The below should fix the issue above.
--- a/vendor/zip/magento2/Model/Config.php	2022-08-25 13:23:56.000000000 +1000
+++ b/vendor/zip/magento2/Model/Config.php	2023-06-06 11:56:51.235993621 +1000
@@ -284,8 +284,16 @@
      */
     protected $_locale;

+    /**
+     * @var \Magento\Framework\Module\ModuleListInterface
+     */
     protected $_moduleList;

+    /**
+     * @var \Magento\Framework\UrlInterface
+     */
+    protected $_urlBuilder;
+
     public function __construct(
         \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
         \Magento\Store\Model\StoreManagerInterface $storeManager,


EDIT THIS PLEASE (Copied Protos from Server)

:crown: copied proto files from server repo: a95fe293 feat: Wallet management endpoints for providers (#1810)
UPDATE THIS AND PR TITLE

@tmarkovski the PR title wasn't updated, FYI. Thats why it comes in as "EDIT THIS PLEASE".

Can we make the PR title same as the origin PR?


Error - 1109

TuyaOpenAPI response: {"code":1109,"msg":"param is illegal, please check it","success":false,"t":1636213979419} path = /v1.0/iot-01/associated-users/actions/authorized-login
TypeError: Cannot destructure property 'access_token' of 'res.result' as it is undefined.
at TuyaSHOpenAPI._refreshAccessTokenIfNeed (/usr/local/lib/node_modules/homebridge-tuya-platform/lib/tuyashopenapi.js:49:11)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at TuyaSHOpenAPI.request (/usr/local/lib/node_modules/homebridge-tuya-platform/lib/tuyashopenapi.js:145:7)
at TuyaSHOpenAPI.getDevices (/usr/local/lib/node_modules/homebridge-tuya-platform/lib/tuyashopenapi.js:63:15)
at TuyaPlatform.initTuyaSDK (/usr/local/lib/node_modules/homebridge-tuya-platform/index.js:90:19)
Attention⚠ ⚠ ⚠ ! You get an error!
Failed to get device information. Please check if the config.json is correct.
request path = /v1.0/iot-01/associated-users/actions/authorized-login
There are no error descriptions here
https://developer.tuya.com/en/docs/iot/error-code?id=K989ruxx88swc

https://github.com/tuya/tuya-homebridge/issues/134#issuecomment-948002663
the solution helped me too as here

The solution didn't help me. I'm based in Canada, so the host was correct. What helped was:

Create new account on IoT website, with region Canada
Link mobile phone
Create a new smart home project with both Western and Eastern America data centers
Create new account for Tuya mobile app. Region Canada is auto selected and can't be changed. It was wrong when I user Google login.
Reinstall tuya plugin because it caches config


Fix bug 135: Copying parent molecule instead of fragment

See #135

Thanks, @FelixBaensch , looks good to me.
@ToLeWeiss , can you confirm?

Thank you for the fix @FelixBaensch , looks like a nice solution to me @JonasSchaub .

@JonasSchaub Feel free to merge, since you are the product owner.


Possible optimization (if not a bug): should the sub programs in the explainer also follow the constraint?

Hi Andrew,
Not sure if I understand correctly, but currently the subprogs generated by the explainer contain the ones which don't satisfy things like non_datalog. Is it true that they should be pruned?

Yes, that is true, it prunes programs that do not necessarily obey the constraints.
Kind regards,
Andrew

On 10 Feb 2023, at 02:07, yangdinglou @.***> wrote:
Hi Andrew,
Not sure if I understand correctly, but currently the subprogs generated by the explainer contain the ones which don't satisfy things like non_datalog. Is it true that they should be pruned?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: @.***>


AWS Visual Studio - Failed to retrieve credentials exception

AWS Visual Studio - Failed to retrieve credentials when debugging
Current Behavior
Get the following exception
"AmazonServiceException: Failed to retrieve credentials from EC2 Instance Metadata Service"
If I copy my existing credentials from c:\users[username].aws\credentials to another location e,g, c:\temp.aws and
add the ProfilesLocation to my appsettings.json it works
"AWS": {
"ProfilesLocation": "C:\temp\.aws\credentials",
"Profile": "default",
"Region": "eu-west-2"
}
It seems that aws is having a problem loading from the default location but not sure why. I am running as administrator and have full control on this folder.
Steps to Reproduce (for bugs)
Use any aws services such as S3 or SystemsManager using awssdk from within visual studio
Context
Cant check in the workaround so its painful to change the location everytime i branch
Your Environment

AWSSDK.Core version used:
3.3.2
Operating System and version:
Windows 10
Visual Studio version:
2017
Targeted .NET platform:
.Net Core 2.1

.NET Core Info
.NET Core SDK (reflecting any global.json):
Version:   2.1.302
Commit:<PHONE_NUMBER>
Runtime Environment:
OS Name:     Windows
OS Version:  6.1.7601
OS Platform: Windows
RID:         win7-x64
Base Path:   C:\Program Files\dotnet\sdk\2.1.302\
Host (useful for support):
Version: 2.1.2
Commit:  811c3ce6c0
.NET Core SDKs installed:
1.1.0 [C:\Program Files\dotnet\sdk]
2.0.0 [C:\Program Files\dotnet\sdk]
2.0.2 [C:\Program Files\dotnet\sdk]
2.1.202 [C:\Program Files\dotnet\sdk]
2.1.302 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 1.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

I'm not able to reproduce any problems, ProfileLocation is being correctly read in my ASP.NET Core application for service clients created by ASP.NET Core dependency injection. Are you creating the service clients yourself or are you relying on ASP.NET Core's dependency injection system to create the service clients which is what reads in the appsettings.json file?

Hi, Thanks for reply. I'm using the ASP.net core DI as below
          _serviceCollection.AddDefaultAWSOptions(_configuration.GetAWSOptions());

           _serviceCollection.AddAWSService<IAmazonS3>();
           _serviceCollection.AddAWSService<IAmazonSimpleSystemsManagement>();
           _serviceCollection.AddAWSService<IAmazonStepFunctions>();
           _serviceCollection.AddAWSService<IAmazonDynamoDB>();

The _configuration.GetAWSOptions() will be loading options from my appsettings.json as described.
My problem is that I can't see any logs or what path is generated to load the credentials when I dont specify ProfilesLocation in my appsettings. The problem must be an issue with the path not existing or a security issue on the folder. Any help in that area would be great.
Thanks again

Just to add that Im not sure why the exception mentions the EC2 Instance Metadata Service when Im running locally. Is there some environement variable I havent set. Thanks

I'm closing this due to inactivity and inability to reproduce.  Feel free to reopen it if you continue to have difficulties.


Adding the ability to tag the source of an event for the analytics

Describe changes
I implemented/fixed _ to achieve _.
Pre-requisites
Please ensure you have done the following:

[ ] I have read the CONTRIBUTING.md document.
[ ] If my change requires a change to docs, I have updated the documentation accordingly.
[ ] If I have added an integration, I have updated the integrations table and the corresponding website section.
[ ] I have added tests to cover my changes.

Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Other (add details above)

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.1 out of 2 committers have signed the CLA.:white_check_mark: bcdurak:x: Baris Can DurakBaris Can Durak seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Add support for header with proof message type & validation

What was wrong?
Add support for HeaderWithProof history network message type, along with proof generation/validation.
How was it fixed?

Added a HeaderWithProof message type to History network
Implemented support for generating accumulator proofs via master accumulator
Implemented support for validating accumulator proofs against master accumulator
Found a bug in EpochAccumulator ssz encoding, which required updating the test accumulators
Added tests against fluffy & ultralight (epoch & master) accumulators to validate that we are encoding / decoding our message values similarly
Added tests against fluffy's header with proofs to validate that we are generating/validating our proofs similarly
Reorganized some test assets

To-Do

[ ] Add entry to the release notes (may forgo for trivial changes)
[ ] Clean up commit history

I think it would be useful to include all resources for testing in a separate test folder. for example assets/test. This way we will know what files are required for testing and what is required for running the binary (we can include them inside the binary, see  https://github.com/ethereum/trin/issues/466).


Create Github Action to Examine Terraform Scripts

Create github action to examine terraform scripts.
Fix ip resolve error: it should be ipv4 address but the result is ipv6 address.
Add network_acls block for keyvault in terraform scripts.

Linked issue: https://github.com/Azure-Samples/azure-spring-boot-samples/issues/269

Close this pr, the github action has strict rule of keyvault terraform scripts, the network_acls limit the ips, but the ip in local machine may change.


Impossible import annotations in MOT 1.1 format

My actions before raising this issue

[ ] Read/searched the docs
[ ] Searched past issues

It is impossible to upload annotations in MOT 1.1 format when images names contain only numbers
Expected Behaviour

Annotations should be uploaded successfully
Current Behaviour

Possible Solution

Steps to Reproduce (for bugs)

Create a task with images whose names contain only numbers (or restore demo_task.zip)
Create dummy annotations
Export annotations in MOT 1.1 format
Upload this annotations

Details
Traceback (most recent call last):
  File "/home/maya/Documents/cvat_ai/cvat/.env/lib/python3.8/site-packages/rq/worker.py", line 936, in perform_job
    rv = job.perform()
  File "/home/maya/Documents/cvat_ai/cvat/.env/lib/python3.8/site-packages/rq/job.py", line 684, in perform
    self._result = self._execute()
  File "/home/maya/Documents/cvat_ai/cvat/.env/lib/python3.8/site-packages/rq/job.py", line 690, in _execute
    return self.func(*self.args, **self.kwargs)
  File "/usr/lib/python3.8/contextlib.py", line 75, in inner
    return func(*args, **kwds)
  File "/home/maya/Documents/cvat_ai/cvat/cvat/apps/dataset_manager/task.py", line 775, in import_task_annotations
    task.import_annotations(f, importer)
  File "/home/maya/Documents/cvat_ai/cvat/cvat/apps/dataset_manager/task.py", line 658, in import_annotations
    importer(src_file, task_data, **options)
  File "/home/maya/Documents/cvat_ai/cvat/cvat/apps/dataset_manager/formats/registry.py", line 37, in __call__
    f_or_cls(*args, **kwargs)
  File "/home/maya/Documents/cvat_ai/cvat/cvat/apps/dataset_manager/formats/mot.py", line 112, in _import
    _import_task(dataset, instance_data)
  File "/home/maya/Documents/cvat_ai/cvat/cvat/apps/dataset_manager/formats/mot.py", line 22, in _import_task
    frame_number = task_data.abs_frame_id(frame_number)
  File "/home/maya/Documents/cvat_ai/cvat/cvat/apps/dataset_manager/bindings.py", line 198, in abs_frame_id
    raise ValueError("Unknown internal frame id %s" % relative_id)
ValueError: Unknown internal frame id<PHONE_NUMBER>

Context

Your Environment

Git hash commit (git log -1): c3dd3499
Docker version docker version (e.g. Docker 17.0.05):
Are you using Docker Swarm or Kubernetes?
Operating System and version (e.g. Linux, Windows, MacOS):
Code example or link to GitHub repo or gist to reproduce problem:
Other diagnostic information / logs:
Logs from `cvat` container

why is int and not float?


fix: include path to test file in "after teardown" error

Summary
The logging can happen long after the test has been printed as PASS to the user, so let's include the test file in the message to make it easier to track down (not super useful in sync situations as the stack trace should include it, but that doesn't happen in async contexts)

Test plan
Green CI

Codecov Report

Merging #11885 (11f1edb) into main (7c4ea24) will decrease coverage by 0.05%.
The diff coverage is 10.00%.

@@            Coverage Diff             @@
##             main   #11885      +/-   ##
==========================================
- Coverage   68.93%   68.87%   -0.06%
==========================================
  Files         312      312
  Lines       16414    16432      +18
  Branches     4761     4768       +7
==========================================
+ Hits        11315    11318       +3
- Misses       5072     5087      +15
  Partials       27       27

Impacted Files
Coverage Δ

packages/jest-runner/src/runTest.ts
3.47% <0.00%> (ø)

packages/jest-runtime/src/index.ts
56.44% <10.52%> (-0.98%)
:arrow_down:

packages/expect/src/utils.ts
96.13% <0.00%> (+0.55%)
:arrow_up:

Continue to review full report at Codecov.

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


Modify slot_usage for source_mat_id in Biosample

@mslarae13 thanks for reviewing

https://github.com/microbiomedata/nmdc-schema/pull/1449

You raised one comment that I didn't understand how to address
I'm going to merge the PR now but we can revisit this whenever you want

Oh! My comment was just if the things we put in 'todo' should be in 'notes' so it doesn't show up in the documentation.. we talked about it a bit at the metabolink meeting today... I made this issue for @sujaypatil96  so it might be moot.
https://github.com/microbiomedata/nmdc-schema/issues/1495

see

#1898

Resolved by opening #1495


[Feature] Making the contributors section dynamic.

Description
Making the contributors section dynamic in Readme.md
The svg will look something like this with limit upto 54 contributors & will move from right to left.
Screenshots

Checklist

[X] I have checked the existing issues
[X] I have read the Contributing Guidelines
[X] I am willing to work on this issue (optional)
[X] I am a GSSoC'23 contributor

/assign


Conditional spawns don't work across round restarts with different presets

I couldn't reproduce this issue locally so I'll close this.


fetch_int -> from_integer; integer_representation -> to_integer

sage deprecated fetch_int and integer_representation in vesion 3.9: https://www.sagemath.org/changelogs/sage-9.8.txt.
I'm getting the following warning when running our code
/usr/lib/python3.12/site-packages/sage/structure/sequence.py:233: DeprecationWarning: fetch_int is deprecated. Please use from_integer instead.
See https://github.com/sagemath/sage/issues/33941 for details.
  x = list(x)  # make a copy even if x is a list, we're going to change it
/tmp/MAYO-sage/sagelib/utilities.py:29: DeprecationWarning: integer_representation is deprecated. Please use to_integer instead.
See https://github.com/sagemath/sage/issues/33941 for details.
  bs += [v[i*_sage_const_2 ].integer_representation() |
/tmp/MAYO-sage/sagelib/utilities.py:30: DeprecationWarning: integer_representation is deprecated. Please use to_integer instead.
See https://github.com/sagemath/sage/issues/33941 for details.

We should switch to from_integer to_integer.
Thanks yx7

Uff - this breaks on still fairly recent sage versions (9.5 in CI) - let's not change this yet.

Let's wait on this one, yes. Let me see if I find the plans to upgrade the CI version..


nodePackages.dat:added dependencies to fix compilation

Motivation for this change
Fixes https://github.com/NixOS/nixpkgs/issues/76611
Thanks @lilyball for helping
Things done

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

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

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

Notify maintainers
cc @

Can you fix the formatting in your commit message please?

@GrahamcOfBorg build nodePackages.dat


config/operator: fix omitempty, +optional, +nullable without behaviour change

Second PR with changes which

do not change serialization behavour
but where the API owners should check (independently from the PR) whether they really means what they specified (e.g. optional, but no pointer to structs).

This updates the omitempty, // +optional, // +nullable (soon a new tag for CRD validation schema generation) tags on all config/v1 and operator/v1 types which either belong to the master team or are uncontroversial. The others are pushed into separate PRs for the respective teams.
This were the rules:

no omitempty for non-pointer structs
added // +optional where we had omitempty
added // +nullable where we have // +optional, but due to overrides of JSONMarshal we cannot apply omitempty.

Plan to merge this after lunch unless there are significant comments.  This unsticks our generation or openapi schemas for CRD validation.


/token endpoint without client secret is redirecting to LoginUrlAuthenticationEntryPoint

Describe the bug
OAuth2AuthorizationServerConfiguration.applyDefaultSecurity(http);
		http.getConfigurer(OAuth2AuthorizationServerConfigurer.class)
			.oidc(Customizer.withDefaults());	// Enable OpenID Connect 1.0
		http
			// Redirect to the login page when not authenticated from the
			// authorization endpoint
			.exceptionHandling((exceptions) -> exceptions
				.defaultAuthenticationEntryPointFor(
					new LoginUrlAuthenticationEntryPoint("/login"),
					new MediaTypeRequestMatcher(MediaType.TEXT_HTML)
				)
			)

Added
.oauth2ResourceServer((resourceServer) -> resourceServer
.jwt(Customizer.withDefaults()));
As part of below bean
	@Bean
	@Order(2)
	public SecurityFilterChain defaultSecurityFilterChain(HttpSecurity http)
			throws Exception {
		http
			.authorizeHttpRequests((authorize) -> authorize
				.anyRequest().authenticated()
			)
			// Form login handles the redirect to the login page from the
			// authorization server filter chain
			.formLogin(Customizer.withDefaults());

		return http.build();
	}

To Reproduce
If i dont give client secret in token endpoint request it is going to /login
Expected behavior
It should throw 401
Sample
A link to a GitHub repository with a minimal, reproducible sample.
Reports that include a sample will take priority over reports that do not.
At times, we may require a sample, so it is good to try and include a sample up front.

@learningvkpg To help me troubleshoot your issue, please provide a minimal sample with detailed steps on how to reproduce the issue.
I will take a look at this after you provide the sample and steps to reproduce.


tfdbg: add persistent config (cherry-pick to r1.4)

Add two persistent UI configurations backed by a file at ~/.tfdbg_config by default.

graph_recursion_depth, which controls the recursive output of li/lo commands.
mouse_mode, which controls the mouse state of the CursesUI.

Add config command to set and inspect the persistent configuration. E.g.,

config show
config set graph_recursion_depth 3
config set mouse_mode False

Fixes: #13449
PiperOrigin-RevId: 172270804

The new cherrypick policy is we only accept critical bugfixes or documentation updates into the release.
As the issue looks like a feature request, I will close the PR.
We can discuss internally whether to have this cherrypick, if you think we definitely need it, let's start an email thread.


Flycheck not working on Java files

What did you expect to happen?
Flycheck should report errors in source code with a .java extension.
What actually happened?
The symbol in the bottom right corner does not change, remaining a clock and displaying the words "Flycheck, Running..." on mouseover.
Additional details:

Private config: https://bin.snopyta.org/?8f197c649d2cc8ff#88ZSMnn7wGxvhYHK7LP52wEXL4ZSQga6EyaVXXtb5ubp
Screenshot:

The *Messages* buffer only says:Meghanada-Server Starting ...
Server waiting client connection ...
meghanada-client process start ...
Please wait. Meghanada indexing ...

Flycheck "Verify setup" output (note that the problem occurs even if I register and select the "meghanada" checker):Syntax checkers for buffer ThreadExample.java in java-mode:

First checker to run:

  meghanada-live
    - may enable:       yes
    - may run:          t
    - Meghanada server: Running

The following syntax checkers are not registered:
  - meghanada
Try adding these syntax checkers to `flycheck-checkers'.

Flycheck Mode is enabled. Use SPC u C-c ! x to enable disabled checkers.

--------------------

Flycheck version: 32snapshot
Emacs version:    27.2
System:           x86_64-pc-linux-gnu
Window system:    x

Steps to reproduce:

Open a .java file
Make sure there is an error in it
Flycheck loads forever

System information:
https://pastebin.com/P05RS3W3

I cannot reproduce this. Flycheck works fine in my simple test on vanilla Doom, on 27.1, 27.2 and 28.0.50.

Please update Doom to the latest commit.
Please check *Messages* for any warnings or error messages (SPC h e or C-h e will open this buffer)
Check the *meghanada-server-logs* buffer for clues (SPC b B or C-x b to switch to it)

The *Messages* buffer doesn't contain anything other than a warning I just noticed: Warning: (wrong-type-argument characterp nil)
This, on the other hand, is Meghanada's log; it doesn't seem to contain anything strange, but I'll let you judge: https://bin.snopyta.org/?30dc8af47b13dbf1#4DXWJg2jpJ43tYMQGnbfK1tayW4S25G1N8G33gV8niid

I have tried moving .doom.e and .emacs.e, reinstalling Doom and trying again with a new Java file, but the problem keeps recurring.
So since it seems to be a Meghanada problem (rather than a Doom problem) I tried installing java-lsp as you suggested, but that doesn't seem to work either. Flycheck says it has no checker available and the *Messages* buffer says File mode specification error: (doom-hook-error lsp! (invalid-function lsp!)). What could this be due to?

@hlissner I don't know if this information is enough to reopen the issue, but I think I found the cause of the error.
Since Arch systems have a script to swap Java versions on the fly, I attempted to install and run OpenJDK 8 instead of 15, and although Meghanada should be compatible with any version greater than or equal to 8, this fixed the problem.


Some embed previews overflow preview item

When embedding e.g. a tweet, this overflow the embed preview, e.g. this tweet https://twitter.com/umbraco/status/1402194892764372996

We could add overflow: hidden to preview-item class, but display: inline-block may be nicer (at least in single mode).

Hi @bjarnef
Thanks for raising the issue. Will have a look after CG. To be honest I did not know that you could embed tweets. Our customer main usage is Youtube and Vimeo.
Dave


Access token expired error when using spotdl as a library.

I'm getting access token expired error when using spotdl as a library.
Error message
http status: 401, code:-1 - https://api.spotify.com/v1/tracks/6jRmczmtqIiXZBKUBHNgTn?si=u84Ru2cFRzufAPOc4qTIcg:
The access token expired
SpotifyException
Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.6/site-packages/spotipy/client.py", line 119, in _internal_call
r.raise_for_status()
File "/app/.heroku/python/lib/python3.6/site-packages/requests/models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.spotify.com/v1/tracks/6jRmczmtqIiXZBKUBHNgTn?si=u84Ru2cFRzufAPOc4qTIcg
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.6/site-packages/spotdl/downloader.py", line 94, in init
self.content, self.meta_tags = youtube_tools.match_video_and_metadata(raw_song)
File "/app/.heroku/python/lib/python3.6/site-packages/spotdl/youtube_tools.py", line 55, in match_video_and_metadata
meta_tags = spotify_tools.generate_metadata(track)
File "/app/.heroku/python/lib/python3.6/site-packages/spotdl/spotify_tools.py", line 42, in generate_metadata
meta_tags = spotify.track(raw_song)
File "/app/.heroku/python/lib/python3.6/site-packages/spotipy/client.py", line 223, in track
return self._get('tracks/' + trid)
File "/app/.heroku/python/lib/python3.6/site-packages/spotipy/client.py", line 146, in _get
return self._internal_call('GET', url, payload, kwargs)
File "/app/.heroku/python/lib/python3.6/site-packages/spotipy/client.py", line 124, in _internal_call
headers=r.headers)
spotipy.client.SpotifyException: http status: 401, code:-1 - https://api.spotify.com/v1/tracks/6jRmczmtqIiXZBKUBHNgTn?si=u84Ru2cFRzufAPOc4qTIcg:
The access token expired
Is there any way to refresh token programmatically using spotdl as a library?
Originally posted by @cyberboysumanjay in https://github.com/ritiek/spotify-downloader/issues/150#issuecomment-457835793

Any quick fix for this? @ritiek

Take a look how it is done when using the CLI:
https://github.com/ritiek/spotify-downloader/blob/a182fe5eb38a4c952fbd56a2f504aa7e5ebf0b03/spotdl/downloader.py#L204-L210
You would need to wrap your code in a try-catch block and look for the spotipy.client.SpotifyException exception which gets raised when the token expires. Then you need to regenerate the token and continue with the usual work.
(Cross-referencing #468)

I can confirm this is fixed by https://github.com/ritiek/spotify-downloader/pull/506


Create example models using python in core test suite

Right now https://github.com/Deltares/Ribasim/blob/main/core/test/basin.jl runs pre-prepared models that it downloads in runtests.jl. This creates an extra step when changing things. Preferably we run the python code before running the tests.

Yeah, that is not correct

Let's keep this open after #149 so we can look into further improvements later, meaning the PythonCall solution mentioned in https://github.com/Deltares/Ribasim/pull/149#issue-1654524866.

Closed in favor of #244


Map is not loading.

IMPORTANT

[X] My question is related to the samples and content within this repository. For all other issues, open a ticket with Esri Technical Support or post your question in the community forum.
[X] I have checked for existing issues to avoid duplicates. If someone has already opened an issue for what you are experiencing, please add a 👍 reaction and comment as necessary to the existing issue instead of creating a new one. You can also refer to this repo's troubleshooting guide for hints and suggestions.

Actual behavior
I m using angular application. I am getting below error. This error coming in loop and map is not loading. please find below [screenshot]
Please let me know if I miss anything in code, I am referring code from https://github.com/Esri/jsapi-resources/blob/main/esm-samples/jsapi-angular-cli/src/app/app.component.ts

Expected behavior
Map should be visible and error should not be there
Reproduction sample
na
Reproduction steps
npm install @arcgis/core
created component
imported below modules
import Map from '@arcgis/core/Map';
import Config from '@arcgis/core/config';
import MapView from '@arcgis/core/views/MapView';
import Bookmarks from '@arcgis/core/widgets/Bookmarks';
import Expand from '@arcgis/core/widgets/Expand';
initilize webmap and mapview
const webmap = new WebMap({
basemap:"streets-vector"
});
const view = new MapView({
  container:'mapdiv',
  map: webmap
});

Reproduction browser
Chrome
Operating System (check https://whatsmyos.com)
Windows

Closing, this issue should be posted to community.esri.com for better visibility on general usage questions.


Possible UI/UX improvements of UTBot Wizard #494

check presence of SFTP and SARIF plugins
configure SFTP by writing sftp.conf
runs SFTP sync for project with server copy

Signed-off-by: Alexey Utkin<EMAIL_ADDRESS>

You can check new wizard in the pre-release

You can check the pre-release
https://github.com/UnitTestBot/UTBotCpp/releases/tag/2022.10.6
with new wizard.


Update .gitignore

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Seems unclear what this aims to solve

It aims not pollute my git history with irrelevant stuff.


How to specify the bert model path? What is it expecting?

I am trying to use this library for my personal project. Here is what I am doing in the code
from kashgari.tasks.labeling import BiGRU_Model
from kashgari.corpus import ChineseDailyNerCorpus
import kashgari

import os
cwd = os.getcwd()

print(os.path.join(cwd, 'uncased_L-12_H-768_A-12'))

bert_embedding = BERTEmbedding(os.path.join(cwd, 'uncased_L-12_H-768_A-12/'), sequence_length=30)
model = BiGRU_Model(bert_embedding)

train_x, train_y = ChineseDailyNerCorpus.load_data()
model.fit(train_x, train_y)

It is giving error all the time like this
WARNING:root:CUDA GPU available, you can set `kashgari.config.use_cudnn_cell = True` to use CuDNNCell. This will speed up the training but will make model incompatible with CPU device. WARNING:root:CuDNN enabled, this will speed up the training, but will make model incompatible with CPU device. D:\Pirimid\bert_exp\uncased_L-12_H-768_A-12 Traceback (most recent call last):   File "bert_kashgari.py", line 11, in <module>     bert_embedding = BERTEmbedding(os.path.join(cwd, 'uncased_L-12_H-768_A-12/'), sequence_length=30)   File "C:\Users\Urvish\Envs\tf_1_14\lib\site-packages\kashgari\embeddings\bert_embedding.py", line 73, in __init__     from_saved_model=from_saved_model)   File "C:\Users\Urvish\Envs\tf_1_14\lib\site-packages\kashgari\embeddings\base_embedding.py", line 78, in __init__     raise ValueError() ValueError
What I am doing wrong here? Please, help.

You need to add task param to BERTEmbedding init function. Here is the doc.


cardano.enable() throws an exception when the connection is not accepted

Description
When the cardano.enable() method is called from JavaScript, there are 2 possible scenarios.

The user accepts the connection
The user cancels the connection or closes the pop-up window

In the first case, the promise is resolved and returns true. But in the second case, an exception is thrown and the execution of the method is interrupted. The promise never returns anything.
Steps to reproduce

Run await cardano.enable() in the browser console
Close the nami popup window

Expected behavior
The promise returned by await cardano.enable() resolves and returns false.
Actual behavior
An exception is thrown with the message: The request was refused due to lack of access - e.g. wallet disconnects.
The promise is not resolved.
About
Nami version: 3.0.0
Browser: Chrome

Edit: I do realize that the current behavior is according to the specifications in the README, but it is very counter intuitive. Throwing exceptions should be avoided if possible.

The cardano.enable() function works correct. Returning false would not be correct. The promise is resolved in both cases, however in one it throws an error. If you simply want to ignore it, you can catch the error and do nothing with it.

Returning false would not be correct.

Why not? Using exceptions to control program flow is not a good practice imo. Besides that it's not consistent with cardano.isEnabled() which returns false if the wallet is not connected.

You can't compare both method. cardano.isEnabled()  is a boolean method, it will return true or false by design. It could also throw an exception due to internal failure. In the case of cardano.enable(), the expected result is always a successful connection. Returning only false on failure would bypass the actual cause of the failure and you would be clueless about what is causing the failure.
I disagree that Exception control is a bad practice, on the other side, silent failure would be a bad practice.


DIO 8

Ready for the most part, mostly tweaking the level of abstractions to allow for a clean transition into the 2-phase commit->flush approach for the next minor release before/when react fiber(async mode) is released and cooperative scheduling is proven a necessary abstraction.
Currently the infrastructure looks like  reconcile -> commit -> renderer.
The transition would make it look like reconcile -> commit  ...  [DOM/Native...]renderer(commits).

Symbol is not supported in IE, should document shim requirement
https://github.com/thysultan/dio.js/pull/28/files#diff-04c6e90faac2675aa89e2176d2eec7d8L16

@Zolmeister Yes, it falls back to a string key[1] if there are no symbols same thing for WeakMap used in the event delegation system[2].
[1]
[2]

rendering to document.documentElement fails
page becomes an empty

What are you rendering? Can you post an example.

Emptyness seems to be caused by a mutation of
After simplification, it renders a nested

    <title>xxx</title>
    body

@Zolmeister What where you trying to render that caused the emptyness? An exact example would help.
On that note if you wanted to render to  you would use a fragment
dio.render([...])

good call, the issue now appears to be that fragments don't support top level components
class Head
  render() { h('head') }
class Root
  render() { [h(Head), h('body')] }

cannot read property `type` of null

This works for me.
class Head {
  render() {
  	h('head')
  }
}

class Root {
  render() {
  	return [
  		h(Head),
  		h('body')
  	]
 }
}

dio.render(Root)

Can you post a reproduction of your case.

sorry I should have clarified, it seems to be coming from toString()
Apologies in advance if I mistake some issues, I'm porting a giant app over and it can be difficult to determine where the issue originates

How are you using toString()? The following example works for me.
var dio = require('./dist/dio.js')

class Head {
  render() {
    return h('head')
  }
}

class Root {
  render() {
    return [
      h(Head),
      h('body')
    ]
  }
}

console.log(`${h(Root)}`)
//

Alright, I figured it out. Completely my fault, I was passing an invalid component there. Thanks for your patience

Out of curiosity what kind of component was it, if it is something we can detect it in the implementation and throw/warn with a useful error that might help.

So it did catch it here: https://github.com/thysultan/dio.js/pull/28/files#diff-a6b77a6eb2476ebcc9cb30d1be3aaa2aR106
However the object was circular so the error came out TypeError: Converting circular structure to JSON

I wonder if we should JSON.stringify there.

I'm having issues with hydration.
It seems to assume the DOM perfectly matches the vtree.
e.g.
abc

dio.hydrate([h('body', 'xyz')])

abc

The way I thought it would work was to parse the existing DOM into a vtree, and then diff against the vtree on first render. This is what I'll have to implement otherwise.

It should work as you described, i've updated the implementation to reflect that.

It still doesn't seem to work as expected

<stuff>...</stuff>

dio.hydrate([h('body', h('div', 'xxx'))])

<stuff>...</stuff>xxx

Yes, that's by design, it skips element nodes that don't match, but correct text nodes that don't match.

Even if the node matches I'm still running into issues where it appends.

xxx

dio.hydrate([h('body', h('div', className: 'abc', 'xxx'))])

xxx

xxx

Can't reproduce.
This works for me, both minified/unminified versions:

xxx

render errors are no longer handled properly in toString
class X
  render: ->
    throw new Error 'test'
'' + h(X)
# TypeError: Cannot read property 'type' of null

undefined sets value to false
h('input', {value: undefined})
// expected: ''
// resulted: 'false'

now the error callback is being called 3 times, once with undefined on the error
class X
  componentDidCatch (err) { /* called 3 times */ }
  render { throw new Error('test') }

Can there at least be a way to silence error logs while running my test suite?

now the error callback is being called 3 times, once with undefined on the error

Can't reproduce. This works for me:
var dio = require('../dist/dio.js')

class X {
  componentDidCatch (err) {
  }
  render() {
  	throw new Error('test')
  }
}

console.log(h(X)+'')

Can there at least be a way to silence error logs while running my test suite?

Yes i think we do need a way to do this, i was silencing errors in the test suit with noop'ing console.error console.error = () => {} but i admit that doesn't look good.
What do you suggest?

I mean, if you're going to default to false anyways; may as well just not log if it's caught

if you're going to default to false anyways;

Elaborate?

I'd like to re-iterate a desire for the hydrate api to diff the DOM and not skip any elements
My current setup renders server-side a small-screen DOM (for mobile), but upon rendering on the client adjusts dynamically based on screen-size upon first render. This leads to differing initial vtrees.

Can you elaborate with an example?
The current hydration implementation appends elements to the DOM that it could not find the only thing it doesn't do is remove elements. Isn't this what you want to archive?

Exactly, remove elements that don't match.
e.g.
if (!client || window.matchMedia('max-width 600px').matches) {
  h('div', h('span', 'switch to bigger screen'))
} else {
    h('div', h('div', 'this screen is big enough'))
}

would leave behind the

Sure, i'm ok with this. I think i now understand the question you where asking in #30

hydration is still skipping elements. Something like:

content

h('body', h('div', 'contentv2'))

leaves

hydration also doesn't remove extraneous child elements. e.g.

xxx

yyy

h('body', h('div', 'xxx'))

leaves
yyy

render error when rendering a list of the same component
class Picker
  render {
     h( 'div', 'picker')
  }

h('div',
  [
    h(Picker)
    h(Picker)
  ])

Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.

Can't reproduce. https://jsbin.com/dilapiv/edit?js,output
class Picker {
  render() {
    return h('div', 'picker')
  }
}

dio.render(h('div', [h(Picker), h(Picker)]))

I should clarify, only during hydrate

Can you elaborate with an example that i can use to reproduce the error?

https://jsbin.com/dilapiv/1/edit?html,js,output

Link points to the same jsbin i shared, you might need to clone it first

oops, indeed it does. updated
https://jsbin.com/natipafebu/1/edit?html,js,output

Yes that looks like another bug. Can you also make on that reproduces the render error you where having?

Can't reproduce the error outside of my app. It's likely unrelated to this issue and have to do with how I'm mutating the tree. I'll continue investigating.

Currently unmount happens in a top-down manner. It seems preferable to be bottom-up instead, and mount preferably be top-down. Intuitively a parent must exist before a child can exist, and a child cannot exist without a parent.
e.g.
class A
  componentDidMount() { console.log('mount A') }
  componentWillUnmount() { console.log('unmount A') }
  render() { h(B) }
class B
  componentDidMount() { console.log('mount B') }
  componentWillUnmount() { console.log('unmount B') }

render(h(A))
/*
currently:
mount B
mount A
unmount A
unmount B

preferable:
mount A
mount B
unmount B
unmount A
*/

There's no contradiction in the mount order, DidMount B signals that B mounted into A(its parent) and DidMount A signals that A mounted into it's parent(what ever you passed to dio.render) which is implicitly the  element. The reverse is true for WillUnmount and WillMount.

It's not a contradiction; but a logical inconsistency regarding the parent/child relationship.
DidMount B means that B mounted into A, but it doesn't (currently) mean that A has been mounted.
A child should only be considered mounted after it's parent has been considered mounted.

Interesting. On the other side of this is that Components are compound structure, the only representation they have within the DOM/Native view is in regards to the children they produce. As such a component is not considered mounted until its children are mounted.

So question, what happens if I return a promise from render() in a child. Will it not mount until resolved? Will it's parent not mount until the child resolves?

It will be considered mounted since it's children are. You could also return null/undefined from render which render(nothing) to the DOM but they are considered mounted.

Function components don't catch errors (rendered to string)
// server-side
r = function() {
  throw new Error('x');
};

r.componentDidCatch = function(err) {
  return console.log('did throw');
};

console.log('hmm', h(r) + '');

// expected 'did throw' to be logged

Diff component vtrees instead of replacing
If I have two separate head components that render identically, they should not cause a DOM re-write (#30)
// Can be simplified by omitting Ps, but wanted to show my full use-case
H1 = function() {
  return h('head', h('title', 'one'));
};
H2 = function() {
  return h('head', h('title', 'two'));
};
P1 = function() {
  return [H1];
};
P2 = function() {
  return [H2];
};

forceUpdate = null;
page = P1;
Root = function() {
  forceUpdate = this.forceUpdate.bind(this);
  return page;
};

$el = document.createElement('div');
render(Root, $el);
$title = $el.querySelector('title');
page = P2;
forceUpdate();
console.log($title, $el.querySelector('title'));

// Expected:
// <title>two</title>, <title>two</title>
// Received:
// <title>one</title>, <title>two</title>

P2 and P1 do not point to the same function. The new component has to replace the older one since we cannot know if they share the same internal state.

This could archive what you posted.
function Head ({title}) {
	return h('head', h('title', title))
}

render(h(Head, {title: 'one'}))
render(h(Head, {title: 'two'}))

Why does it have to replace it? The vdom is independent of state because it has already been rendered. The DOM node (when detached) has a known vtree that can be used as the source for the component diff.
Obviously you could try to avoid it, but it's not so easy in production as this toy example.

Because the components(functions) are not the equal. The components generated vtree is dependent on the component, when the component is unmounted we loose any references to the tree it generated. The new component cannot diff against any old tree at this point.
Looking at your example P1 and P2 could assume one component that renders either [H1] or [H2] depending on the props it receives.

So then either pass the tree to the replacing component in lock-step, or leave the vtree on the node
Regardless of P1 and P2, the different head is causing script re-requests.

The suggestion i made will not replace the .
Leaving the vtree of the node will create memory leaks.

Why? It would only write to document DOM nodes so at most would use O(nm) extra memory (n nodes, m size of vtree). You could maybe hack it to remove the vtree on next tick (setTimeout) ~. But ok, so just pass the vtree during the diff operation.
This did not work for me, perhaps I misunderstood your suggestion.
P1 = ({a}) -> if a then [H1] else [H2]

This.
function Head ({title}) {
	return h('head', h('title', title))
}

render(h(Head, {title: 'one'}))
render(h(Head, {title: 'two'}))

Ah yes. Again, it's not so easy in production.

Can you post an example that demonstrates this?
Regardless i don't think the pattern you suggested would make it any easier. The suggested would introduce more logic to avoid potential memory leaks and would certainly break animations in the process.
With animations as an example if i have two components A and B in a list and they all render
text
 elements that only differ in the text content they hold.
When one of the components is replaced we have an animation setup to slideOut the component before it's removed and slideIn the new component.
The suggested recycling would render this interaction void. It would render the new component and try to reconcile what it can of the old component while we intended otherwise.
The current heuristics is how other implementations that use a virtual tree work.
I don't see a strong argument for the proposed that would break this otherwise valid expected behavior.

Each page of my site has it's own Head component because for example the User page has fetch the user resource to render the title with the username; as opposed to the Card page which has to fetch the card information.
It is possible to use a shared Head component as a child, but it doesn't matter because it's a child of a different component (so still gets replaced).
// doesn't work
h(H1, {H})
h(H2, {H})

The suggested solution is to pass the vtree during replacement in lock-step (not the DOM/setTimeout hack).
For animations both components are necessarily part of the DOM at the same time, this change does not affect that case. Asynchronous unmount would not trigger the diff.
I disagree that it breaks any expected behavior. It's simply a diffing optimization. Moreover, React and  virtual-dom both do this.

React does not do what you suggest.

For animations both components are necessarily part of the DOM at the same time, this change does not affect that case. Asynchronous unmount would not trigger the diff.

Both asynchronous and sync unmount follow the same replace branch so i can't see how this is true.

"Whenever the root elements have different types, React will tear down the old tree and build the new tree from scratch. Going from  to , or from
 to <Comment>, or from <Button> to
 - any of those will lead to a full rebuild."
Type does not mean class, it means HTML tag.
It should not follow the same branch then.

JSX uppercase
 identifies a class/function. Observe the DOM of the following example: https://jsbin.com/fukusuq/edit?js,output. The div is unmount and mounted on every tick.

I see. And Reacts solution seems to be react-helmet. Quite unfortunate.

What stops you from using a component that just returns it's children.
function Page ({children}) {
   return children
}

h(Page, h(Head, {...}), h(Body, ...))

Because Page is different, so it's whole tree is replaced.
I think I've solved it though, it looks something like this:
[
  h(Head, {Page.getProps....})
  h('body',
    h(Page))
]

What i was trying to demonstrate is that if you split you components into smaller pieces you could have an Auxiliary component in this case i called it page that just returns a fragment of children passed to it such that you can then reuse  and <Page>.
h(Page, h(Head, {...resources}), h(User, ...))
h(Page, h(Head, {...resources}), h(Dashboard, ...))

The problem is that each page (User, Dashboard) has to fetch data to render its Head properties. I'd like to keep the logic for each page's Head in the page component, as opposed to a separate (giant) Head that handles all cases

unmount on triggers 2 layers deep
X = function({child}) {
  return h('div', child);
};
X.componentWillUnmount = function() {
  return console.log('unmount');
};

forceUpdate = null;
change = false;
Root = function() {
  forceUpdate = this.forceUpdate.bind(this);
  if (change) {
    return z(X);
  } else {
    return z(X, {
      child: z(X, {
        child: z(X, {
          child: z(X, {
            child: z(X)
          })
        })
      })
    });
  }
};

$el = document.createElement('div');
z.render(Root, $el);
change = true;
forceUpdate();

// Expected: unmount x4
// Received: unmount x2

Props from parent state disappear on state update
forceUpdateChild = null;
Child = function(props) {
  forceUpdateChild = this.forceUpdate.bind(this);
  return z('div', props.x);
};

setState = null;
Root = function() {
  setState = this.setState.bind(this);
  return z('div', z(Child, {
    x: this.state.locale['xxx']
  }));
};
Root.getInitialState = function() {return {locale: {}}}

$el = document.createElement('div');
render(h(Root), $el);
console.log($el);
setState({
  locale: {
    'xxx': 'abc'
  }
});
console.log($el);
forceUpdateChild();
console.log($el);

abc

abc

abc

Please consider 100% test coverage before release

I think that last commit broke something (error during initial hydration)
dio.esm.js:2060 Uncaught (in promise) TypeError: Cannot read property 'DOM' of undefined
    at getDOMNode (dio.esm.js:2060)
    at getDOMQuery (dio.esm.js:2091)
    at commitQuery (dio.esm.js:1332)
    at commitMount (dio.esm.js:1126)
    at commitChildren (dio.esm.js:1080)
    at commitMount (dio.esm.js:1141)
    at commitMount (dio.esm.js:1102)
    at commitChildren (dio.esm.js:1080)
    at commitMount (dio.esm.js:1141)
    at commitMount (dio.esm.js:1102)

Dynamic appends to a child array seems to cause problems.
(coffeescript)
 class Ripple
  getInitialState: -> {$waves: []}

  ripple: ({$$el}) =>
    {$waves} = this.state
    $wave =  h '.wave', 'wave'
    this.setState {$waves: $waves.concat $wave}
    window.setTimeout =>
      {$waves} = this.state
      # this triggers the error
      this.setState {$waves: _.without this.state.$waves, $wave}
    , 100

  render: =>
    h '.ripple',
      onmousedown: (e) => @ripple {$$el: e.currentTarget}
      this.state.$waves

$el = document.createElement 'div'
render h(Ripple), $el
r = $el.querySelector '.ripple'
event = new Event 'mousedown'
r.dispatchEvent event
r.dispatchEvent event
setTimeout ->
  done()
, 200

Error: Uncaught NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.

Can you post a JS version.

Maybe i converted in wrong, but this works for me.
import {h, render} from '../dist/dio.esm.js'

class Ripple {
	getInitialState() {
		return {$waves: []}
	}
	ripple({$$el}) {
		const {$waves} = this.state
		const $wave = h('div', {class: 'wave'}, 'wave')

		this.setState({$waves: $waves.concat($wave)})

		setTimeout(()=>{
			const {$waves} = this.state
			this.setState({$waves: this.state.$waves, $wave})
		})
	}
	render() {
		return h('div', {
			class: 'ripple', onmousedown: (e) => this.ripple({$$el: e.currentTarget})
		}, this.state.$waves)
	}
}

render(Ripple)
const r = document.querySelector('.ripple')
const event = new Event('mousedown')
r.dispatchEvent(event)
r.dispatchEvent(event)
setTimeout(()=>{
	// done()
}, 200)

The error is async
(js2.coffee)
Ripple = function() {
  return h('.ripple', {
    onmousedown: ripple
  }, this.state.$waves);
};

Ripple.getInitialState = function() {return {$waves: []}};

ripple = function() {
  $waves = this.state.$waves;
  $wave = h('.wave', 'wave');
  this.setState({
    $waves: $waves.concat($wave)
  });
  self = this;
  window.setTimeout(function() {
    $waves = self.state.$waves;
    // error triggered here
    self.setState({
      $waves: _.without(self.state.$waves, $wave)
    });
  }, 100);
};

$el = document.createElement('div');

render(h(Ripple), $el);
r = $el.querySelector('.ripple');
event = new Event('mousedown');
r.dispatchEvent(event);
r.dispatchEvent(event);
setTimeout(function() {
  done();
}, 200);

Yes i was missing the _.without(self.state.$waves, $wave) in my reproduction it.

The issue persists.
Add another setTimeout and two dispatch events
setTimeout(function() {
  r.dispatchEvent(event);
  r.dispatchEvent(event);
  return setTimeout(function() {
    return done();
  }, 40);
}, 40);

Still getting the same issue with the second set of dispatch events.

This test case mimics the mentioned bug and passes. Is there something different your the implementation of your reproduction?

There are some differences (setTimeout 0), try with my js version posted in https://github.com/thysultan/dio.js/pull/28#issuecomment-328181246 + extra dispatches

Wait, sorry, my bad. Forgot to update... :wink:

Getting a new error during hydration (as well as hydration seeming to cause some odd mount/unmount behavior). Will investigate.
Uncaught TypeError: Cannot read property 'context' of null
    at componentUpdate
    at enqueueUpdate

Error when immediately updating state (kind of, it seems a bit more complex)
updated = false;
C = function() {
  if (updated === false) {
    updated = true;
    this.forceUpdate();
  }
  return h('div', 'child');
};

setState = null;
updated2 = false;
P = function() {
  if (updated2 === false) {
    updated2 = true;
    this.forceUpdate();
  }
  setState = this.setState.bind(this);
  return h('p', h('form', 'x'), this.state.test ? C : void 0);
};

P.getInitialState = function() {
  return {
    test: false
  };
};

$el = document.createElement('div');
render(h(P), $el);
setState({
  test: true
});
setTimeout(function() {
  done();
}, 20);

Uncaught TypeError: Cannot read property 'context' of null

hydration is broken
$el = document.createElement('html')
$el.innerHTML = ''
hydrate([h('head', h('title', 'xxx'))], $el)
console.log($el)

<title>xxx</title>

<title>xxx</title>

Patched. I think the expected should be.
<title>xxx</title>~~~~

reconciliation is not stable
$el = document.createElement('div');
setState = null;
X = function() {
  return z('div', 'x');
};

List = function() {
  setState = this.setState.bind(this);
  return z('div', this.state.on === true ? X : void 0, z('div', 'y'), this.state.on === true ? X : void 0);
};

List.getInitialState = function() {
  return {on: false};
};

z.render(z(List), $el);
console.log($el);
setState({on: true});
console.log($el);
setState({on: true});
console.log($el);

y

x

y

x

y

x

x

Can't reproduce. Works for me.
var {render, h} = dio

$el = document.body.appendChild(document.createElement('div'));
setState = null;
X = function() {
  return h('div', 'x');
};

List = function() {
  setState = this.setState.bind(this);

  return h('div',
  	this.state.on === true ? X : void 0,
  	h('div', 'y'),
  	this.state.on === true ? X : void 0
  );
};

List.getInitialState = function() {
  return {on: false};
};

render(h(List), $el);
setState({on: true});
setState({on: true});

That did seem fix it. I'd like to see a test for it though.

Last commit(portals) is related to https://github.com/facebook/react/pull/10675. For the most part to maintain top-level(stable) API parity with the upcoming release of React 16. Which just means on top of being able to create portals like
h(container, props, ...children)

There is a top level API
dio.createPortal(container, children, key)

Children.toArray doesn't seem to be working for me, perhaps I'm using it incorrectly?
Children.toArray(h('div', 'a', 'b').children)

// received
[ { next:
     Element {},
    prev:
     Element {},
    length: 2 } ]
// expected
[Element {}, Element {} ]

It's meant to be used on a children passed to components – this.props.children i.e
const Foo ({children}) => Children.toArray(children)
render(h(Foo, 'hello'))

Since this.props.children is an opaque data-struct children will be the Hello string.
But i think we should also handle the linked list data-structure that element.children uses.

With PureComponent, props are always considered updated because of children array
[] !== []

Isn't this expected, can you post an example of this?

I understand now, it's because I was passing in [] as children
{PureComponent, render, h} = require 'dio.js'
Child = ->
  h 'div', 'y'
Child.shouldComponentUpdate = PureComponent.prototype.shouldComponentUpdate

Parent = ->
  h 'div',
    h Child, {x: '123'}, [] # always re-renders on parent state update because [] !== []

I guess it is as expected then

shouldComponentUpdate passed stale props
setStateChild = null;
Child = function({x}) {
  setStateChild = this.setState.bind(this);
  return h('div', x);
};
Child.shouldComponentUpdate = function(props, state) {
  console.log(this.props, props);
  return PureComponent.prototype.shouldComponentUpdate.call(this, props, state);
};

setState = null;
Parent = function() {
  setState = this.setState.bind(this);
  return h('div', h(Child, {x: this.state.x}));
};
Parent.getInitialState = function() {return {x: 'abc'}};

render(h(Parent), $el = document.createElement('div'));
setState({x: 'xxx'});
setStateChild({abc: 1});

// Expected
Object{x: 'abc'}, Object{x: 'xxx'}
Object{x: 'xxx'}, Object{x: 'xxx'}
// Received
Object{x: 'abc'}, Object{x: 'xxx'}
Object{x: 'xxx'}, Object{x: 'abc'}

undefined href renders as empty string
A = function() {return h('a', {href: void 0});};
render(A, document.createElement('div'));

dynamic array changes broken
Y = function() {return h('div', 'y')};

setState = null;
X = function() {
  setState = this.setState.bind(this);
  // the .concat() is critical
  return h('div', (this.state.x ? [this.state.arr[0]] : this.state.arr).concat([h('div')]));
};

X.getInitialState = function() {return {x: false, arr: [Y, Y, Y]}};

root = document.createElement('div');
render(X, root);
console.log(root);
setState({x: true});
console.log(root);

y

y

y

y

y

y

y

y

y

I propose that hydrate re-use the DOM regardless of whether it has already been hydrated.
In pursuit of https://github.com/thysultan/dio.js/issues/33 the simplest solution is to re-render the entire tree, but re-rendering  breaks everything.
thus this should work (after changes):
dio.hydrate(App)

if (module.hot)
  module.hot.accept('./app', function () {
    // clear  of old event listeners
    document.body.innerHTML = ''
    var newApp = require('./app')
    dio.hydrate(newApp)
  })

changes:
remove if (root.has(target)) from hydrate()
After that change though, fragments needs to be fixed:
{h, hydrate} = require 'dio.js'
A = ->
  [ // fragment here is the issue
    h('span', 'aaa')
  ]
B = ->
  [
    h('span', 'bbb')
  ]

root = document.createElement 'div'
root.innerHTML = 'pre-dio'
first = root.querySelector 'span'
hydrate A, root
second = root.querySelector 'span'
hydrate B, root
console.log first, second, root.querySelector 'span'2

bbb, bbb, bbb

aaa, aaa, bbb

Removing a


Getting error when iam trying to import YLprogress bar in my code.

Hi i ran the sample code and its working fine, but when i imported the YLProgressBar to my project iam getting an error. Do i need to install Cocoa Pods? The error in .h file shows "Funcion definition is not allowed here" . I am using Xcode 6.0.1

Hi,
Sorry for the late. Yes you can change the track color by modifying the trackTintColor property.

Hi Thanks for the reply. Is there an option to stop the animating progress color and keep it without animation?

Hi Thanks for the reply. Is there an option to stop the animating progress color and keep it without animation? Also when i try to change the trackTintColor to light grey a black line appears on top border of the progress bar. When i tested it in your sample code also it was there. You can see it clearly when the "trackTintColor" is white.

Hi,
you can stop the animation by setting the stripesAnimated property. To remove the grey line you have to disable the gloss effect thanks to the hideGloss property.

Hi,
Thanks for your swift reply. I was able to change both those issues and its working fine. Would like to let you know theres a minor design issue in it. A thin dark line appears above the top corner of the progress bar. Its visible only when we use light colors for the track color property. I have tested it in your sample code as well. Attached a screenshot with this. Please check.

Thanks
Subin.

Hi,
Have you tried with the last version (3.5.1)? I have fixed this issue in the last release.

No I havent. Will try
Thanks.

Hi,
Checked the latest code and its fine :)

Great! I close the issue. :)


[CI Problem] Jenkins link 404

Thanks for participating in the TVM community! We use https://discuss.tvm.ai for any general usage questions and discussions. The issue tracker is used for actionable items such as feature proposals discussion, roadmaps, and bug tracking.  You are always welcomed to post on the forum first :smile_cat:
Issues that are inactive for a period of time may get closed. We adopt this policy so that we won't lose track of actionable issues that may fall at the bottom of the pile. Feel free to reopen a new one if you feel there is an additional problem that needs attention when an old one gets closed.
Branch/PR Failing
98bf40f
Jenkins Link
https://ci.tlcpack.ai/job/tvm/job/main/3663/display/redirect
Flakiness
No

This was probably due to some cleanups we had to do to get disk space under control on the Jenkins head, since then we've set up a 90 day retention policy and bought more disk space for the node


Unable to bind back values that were submitted previously to the rendered form.

was not able to bind FormValues that were stored previously.

Hi,
You can assign the previous data in finally statement. Example below:
.then(response => {
                let data = response.data.data
                this.formData = JSON.parse(data.configuration_data)
            }).finally(response => {
                this.formValues = {'name': 'ADI', 'city': 'DDDDDDD'}
            })


OS X retina resolution

Please fix OS X retina resolution
        NSScreen *mainScreen = [NSScreen mainScreen];
        NSRect rect = [mainScreen convertRectToBacking:mainScreen.frame];

What is the expected behaviour here on a retina display?

yeah, retain display


unblock multi-threaded use cases

why: in gdrdrv, the current check for "same process" is too strong, and excludes tasks in same tgid.
how: relax the check on tsks
fixes #120

@pakmarkthub feel free to add your comments here

@pakmarkthub could you rereview ? thanks

@drossetti This does not build on RHEL8 and I think newer kernel versions (I have only tried RHEL8). task_tgid was moved to linux/sched/signal.h

@drossetti This does not build on RHEL8 and I think newer kernel versions (I have only tried RHEL8). task_tgid was moved to linux/sched/signal.h

@nysal that you for checking. Is there a backward compatible way of including signal.h, other than ifdef the include ?

@drossetti This does not build on RHEL8 and I think newer kernel versions (I have only tried RHEL8). task_tgid was moved to linux/sched/signal.h

@nysal that you for checking. Is there a backward compatible way of including signal.h, other than ifdef the include ?

it looks like linux/sched/signal.h has been introduced in 4.10-rc1.

Thanks. The fix looks good to me.


Azure SDK Review - [Azure AI Translator]

New SDK Review meeting has been requested.
Service Name: Azure AI Translator
Review Created By: Krishna Doss Mohan
Review Date: 04/15/2024 02:05 PM PT
Release Plan:1252
Hero Scenarios Link: Not Provided
Architecture Diagram Link: Not Provided
Core Concepts Doc Link: Not Provided
APIView Links: Javascript, .NET, Python, Java,
Description: This is Translator SDK for 'Text Translation' feature. The Text Translation API v3 has been in production since 2016. We haven't made changes to this API since then.
The SDK has been in public preview for an year. We have addressed feedback received from the SDK review.
This is a formal review of the updated SDK before we ship to GA.
Detailed meeting information and documents provided can be accessed here

Meeting updated by Krishna Doss Mohan
Service Name: Azure AI Translator
Review Created By: Krishna Doss Mohan
Review Date: 04/15/2024 02:05 PM PT
Hero Scenarios Link: here
Architecture Diagram Link: Not Provided
Core Concepts Doc Link: Not Provided
APIView Links: Javascript, .NET, Python, Java,
Description: This is Translator SDK for 'Text Translation' feature. The Text Translation API v3 has been in production since 2016. We haven't made changes to this API since then.
The SDK has been in public preview for an year. We have addressed feedback received from the SDK review.
This is a formal review of the updated SDK before we ship to GA.
Detailed meeting information and documents provided can be accessed here

Meeting updated by Michal Materna
Service Name: Azure AI Translator
Review Created By: Krishna Doss Mohan
Review Date: 04/15/2024 02:05 PM PT
Hero Scenarios Link: here
Architecture Diagram Link: Not Provided
Core Concepts Doc Link: Not Provided
APIView Links: Javascript, .NET, Python, Java,
Description: This is Translator SDK for 'Text Translation' feature. The Text Translation API v3 has been in production since 2016. We haven't made changes to this API since then.
The SDK has been in public preview for an year. We have addressed feedback received from the SDK review.
This is a formal review of the updated SDK before we ship to GA.
Detailed meeting information and documents provided can be accessed here

Meeting updated by Michal Materna
Service Name: Azure AI Translator
Review Created By: Krishna Doss Mohan
Review Date: 04/15/2024 02:05 PM PT
Hero Scenarios Link: here
Architecture Diagram Link: Not Provided
Core Concepts Doc Link: Not Provided
APIView Links: Javascript, .NET, Python, Java,
Description: This is Translator SDK for 'Text Translation' feature. The Text Translation API v3 has been in production since 2016. We haven't made changes to this API since then.
The SDK has been in public preview for an year. We have addressed feedback received from the SDK review.
This is a formal review of the updated SDK before we ship to GA.
Detailed meeting information and documents provided can be accessed here

Meeting updated by Ronnie Geraghty
Service Name: Azure AI Translator
Review Created By: Krishna Doss Mohan
Review Date: 04/15/2024 02:05 PM PT
Hero Scenarios Link: here
Architecture Diagram Link: Not Provided
Core Concepts Doc Link: Not Provided
APIView Links: Javascript, .NET, Python, Java,
Description: This is Translator SDK for 'Text Translation' feature. The Text Translation API v3 has been in production since 2016. We haven't made changes to this API since then.
The SDK has been in public preview for an year. We have addressed feedback received from the SDK review.
This is a formal review of the updated SDK before we ship to GA.
Detailed meeting information and documents provided can be accessed here


REVIEW ONLY: refactor and improvements

Three things:

Only set mask when needed // just small refactor
Do not make key window // we don't want to change key window if not necessary, it will dismiss the typing keyboard, and have some other side effects like we are using key window to push/show view controllers
Support view controller based status bar // as titled in commit message

If you are agree with my changes, feel free to leave comment, I will happy to clean up code and prepare for merge.

Thanks!
I'll review your request in the next few days.

Great, thank you!