Example haproxy config

Question
@Acconut You mentioned that you're using haproxy in live deployments.  I'm having trouble getting that working.  Would you be able to share your haproxy config?

Here's what I have.  This does manage to upload, but it was a bit of a struggle and I had to add various CORS headers which I don't think I should need to:
frontend tusd_frontend
  bind *:8080 ssl crt /etc/haproxy/<whatever>.pem
  redirect scheme https if !{ ssl_fc }
  http-response add-header Access-Control-Allow-Origin *
  http-response add-header Access-Control-Allow-Headers 'Authorization, Origin, X-Requested-With, X-Request-ID, X-HTTP-Method-Override, Content-Type, Upload-Length, Upload-Offset, Tus-Resumable, Upload-Metadata, Upload-Defer-Length, Upload-Concat, Upload-Complete, Upload-Draft-Interop-Version, x-token'
  http-response add-header Access-Control-Allow-Methods 'POST, HEAD, PATCH, OPTIONS, GET, DELETE'
  http-response add-header Access-Control-Expose-Headers 'Location,Upload-Offset'
  no option http-buffer-request

  default_backend tusd_backend

backend tusd_backend
  mode http
  http-request set-header X-Forwarded-Proto "https"
  http-request add-header X-Forwarded-For %[src]
  server app1 <ip>:8080 check

And this is what I was running:
./tusd -upload-dir=./files -disable-cors -behind-proxy -base-path /

It appears odd to me that you disable the CORS headers from tusd and then set them manually in HAProxy. Is there a specific reason why you do this? Normally the CORS handling from tusd is sufficient to get tus uploads working.
What errors were you running into?

@Acconut I found that tusd wasn't sending any of the CORS headers, no matter which option I chose.  So I turned that off and bodged it inside haproxy.
I think this may have been because there was no Origin header on the incoming request - unrouted_handler.go has some code along those lines, though I may not be looking in the right place.
I'm not sure whether that's deliberate/correct - I'm not sure when Origin is/should be present.

The Origin header should be present in an CORS-related request (preflight requests and main request): https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS Unless some other intermediary is removing this header, it should be there. Did you inspect the incoming requests and saw that the header was missing?

Yes, it was missing.
This sounds like it's specific to my environment.  But would there be any harm in returning the CORS headers anyway?

A CORS request must include the Origin header or otherwise it's not a valid CORS request as far as I know. Without the Origin header, the server can also not validate whether it should allow the cross-origin request or not.
What error message did you get from the browser? What do the request/response look like that were sent/received?

I agree a CORS request should include those.  My point is: would it do any harm to include the CORS headers on a response whether or not the Origin header is present on the request?
I can't see that it would.  I think I've set up lots of configs in the past (e.g. in nginx) where that would occur.  If it would do no harm, then always adding them would also solve this.
I'll try to repro this later, but the browser was logging console errors about CORS once it tried to PATCH the uploaded file.

Ok, some more experimentation.  As you were too polite to say, CORS is probably a red herring.
Here's an haproxy config that works.
frontend tusd_frontend
  bind *:8080 ssl crt /etc/haproxy/<whatever>.pem
  redirect scheme https if !{ ssl_fc }
  mode http
  no option http-buffer-request
  default_backend tusd_backend

backend tusd_backend
  mode http
  balance leastconn
  no option http-buffer-request
  stick-table type ip size 200k expire 30m
  stick on src
  option redispatch
  http-request set-header X-Forwarded-Proto "https"
  http-request add-header X-Forwarded-For %[src]
  server app1 <whatever>:8080 check
  server app4 <whatever>:8080 check backup

I think the key option is no option http-buffer-request.  Without this, I get empty requests back on the PATCH.
The docs allude to needing to configure haproxy in this kind of way, but I think it would be super helpful to have a sample config that you know works, as you have for nginx.
Given that you are using haproxy in production, you probably have a config that you are happy with, and it might easily include some more/better configuration that I've not figured out yet.  Could you add that to the docs?

I am glad to read that you figured it out and I also agree that having a working HAProxy config as an example would be helpful for users. Unfortunately, our HAProxy configuration is a lot more involved, so I cannot easily share it. However, I can tell that we do not use no option http-buffer-request and don't have any upload issues. As far as I understand, request buffering is not enabled by default, so this configuration directive is only needed if it's enabled somewhere else. Maybe that was the case for you?
Besides that, our configuration includes logic to set the X-Forwarded-Host property.

You can also configure tusd's CORS setup to allow/expose additional headers: https://tus.github.io/tusd/getting-started/configuration/#cross-origin-resource-sharing-cors Might be helpful for you :)


Update to node versions .travis.yml

Add 10
Remove 4 (ending support 2018-04-30)

Codecov Report

Merging #205 into master will increase coverage by 0.65%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #205      +/-   ##
==========================================
+ Coverage   84.86%   85.52%   +0.65%
==========================================
  Files           7        7
  Lines         304      304
==========================================
+ Hits          258      260       +2
+ Misses         46       44       -2

Impacted Files
Coverage Δ

dat.js
91.11% <0%> (+2.22%)
: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 c76d264...4b90d11. Read the comment docs.


sample of mix rxjava and livedata

I have seen there are many blogs,tutorial about the sample of mix rxjava and livedata with new architecture component.Actually it leads to some kind of confusion whether this or that approach is better.

So Could you provide the standard way of using both rxjava and livedata, if possible please add in arch component sample.

rxjava stream,livedata data holder.

Patiently waiting for an example on github hehe ;)

??


Make it easier to update drivers version

a la #188 , we should have a way to make update-versions for DRIVERS versions too!

There are currently several places where we have to update the Drivers version number within the Docker repos. We should streamline this to make the update process simpler.


FileExistsError

What version of fMRIPrep are you using?
20.2.3
What kind of installation are you using? Containers (Singularity, Docker), or "bare-metal"?
Singularity
What is the exact command-line you used?
code/containers/scripts/singularity_cmd run code/containers/images/bids/bids-fmriprep--20.2.3.sing sourcedata/ds001734 /scratch1/03201/jbwexler/openneuro_derivatives_tests/derivatives/fmriprep/ds001734-fmriprep participant --participant-label '001' -w '/scratch1/03201/jbwexler/work_dir/fmriprep//ds001734_sub-001' -vv --output-spaces MNI152NLin2009cAsym:res-2 anat func fsaverage5 --nthreads 14 --omp-nthreads 7 --skip-bids-validation --notrack --fs-license-file /home1/03201/jbwexler/.freesurfer.txt --use-aroma --ignore slicetiming --output-layout bids --cifti-output --resource-monitor --skull-strip-t1w force --use-syn-sdc --mem_mb 38400 --bids-database-dir /tmp

Have you checked that your inputs are BIDS valid?
Yes
Did fMRIPrep generate the visual report for this particular subject? If yes, could you share it?
no
Can you find some traces of the error reported in the visual report (at the bottom) or in crashfiles?
Traceback (most recent call last):
  File "/usr/local/miniconda/bin/fmriprep", line 6, in <module>
    from fmriprep.cli.run import main
  File "/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/cli/run.py", line 4, in <module>
    from .. import config
  File "/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/config.py", line 96, in <module>
    from templateflow import __version__ as _tf_ver
  File "/usr/local/miniconda/lib/python3.7/site-packages/templateflow/__init__.py", line 19, in <module>
    from . import api
  File "/usr/local/miniconda/lib/python3.7/site-packages/templateflow/api.py", line 7, in <module>
    from .conf import TF_LAYOUT, TF_S3_ROOT, TF_USE_DATALAD
  File "/usr/local/miniconda/lib/python3.7/site-packages/templateflow/conf/__init__.py", line 42, in <module>
    _update_s3(TF_HOME, local=True, overwrite=True)
  File "/usr/local/miniconda/lib/python3.7/site-packages/templateflow/conf/_s3.py", line 20, in update
    retval = _update_skeleton(skel_file, dest, overwrite=overwrite, silent=silent)
  File "/usr/local/miniconda/lib/python3.7/site-packages/templateflow/conf/_s3.py", line 55, in _update_skeleton
    zipref.extractall(str(dest))
  File "/usr/local/miniconda/lib/python3.7/zipfile.py", line 1616, in extractall
    self._extract_member(zipinfo, path, pwd)
  File "/usr/local/miniconda/lib/python3.7/zipfile.py", line 1666, in _extract_member
    os.mkdir(targetpath)
FileExistsError: [Errno 17] File exists: '/scratch1/03201/jbwexler/openneuro_derivatives_tests/derivatives/fmriprep/ds001734-fmriprep/code/containers/binds/HOME/.cache/templateflow/tpl-Fischer344'

Are you reusing previously computed results (e.g., FreeSurfer, Anatomical derivatives, work directory of previous run)?
no
fMRIPrep log
If you have access to the output logged by fMRIPrep, please make sure to attach it as a text file to this issue.

@effigies

Are you running multiple jobs in parallel? This looks like 2 conflicting templateflow update calls.
Can you clear your templateflow cache (/scratch1/03201/jbwexler/openneuro_derivatives_tests/derivatives/fmriprep/ds001734-fmriprep/code/containers/binds/HOME/.cache/templateflow/) and retry with a single job?

Yes, it's a race, but we should be resilient to those. For fMRIPrep, we should check again that we're prefetching all default templates. For templateflow we should catch the error and validate the newly found file.


ServerSelectionTimeoutError if no mongo service is running

---------------------------------------------------------------------------
ServerSelectionTimeoutError               Traceback (most recent call last)
<ipython-input-8-85a74561894d> in <module>()
----> 1 uid = run_start(sf1, 'ixs', str(uuid.uuid4()))

<ipython-input-7-990d0341c391> in run_start(specscan, beamline_id, uid, **md)
      9     }
     10     run_start_dict.update(**md)
---> 11     return insert_run_start(**run_start_dict)

/home/edill/miniconda/envs/ixstools/lib/python3.5/site-packages/metadatastore/commands.py in inner(*args, **kwargs)
    118         port = int(conf.connection_config['port'])
    119         db_connect(database=database, host=host, port=port)
--> 120         return func(*args, **kwargs)
    121     return inner
    122

/home/edill/miniconda/envs/ixstools/lib/python3.5/site-packages/metadatastore/commands.py in insert_run_start(time, scan_id, beamline_id, uid, owner, group, project, **kwargs)
    612                          project=project, **kwargs)
    613
--> 614     run_start = run_start.save(validate=True, write_concern={"w": 1})
    615
    616     _cache_run_start(run_start.to_mongo().to_dict())

/home/edill/miniconda/envs/ixstools/lib/python3.5/site-packages/mongoengine-0.10.5-py3.5.egg/mongoengine/document.py in save(self, force_insert, validate, clean, write_concern, cascade, cascade_kwargs, _refs, save_condition, **kwargs)
    314
    315         try:
--> 316             collection = self._get_collection()
    317             if self._meta.get('auto_create_index', True):
    318                 self.ensure_indexes()

/home/edill/miniconda/envs/ixstools/lib/python3.5/site-packages/mongoengine-0.10.5-py3.5.egg/mongoengine/document.py in _get_collection(cls)
    207                 cls._collection = db[collection_name]
    208             if cls._meta.get('auto_create_index', True):
--> 209                 cls.ensure_indexes()
    210         return cls._collection
    211

/home/edill/miniconda/envs/ixstools/lib/python3.5/site-packages/mongoengine-0.10.5-py3.5.egg/mongoengine/document.py in ensure_indexes(cls)
    763
    764                 if IS_PYMONGO_3:
--> 765                     collection.create_index(fields, background=background, **opts)
    766                 else:
    767                     collection.ensure_index(fields, background=background,

/home/edill/miniconda/envs/ixstools/lib/python3.5/site-packages/pymongo/collection.py in create_index(self, keys, **kwargs)
   1378         keys = helpers._index_list(keys)
   1379         name = kwargs.setdefault("name", helpers._gen_index_name(keys))
-> 1380         self.__create_index(keys, kwargs)
   1381         return name
   1382

/home/edill/miniconda/envs/ixstools/lib/python3.5/site-packages/pymongo/collection.py in __create_index(self, keys, index_options)
   1284         index.update(index_options)
   1285
-> 1286         with self._socket_for_writes() as sock_info:
   1287             cmd = SON([('createIndexes', self.name), ('indexes', [index])])
   1288             try:

/home/edill/miniconda/envs/ixstools/lib/python3.5/contextlib.py in __enter__(self)
     57     def __enter__(self):
     58         try:
---> 59             return next(self.gen)
     60         except StopIteration:
     61             raise RuntimeError("generator didn't yield") from None

/home/edill/miniconda/envs/ixstools/lib/python3.5/site-packages/pymongo/mongo_client.py in _get_socket(self, selector)
    710     @contextlib.contextmanager
    711     def _get_socket(self, selector):
--> 712         server = self._get_topology().select_server(selector)
    713         try:
    714             with server.get_socket(self.__all_credentials) as sock_info:

/home/edill/miniconda/envs/ixstools/lib/python3.5/site-packages/pymongo/topology.py in select_server(self, selector, server_selection_timeout, address)
    140         return random.choice(self.select_servers(selector,
    141                                                  server_selection_timeout,
--> 142                                                  address))
    143
    144     def select_server_by_address(self, address,

/home/edill/miniconda/envs/ixstools/lib/python3.5/site-packages/pymongo/topology.py in select_servers(self, selector, server_selection_timeout, address)
    116                 if server_timeout == 0 or now > end_time:
    117                     raise ServerSelectionTimeoutError(
--> 118                         self._error_message(selector))
    119
    120                 self._ensure_opened()

ServerSelectionTimeoutError: localhost:27017: [Errno 111] Connection refused

@tacaswell suggest that we should catch this and reraise as something better.  Could we detect this before it spins for ~60 seconds and raise immediately?

How would we catch a timeout immediately?

Lol I don't mean try to catch a timeout immediately. I mean chexk to make sure we are connected before trying to insert

Absolutely!  Unless u love getting calls at 2:45am that "bluesky crashed" :(   catching stuff like this and providing concise specific messages is essential for providing an acceptable and sustainable level of support.
Would be awesome to have tests for such common subsystem problems and clear error mesgs in the test/fuzz/ci stuff.  Ideally, hearing "bluesky crashed" would be exciting/interesting... cuz you'd only hear that when a never seen before problem occured.
-matt

@tacaswell There are apparently a couple of different timeout options that are set by default when you instantiate a new MongoClient.  They are
socketTimeoutMS: (integer or None) Controls how long (in milliseconds) the
                 driver will wait for a response after sending an ordinary
                 (non-monitoring) database operation before concluding that a
                 network error has occurred. Defaults to None (no timeout).
connectTimeoutMS: (integer or None) Controls how long (in milliseconds) the
                  driver will wait during server monitoring when connecting a
                  new socket to a server before concluding the server is
                  unavailable. Defaults to 20000 (20 seconds).
serverSelectionTimeoutMS: (integer) Controls how long (in milliseconds) the
                          driver will wait to find an available, appropriate
                          server to carry out a database operation; while it
                          is waiting, multiple server monitoring operations
                          may be carried out, each controlled by
                          connectTimeoutMS. Defaults to 30000 (30 seconds).
waitQueueTimeoutMS: (integer or None) How long (in milliseconds) a thread will
                    wait for a socket from the pool if the pool has no free
                    sockets. Defaults to None (no timeout).

That being said, mucking with these timeout values does not seem like a good idea.  It is good to know that they exist so that we can modify them in the off chance that some beamline complains about that their scan hangs for a while before it reports that it cannot insert any data.  I am :-1: on mucking with these default values in the call to MongoClient in metadatastore.mds.MDS.
The only thing that I would want to do by default in metadatastore would be to catch the TimeoutError somewhere and print out a message that metadatastore can't connect and that whoever sees that TimeoutError should check to make sure that their mongodb is running on whatever server is configured to do so.  Thoughts?

The other behavior to worry about is what happens if the user as successfully connected (so we have 'live' connection) but between when it was connected and the next call the mongo server falls over / is killed.

between when it was connected and the next call the mongo server falls over / is killed.

I guess there are a couple of things to consider in regards to what caused mongo to fall over.

disk is full. IIRC we experienced this at HXN when their xspress3 detector server was full and filestore was barfing on weird errors.
server where mongo is running fell over
network has totally crashed and nothing is accessible.

(1) is pretty easy to prevent if we have proper monitoring tools. I guess that is the responsibility of Petkus and crew.  I'm not sure how we would automatically recover from such a situation
(2) is preventable by having a redundant mongo service running somewhere so we don't lose data, but that sounds quite challenging to implement redundant mongo services the right way.
(3) We are well and truly screwed and data collection cannot continue since EPICS isn't working either.

No action for more than a year. Closing.

(I will note that we have operationalized the mongo servers better, but that better monitoring is still needed. This is out of scope for the software though; really it's an IT concern.)


Recompute mappings on props update.

Related to Yomguithereal/baobab#176.

Cannot find a way to do so except in componentDidUpdate which does not seem like an ideal solution. Any idea @christianalfoni?

Hi,
You also have componentWillReceiveProps. So that one only triggers on "external updates", componentDidUpdate runs also on "internal updates". Would that work?

Problem with those hooks is that this.props has not yet changed so the functions does not work. Related to #12  :).

You receive new props as argument :-)
componentWillReceiveProps: function (newProps) {
  this.props // old props
  newProps // new props
}

Consider the following:
var Component = React.createClass({
  mixins: function() {
    return {
      name: this.props.namePath
    }
  }
});

If I run this function during one of the hooks before componentDidUpdate, it won't work since this.props hasn't changed yet.

Just to be sure, this one you are talking about?:
  mixins: [mixin.branch],
  cursors: {
    name: function() {
      return ['step1', this.props.step2];
    },
   name2: function() {
      return ['step1', this.props.step2];
    },
  }

And you want to update those cursors when the props change?

Since those are not part of React and only being used by the mixin I would:
With silly code, but you get the point :-) :
componentWillReceiveProps: function (nextProps) {
  var nameCursor = this.cursors.name.call({
    props: nextProps
  });
}

Yeah, I guess this is the only solution aside from passing props as an argument to the function itself. I'll probably hook on componentWillUpdate so this occurs after shouldComponentUpdate however.

Yeah I was speaking about:
var Component = React.createClass({
  mixins: [branch.mixin],
  cursors: function() {
    return {
      name: this.props.namePath
    }
  }
});

I mistyped.

Hm, yeah,
You can also:
componentWillReceiveProps: function (nextProps) {
  setTimeout(function () {
    // Run those functions
  }, 0);
}

I would not consider that a hack, it is just running the cursors on the next tick

setTimeout is dangerous. What if the tree commits synchronously? The problem also with the .call on a simili component scope to override the props is that you make the user believe this is the scope of the component whereas it's really not.

Normally I would agree on setTimeout, but after getting the cursors you still have to run setState which runs asynchronously. So instead of:
componentWillReceiveProps -> new props to new cursors -> setState - - - > render
would be:
componentWillReceiveProps - - - > new cursors -> setState - - - > render
So even if the tree commits synchronously it is still an async process to get the state to the component. I do not see where it could fail? Even it multiple sync triggers of componentWillReceiveProps occur it will still just grab the latest version of "this.props" when grabbing the new cursors?

Would your setTimeout solution render the component once or twice?

First it renders because of the prop change (React Behaviour), then it renders again because of the mixin grabbing new cursors and setting to state (Baobab Behaviour). I do not quite see how it differs if the mixin is triggered synchronously or asynchronously as it will either way cause an extra render.
I do not think a sync setState() within componentWillReceiveProps changes the state for the next render. It will cause a completely new render after the one that is about to happen.
Let me check that :-)

You know, this.setState() in componentWillReceiveProps does not trigger a new render. I learned something new. Then I agree setTimeout is a bad idea, as it will cause an extra render :-)

So I guess the only possibility here is to:

Hook on componentWillUpdate so that we don't refresh cursors for nothing in case shouldComponentUpdate would return false.
Pass props and context to the function rather than executing in the component scope.

?

Eyh, I got an idea:
componentWillReceiveProps: function (nextProps) {
  var component = Object.create(this);
  component.props = nextProps;
  this.cursors.call(component);
}

Now the component itself is just a prototype of a new object where you override with the next props. Now it runs in the context of the component with acces to everything as normal, except an instance property of the next props. This should work :-)

Still this would not be the component's scope and you are misleading the user, aren't you :)?

Hehe, actually, it still is the components scope, it just acts like a delegate :-)
Using Object.create(this) has absolutely no effect at all, we only hook an extra object to the prototype chain. It technically runs in the "context" of a new object, but since the object is empty it will delegate absolutely everything to the original component. So calling any method etc. will just work. The only way to get in trouble is:
cursors: function () {
  this.myNewProperty = 'foo';
  return {name: [this.props.name]}
},
componentWillReceiveProps: function () {
  var component = Object.create(this);
  component.props = nextProps;
  var cursors = this.cursors.call(component);
}

It would be weird to do anything like that, but you could of course fix that too.
cursors: function () {
  this.myNewProperty = 'foo';
  return {name: [this.props.name]}
},
componentWillReceiveProps: function () {
  var component = Object.create(this);
  component.props = nextProps;
  var cursors = this.cursors.call(component);
  delete component.props;
  Object.keys(component).forEach(function (key) {
    this[key] = component[key];
  }, this);
}

Haha, yeah... it seems a bit crazy, but controlled crazy ;-)

In my experience this is a bad idea to make your user believe things which are untrue. Would it be so terrible to do the following?
mixins: [mixins.branch],
cursors: function(props, context) {
  return {name: props.namePath};
}

Anything else would require some sort of "hacking", so I think you are right in your assumption @Yomguithereal . It is the most clean solution :-)

I will let this settle down for 1-2 days to see whether there is something we would have missed. And if this does not solve by itself I will therefore apply this solution. Thanks for your input @christianalfoni :-).

:+1:


执行命令gradle assembleReleaseChannels后报错

w: -Xcoroutines has no effect: coroutines are enabled anyway in 1.3 and beyond
e: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException

What went wrong:
Some problems were found with the configuration of task ':app:assembleReleaseChannels' (type 'ChannelMaker').

In plugin 'walle' type 'com.meituan.android.walle.ChannelMaker' field 'targetProject' without corresponding getter has been annotated with @Input.
Reason: Annotations on fields are only used if there's a corresponding getter for the field.
Possible solutions:

Add a getter for field 'targetProject'.
Remove the annotations on 'targetProject'.

Please refer to https://docs.gradle.org/7.4/userguide/validation_problems.html#ignored_annotations_on_field for more details about this problem.


Save BuildVer data when moved out of a repository

Currently, it looks like the script clears its .var file if it finds that it is no longer in a Git repository. (For example, if I exported the project as a zip for someone who isn't on Git) Would it be possible to leave the data as it was in that situation? Or it could leave some data and clear others?
These are the things that matter the most to me:

BuildDate and Configuration: Could the whole BuildVersionProjectType structure even be updated because it doesn't depend on Git?
Git Tag/Version/Describe: Lately, I have been displaying that on the HMI instead of the AS hardware config number because it is more likely to be updated regularly

Is this what you're thinking?

User A builds the project with script from git.  Successfully generates Variables.var file.
User A archives project.  Archive includes latest Variables.var and build script event.
User B builds the project from archive without git.  The Variables.var file should be unmodified.

The archived project still includes the build script event - the beginning of the build script creates a blank Variables.var before checking if git.exe exists.  This is to avoid project compilation errors but it does overwrite any good version information.
I'll see to modified the script to only write a blank Variables.var file if no file currently exists.

You want BuildVersion.Git and BuildVersion.Project updated if the user is building with git
but only BuildVersion.Project updated if the user if building without git, leaving BuildVersion.Git unmodified?

See ddb66d1aeff6f54bb649f21070ee2d6187a77c2f, 07e58a4d7c309c87ba8ba3aaaa7ad2e63f3eccef, and 6cace1199ea8171d55e0f03f9075e3e49454114e

See 0.0.7


Add NOTICE file

For GPL v2 with CPE license
Addresses remkop/picocli#1544

Merged. Thank you for the contribution!


Added Learning MySql Book by Seyed M.M. “Saied” Tahaghoghi and Hugh E. Williams

What does this PR do?
Add resource(s) | Remove resource(s) | Add info | Improve repo
For resources
Description
Why is this valuable (or not)?
How do we know it's really free?
For book lists, is it a book? For course lists, is it a course? etc.
Checklist:

[x] Read our contributing guidelines.
[x] Search for duplicates.
[x] Include author(s) and platform where appropriate.
[x] Put lists in alphabetical order, correct spacing.
[x] Add needed indications (PDF, access notes, under construction).
[x] Used an informative name for this pull request.

Follow-up

Check the status of GitHub Actions and resolve any reported warnings!

It looks like there are quite a few unintentional formatting changes here. Please check the output of free-programming-books-lint and fix the errors. Update the title with (changes made) once the lint check is passing. Thanks!


Generate code based on version rather than cfg

something like:
#[const_fn(1.36)]
const fn foo() {
    // ...
}

Even more powerful, with the use of autocfg, it may be possible to automatically determine if the function can be const. This would allow use on nightlies and betas similarly.

it may be possible to automatically determine if the function can be const.

Interesting, but does it actually seem like you have to compile the whole crate per const_fn attribute (as the function may depend on other items in the crate)?

 Disregard 😄

Published 0.4.0 which fixes this issue.


[BUG] Missing ordinal field for the first resource

❯ k get appliedwork -A -o yaml
apiVersion: v1
items:

apiVersion: multicluster.x-k8s.io/v1alpha1
kind: AppliedWork
metadata:
creationTimestamp: "2022-07-21T18:54:25Z"
generation: 1
name: test-work
resourceVersion: "36801"
uid: d32ce2f2-a176-452f-9005-b87726d15907
spec:
workName: test-work
workNamespace: bbxsnrmem
status:
appliedResources:

group: apps
kind: Deployment
name: test-nginx
namespace: default
resource: deployments
version: v1
kind: Service
name: test-nginx
namespace: default
ordinal: 1
resource: services
version: v1

https://github.com/Azure/k8s-work-api/pull/89


QCIF and BioCommons logos improved resolution

@GarethPrice-Aus or @neoformit are you able to please bring these into the main branch, and also remove the Melbourne Bioinformatics logo from the collection? Reason being, Melbourne Bioinformatics are no longer involved in managing our services. Thanks!

Plus replace Melbourne Bioinformatics logo with the University of Melbourne logo please

Sure thing, but can you get a Melb uni logo in the same dimensions as other logos? Otherwise will look a bit weird/small. Something like this:

(But transparent/white background like the others please)
Thanks!

I should also note that we already have UniMelb as a minor (grayscale) logo:

Do you want this moved up to the top line as a major (coloured) logo?

I'll have to put in a special request with UoM brand management to get any different logos. Can you maybe fit the logo that I uploaded to match the vertical dimensions of the other logos, and then it'll just have a smaller overall footprint than the others?
As far as I know the UoM logo must be kept on the blue background, not sure they have a transparent version (but would be a special request again)
Re the bottom line greyscale logo - I think best to leave that there, as I understand the row of greyscale logos reflects a different part of the acknowledgement statement (bolded below from BioCommons website), whereas the colour logos show who is managing the service
The following BioCommons partners are collaborating to offer the Galaxy Australia service which is managed by QCIF, The University of Melbourne and AARNet, and underpinned by computational resources provided by AARNet, ARDC Nectar Research Cloud, The University of Melbourne, QCIF, National Computational Infrastructure and the Pawsey Supercomputing Research Centre. These efforts are supported by funding from The University of Melbourne, Bioplatforms Australia (BPA) and Australian Research Data Commons (ARDC). BPA and ARDC are enabled by NCRIS.

Having said that, the greyscale row doesn't include a duplicate of AARNet or QCIF. So I think remove the greyscale UoM and only have it in the full colour row. Sorry for the difficulty!

So I think remove the greyscale UoM and only have it in the full colour row.

Yep that's what I thought. All good.

Took me a minute to reach the same conclusion! Thanks Cam

I found this one being used on one of their websites:

https://catalog.lms.unimelb.edu.au/

If you're able to make the square one fit nicely, I would prefer to stick to their primary logo if we can. But if it proves too difficult/ruins the rest of the logos, then yeah go ahead with that one

I think if you send them this screenshot they will agree that it hurts their brand. Usually they would produce a set of 3-4 for this reason:

Agreed, go with the horizontal one. Thanks for checking
Patrick Capon, PhD (he/him)
Science Communication Officer
Australian BioCommons
The University of Melbourne
M: +61 479 160 020
W: biocommons.org.au
https://protect-au.mimecast.com/s/u7UfClxwqLcvQGjkiGs6nE?domain=biocommons.org.au
My position is funded by Bioplatforms Australia and hosted by The
University of Melbourne.
I acknowledge the Traditional Owners of the lands upon which I work and* pay
my respects to their Elders, both past and present.*
On Wed, 20 Mar 2024 at 4:59 PM, Cameron Hyde @.***>
wrote:

I think if you send them this screenshot they will agree that it hurts
their brand. Usually they would produce a set of 3-4 for this reason:
image.png (view on web)
https://github.com/usegalaxy-au/galaxy-media-site/assets/42562517/89332b18-908b-409a-854f-afe23a6b93f0
—
Reply to this email directly, view it on GitHub
https://github.com/usegalaxy-au/galaxy-media-site/pull/100#issuecomment-2008730089,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BAXAMBL4IEFMIQLHM2ATS33YZEUDLAVCNFSM6AAAAABE62XFLOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBYG4ZTAMBYHE
.
You are receiving this because you modified the open/close state.Message
ID: @.***>

How's that?

Looks goo, thanks Cam!


@asyncConnect not working when using component wrapper in <Router

Hi,
What i have is in my router <Route path="info_post" component={Post} /> everything works fine. But i want to pass some props to the Post component because i need it for the rest call to the api. So i found on internet solution to do it this way: <Route path={route.path} component={() => <Post id='1'/>} /> but when i do this my @asyncConnect doen't work anymore. Does any one know how to fix this?
@asyncConnect([{
  promise: ({store: {dispatch}}) => {
    return dispatch(getPost(1));
  },
}])
@connect(
  state => ({post: state.post})
)

Wont work like this. You need to get data like this from ownProps of the router, there is no need to create wrapper functions. Please forget that pattern you’ve just used - it’s literally one of the worst practices
There are a few other issues that are open, specifically “blocking” ones that you should read through on why this can’t be done like this
As to how it should be done - use second and third arguments, which are respectively ownProps and Helpers. There is an open issue with docs for that

On Jan 21, 2017, at 8:19 AM, Lennard<EMAIL_ADDRESS>wrote:
Hi,
What i have is in my router  everything works fine. But i want to pass some props to the Post component because i need it for the rest call to the api. So i found on internet solution to do it this way: <Route path={route.path} component={() => } /> but when i do this my @asyncConnect doen't work anymore. Does any one know how to fix this?
@asyncConnect([{
promise: ({store: {dispatch}}) => {
return dispatch(getPost(1));
},
}])
@connect(
state => ({post: state.post})
)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/makeomatic/redux-connect/issues/102, or mute the thread https://github.com/notifications/unsubscribe-auth/ABol0bHBIvqfqup1aSDLZbsl782qGaMcks5rUi_4gaJpZM4LqHBd.

Thanks for quick answer, yea I was thinking the same that this wasn't the right way. But can you give a example of ownProps solution?

check https://github.com/makeomatic/redux-connect/issues/95

and react-router documentation on what props are passed to the component thats in the route

AVVS i see a interesting thing what maybe solve the <Route props problem see the new release of react-router: https://github.com/ReactTraining/react-router/blob/v4/README.md#why-the-huge-change


Allow spatie/invade 2.x

[ ] Changes have been thoroughly tested to not break existing functionality.
[ ] New functionality has been documented or existing documentation has been updated to reflect changes.
[ ] Visual changes are explained in the PR description using a screenshot/recording of before and after.

Trying to keep packages up to date.
Based on the spatie/invade v2 change log it should be fine.

Check the usages, I know for sure this will break one of them, where we use ->reflected I think

Mark this as ready when you've fixed that

Not been tested properly, and not fixed with the breaking changes associated with v2 of that package. So reopen this PR when it is complete please.

#9660


APT whitelist request for gcc-mingw-w64-i686, binutils-mingw-w64-i686, mingw-w64-dev, wine

See https://travis-ci.org/dashpay/dash/jobs/173071266 and https://travis-ci.org/crowning-/dash/jobs/173384008
The commit before built without problems.

Sorry, but this doesn't fit the form described in README. Please split requests into individual packages.
I'm closing this.


Closes: #1

updated validation function
Fixes #<issue_number_goes_here>

It's a good idea to open an issue first for discussion.

[ ] Tests pass
[ ] Appropriate changes to README are included in PR

@googlebot I signed it


Storage: 429 during 'create_bucket' system test

New failure:
See: https://circleci.com/gh/GoogleCloudPlatform/google-cloud-python/6958

We need retry support added here:
self = <tests.system.TestStorageBuckets testMethod=test_create_bucket>

    def test_create_bucket(self):
        new_bucket_name = 'a-new-bucket' + unique_resource_id('-')
        self.assertRaises(exceptions.NotFound,
                          Config.CLIENT.get_bucket, new_bucket_name)
>       created = Config.CLIENT.create_bucket(new_bucket_name)

tests/system.py:97:


[stable/sentry] Readiness and liveness probes for sentry workers

Is this a request for help?:
Yes.
Is this a BUG REPORT or FEATURE REQUEST? (choose one):
Feature request.

Version of Helm and Kubernetes:
Helm version: v2.12.2
K8S version: v1.11.2
Which chart:
sentry.
What happened:
Celery workers stop processing tasks from time to time with the following type of error messages:
16:05:29 [WARNING] beacon: Failed sending beacon
16:05:29 [ERROR] multiprocessing: Process 'Worker-33' pid:47 exited with 'signal 9 (SIGKILL)'
20:05:19 [ERROR] multiprocessing: Process 'Worker-35' pid:49 exited with 'signal 9 (SIGKILL)'
10:05:21 [ERROR] multiprocessing: Process 'Worker-34' pid:48 exited with 'signal 9 (SIGKILL)'
12:00:03 [ERROR] multiprocessing: Process 'Worker-36' pid:50 exited with 'signal 9 (SIGKILL)'
12:00:05 [ERROR] multiprocessing: Process 'Worker-39' pid:53 exited with 'signal 9 (SIGKILL)'
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/billiard/pool.py", line 1175, in mark_as_worker_lost
human_status(exitcode)),
WorkerLostError: Worker exited prematurely: signal 9 (SIGKILL).
12:00:05 [ERROR] celery.worker.job: Task sentry.tasks.reports.deliver_organization_user_report[edf8e147-114d-4462-b9ef-9dc06c9f75dd] raised unexpected: WorkerLostError('Worker exited prematurely: signal 9 (SIGKILL).',) (data={u'hostname': 'celery@sentry-example-sentry-worker-758d88f9bc-bf9gp', u'name': 'sentry.tasks.reports.deliver_organization_user_report', u'args': '(1549238400.0, 604800, 1L, 2)', u'internal': False, u'kwargs': "{'dry_run': False}", u'id': 'edf8e147-114d-4462-b9ef-9dc06c9f75dd'})
12:05:18 [ERROR] multiprocessing: Process 'Worker-45' pid:59 exited with 'signal 9 (SIGKILL)'
15:05:20 [ERROR] multiprocessing: Process 'Worker-41' pid:55 exited with 'signal 9 (SIGKILL)'
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/billiard/pool.py", line 1175, in mark_as_worker_lost
human_status(exitcode)),
WorkerLostError: Worker exited prematurely: signal 9 (SIGKILL).
15:05:21 [ERROR] celery.worker.job: Task sentry.tasks.process_buffer.process_pending[3c079df4-d2cc-487b-863e-33a675fd9681] raised unexpected: WorkerLostError('Worker exited prematurely: signal 9 (SIGKILL).',) (data={u'hostname': 'celery@sentry-example-sentry-worker-758d88f9bc-bf9gp', u'name': 'sentry.tasks.process_buffer.process_pending', u'args': '[]', u'internal': False, u'kwargs': '{}', u'id': '3c079df4-d2cc-487b-863e-33a675fd9681'})
19:05:21 [ERROR] multiprocessing: Process 'Worker-38' pid:52 exited with 'signal 9 (SIGKILL)'
21:05:21 [ERROR] multiprocessing: Process 'Worker-37' pid:51 exited with 'signal 9 (SIGKILL)'
23:05:21 [ERROR] multiprocessing: Process 'Worker-42' pid:56 exited with 'signal 9 (SIGKILL)'
02:05:21 [ERROR] multiprocessing: Process 'Worker-40' pid:54 exited with 'signal 9 (SIGKILL)'
07:05:21 [ERROR] multiprocessing: Process 'Worker-43' pid:57 exited with 'signal 9 (SIGKILL)'
08:05:22 [ERROR] multiprocessing: Process 'Worker-44' pid:58 exited with 'signal 9 (SIGKILL)'
13:10:07 [ERROR] multiprocessing: Process 'Worker-49' pid:63 exited with 'signal 9 (SIGKILL)'

And when this happens we can see these type of messages on the UI: Background workers haven't checked in recently. It seems that you have a backlog of 10053 tasks. Either your workers aren't running or you need more capacity.
What you expected to happen:
I would expect that when this message occurs the works liveness prob would fail, but this does not happen since there is no such prob in place. Is there intentions to add liveness/readiness probs to sentry workers just like the web component has?
How to reproduce it:
After installing a new instance of Sentry on K8S the workers work just fine, but after a few days or a few tasks processed the logs above start appearing and after some time (not sure how much) the workers processes are all dead. The only solution is to recreate the workers pods.

were you ever able to solve this issue? having same problem .. any pointers?

Have the same issue and resolve it by increasing the memory limit for workers twice

Have the same issue and resolve it by increasing the memory limit for workers twice

I believe this is just a quick fix, there must be a way to define a readiness and liveness probs to handle extreme scenarios.

maybe it will be useful https://github.com/helm/charts/pull/11847

This seems to be exactly what I was needing, thanks a lot.

@CCardosoDev  any luck to deal with the worker issue like this ? we started seeing it recently ?

Yes, I am using the new version of the chart with the probs (#11847) and till now it's working just fine :)


mitigate deprecation warnings

newer versions of moment.js print this warning to the console:
moment().add('h',3)
Deprecation warning: moment().add(period, number) is deprecated. Please use moment().add(number, period).

moment().subtract('d',3)
Deprecation warning: moment().subtract(period, number) is deprecated. Please use moment().subtract(number, period).

I know this is an old PR and this repository is clearly dead, but since this PR is still open I'll take the liberty to comment on it.
I think this plugin needs versioning first so that calls like that can be made. "momentjs-business x.x" is only compatible with "moment x.x".


events and destroy support

Hi,
Is there are events like onStop ?
and is there a way to destroy existing pulsating elements ?

Hi! You can use .pulsate("destroy") to destroy, but there are no events.


double click

Good afternoon,
How can I identify a double click on the row to select?

https://github.com/react-bootstrap-table/react-bootstrap-table2/issues/372


[BUG] Legacy Sysex from MIDI USB device results in F0/F7 in UMP data

Describe the bug
UMP sysex data in midi.exe shows F0 and F7 inside UMP packets. Per UMP specification F0 and F7 these should be  used as start and end of system exclusive message indicators. (In Sysex8 these are treated as data)
To Reproduce

Connect a MIDI  USB device with legacy MIDI descriptor.
Install Windows Midi 2.0 driver  for the device
Install Developer preview 6
midi.exe service stop and then start
midi ep monitor
Observe sysex contains F0 and F7 in UMP data

Expected behavior
No F0 and F7 in UMP data
Screenshots

Installer Name or Version
Windows MIDI 2.0 DP6 with DP2 driver (latest)
Desktop (please complete the following information):
Windows 11 Canary
Device information, if this is with an external MIDI device:
DIY MIDI Device using MCU
Application Information
Own firmware
Additional context
ALSA handles this correctly.

@MusicMaker how are you generating the SYSEX data. Routines only look and parse out F0 and F7 at the start and end of SYSEX as indicated by CIN in USB MIDI 1.0. If there are further embedded F0 and F7 in the stream, then system will pass along.

@MusicMaker This was resolved in latest driver - if you are using older driver version like in issue 375, then your output is expected. Again, this has been resolved - please confirm, are you using latest test signed driver?

Using the latest (public) one from github, DP2 right? BTW I insert these real time data in Sysex messages on the device. For I create a legacy (DIN) byte stream and then convert it to USB packets (DYI MCU). I think this case was it was in USB legacy mode then sending it over USB to Windows.

Closing as fixed in the August 2024 driver release. If you find it not to be when testing, will reopen.

Regressed with DP6, confirmed this is fixed.

Regressed with DP6, confirmed this is fixed.

I assume you're not using the correct word here due to language. "Regressed" would mean that the problem is not fixed and has come back.

fixed : changed resgressed to regression tested


Improve code quality and stability

Motivation
Hey! First of all, thanks for this library. While working with it, I encountered some issues which I wanted to fix with this PR.
Summary
This PR introduces several enhancements to improve the functionality, compatibility, and code quality of the library.
Key Changes:

Migrated RerankRequest to a dataclass to reduce boilerplate code.
Added backwards compatibility for dataclasses on Python 3.6
Optimized local LLama models to use fewer than 8 threads, if less than 8 are available
Implemented user warning for max length exceeding model capabilities
Improved LLM rank extraction to handle numbers > 9
Code formatting and documentation according to PEP8 guidelines

Please review @PrithivirajDamodaran and let me know if any further changes or clarifications are needed.

Thanks for reaching out, very interesting. Lets understand what issues you faced. Can you list down the issues you faced and share how the corresponding changes you are suggesting fixes them.  (let's focus just on issues and then in round 2 we can look at formatting, quality and other cosmetic stuff)

Sure, these were the main two issues I had:

Try to use the crossencoder models for my large document chunks. They are up to 1024 tokens long (openai tokenizers) and when first blindly using the the library I didn't notice my chunks were truncated for reranking and I was wondering why the reranked results made no sense. I had to look into your library in detail and into the models config json files to figure out the token limit for these crossencoder models and I would have found it helpful to just receive a warning. In the end, I had to use sliding window reranking over my large chunks to rerank every text passage with the crossencoders. That is addressed by commit 0d6f0cd484873b2496eb9f64c710a7ddcd0eb8b4
Try to use the llm based reranking for > 10 chunks to be reranked and I noticed again the reranked order made no sense, as the old "rank extraction" from the LLM response, just considers the first integer digits in the square brackets. I improved the rank extraction from the LLM response using regex in this commiet 1e292ef34bd0fef1e2dfbc47db13b57b3ad9c368. Consider the following:

e.g we have 11 documents with ranks [1] ... [11]
The LLM reranks the documents into the following order [11], [3], [2], ... [1]
Document 11 is the number one most important document
Using the current logic of results.append(result_map[int(rank[1])]), only the first digit of "[11]" would be extracted, which is 1, putting document number 1 on the first spot, even though it was ranked last by the LLM.

Try to use the llm based reranking for > 10 chunks to be reranked and I noticed again the reranked order made no sense, as the old "rank extraction" from the LLM response, just considers the first integer digits in the square brackets. I improved the rank extraction from the LLM response using regex in this commiet https://github.com/PrithivirajDamodaran/FlashRank/commit/1e292ef34bd0fef1e2dfbc47db13b57b3ad9c368. Consider the following:
e.g we have 11 documents with ranks [1] ... [11]
The LLM reranks the documents into the following order [11], [3], [2], ... [1]
Document 11 is the number one most important document
Using the current logic of results.append(result_map[int(rank[1])]), only the first digit of "[11]" would be extracted, which is 1, putting document number 1 on the first spot, even though it was ranked last by the LLM.

This seems like an issue and needs attention. Will be happy to test and merge. So, please segregate this fix and submit a separate PR, will have someone do a few rounds of testing and give me feedback.

Try to use the crossencoder models for my large document chunks. They are up to 1024 tokens long (openai tokenizers) and when first blindly using the the library I didn't notice my chunks were truncated for reranking and I was wondering why the reranked results made no sense. I had to look into your library in detail and into the models config json files to figure out the token limit for these crossencoder models and I would have found it helpful to just receive a warning. In the end, I had to use sliding window reranking over my large chunks to rerank every text passage with the crossencoders. That is addressed by commit https://github.com/PrithivirajDamodaran/FlashRank/commit/0d6f0cd484873b2496eb9f64c710a7ddcd0eb8b4

Is about just showing a warning and still truncating. It's a good idea to let the user know but just to give you a background the CE models we chose are mostly BERT-base or smaller and by default their lengths are 512 and NLP practitioners mostly know that, so it was assumed. I will also call this out on the readme for now. We can take it as different PR.

Is about just showing a warning and still truncating. It's a good idea to let the user know but just to give you a background the CE models we chose are mostly BERT-base or smaller and by default their lengths are 512 and NLP practitioners mostly know that, so it was assumed. I will also call this out on the readme for now. We can take it as different PR.

As there are many newcomers to the field with the recent hype, I'm not sure if it can be assumed. Also, for future upwards compatibility, it would be helpful to add this warning. If it is almost always 512 and can be assumed, why is it even an argument to the initialization of the Reranker?

This seems like an issue and needs attention. Will be happy to test and merge. So, please segregate this fix and submit a separate PR, will have someone do a few rounds of testing and give me feedback.

Added a PR here: https://github.com/PrithivirajDamodaran/FlashRank/pull/33

Is about just showing a warning and still truncating. It's a good idea to let the user know but just to give you a background the CE models we chose are mostly BERT-base or smaller and by default their lengths are 512 and NLP practitioners mostly know that, so it was assumed. I will also call this out on the readme for now. We can take it as different PR.

Added a PR here: https://github.com/PrithivirajDamodaran/FlashRank/pull/34

Refactored this PR to only include the code quality improvements.

Is about just showing a warning and still truncating. It's a good idea to let the user know but just to give you a background the CE models we chose are mostly BERT-base or smaller and by default their lengths are 512 and NLP practitioners mostly know that, so it was assumed. I will also call this out on the readme for now. We can take it as different PR.

As there are many newcomers to the field with the recent hype, I'm not sure if it can be assumed. Also, for future upwards compatibility, it would be helpful to add this warning. If it is almost always 512 and can be assumed, why is it even an argument to the initialization of the Reranker?

Understand the basics first:
The max token length can be assumed to 512 because BERT family models famously are limited to 512. Assuming max doesnt mean always use the max. Here is why.
Initializing a tokenizer or model with a always to maximum sequence length affects both speed and memory efficiency during tokenization and inference and its common knowledge for ML practioners. Here's how different maximum lengths impact performance:
Key Points:
Tokenization Speed:
Higher Maximum Length (e.g., 512): The tokenizer processes up to the maximum length for every input, regardless of the actual length. Even if your text is only 96 tokens, the tokenizer will consider the possibility of sequences up to 512 tokens, which can introduce unnecessary overhead.
Lower Maximum Length (e.g., 128): Reducing the maximum length reduces the overhead in processing, which can speed up tokenization. Since your text is consistently 96 tokens, a lower maximum length closer to that (e.g., 128) will streamline tokenization without affecting the results.
Model Inference Speed:
Higher Maximum Length: The model allocates memory and computational resources for the maximum length, even if the actual input is shorter. This means that with a maximum sequence length of 512, the model will handle the input as if it's 512 tokens long, slowing down inference.
Lower Maximum Length: If the maximum length is set closer to your typical input length (e.g., 128), inference will be faster because the model handles fewer tokens, reducing the computational load. Since your texts are 96 tokens, initializing with 128 ensures that you're not wasting resources on handling unnecessarily long sequences.
Memory Usage:
Higher Maximum Length: More memory is allocated for larger sequence lengths, which could lead to increased memory usage, especially with large batch sizes. This can also affect GPU memory allocation during training and inference, leading to potential memory inefficiency. (If we use in GPU).
Lower Maximum Length: Memory usage is optimized when the maximum length is closer to your input size. By setting the length to 128, you avoid the overhead of allocating memory for tokens that aren't being used.


Customizing the color of the squares in "Codemap explorer"

With the theme and color I use, I can't see the squares in  "Codemap explorer" that indicates the level of the headings  [cf "editor" on the printscreen below] .
I can only see them when I am on the heading [cf "keep file open" ] or  when I mouse over the heading on codemap explore [cf "color" - sorry my printscreen didn't keep the mouse cursor]  .
It would be nice to be able to customize the color of these square.
And if it's not too much to ask, it would be awesome to have a different customizable color per level.
Thanks!

Unfortunately VSCode does not allow customizing the colours of the TreeView node icons.
However I decided allow setting completely custom icon (not colour) to allow users to handle cases like yours.
The update v1.15.2 just has been published.
You can now specify in your mapper definition icon path instead icon name. So the only thing that you need to do is to store somewhere set of icons that is suitable for your VSCode theme and then update your mappers with the path to the desired icon:

1.15.0 (12 August 2020)

Issue #41: Customizing the color of the squares in "Codemap explorer"
An additional format for icon allows specifying custom path:
path:<absolute path to svg icon file>
The path string can contain special token {theme} which is replaced at runtime with the word "dark" orc "light". Depending on the VS theme.
    "codemap.md": [
      {
          "pattern": "^(\\s*)### (.*)",
          "clear": "###",
          "prefix": " -",
          "icon": "path:E:\\icons\\VSCode\\codemap\\{theme}\\custom_level_a.svg"
      },
      . . .

You are amazing, thanks so much for the update!
I use a custom mapper so I am not sure how I should set the  "icon": "path:..." for each of the 4 level I use.
Here is my current set up :
In settings.json:
    "codemap.maxNestingLevel": "4",
    "codemap.x": [{"C:/Users/Me/mydocs/codemap.js ",
    "codemap.py": "config:codemap.x",
    "codemap.pyw": "config:codemap.x",
    "codemap.json": "config:codemap.x",

In C:/Users/Me/mydocs/codemap.js:

"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
const fs = require("fs");
class mapper {

    static read_all_lines(file) {
        let text = fs.readFileSync(file, 'utf8');
        return text.split(/\r?\n/g);
    }

    static generate(file) {
        let members = [];
        try {
            let line_num = 0;
            let image_index = 1;
            mapper
                .read_all_lines(file)
                .forEach(line => {
                    line_num++;
                    line = line.trimStart();
                    // https://www.w3schools.com/jsref/jsref_obj_string.asp
                    // regex: https://regexr.com/
                    // the
                    // <\!\-\>  = html
                    //  /* = css

                    if (line.includes("# =¤"))
                        members.push(`${line.replace(/^[\s\t/;\<\!\-]*# = ¤\s*/,"")}|${line_num}|level1`);
                    else if (line.includes("# -¤¤"))
                        members.push(`${line.replace(/^[\s\t/;\<\!\-\>]*# - ¤¤\s*/,"   ")}|${line_num}|level2`);
                    else if (line.includes("# .¤¤¤"))
                        members.push(`${line.replace(/^[\s\t/;\<\!\-\>/*]*# .¤¤¤\s*/,"      ")}|${line_num}|level3`);
                    else if (line.includes("# .   ¤¤¤¤"))
                        members.push(`${line.replace(/^[\s\t/;\<\!\-\>/*]*# . ¤¤¤¤\s*/,"      ")}|${line_num}|level4`);
                });
        } catch (error) {}
        return members;
    }
}
exports.mapper = mapper;

you can do it like this:
members.push(`${line.replace(/^[\s\t/;\<\!\-]*# = ¤\s*/,"")}|${line_num}|path:E:\\icons\\VSCode\\codemap\\{theme}\\custom_level_a.svg`);

Super!
I am using this custom path with a .png icon (16x16 pixels) and it's perfect:
path:C:\\Users\\user\\Desktop\\myIcons\\CodemapIcon\\level4.png
I am even able to have more than 3 levels! This is so great!

Glad it helped :)

The last release was in  Sep 2020 (~5 month ago). Thus  it is unlikely the change is coming from the extension.
Though I noticed it was update of VSCode a few days ago and the big change was something about the icons...
Maybe it was it.

Thanks for you quick answer! I am not sure I understand. Do you mean that there was a change in the way VSCode handle the icons and thus the extension needs to be updated to reflect this change?

Not exactly.
The extension has not changed since Sep 2020. Thu the change in behavior is either contributed by your environment (e.g it triggers a hidden flaw in the extension implementation) or by the changes in the VSCode itself, which happens a lot :(
But I cannot be sure about VSCode as a suspect as I have no evidence of that. It was my pure speculation since the latest update was specifically nominating the icons a a big change.
I will be working on the extension again (after I finish my commitments to my other two open source projects) so I will definitely see the problem if it is there.

Thanks for taking the time to write a detailed answer!

I can confirm now that I do not see this problem:

At least with the

Yes it's also working for me now. Not sure what has changed because my codemap.js is still same but, yeah, it's back!
I don't know if it is linked but just before the icons came back I disabled all my vs-code extensions and then reload vscode and then re-enable them all.


Fix priorities in RemoveEmptyDocBlockFixer (closes #838)

I'm no longer interested in this fixer and as such this PR is no longer maintained. Feel free to merge as is, amend, or close.

Without proper testing this might cause regression.
So I'm unable to merge it in this state

Continues in #845


[TEST] - Add tests for UserRoleHelper

@mattyb149, @brosander, review it please. This is test for UserRoleHelper. I prepared it when was dealing with PDI-12814, but didn't include into its PRs

@mattyb149, I've updated the PR by adding guard conditions

@mattyb149, review it please

@mattyb149, review it please

Changed files:
plugins/pdi-pur-plugin/src/org/pentaho/di/repository/pur/UserRoleHelper.java
plugins/pdi-pur-plugin/test/org/pentaho/di/repository/pur/UserRoleHelperTest.java
Checkstyle violations:
No errors found
Unit test coverage change:
org.pentaho.di.repository.pur.UserRoleHelper:

instructionPercentCoverageChange : +15.55%
branchPercentCoverageChange : +20.35%
linePercentCoverageChange : +15.79%
complexityPercentCoverageChange : +11.58%
methodPercentCoverageChange : +11.11%

org.pentaho.di.repository.pur.model.EEUserInfo:

instructionPercentCoverageChange : +19.23%
linePercentCoverageChange : +27.27%
complexityPercentCoverageChange : +27.27%
methodPercentCoverageChange : +30.00%


[Proposal] Rename Quickstarts repo to Tutorials and create a new Quickstarts repo with simplified examples

Work has been done to create simplified/runnable examples for each building block API for a given SDK. Currently, the source code for these examples lives in a contributor's personal GH account.
This proposal is to rename our current quickstarts repo to tutorials (since some of the examples are more representative of real world application/scenarios, which include usage of more than one building block per example).
IMO, Quickstarts should be a 5-minutes to "wow" experience and showing a singular value prop. I suggest we create a new "Quickstarts" repo and port over the source code from here, which are simplified examples on how to use each building block with a given SDK.

This proposal was accepted and approved by the Dapr STC. See https://github.com/dapr/community/issues/120

This has now been implemented, but done slightly differently. Instead the existing quickstart repo was kept and the existing ones named as tutorials. This made the transition much simpler to understand without having to create a new repo.


debug modus

after ca. 1 hour of playing the game (~e30 mana), the combiner starts to produce unpredictable stones.
i play in default resolution, set it back to default resolution when the problem occures, restart the combiner, set the delay from 50 to 100, from 100 to 150, change combining steps - but the issue still remains.
I studied a bit the combinercode, and saw there is a outcommented section with a message box that shows the resolution, and my guess is, that something with that isn't right on my pc. so could you please add a debug option, so that that message box (and maybe some other infos are logged in a file) is shown?
thx in advance,
deuter

If the combiner gets the right gems at the beginning the resolution is right.
Your problem is that you need a bigger delay when there are many monsters on screen, try to up it to ~500.

ok - thank you very much!
i'll give it a try :)

works pefect!
thx 12345ieee :)

Great to know, @deuter75 .
I'm closing this.


fix: Gemfile(add sass-embedded)

Configuration file: /home/runner/work/blog/blog/_config.yml
To use retry middleware with Faraday v2.0+, install faraday-retry gem
Source: /home/runner/work/blog/blog
Destination: /home/runner/work/blog/blog/_site
Incremental build: disabled. Enable with --incremental
Generating...
Jekyll Feed: Generating feed for posts
Liquid Exception: The GitHub API credentials you provided aren't valid. in /home/runner/work/blog/blog/_layouts/base.html
bundler: failed to load command: jekyll (/home/runner/work/blog/blog/vendor/bundle/ruby/3.3.0/bin/jekyll)
/home/runner/work/blog/blog/vendor/bundle/ruby/3.3.0/gems/jekyll-github-metadata-2.16.1/lib/jekyll-github-metadata/client.rb:94:in `rescue in save_from_errors': The GitHub API credentials you provided aren't valid. (Jekyll::GitHubMetadata::Client::BadCredentialsError)


Validate-RetentionRuleQuery - fails to do anything

If i run:
PS C:\Users\robert> Validate-RetentionRuleQuery 'from:"Ann Beebe" AND subject:northwind'
I get the below output:
WARNING: The query string contains workload-specific properties. So, it should only be applied to workload which can understand these properties.
So while the command runs, it doesnt work in terms of validating the rule.
Robert

Hi @robert5150, thank you for your feedback and help us to improve docs.microsoft.com.
I have this comment from the product manager:
"The warning is actually exactly what the validation is supposed to do, it says this is not a KQL which will work for all workloads so it needs to only be used in the appropriate workload (EXO in this case)"

@dariomws  Thank you very much for the contribution and sharing this explanation. @robert5150 Hope this comment is helpful for you. If you see a documentation update is required, please feel free to open an issue for the same. We proceed here to close it. Thanks for taking out some time to open the issue. Appreciate and encourage you to do the same in future also.


Client sends string rather than array of strings when settings moderators

incorrect reason for bug, it's a bug on backend instead

incorrect reason for bug, it's a bug on backend instead


[Type checker] Suggest @objc for ill-formed extensions of ObjC generic classes.

@objc is used as a proxy to allow 'self' to access type parameters within
an extension of an Objective-C generic class. Suggest it in cases where it
might make sense.
Clarifies the fix for cases like rdar://problem/27796182.

@swift-ci please smoke test and merge


Remove RegEx from Replace and LoggingRule Pattern

RegularExpression is a heavy dependency for a logging library, when using AOT.
Instead create dedicated RegEx-Replace-LayoutRenderer, and change the MultiplePatternLoggerNameMatcher to not rely on RegEx.

Resolved by #5644 + #5646


Allow empty sfo key

Allow empty SFO key to support EB without SFO. This change will allow SFO configuration without a valid key needed in the configuration.
https://github.com/OpenConext/OpenConext-engineblock/issues/852

This looks like a good and pragmatic way to solve the issue described in #852. We can maybe take this a step further:

Remove/unset the default SFO settings in the parametesr.yml.dist file. So EB with SFO is not configured out of the box. I think using this feature is not common for EB users except for ourselves. Please ask Thijs for input on this if you haven't done so already.
Add a documentation entry in the docs folder explaining the configuration of the SFO featuer (basically moving the already documented dist file documentation to a markdown file.

Thanks for addressing the doc suggestions, feel free to merge when Travis is also in agreement.


[AVM Module Issue]: ApiManagement is missing module service/products/policies

Check for previous/existing GitHub issues

[X] I have checked for previous/existing GitHub issues

Issue Type?
Feature Request
Module Name
avm/res/api-management/service
(Optional) Module Version
No response
Description
AVM v0.2.0 supports both service/policies and service/apis/policies but not service/products/policies so bicep authors need to create all the product policies as bicep resources separate from the AVM, for example:
resource internalproductpolicy 'Microsoft.ApiManagement/service/products/policies@2023-05-01-preview' = {
  name: '${apimName}/Internal/policy'
  dependsOn: [apim]
  properties: {
    value: loadTextContent('../policies/internal-product-policy.xml')
  }
}

Feature Request
Add the service/products/policies sub-module to the AVM. Should be reasonably straightforward as very similar to service/apis/policies
(Optional) Correlation Id
No response

@mikejonestechno thank you for the suggestion. I will get to this into my next PR where I am adding a few more new features.


Refine read more functionality

TBD.

Some notes on the Description Read More:

When resizing the browser from small (mobile size), it is expected the description text will adjust to show more characters. The Read More is positioned inline, and after the ellipsis. To achieve this the following structure is necessary:

A comprehensive cellular anatomy of normal human prostate is essential for solving the cellular origins of benign prostatic hyperplasia and prostate cancer. The tools used to analyze the contribution of individual cell types are not robust. We provide a cellular... <button>Read More</button>

We will not be able to use css line clamp because the button needs to be inline (any line clamp will truncate the button). We will need to calculate onResize how many chars to display, taking into consideration the need to display the ellipsis and the Read More text.
When the breakpoint becomes desktop we will no longer need to calculate the displayable chars, css line clamp is utilised and the structure will change to:

A comprehensive cellular anatomy of normal human prostate is essential for solving the cellular origins of benign prostatic hyperplasia and prostate cancer. The tools used to analyze the contribution of individual cell types are not robust. We provide a cellular...

<button>Read More</button>


Index based DataSet creation

In Pandas it is common to create DataFrame as follows:
from pandas import DataFrame
DataFrame(data=[("Nanne", "Aben"), ("Slava", "Tradunsky")], columns=["First name", "Last name"])

  First name  Last name
0      Nanne       Aben
1      Slava  Tradunsky

However, when trying to do an analogy in DataSet:
from dataclasses import dataclass
@dataclass
class Person:
    first_name: str
    last_name: str

DataSet[Person](data=[("Nanne", "Aben"), ("Slava", "Tradunsky")])

...
File "python3.9/site-packages/strictly_typed_pandas/dataset.py", line 119, in _continue_initialization
validate_schema(schema_expected, schema_observed)
File "python3.9/site-packages/strictly_typed_pandas/validate_schema.py", line 30, in validate_schema
_check_names(set(schema_expected.keys()), set(schema_observed.keys()))
File "python3.9/site-packages/strictly_typed_pandas/validate_schema.py", line 37, in _check_names
raise TypeError(
TypeError: Data contains the following columns not present in schema: {0, 1}

Assuming schema is known due to generic class Person, I am not passing it as a dictionary nor giving columns.
Would be great to have the least resistance path to migrate existing code from DataFrame to DataSet without changing data parameter shape too much. 🙏🏻

Hi Slava!
Thanks for your feedback! I think the most straightforward solution would be to define the DataSet as:
from strictly_typed_pandas import DataSet

class Person:
    first_name: str
    last_name: str

DataSet[Person](data=[("Nanne", "Aben"), ("Slava", "Tradunsky")], columns=["first_name", "last_name"])

You're right that in this case you should be able to determine the column names from the Person class. You could do something like this (though it doesn't look great, I admit):
from strictly_typed_pandas import DataSet

class Person:
    first_name: str
    last_name: str

DataSet[Person](data=[("Nanne", "Aben"), ("Slava", "Tradunsky")], columns=Person.__annotations__.keys())

While I agree that it would be neat if strictly_typed_pandas would take care of this for you, there is one problem with that: we don't actually assume anywhere that the ordering of variables in the schema is the same as the ordering in the columns. For example, this would also work:
from strictly_typed_pandas import DataSet

# switching first name and last name
class Person:
    last_name: str
    first_name: str

DataSet[Person](data=[("Nanne", "Aben"), ("Slava", "Tradunsky")], columns=["first_name", "last_name"])

I don't really want to change that behaviour. One of the advantages of order independence is that we could use the Prototype class down the line to move a lot more type checking into the linting part (using the Prototype type), rather than relying on run-time checks.

Hi @nanne-aben,
Thank you for your answer and suggestions!
That's indeed an issue with sorting I did not realize originally! Great that you pointed it out.
Seems like the suggestion you made, would explicitly define the order, but indeed the class design looks not ideal:
DataSet[Person](data=[("Nanne", "Aben"), ("Slava", "Tradunsky")], columns=Person.__annotations__.keys())

I started to think about linting more and would like to hear your opinion:
Whenever I create a pandas.DataFrame it has clear field type variations that it can be constructed from.

This makes class design complete, as I can construct DataFrame of the given data shape and have linting time type checking:

       0          1
0  Nanne       Aben
1  Slava  Tradunsky

Whereas DataSet class design does not give any clue about what parameter types it expects (show parameters command does nothing). I believe this is primarily because DataSetBase eliminates all work done in pandas to introduce type hints for better linting to find errors earlier than runtime:
class DataSetBase(pd.DataFrame, ABC):
    def __init__(self, *args, **kwargs) -> None: # here all DataFrame type hints are effectively shallowed

But since the main purpose of the library is to have generic specialized content of the collection data structure (analogy to List[Person], Set[Person]), DataSet[Person] design is intuitively expected to represent its content, however, when a user tries to follow the common class design and construct an object, it does not show linting type error, but throws a bit confusing runtime error:
DataSet[Person](data=[("Nanne", "Aben"), ("Slava", "Tradunsky")])

TypeError: Data contains the following columns not present in schema: {0, 1}

WDYT?

Yeah, I've noticed that the parameter type hints (and actually, all documentation about parameters) goes out of the window once you subclass something. I wish I could inherit those somehow, but I have no idea how to do this. If you have suggestions, those would be very welcome!
With respect to the error: since you didn't define column names, pandas automatically creates a DataFrame with columns ['0', '1']. Strictly typed pandas then detects that those are different from what you've defined in the schema and gives the error you see. Maybe the error could be a bit more clear indeed. We could check in DataSetBase whether the input is a list of tuples, and whether a columns argument has been provided, and throw a warning accordingly. What do you think? Would you like to make a PR?


feat: Kibbeh added basic ability to check upload in ChangeAvatarcard

In this pr:

Added code to upload files and test functionality of change avatar card
code cleanup and formatting
removed unused imports
added comments for future scope
added images/jpg type and handled some edge cases with file size

Do you mind updating the linting tests?

sure, what should I do to fix linting tests?

apparently there is a linting issue in useDefStore and SingleUser tax, both which I am not updating but are like that from before.

use proper commit messages please (yarn commit or yarn commit:signed)
and the setDeaf etc will be fixed if you pull latest and push

I have used yarn commit

I have used yarn commit

all you commits need to be yarn commit and the scope can only be from one of these below

ok let me open a new pr


Generic/DocComment: improve code coverage

Description
This PR improves the code coverage for the Generic.Commenting.DocComment sniff.
See commit messages for more details on the reasoning behind some of the changes, including one that I'm not sure if I took the best approach (handling errors in different lines for the JS and PHP test case files).
While working on this PR, I noticed that PHPCS considers /**/ a doc comment, but php.net states that "doc comments start with /**, followed by whitespace" (https://www.php.net/manual/en/reflectionclass.getdoccomment.php). I'm not sure why PHPCS doesn't require the whitespace after /**, but this seems to be intentional. Here is the commit that introduced this change: https://github.com/PHPCSStandards/PHP_CodeSniffer/commit/8c64ded3af264610db8c435ae858868a3b842e42. I'm sharing this here in case it is something that we want to further investigate.
Related issues/external references
Part of #146
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)

[ ] This change is only breaking for integrators, not for external standards or end-users.

[ ] Documentation improvement

PR checklist

[x] I have checked there is no other PR open for the same change.
[x] I have read the Contribution Guidelines.
[x] I grant the project the right to include and distribute the code under the BSD-3-Clause license (and I have the right to grant these rights).
[ ] I have added tests to cover my changes.
[x] I have verified that the code complies with the projects coding standards.
[ ] [Required for new sniffs] I have added XML documentation for the sniff.

While working on this PR, I noticed that PHPCS considers /**/ a doc comment, but php.net states that "doc comments start with /**, followed by whitespace" (https://www.php.net/manual/en/reflectionclass.getdoccomment.php). I'm not sure why PHPCS doesn't require the whitespace after /**, but this seems to be intentional. Here is the commit that introduced this change: 8c64ded. I'm sharing this here in case it is something that we want to further investigate.

@rodrigoprimo Good observation, but this is exactly as it should be. PHPCS needs to be able to flag these kind of user errors and should therefore tokenize it a way that allows us to do so.

See commit messages for more details on the reasoning behind some of the changes, including one that I'm not sure if I took the best approach (handling errors in different lines for the JS and PHP test case files).

For clarity I'm copying the commit message referred to above here:

I opted to separate the array containing the list of errors for
DocCommentUnitTest.1.inc and DocCommentUnitTest.js as the files had
already diverged even before this commit and I believe it will be easier
to just remove the switch case for JS when JS support is dropped.

@rodrigoprimo While I understand your reasoning, I don't think the reasoning is correct.

At this time, in the 3.x branch JS is still supported, so that same error code should also be tested for JS (if possible).
Splitting it up is not going to make dropping JS easier as JS has already been dropped in the 4.x branch, so this would now make the cherrypick to the 4.x branch more complicated instead of easier.

As for:

the files had already diverged

That raises some questions. I mean,  would expect the files to be different as JS is a different language than PHP, but the error list is the same, so how have they diverged ?

At this time, in the 3.x branch JS is still supported, so that same error code should also be tested for JS (if possible).
(...)
That raises some questions. I mean, I would expect the files to be different as JS is a different language than PHP, but the error list is the same, so how have they diverged ?

What I meant to say when I said that they diverged is that there are two comments that were added to the PHP test case file but not to the JS test case file:
https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/src/Standards/Generic/Tests/Commenting/DocCommentUnitTest.inc#L253-L262
That led me to believe that I should add the new tests only to the PHP file.

Splitting it up is not going to make dropping JS easier as JS has already been dropped in the 4.x branch, so this would now make the cherrypick to the 4.x branch more complicated instead of easier.

:+1:
I pushed new commits copying the missing tests from the main PHP test case file to the JS test case file and undoing the change that I made to DocCommentUnitTest.php. Can you please check this PR again?

What I meant to say when I said that they diverged is that there are two comments that were added to the PHP test case file but not to the JS test case file

Ah. That was an oversight from my side as those tests didn't (and shouldn't) yield any errors. I would have caught it when adding them if they did yield errors.

Ended up making some tiny tweaks:

Parse error test: kept the "Must be last test without new line." comment and removed the new line.
If this was explicitly marked as such, there was a reason for it. The sniff may handle it correctly now, but likely didn't in the past.
As there is no reason to change the test, better not to.
Proper capitalization and punctuation for the "// Tests to check handling empty doc comments." comment.


Fix extension services not updating the friendly name and default profile.

The current extension services were missing some fields in the MixedRealityExtensionService attribute, specifically:

Name
Default profile path
Package folder

In addition, the extension services profile inspector was not updating the name from the attribute.
Both are resolved by this change.

/azp run


App selection UI improvement

This pull request changes the app selection dialog in lumina-config to be a bit more user friendly.
The comboBox is replaced with a list and search input and allows double clicking the item to select it.

Nice! Thanks for sending that in!


Update primary font from Raleway to Satoshi

Our primary font used for headers and display titles should be changed from Raleway to Satoshi.
Link to font: https://www.fontshare.com/fonts/satoshi
Link to Figma: https://www.figma.com/file/ZGYKkf5yHXoS2jadfbB4NM/SWC-Design-System?type=design&node-id=5-2&mode=design&t=MJ0eFkjrletXS9Gi-4

https://nextjs.org/docs/pages/building-your-application/optimizing/fonts


It's not working for JavaScript

Hi, I don't know why, but it's not working for me with ST3. I'm using it for JavaScript.
I did these steps:

Installed LSP plugin for ST3.
npm install -g javascript-typescript-langserver
Opened User settings and added:

"auto_complete_triggers": [
        {
            "characters": ".",
            "selector": "source.js"
        },
        {
            "characters": ".",
            "selector": "source.ts"
        }
]

Enabled all logging.
Restarted ST3.
Tested, nothing happened, no autocomplete support and other things with .js files. Also opened console and nothing was here related with LSP. Seems it doesn't started or what? I don't understand why it doesn't working and how to make it work.
Tried with dev build and with stable build, same...

Did you run "LSP: Enable Language Server Globally"?

@rwols Hi, what did you mean?

In the Command Palette, if you type "LSP:", a list of commands should appear. One of them should be "LSP: Enable Language Server Globally". Select the javascript language server in the popup menu that appears.

@rwols I didn't saw such option in command palette, only LSP settings. I will try to reinstall everything.

@rwols Seems everything is good, but it's very buggy, it worked for me only 1 time for new project, I did yarn add express and it never started normally after that.

If you happen to find the time, we'd appreciate if you could share the debug output in the console (enable it with "log_debug": true in your LSP settings).


xhost local

Do you think its worth adding xhost local: to the instructions for all X based images?
Thanks,
Dan

Depends on distro it's kinda redundant
On Friday, April 29, 2016, Daniel Pryor<EMAIL_ADDRESS>wrote:

Do you think its worth adding xhost local: to the instructions for all X
based images?
Thanks,
Dan
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/jfrazelle/dockerfiles/issues/135

--
Jessie Frazelle
4096R / D4C4 DD60 0D66 F65A 8EFC  511E 18F3 685C 0022 BFF3
pgp.mit.edu http://pgp.mit.edu/pks/lookup?op=get&search=0x18F3685C0022BFF3

Yeah, I'm noticing some weirdness with stuff on Ubuntu 16.04, 4.4 kernel, and docker 1.11.1. We will see what I can figure out and Ill post various hacks I had to do here to get things working.

Had to download your chrome seccomp profile for chrome and add it to the CWD (i.e dockerfiles/chrome/stable)
We also need to add installing libexif12  to your Dockerfile, unless there is a reason you left it out.
Then I wrote this start.sh script that others might find a use for.
#!/bin/bash

CHROME_DATA_DIR="${HOME}"/.docker-google-chrome/
DOWNLOAD_DIR="${HOME}"/Downloads

if [ ! `xhost |grep -c LOCAL` -ge 1 ]
then
    echo "adding local permissions to X socket"
    xhost local:
fi

# Check for local image otherwise pull
if [ `docker images |grep -c chrome` -ge 1 ]
then
    DOCKER_CHROME_IMAGE=`docker images | grep chrome |head -n 1 |awk '{print $1}'`
else
    DOCKER_CHROME_IMAGE="jess/chrome"
fi

docker run --rm -it \
	--security-opt seccomp:./chrome-seccomp.json \
	-v /tmp/.X11-unix:/tmp/.X11-unix \
        -e DISPLAY=unix"${DISPLAY}" \
        -v "${DOWNLOAD_DIR}":/root/Downloads \
	-v "${CHROME_DATA_DIR}":/data \
	--device /dev/snd \
        --name chrome \
	"${DOCKER_CHROME_IMAGE}"


Update index.md

Docs Build status updates of commit 8ad43a1:
:warning: Validation status: warnings

File
Status
Preview URL
Details

test-repo-26072021-01/index.md
:warning:Warning
View
Details

test-repo-26072021-01/index.md

Line 1, Column 1: [Warning-title-missing] Missing required attribute: 'title'. Add a title string to show in search engine results.
Line 1, Column 1: [Warning-author-missing] Missing required attribute: 'author'. Add the current author's GitHub ID.

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


Empty ObjectString missing validation inside query schema

What version of Elysia.JS is running?
0.8.17
What platform is your computer?
Linux 6.7.6-arch1-1 x86_64
What steps can reproduce the bug?
I've created an object to be passed as a query parameter to store the current page the user is in and the maximum number of items to display per page.
To do so, I've used ObjectString. If pagination is not sent or is not an object, the validation fails. However, if it is an empty object (or any kind of object at all) the validation does not fail.
I needed those two fields to be required and to be of type number.
Use the code and the URL below to reproduce:
import { Elysia, t } from "elysia";

const lists = new Elysia({ prefix: "/lists" })
  .get("/", ({ query }) => {
    console.log({ query })
    return "Hello"
  }, {
    query: t.Object({
      pagination: t.ObjectString({
        pageIndex: t.Number(),
        pageLimit: t.Number()
      })
    })
  })

export { lists }

Type in your browser: http://localhost:3000/lists?pagination={}
A "Hello" message will appear, although it was not correctly validated.
What is the expected behavior?
The expected behavior was for it to fail if the param is missing, if the object is empty, or one of the fields is missing, or one or both the fields to not have a number value.
It only fails if the param is missing or is not an object.
What do you see instead?
The page loads with the missing required values from ObjectString as undefined, instead of failing at validation.
Additional information
No response

Fixed in 711925a under 1.0.0-beta.14

Should be fixed in 1.0.0
Feels free to reopen if issue still persists.


Support for Aqara Zigbee Switches

Device model
lumi.158d0002c7f0f8
Device name
Aqara D1
Does the device require a MiCloud connection?
Do not know
Runs through Mi Gateway
Anything special about the device?
I would like to get Alexa access to this device through Homebridge, the device natively supports Homekit through the Mi Gateway.

The specified device does not seems to have a miot spec so it will not work.
https://www.merdok.org/miotspec/?model=lumi.158d0002c7f0f8


Use open binary instead of Terminals own binary

This avoids opening multiple instances of Terminal, also it makes
Terminal the front most window.

@zenangst thanks for your PR, but it still opens up new Terminal

@onmyway133 remember this one? 😁

@zenangst yeah, I took a look at it last week when I convert this to Swift. It is merged now 👍


20200606: cannot build with system-wide ncnn and libwebp

Hi,
It seems that version 20200606 can no longer be built with system-wide ncnn as it does look for ncnn locally in source tree and fails if it does not exist.
if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ncnn/CMakeLists.txt")
    message(FATAL_ERROR "The submodules were not downloaded! Please update submodules with \"git submodule update --init --recursive\" and try again.")
endif()

Same goes for libwebp
if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/libwebp/CMakeLists.txt")
    message(FATAL_ERROR "The submodules were not downloaded! Please update submodules with \"git submodule update --init --recursive\" and try again.")
endif()

In Gentoo we uses https://github.com/nihui/waifu2x-ncnn-vulkan/archive/20200606.tar.gz as the source (from release page).
Can you please restore a way to not use bundled/submodule dependencies?

I've hacked CMakeLists.txt a bit but I do seems to crash on ncnn, is it possible that current release does not work with latest release of ncnn and require master branch of ncnn?
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index abfdab2..596e9f1 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -83,10 +83,6 @@ else()
     message(WARNING "IPO is not supported: ${ipo_supported_output}")
 endif()

-# build ncnn library
-if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ncnn/CMakeLists.txt")
-    message(FATAL_ERROR "The submodules were not downloaded! Please update submodules with \"git submodule update --init --recursive\" and try again.")
-endif()

 option(NCNN_INSTALL_SDK "" OFF)
 option(NCNN_PIXEL_ROTATE "" OFF)
@@ -174,12 +170,7 @@ option(WITH_LAYER_mish "" OFF)
 option(WITH_LAYER_statisticspooling "" OFF)
 option(WITH_LAYER_swish "" OFF)

-add_subdirectory(ncnn)
-
-# build libwebp library
-if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/libwebp/CMakeLists.txt")
-    message(FATAL_ERROR "The submodules were not downloaded! Please update submodules with \"git submodule update --init --recursive\" and try again.")
-endif()
+find_package(ncnn REQUIRED)

 option(WEBP_ENABLE_SIMD "" ON)
 option(WEBP_BUILD_ANIM_UTILS "" OFF)
@@ -195,8 +186,6 @@ option(WEBP_BUILD_WEBP_JS "" OFF)
 option(WEBP_NEAR_LOSSLESS "" OFF)
 option(WEBP_ENABLE_SWAP_16BIT_CSP "" OFF)

-add_subdirectory(libwebp)
-
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/libwebp/src)

 # look for vulkan compute shader and compile

The crash
[ 86%] Building CXX object CMakeFiles/waifu2x-ncnn-vulkan.dir/main.cpp.o
/home/piotr/src/waifu2x-ncnn-vulkan/src/main.cpp: In function ‘int main(int, char**)’:
/home/piotr/src/waifu2x-ncnn-vulkan/src/main.cpp:661:61: error: ‘class ncnn::VulkanDevice’ has no member named ‘get_heap_budget’
  661 |         uint32_t heap_budget = ncnn::get_gpu_device(gpuid)->get_heap_budget();
      |                                                             ^~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/waifu2x-ncnn-vulkan.dir/build.make:83: CMakeFiles/waifu2x-ncnn-vulkan.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:97: CMakeFiles/waifu2x-ncnn-vulkan.dir/all] Error 2
make: *** [Makefile:104: all] Error 2

yeah, it currently depends on the ncnn git master code. That's why I setup ncnn as a submodule
I shall add a cmake option to enable using system ncnn and libwebp after a new ncnn release

That would be great, I also got some difficulties in compling libwebp as submodule in termux. But system libwebp is available.

ncnn-20200616 released

fixed in  https://github.com/nihui/waifu2x-ncnn-vulkan/commit/a2e592426bf06ef50a09a8aa99f6eca08b30b395
note: The code requires up-to-date ncnn to work properly.


Only emit file.update if the file checksum has changed

Issue opened with imdone.io from code comment on d77a719
READY  Only emit file.update if the file checksum has changed id:49

https://github.com/imdone/imdone-atom/blob/d77a7194ebca4b0071d00166ba3a7f6b5540b46b/lib/services/worker-watched-fs-store.js#L19-L24

Issue closed with imdone.io by removing a comment.

https://github.com/imdone/imdone-atom/blob/ec7a026e281c20e72696144df48c9c343fac4177/lib/services/worker-watched-fs-store.js#L19-L24


Compensate remaining body length by previous buffer size

As shown in https://github.com/mtrudel/bandit/pull/182, body_remaining goes down beyond 0. That signalizes that due to size miscalculation, do_req_body function skips on reading the last few packets from the socket which contains the tail of the body. Note that body_remaining is already being adjusted on line 62 after the headers were read. I'm certain that this should not happen. I'm not sure if that fixes BodyAlreadyReadError but I think it's still worth to have that fix in the main branch :)

I literally just discovered the exact same thing, though I'm solving it a smidge differently (DRYing up a few other byte_size calls in that same function).
PR up momentarily.

Closed in favour of #184


Padding strategy: torso, back, arms

All our subjects have torso's cut off at the boundary, such that edge padding should be used over zero padding to avoid introducing a non-existent air-torso interface,

Also, several subjects have their backs slightly (or a lot) touching the boundary, and here zero (or air-chi) padding would be best imo. You can clearly see the effect that edge padding has on the field simulation for this case in the example below,

Lasly, all our subjects have their arms and part of their torso cropped latterally,

I'm not sure what would be the best strategy here - I guess it would depend on the padding distance. If we're only going to pad up to 10 cm each boundary, then edge padding would make a bit more sense (but even then, not ideal because it extends the lung cavity), but further away than that we would need to introduce air I think.
tl;dr instead of edge padding all boundaries, we should probably edge pad all the sides besides the back, and air-pad the back. So, a 2-step padding procedure, which numpy can do I believe by selecting which boundaries you want to pad. And then, maybe set a limit for the padding distance where, beyond that, we would start zero padding the sides of the torso (and maybe even, the legs at some point if you really want to pad far away)

Writing a note here for documentation purposes:
In a discussion yesterday, Eva reminded me that after padding, the pairity of the dimensions must be preserved, i.e. if x dim was odd before it must be odd after padding, same for y and z. If they were even, it also needs to be preserved.
With my suggested padding, this condition is met (since the padding is symmetrical on both sides of each axis, eg a 129 voxel +50 padding on one side then +50 on the other results in 229, for 128 it would result in 128.
Note however that the old implementation done by Charles's initial code (and I think, possibly inherited from the MATLAB version of the code) does not meet this condition. Before, padding was done as a multiplicative factor, with default 2, so 129 with x2 padding would have been 258, changing the parity.
See:
https://github.com/shimming-toolbox/susceptibility-to-fieldmap-fft/blob/9a60de9e478b724576d390c63070b48951df5e23/functions/compute_fieldmap.py#L63
# creating the k-space grid with the buffer
new_dimensions = buffer*np.array(dimensions)


dist: transpile to ES5 compatible format and UMD module

Currently ES2017 is compiled to ES2016. Instead we want to have ES5 compatible code as dist output.

Additionally the output should be exported as UMD version instead of CommonJS.

Fixed on master (v0.6.0).


[FEATURE]Add Windows Support

Coming from https://github.com/opensearch-project/opensearch-plugins/issues/95, add Windows support.

[ ] Passing CI on Windows
[ ] Documentation

closing this as we already added windows support. https://github.com/opensearch-project/security-analytics/pull/84


Added shell and counting sort in Ruby (#478) (#480)

-- Also updated the readme file

Please consider it under Hacktoberfest label.


fix the default behavior when cloud environments are configured

Change the behavior for configured cloud environments.
If there is any configuration for a cloud environment fall into the parameterized code path.
Otherwise, the default is the public cloud with no configuration and the gov cloud if the (legacy) ChannelService property indicates that.

Using this PR in a DevOps experiment...

Yay.

Reran the failed build, and all is good.