text:
Fix for one modal closing after another has been opened

I know you said that you were not looking to support this at this time, but I know a lot of people have posted on stackoverflow regarding this issue. In my scenario I am using modal to hold a progress list of executed ajax with the ability to cancel each one. I am also using modal for "more details" on notifications. The data is gathered via ajax, therefore the processing modal is shown, and this closes once the entire ajax success function is called. The success function, in this case, opens the notification. So, the last issue I raised was regarding the modal-open class, and as patrickhlauke pointed out it is not just the class. This time I have taken the whole hideModal function and worked a test solution to solve this issue:
Modal.prototype.hideModal = function () {
var that = this;
this.$element.hide();
this.backdrop(function () {
var noOpenModals = $( 'body' ).find( '.modal:visible' ).length;
if( noOpenModals == 0 ) {
that.$body.removeClass('modal-open');
that.resetAdjustments();
that.resetScrollbar();
that.$element.trigger('hidden.bs.modal')
}
});
}
I'm not entirely sure if this would cause any other issues as a knock on effect, as I may have overlooked something, but I thought I'd post the fix. That way you can do with it as you fancy and other users can see how to overcome it if they want to.
Thanks.

The way I would personally attack the problem personally would be to use an accordion or collapsable panel(s) inside the first modal.
This allows for the progress of multiple functions to be displayed in the main title of each collapsible panel. Using a button for more details, or the completion of one of the functions could then reveal one or multiple panels with details without the concerns related to requiring additional modals.

Closing per #15817.

authors: cvrebert kkirsche moridianmess

repo: twbs/bootstrap


text:
ScrollSpy works only on the body tag?

I've got an example here: http://jsfiddle.net/03sv47av/
As is, scrollspy will set up, but will not react to scrolling. But if you cut all the attributes from the first div and paste them to the body tag and re-run the example, scrollspy works perfectly.
You'll need to inspect the nav elements with your browser dev tools. When it works, the active classes will be dynamically applied as you scroll.
I've reread the docs about a zillion times now, and I can't seem to pinpoint where I'm going wrong.

Hi @shadowii!
You appear to have posted a live example (http://fiddle.jshell.net/03sv47av/show/light/), which is always a good first step. However, according to the HTML5 validator, your example has some validation errors, which might potentially be causing your issue:

line 38, column 3 thru line 38, column 8: Start tag body seen but an element of the same type was already open.
line 327, column 1 thru line 327, column 7: Saw an end tag after body had been closed.

You'll need to fix these errors and post a revised example before we can proceed further.
Thanks!
(Please note that this is a fully automated comment.)

Maybe I'm blind, but I don't see where the validator is seeing extra body tags, ignoring the presence of iframes.

JS Fiddle already adds a <body> tag for you, so you don't need to include one in the HTML pane of the fiddle. Fiddle without the extra <body> tag: http://jsfiddle.net/03sv47av/2/

I see, sorry about that. Fiddle warned me that it would already place an html tag, but was silent when I tried adding a body tag. I'll update the link with yours, thanks.

You can scrollspy on elements other than <body>. There's an example of doing this in the docs, and it works: http://getbootstrap.com/javascript/#scrollspy-examples
Here's another one using pills instead of a navbar: http://jsfiddle.net/6normhda/
For personal troubleshooting help, please use StackOverflow; see https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md#using-the-issue-tracker

Eh, I think the documentation needs to be updated then. As currently written, it seems to imply "natural" divs will work if you follow the steps given. In the examples you've given, a height and overflow need to be specified. If you remove them, or set height to 100%, ScrollSpy stops working as per my example.
E.g.: Remove height and overflow. Make browser window smaller to allow for scrolling.
http://jsfiddle.net/6normhda/1/

sdf

You should also add that scrollspy needs to be added to div that wraps only the sections and not the nav, unlike the body which wraps both sections and nav.

source: gharchive/issue

authors: cvrebert elinake josemariap onethread shadowii twbs-lmvtfy

license: MIT

license_type: permissive

license_source: github-api


text:
Bootstrap dropdown-menu doesn't get close when clicking an element

I'm firing the bootstrap v3.3.5 dropdown menu by using the javascript function dropdown('toggle') as stated in the docs.
Usually dropdowns would hide whenever you click outside them or you select one of their options.
This doesn't happen when firing it through javascript.
In this reproduction you'll see two menus:

One which works as expected as its fired using the "components" trigger
And another one, using the right click of the mouse, which doesn't work as expected. (it doesn't get closed on click outside or even on element click)

I was able to "manually" get rid of the dropdown menu when clicking outside it by using the following:
$('body').removeClass('open');

But I'm not quite sure why dropdown menus don't work in the same way as when you fire them by the normal procedure.
And having to manually hide them doesn't seem like the best solution...
I opened the same issue in stackoverflow but I didn't get a good solution.

A. You're calling $('#menu').dropdown('toggle') twice in your event handler method
B. You're missing a
 around the

C. You're missing an element with data-toggle="dropdown" (Not explicitly documented, but followed by all the examples and related to the warning in http://getbootstrap.com/javascript/#callout-dropdowns-data-required )
D. The examples imply that dropdown methods are supposed to be invoked on the data-toggle="dropdown" element, not the class="dropdown-menu" element, but apparently there are exceptions to that.
Revised example: http://jsfiddle.net/cvrebert/wnjmb1La/
Action items:

[ ] (Re: C): Further clarify in http://getbootstrap.com/javascript/#callout-dropdowns-data-required that a trigger element is always required, even for programmatic triggering
[ ] (Re: D): Determine which elements of the dropdown the dropdown methods are supposed to work on, and document this more explicitly

B. You're missing a  around the

It doesn't seem to be required, its just to make sure its using a relative position as far as I understood.
Here's the example without it.

C. You're missing an element with data-toggle="dropdown" (Not explicitly documented, but followed by all the examples and related to the warning in http://getbootstrap.com/javascript/#callout-dropdowns-data-required )

That is what it seems to be the trick! Adding an invisible element with the data-toggle attribute.
Thanks for it!

Bootstrap 3 is no longer being officially developed or supported.
All work has moved onto our next major release, v4. As such, this issue or pull request is being closed as a "won't fix." For additional help and support, we recommend utilizing our community resources. Thanks for your understanding, and see you on the other side of v4!
<3,
@mdo and team

authors: alvarotrigo cvrebert mdo


text:
Grid : Document choice of negative margin on the container vs resetting first-child and last-child left/right margin

I attempted recently to "extend" the Bootstrap grid with the following:
.row-no-gutter {
    margin: 0;
}

.row-no-gutter>* {
    padding: 0;
}

.row-small-gutter {
    margin-left: -$grid-gutter-small;
    margin-right: -$grid-gutter-small;
}

.row-small-gutter>* {
    padding-left: $grid-gutter-small;
    padding-right: $grid-gutter-small;
}

.row-large-gutter {
    margin-left: -$grid-gutter-large;
    margin-right: -$grid-gutter-large;
}

.row-large-gutter>* {
    padding-left: $grid-gutter-large;
    padding-right: $grid-gutter-large;
}

Things generally "worked" , until I resized down to mobile and noticed the .container-fluid was still applying the (default) grid padding of 15px, resulting in Horizontal scrollbars.
By the look of things, we can't have different gutter widths with the current Grid implementation?
Provided the above's correct, is there a documented discussion somewhere over the decision of the "negative margins" on the container versus something like resetting the left margin of the first child and the right-margin of the last child? (I am pretty sure that also has side-effects but I'd like to skip the part of researching this on my own when I can safely imagine this has already been widely researched by the community)
Many thanks and cheers!
update after some more research, it is the problem of mobile is remedied by min-width media-querying .row-large-gutter (still my question stands and that's not a bullet-proof solution)
@include bp-medium {
    .row-large-gutter {
        margin-left: -$grid-gutter-large;
        margin-right: -$grid-gutter-large;
    }

    .row-large-gutter>* {
        padding-left: $grid-gutter-large;
        padding-right: $grid-gutter-large;
    }
}

The CSS specificity increase in the :first-child/:last-child case was probably one factor in deciding against it.

I could be mistaken, but when I noticed the negative margins on columns I was under the assumption they did it to make columns more optional. Now if you put content directly into a row without a column it will have a padding, but if you use columns the columns applies the padding while still stretching to fill the space for the purpose of full-width backgrounds and the like.
I thought it was an awkward but neat hack
Consider the following:

Title

...

...

This would have exploded in Bootstrap 3, but now works as expected

@stevendesu let me clarify that my question is regarding Bootstrap 3.x and not 4.x . (saying this because from your post it seems its implied that this is a 4.x behavior)
@all : I guess the question could have been how do we add options for variable Grid Gutter sizes (like UiKit does) but this could be flagged as support/SO question; I would rather hear the opinion of the maintainers.

Unfortunately, we no longer support Bootstrap v3. But you might find the following article helpful:
http://www.helloerik.com/the-subtle-magic-behind-why-the-bootstrap-3-grid-works
Or you could try StackOverflow. The design decision most likely been explained in some old issue on this tracker; just a matter of someone tracking it down for you.

@cvrebert that ticket closing is a little bit premature, the discussion was ongoing.
Does Bootstrap v4 support multiple grid gutter widths?

@cvrebert also, thanks for the link, I've been using Bootstrap since 3 years, I know quite well how the grid works.

By the look of things, we can't have different gutter widths with the current Grid implementation?

Answering that question @gkatsanos, no you cannot have different gutter widths in v3. We don't provide that out of the box, but you could further customize things and add it yourself.

@mdo Thanks Mark, that's what I did as you can see above. But what about v4? Is it an option there? I was just looking at the documentation and the options looked more or less the same as v3.
Which channel do I use to ask for that feature?

(just to clarify I realized that blindly using one framework even if that's the most popular sometimes isn't the best idea if it's not built to satisfy your most common use cases)

authors: cvrebert gkatsanos mdo stevendesu


text:
No Hand Cursor in button Boostrap 4 beta 3

Operating system : Ubuntu 16.4
Browser: Chrome 63, Firefox 58
Bootstrap 4 beta 3

I don't get the "hand" cursor when pointing on a button.

Here's the code: <button type="button" class="btn btn-primary">Primary</button>
And here's a bootsnipp to confirm that. Take a look please at the add user button.
But in the official bootstrap beta 3 website it's working fine I see the hand cursor.
https://getbootstrap.com/docs/4.0/components/buttons/

looks like they are still using the beta 2. give them a little time to update, services like this don't update immediately after release

Yup, closing per @browner12.

authors: browner12 hamzahamidi mdo


text:
Removes border around select caret in IE. #16527

Working example in JSbin. Open it using IE: http://jsbin.com/lapakociya/1/edit?html,css,output
Removes border around select caret. Fixes issue #16527
Before and After in IE:

Messed up rebasing. Will close and redo the pull request..

source: gharchive/pull-request


text:
Popover inside modal

This fix allows popovers inside modals to be hidden when a modal is dismissed. This resolves #20093.

Closing for #21227.

authors: doofster mdo


text:
Remove precss plugin from webpack.md documentation

AFAIK precss is not needed. Moreover I have tested it in a side proejct and it broke some styling.
For example when you add precss to plugins the there is no :root styling in the result css file.
Fixes: #24949

@Johann-S ping

Well it seems the author has deleted the repository thus this cannot be rebased unless I do it manually.
So, closing for now. If anyone wants they can make a new PR.

authors: XhmikosR pmendelski


text:
v5: Add disabled examples for .form-control, .form-select, and .form-range

Forgot to include these somehow. Checkboxes, radios, and file pages already have examples. Range input might need to be documented as well.

Wouldn't it be more accurate to add a new page dedicated to states?

I think each type of form should have it's own page, but we could do some round up ones of some kind. Might explore that in the beta phase as we collect feedback.


text:
How to make (custom Python) kernels support debugging?

"JupyterLab ships with a Debugger front-end by default." "For the debugger to be enabled and visible, a kernel with support for debugging is required." from JupyterLab docs
When I use the default Python 3 (ipykernel), I can use debugging, but I can't use debugging on any kernel defined in kernels.nix.
For example: in kernels.nix:
{pkgs, ...}: {
  kernel.python.trivial = {
    enable = true;
  };
  /* [...other kernels...] */
}

Results in:

My rudimentary understanding is that these kernels are just ipykernel under the hood, so I'm not sure why debugging doesn't work?
Thus, this issue. Any assistance on getting debugging to work on custom kernels would be much appreciated. Let me know if I can provide additional information/context myself. Thanks!

solved by: https://github.com/tweag/jupyenv/pull/524/commits/da28e5361747e28fe888dc8137a9b198bd933f98

authors: ChanceHarrison GTrunSec

repo: tweag/jupyenv


text:
Including attachments in direct messages

Thank you for creating Tweepy, it has been a huge time saver! It took me a bit to figure out the two-step process for uploading and sending an image attachment in a direct message. Part of this request is for an update to the docs, and part is a possible update to the Tweepy code base.
For the code base update, sending direct messages with attachments actually does require that all five arguments are included. Even if you don't want to use Quick Reply Type, you have to insert something (e.g. None) to get the rest of the code to work. Best case, it would be great to update Tweepy so that won't error out.
In the interim, you could include a code snippet that shows the process for uploading and then attaching a file to the direct message. Here is an example:
img = api.media_upload('filepath')
api.send_direct_message(recipient_id, 'text', None, 'media', img.media_id)

(you have to specify None for the quick reply field, and 'media' for image/gif/video content)

You can pass the optional arguments (quick_reply_type, attachment_type, attachment_media_id) as keyword arguments, e.g.:
img = api.media_upload('filepath')
api.send_direct_message(recipient_id, 'text', attachment_type='media', attachment_media_id=img.media_id)

This is the same as and compliant with the rest of Tweepy's API methods.
The optional parameters, as well as the acceptable arguments for attachment_type, are properly documented at https://tweepy.readthedocs.io/en/latest/api.html#API.send_direct_message and https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/new-event.

repo: tweepy/tweepy

license: mit

license_source: bigquery


text:
ForumChannel#default_reaction_emoji#emoji_name is nullable

when trying to serialize forum channels, it throws out this big ugly error:
ERROR twilight_gateway::shard::json: invalid JSON: {"t":"GUILD_CREATE","s":32,"op":0,"d": {redacted}}

https://github.com/twilight-rs/twilight/blob/3407a249d29bd1b99b94626e1db11ffdaec4b4eb/twilight-model/src/channel/forum.rs#L17
Introduced in #1864

Notably serde_json errored with "invalid type: null, expected a string at line 1172 column 5"

authors: Fyko vilgotf

repo: twilight-rs/twilight

license: ISC


text:
Crash by ConcurrentModificationException

Describe the bug
I don't have a prior logs on clue how did this happened. Stack trace does not show my code and I am not able to reproduce the issue, so sorry for that.
Stack Trace
Caused by java.util.ConcurrentModificationException
       at java.util.ArrayList$Itr.next(ArrayList.java:860)
       at java.util.AbstractCollection.toString(AbstractCollection.java:461)
       at java.lang.String.valueOf(String.java:2924)
       at java.lang.StringBuilder.append(StringBuilder.java:132)
       at com.twilio.audioswitch.AudioSwitch.enumerateDevices(AudioSwitch.java:274)
       at com.twilio.audioswitch.AudioSwitch.access$setLogger$p(AudioSwitch.java:29)
       at com.twilio.audioswitch.AudioSwitch$bluetoothDeviceConnectionListener$1.onBluetoothHeadsetStateChanged(AudioSwitch.java:47)
       at com.twilio.audioswitch.bluetooth.BluetoothHeadsetConnectionListener$DefaultImpls.onBluetoothHeadsetStateChanged$default(BluetoothHeadsetConnectionListener.java:4)
       at com.twilio.audioswitch.bluetooth.BluetoothHeadsetManager.onReceive(BluetoothHeadsetManager.java:140)
       at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$LoadedApk$ReceiverDispatcher$Args(LoadedApk.java:1588)
       at android.app.-$$Lambda$LoadedApk$ReceiverDispatcher$Args$_BumDX2UKsnxLVrE6UJsJZkotuA.run(-.java:2)
       at android.os.Handler.handleCallback(Handler.java:883)
       at android.os.Handler.dispatchMessage(Handler.java:100)
       at android.os.Looper.loop(Looper.java:214)
       at android.app.ActivityThread.main(ActivityThread.java:7615)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)

and second one, probably on another thread or worker:
Fatal Exception: java.lang.RuntimeException: Error receiving broadcast Intent { act=android.media.ACTION_SCO_AUDIO_STATE_UPDATED flg=0x10000010 (has extras) } in com.twilio.audioswitch.bluetooth.BluetoothHeadsetManager@df0a9a7
       at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$LoadedApk$ReceiverDispatcher$Args(LoadedApk.java:1606)
       at android.app.-$$Lambda$LoadedApk$ReceiverDispatcher$Args$_BumDX2UKsnxLVrE6UJsJZkotuA.run(-.java:2)
       at android.os.Handler.handleCallback(Handler.java:883)
       at android.os.Handler.dispatchMessage(Handler.java:100)
       at android.os.Looper.loop(Looper.java:214)
       at android.app.ActivityThread.main(ActivityThread.java:7615)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)

Expected behavior
Probably some thread protection should be there or maybe immutable list should be used. you know the best.
Android Device (please complete the following information):

Device: LGE Stylo 6
API Version: Android 10

Version

Version: 1.1.0

Additional context
Happens rarely.

Hi @guness . From the ConcurrentModificationException it appears that your application is accessing an AudioSwitch instance from multiple threads. We currently only support access to this class from a single thread as specified in the documentation here. Please make sure that access to this class in your application is single threaded. Thanks!

hey Alton, I will make this single threaded. thanks for the tip.

Hey,
I think the README should refer to this situation of only supporting access from a single thread.
Besides that I think there are two situations that should also be informed:

AudioSwitch.start will perform the register of WiredHeadsetReceiver to listen to ACTION_HEADSET_PLUG changes, and this is sticky broadcast so when you do astart the enumerateDevices will be trigger twice (one directly from the AudioSwitch.start and another from the callback WiredDeviceConnectionListener
It should also be indicated that the lib should be used from the MainThread because, WiredHeadsetReceiver will send updates through the MainThread. If you startAudioSwitch.start in a different thread than the Main, you can end in situation where two different threads are calling enumerateDevices and leading to ConcurrentModificationException

authors: Alton09 filipebatista guness

repo: twilio/audioswitch


text:
twilio@5.9.0: hash check failed

Getting this while trying to install twilio CLI..
D:\Projects\twilio-conversations-demo-react [main ≡ +1 ~1 -1 ~]> scoop bucket add twilio-scoop https://github.com/twilio/scoop-twilio-cli
Checking repo... OK
The twilio-scoop bucket was added successfully.
D:\Projects\twilio-conversations-demo-react [main ≡ +1 ~1 -1 ~]> scoop install twilio
WARN  Purging previous failed installation of twilio.
ERROR 'twilio' isn't installed correctly.
Removing older version (5.9.0).
'twilio' was uninstalled.
Installing 'twilio' (5.9.0) [64bit] from twilio-scoop bucket
twilio-win32-x64.tar.xz (40.7 MB) [=======================================================] 100%
Checking hash of twilio-win32-x64.tar.xz ... ERROR Hash check failed!
App:         twilio-scoop/twilio
URL:         https://twilio-cli-prod.s3.amazonaws.com/twilio-win32-x64.tar.xz
First bytes: FD 37 7A 58 5A 00 00 04
Expected:    450092d7a7d9a7aeb9e5cd4c34ea172cea6115612633e1e976033c809932964d
Actual:      ede679aab2d7736815c35e78482a06a9aa5203e71da01a049e8f1b8460d40e8b
Please try again or create a new issue by using the following link and paste your console output:
https://github.com/twilio/scoop-twilio-cli/issues/new?title=twilio%405.9.0%3A+hash+check+failed

I'm getting the exact same issue. Running PowerShell as admin.
Not sure if I should post it as a separate issue to get more visibility. If there is no response here in the next day or so I will.

Same issue

Hi, please re-try. We've updated the hash.
To unblock you for now, you can also download the exe file from our release page.

@shrutiburman
please am still having this!!!
"""
PS C:\Windows\System32> scoop install twilio-cli
WARN  Purging previous failed installation of twilio-cli.
ERROR 'twilio-cli' isn't installed correctly.
Removing older version (5.11.0).
'twilio-cli' was uninstalled.
Installing 'twilio-cli' (5.11.0) [64bit] from main bucket
twilio-v5.11.0-win32-x64.tar.xz (40.8 MB) [===================================================================================================================] 100%
Checking hash of twilio-v5.11.0-win32-x64.tar.xz ... ok.
Extracting twilio-v5.11.0-win32-x64.tar.xz ... ERROR Exit code was 2!
Failed to extract files from C:\Users\USER\scoop\apps\twilio-cli\5.11.0\twilio-v5.11.0-win32-x64.tar.
Log file:
~\scoop\apps\twilio-cli\5.11.0\7zip.log
Please try again or create a new issue by using the following link and paste your console output:
https://github.com/ScoopInstaller/Main/issues/new?title=twilio-cli%405.11.0%3A+decompress+error
"""

authors: AbdulmalikAlayande PlatinumAutoArmor broadkent drarsalan shrutiburman

repo: twilio/scoop-twilio-cli


text:
Flickering during video call

Describe the bug
I am experiencing sometimes flickering where the boxes on the bottom and the screen seem to kind of rise up. I have had users complain of this happening frequently and making it difficult to pin/unpin because the boxes are moving around.
Here is a video of it happening a bit (It happens a lot more for the users when they are having trouble)
https://youtu.be/X0temJ7yBGY

Hey @dannnnthemannnn
This video does seem to indicate there may be a problem. However, it appears that the app has been modified. Can you try reproducing this issue in vanilla application so we can properly triage.
Thanks!

Closing due to inactivity, @dannnnthemannnn. Happy to reopen with more info!
However, I do have one idea.
The dimensions of a video track can change at anytime during a video call (due to bandwidth, downsampling, etc). Without CSS applied to a video element, you will see the size of the video element change as its dimensions change.
What I think is happening, is that the large video element in your video has a CSS rule of max-height: 100%;. This will look good most of the time, but if the video track's dimensions are smaller than the container that the video element is in, you will actually see the video element shrink. I think this is what is happening during the flicker.
To fix this, simply use height: 100%; instead of max-height: 100%.
Of course, I haven't seen any of your code, so this guess may be wrong. I'd be better able to help if you could share some code samples.
In the meantime, I hope this helps!

authors: aaalaniz dannnnthemannnn timmydoza

repo: twilio/twilio-video-app-react


text:
The problem is that it will bring back Twitter, which was first collected based on 20 criteria.

Hello, I have a problem about date.
Before I set
c = twint.Config()
c.Search = "topic's"
c.Since = "yyyy-mm-dd"
c.Until = "yyyy-mm-dd"
c.Format "{id}  {date}  {tweet}"
twint.Search(c)
and it works. but today I set for the purpose of creating a json file.
c = twint.Config()
c.Search = "topic's"
c.Since = "yyyy-mm-dd"
c.Until = "yyyy-mm-dd"
c.Format "{id}  {date}  {tweet}"
c.store_json = True
c.Output = "result.json"
twint.Search(c)
The problem is that it will bring back Twitter, which was first collected based on 20 criteria.
What's wrong and how to fix it? plzzzz :(

What the specific issue about date?

repo: twintproject/twint


text:
Refactored Authv4 code to make the logic more easily reusable

To support upcoming attempts to add Route53 support, the recently added (and wonderful) Authv4 features  should be refactored a bit to shift move logic up to the base classes and away from the S3-specific code.
Here is some refactoring.
Note this is still a little rough (eg missing docstrings, possibly missing test coverage).  Feel free to wait until I do a little more polish before reviewing - but early thoughts appreciated as well!
edit: oops, actually it's rougher than I thought, with a failing test that came in from the last master merge and also a bad API incompatibility that I just noticed.

Current coverage is 95.85% (diff: 96.07%)

Merging #33 into master will decrease coverage by 0.33%

@@             master        #33   diff @@
==========================================
  Files            61         61
  Lines          7804       7954   +150
  Methods           0          0
  Messages          0          0
  Branches        487        532    +45
==========================================
+ Hits           7506       7624   +118
- Misses          193        207    +14
- Partials        105        123    +18

Powered by Codecov. Last update ca9aab1...9bac43d

authors: codecov-io exarkun

repo: twisted/txaws


text:
Use https instead of http in urls

This PR changes every instance of an http url to its https version for security reasons.

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

authors: CLAassistant alanbato


text:
Possible off by 1 error for QTrees

@avibryant

I was playing around with the QTree, and I think there may be an off-by one error in the implementation.
Consider this code snippet:
import com.twitter.algebird.{QTree,QTreeSemigroup}

val K = 10
implicit val qtreeSemigroup = new QTreeSemigroup[Double](K)

val l = (1 to 3).map { _.toDouble }
val qt = l.map { v =>QTree(v)}.reduceLeft( qtreeSemigroup.plus)
qt.quantileBounds(0.5)

This returns:
res39: (Double, Double) = (1.0,1.0000152587890625)

Shouldn't the median of the list (1, 2, 3) be 2, not 1?
Out of curiosity, I tried the numbers 1 to 11, and got a median of 5 instead of 6.
And I tried the numbers 1 to 101 and got a median of 50 instead of 51.
I also tried a K of 100,000 but still get a median of 50 (for 1 to 101)
I think this is caused by an off-by-one error in the QTree implementation.
I don't think an off-by-one bug would cause any practical problems since I have lots of data, but it might be worth investigating.
Thanks!
Joshua

I see two tasks here: 1) convert Josh's examples into property tests. 2) fix the issue.

Awesome, thanks so much!

authors: johnynek joshualande

repo: twitter/algebird


text:
Server crashes on startup

log: http://pastebin.com/RLcdBwdg
Crash: http://pastebin.com/3qzz3ccn
after saying the maps that are wrong, it stops for 3 minutes, and crashes afterwards
maybe it has to do with java 8_51

Puedes pasar el crash report que dice que ha creado.
Can you pass the crash report that says that was created.

We need to crash report..

It looks like an invalid map error to me. Possible corrupt chunks?

@dentmaged any map with problems just gets skipped, (or used to), I've always gotten that warns when opening the server and never gave any errors

@Pablete1234 well, you may have one map or a corrupt world. But you really need to specify more information.

@dentmaged I actually have more than 1 map that doesn't work, and all from A to Z (the ones that don't work) showed the warn, i have the feeling it does pass thru the loading repo stage

Try loading the world in single player.  If it crashes try using older versions of Minecraft and see if it works there.

Try @CoWinkKeyDinkInc 's suggestion. Try removing the first map from your repository and see if that changes anything. I feel this is more of a map issue than a Cardinal issue.

@twizmwazin @CoWinkKeyDinkInc I tried to open the server with only 1 map on the repo (one that i know that works), and the problem is still the same, the server stops after deleting old match files, and crashes afterwards

I think the problem is servers crash because they try to load the author's names, and because the mojang servers are down it can't load them, and  because of the time it took for the plugin to wait for mojang servers' respones, it crashes

Pablete go to bukkit.yml allow-end: false | server.PROPERTIES allow-nether=false | Delete world, delete rotation and try.

@Prodigy4532 this is something that only happens when mojang servers are down, do you think i can test it?

You can use AlwaysOnline.

@Prodigy4532 cardinal is thought to work by itself, without external plugins.

When servers are down Mojang is better to have something outside who can help.

This server for example: Node42.Minecrafted.net:25593

@Prodigy4532 i don't care about your servers, my localhost for testing purposes should be able to load when mojang servers are down, and simply not load author names, let them be "null" and done, and if i set it to offline-mode, i should be able to join

offline-mode ignore the mojang server login, you can enter whit not problem.

@Prodigy4532 you are not understeanding the issue, even if you set your server to offline-mode, cardinal will not be able to load if mojang servers are down, it will crash on startup

How much memory is dedicated to your server, i have 1024 mb and ofline mode and i dont have this issue :/ | https://gyazo.com/a6913ea7c00a156d7431f55f8aa8ccce

@Prodigy4532 again, you are not understeanding the issue, cardinal can't load because it waits a mojang response for the authors on startup

Another crash report http://pastebin.com/jKBvqpfv

@Pablete1234 Offline mode should be a good recreation of Mojang's servers being down, or atleast I think so. I haven't done Bukkit in ages.

@dentmaged i belive cardinal crashes on startup because it tries to get mapmakers' names from the mojang api, if mojang is down, it waits for a response, and 10 seconds later or so, the request times out and the server continues doing other stuff.
The problem is that the downloading was expected to be done in 1 tick, but it took more than the "max-tick-lenght" (or some name like that) and considers itself crashed.

fixed in cca5fa4

repo: twizmwazin/CardinalPGM


text:
AttributeError: module 'pandas_ta' has no attribute 'ticker'

Hi, I like pandas_ta. it is very useful.
but i meet un problem.
is it a bug?
Which version are you running? The lastest version is on Github. Pip is for major releases.
ta.version
0.2.45b0
Describe the bug
help(ta.sma)
ok
help(ta.ticker)
AttributeError: module 'pandas_ta' has no attribute 'ticker'
help(ta.yf)
AttributeError: module 'pandas_ta' has no attribute 'yf'
To Reproduce
Screenshots
If applicable, add screenshots to help explain your problem.

Thanks

Hello @wenny0501,
This is not a bug. You are just running an older version of the library. Thus to use ta.yf() or df.ta.ticker() as mentioned on the README, you need to upgrade to the Latest Version. Using the Latest Version ensures you get bug fixes and newer features.
$ pip install -U git+https://github.com/twopirllc/pandas-ta

is only daily historical data acceptable?
can we use hourly (30 min, 5 min, etc.) historical data?

You are not limited to Daily data. You are largely limited to what yfinance is capable of. For more information, please see the README or use help(ta.yf) for it's capabilities.

Please let me know when you install the Latest Version and able to get data.
Thanks,
KJ

thanks

Hello @wenny0501,
Were you able to install the Latest Version and get data?
Thanks,
KJ

yes, it works well.
thanks.

@wenny0501
Thanks for confirming.
Happy trading/investing!
KJ

repo: twopirllc/pandas-ta


text:
docker container should allow user to select python3

part of this is including the anaconda commands to download py3 into the container.
but then also need to allow selecting it.  currently it is done out-of-band by the user editing their ~/.bash_profile.  but the next generation of the plugin manager we would like this to be selectable from within our app.

after https://github.com/twosigma/beaker-notebook/issues/1166
python2 + python3 just requires setting up beaker.pref.json

repo: twosigma/beaker-notebook


text:
Bug: don't understand $ref in path.

{
    "swagger": "2.0",
     ...
    "paths": {
      	"/test": {
      	   "$ref": "./endpoints/test.json"
      	}
    }
}

this should give me a endpoint named /test and all information in test.json. but it give:

Walk around for more people having this problem is to use the cli tool json-refs before.

Quite amount of code need to be added.
But I'll be working on it this weekend :-)

rolled out as version .71. Can you double check if it fit your use case ?

Yes that works good, Nice! thanks :)

authors: bark twskj

repo: twskj/pretty-swag


text:
@twurple/pubsub cannot find module @d-fischer/isomorphic-ws or its corresponding type declarations

Bug Report
Code
import { PubSubClient } from "@twurple/pubsub";

Expected behavior
The package imports correctly and works properly in TypeScript.
Actual Behavior

The TypeScript compiler outputs the following:
node_modules/@twurple/pubsub/lib/BasicPubSubClient.d.ts(2,36): error TS2307: Cannot find module '@d-fischer/isomorphic-ws' or its corresponding type declarations.
Adding @d-fischer/isomorphic-ws to package.json fixes the issue.
Environment

Version: 5.0.17
Node version: 16.14.0
Operating system: Alpine Linux (Docker)

I can confirm this is a current bug.
@d-fischer make sure you dont have @d-fischer/isomorphic-ws globally installed or something.
Im doing an upgrade from 4 to 5, just installed
"@twurple/api": "^5.0.17",
"@twurple/auth": "^5.0.17",
"@twurple/pubsub": "^5.0.17",

and get that error.
looking into the code tells me that node_modules/@twurple/pubsub/lib/BasicPubSubClient.d.ts:2:36 imports import type { ClientOptions } from '@d-fischer/isomorphic-ws';but that package package.json doesnt include it as seen here:
https://github.com/twurple/twurple/blob/a1dc8535c5c023e240b9393fa088a7e27ef9d72f/packages/pubsub/package.json#L32-L39

Temporary fix:
Install the given package as a direct dependacy until this gets gixed:
npm i @d-fischer/isomorphic-ws

and thats one more reason why yarn sucks 😂 :hand_over_mouth:

I couldn't reproduce this with npm either, but I have still fixed up the dependency links and released the new version 5.0.18 that includes this fix.

I was just trying to make a reproducable example but cant....
I could explain why but its fixed. doesnt matter anymore...

authors: TheAppleFreak d-fischer rodrigograca31

repo: twurple/twurple


text:
Network still available after container removal

I'm submitting a ...

[X] bug report

What is the current behavior?
When container is stopped by the command docker stop <NAME> the AP network (configured within  wificfg.json) remains available untill Raspberry reboot.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

Docker installation
txn2/txwifi downloading by docker pull cjimti/iotwifi command
txn2/txwifi container run by respective command -> uap0 interface for AP is created with iot-wifi-cfg-3 network available for connection.
txn2/txwifi container stop/remove by respective commands

What is the expected behavior?
After the container stop/removal, the network interface should be stopped.

What is the motivation / use case for changing the behavior?
Its a logical behavior

Please tell us about your environment:

Device: Rasp 3B+
OS: Stretch

Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

The container is intended to set up the wifi network access. If the container is stopped or removed it has no ability to perform any operations.


text:
pallas-primitives: fix PostAlonzoAuxiliaryData

I noticed a small difference between the cddl and the rust definition for PostAlonzoAuziliaryData.
I wasn't sure if it was intentional or a mistake but I made the adjustment and all tests still pass.
If this is intentional feel free to close this PR. It was a simple adjustment so no worries.

I don't think we should change this in Alonzo primitives. The plutus_v1 vs v2 was introduced in Babbage. The babbage primitives already contemplate that CDDL change: https://github.com/txpipe/pallas/blob/2b5f22def2a76341337417533b7116e13ac9880c/pallas-primitives/src/babbage/model.rs#L503

Yep, my bad. I must have gotten confused late at night. Closing now.

authors: rvcas scarmuega

repo: txpipe/pallas


text:
AttributeError: 'EmbClient' object has no attribute 'set_partition_book'

嗨
在 运行 run_pretrain.sh 脚本时报错:
model init
loaded pretrained relation embeddings. dim: 768
starting to initialize senser
sender initialized successfully.
client is initialized successfully.
1 clients connected!
KVStore service 0 start successfully! Listen for request ...
KVClient 0 connect to kvstore successfully!
Traceback (most recent call last):
File "/home/ktfp768/CoLAKE/pretrain/run_pretrain.py", line 267, in
train()
File "/home/ktfp768/CoLAKE/pretrain/run_pretrain.py", line 199, in train
cache_dir=PYTORCH_PRETRAINED_BERT_CACHE + '/dist_{}'.format(args.local_rank))
File "/home/ktfp768/test/lib/python3.6/site-packages/transformers/modeling_utils.py", line 655, in from_pretrained
model = cls(config, *model_args, **model_kwargs)
File "../pretrain/model.py", line 21, in init
self.ent_embeddings = LargeEmbedding(ip_config, emb_name, ent_lr, num_ent)
File "../pretrain/large_emb.py", line 195, in init
self.client.set_partition_book(emb_name, torch.zeros(num_emb))
AttributeError: 'EmbClient' object has no attribute 'set_partition_book'
Exit KVStore service 0, solved message count: 4
server is started.
self.client 是一个初始化之后的EmbClient，继承于KVClient，确实没有set_partition_book这个方法。看了下dgl包，只有KVserver有set_partition_notebook()
把LargeEmbedding里面这一行改掉之后，模型报错:KeyError: 'entity_emb-part-'

DGL版本请使用0.4.3
pip install dgl==0.4.3

换成0.4.3之后报错:
model init
loaded pretrained relation embeddings. dim: 768
Traceback (most recent call last):
File "/home/ktfp768/CoLAKE/pretrain/run_pretrain.py", line 266, in
train()
File "/home/ktfp768/CoLAKE/pretrain/run_pretrain.py", line 198, in train
cache_dir=PYTORCH_PRETRAINED_BERT_CACHE + '/dist_{}'.format(args.local_rank))
File "/home/ktfp768/test/lib/python3.6/site-packages/transformers/modeling_utils.py", line 655, in from_pretrained
model = cls(config, *model_args, **model_kwargs)
File "../pretrain/model.py", line 20, in init
self.ent_embeddings = LargeEmbedding(ip_config, emb_name, ent_lr, num_ent)
File "../pretrain/large_emb.py", line 185, in init
self.client = EmbClient(server_namebook)
File "../pretrain/large_emb.py", line 99, in init
super().init(server_namebook, queue_size, net_type)
File "/home/ktfp768/test/lib/python3.6/site-packages/dgl/contrib/dis_kvstore.py", line 588, in init
self._machine_id = self._get_local_machine_id()
File "/home/ktfp768/test/lib/python3.6/site-packages/dgl/contrib/dis_kvstore.py", line 981, in _get_local_machine_id
if ip in self._local_ip4_addr_list():
File "/home/ktfp768/test/lib/python3.6/site-packages/dgl/contrib/dis_kvstore.py", line 999, in _local_ip4_addr_list
struct.pack('256s', name[:15].encode("UTF-8")))[20:24])
OSError: [Errno 99] Cannot assign requested address
Exception ignored in: <bound method KVClient.del of <pretrain.large_emb.EmbClient object at 0x7faf4ea9ed68>>
Traceback (most recent call last):
File "/home/ktfp768/test/lib/python3.6/site-packages/dgl/contrib/dis_kvstore.py", line 604, in del
_finalize_sender(self._sender)
AttributeError: 'EmbClient' object has no attribute '_sender'
Exception ignored in: <bound method LargeEmbedding.del of LargeEmbedding()>
Traceback (most recent call last):
File "../pretrain/large_emb.py", line 204, in del
self.client.shut_down()
File "/home/ktfp768/test/lib/python3.6/site-packages/torch/nn/modules/module.py", line 779, in getattr
type(self).name, name))
torch.nn.modules.module.ModuleAttributeError: 'LargeEmbedding' object has no attribute 'client'
Traceback (most recent call last):
File "/opt/scp/software/Python/3.6.3-foss-2017a/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/opt/scp/software/Python/3.6.3-foss-2017a/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/ktfp768/test/lib/python3.6/site-packages/torch/distributed/launch.py", line 260, in
main()
File "/home/ktfp768/test/lib/python3.6/site-packages/torch/distributed/launch.py", line 256, in main
cmd=cmd)
subprocess.CalledProcessError: Command '['/home/ktfp768/test/bin/python', '-u', '/home/ktfp768/CoLAKE/pretrain/run_pretrain.py', '--local_rank=0', '--name', 'CoLAKE', '--data_prop', '1.0', '--batch_size', '2048', '--lr', '1e-4', '--ent_lr', '1e-4', '--epoch', '1', '--grad_accumulation', '16', '--save_model', '--emb_name', 'entity_emb', '--n_negs', '200', '--beta', '0.98']' returned non-zero exit status 1.


text:
Split repository into gh-pages, chrome extension and jquery plugin

To avoid confusion I think it would be the best to split this repository into three parts: gh-pages (for the documentation), chrome extension and jquery plugin.

Sorry but I'm not an advanced user in github ... when you say "split this repository" you means to create 3 different repositories? or github has any tool to split a created repository into others? Do you have any example or reference page?
Anyway, here is the chrome-extension repository:
https://github.com/txusko/PostItAll-ChromeExtension

Thanks for letting me know that you already have a separate repository for the Chrome extension. That is good!
In Github it is common to create a branch called "gh-pages" and host the website about the project there. You can simply create this new branch, copy all files related to the website to it and only let the actual related plugin files in the master branch. This way you don't host the website for yourself, GitHub will take care of this. See this page for a documentation about gh-pages.
So you would have to create a gh-pages branch for the Chrome extension repository and for the jQuery plugin repository. Then your landingpage isn't needed anymore.

I shall certainly be taking that into account in the next release.
Thank you so much Julian.
Javi Filella

Splitted repository in "gh-pages" for the website and "master" for the plugin.
Regards
Javi Filella

authors: julmot txusko

repo: txusko/PostItAll


text:
Modals make the cursor type get stuck

Whenever a modal pops up, the cursor type no longer changes, even if it should go back to normal.
E.g. when resizing, the cursor gets stuck as the diagonal arrows until the modal is dismissed.

It would probably be easiest to just remember the cursor type and temporarily set it back to normal when a modal pops up

repo: tyoeer/Chaoshead


text:
Update ANTLR file and proposed colouring

What is the goal of this PR?
Updating ANTLR file and proposing a colouring identical to the on present in TypeDB Studio.
What are the changes implemented in this PR?
Updating the ANTLR file.
Adding a new "ANY" token category working as a "garbage collector"
Modifying the README to add proper colouring.

Thanks for this. The new colors are nice. I wasn't sure what the ANY_ thing was in the grammar file, but it was causing syntax issues with any TypeQL I put in the IDE, so I removed it. Besides that, lgtm.

Thank you for helping with updates and testing! the ANY_ was there because I was not able to capture the curvy brakets, comas and semi column to color them the proper way (as they are not tokenized in the ANTLR grammar). Putting those ones at the end was just a way to catch them all and add them to the proper section.

authors: BFergerson SullivanDaly

repo: typedb-osi/typeql-plugin-jetbrains


text:
Add a simple law for select

This is a law that shows the when first argument of the select is Right, we don't look at the second parser.

Codecov Report

Merging #107 (c39020a) into main (6daeefc) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #107   +/-   ##
=======================================
  Coverage   95.13%   95.13%
=======================================
  Files           6        6
  Lines         740      740
  Branches       59       59
=======================================
  Hits          704      704
  Misses         36       36

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 6daeefc...c39020a. Read the comment docs.

authors: codecov-io johnynek

repo: typelevel/cats-parse


text:
Update about.html

Fixed typo

Thanks!

authors: larsrh rklaehn


text:
add ConfigMemorySize and getters for it

This is mostly intended to support bean usage as in #249 .
There are various ways to make this fancier but KISS to start.

cool!

added toString and support for it in fromAnyRef.

authors: benmccann havocp

repo: typesafehub/config


text:
Implement Least Recently Used eviction in RequestCache .

Is your feature request related to a problem? Please describe.
_cachedResponses doesn't have a limit on the number of _Cache's it can store and the expired _Cache is conditionally deleted, so a memory leak occurs.
Describe the solution you'd like
Implement an LRU algorithm.
Additional context
related issue

Assigned to @harisarang

@harisarang Maybe read up about TLRU- Time aware LRU scheme. I think TLRU scheme would be more relevant because LRU doesn't take Time to utilize (TLU) of the cached data into consideration.

Is this library considered safe for production use without this fix?

@CoryADavis I wouldn't recommend setting cachedSearchResultsTTL in production code yet.

Ahh, understood, this issue is only related to a feature that is off by default.
Thank you!

@o-artebiakin No, there's no way to clear the cache manually at the moment. Are you planning to use this feature in your app?

authors: CoryADavis happy-san

repo: typesense/typesense-dart


text:
About dynamic runtime exports in CommonJS

let testCases = [ /* ... */ ]

/* works */
exports.testAll = async () => {
  await Promise.all(testCases).map(async item => { /**/  })
}

/* runtime exports can't be recognized */
testCases.forEach(item => {
  exports[item.xxx] = async () => { /* ... */ }
})

I'm consider a PR but not sure which would be the best approach:

ignore this
add a nextTick and display an explicit warning
add a nextTick and recognize that for the user

I would ignore it. I'd prefer to have xv driven by ESM capabilities and keep similarities between both approach. It may be a bit complex to implement. AFAIK while you can have runtime exports in CJS, it's not possible with ESM.
The first example works and it's simple to add some info regarding the failing test case if needed/wanted. Something like that:
exports.testAdd = function() {
  const testCases = [[1, 2, 3], [1, 1, 2], ...]
  for (const testCase of testCases) {
    try {
      // ... do testing
      assert.equal(actual, expected, someMessage) // Optionally: add message
    } catch(e) {
      console.log(testCase[0], testCase[1], 'failed') // Optionally: log info regarding failing test case
      throw e
    }
}

How would the nextTick work?

authors: fritx typicode

repo: typicode/xv


text:
nifty-ntnu-thesis:0.1.0

I am submitting

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

Description: A port of the unofficial NTNU thesis template.

I have read and followed the submission guidelines and, in particular, I

[x] selected a name that isn't the most obvious or canonical name for what the package does
[x] added a README.md with documentation for my package
[x] added a typst.toml file with all required keys
[x] have chosen a license and added a LICENSE file or linked one in my README.md
[x] tested my package locally on my system and it worked
[x] excluded PDFs or README images, if any, but not the LICENSE

[x] ensured that my package is licensed such that users can use and distribute the contents of its template directory without restriction, after modifying them through normal use.

Thanks!

authors: laurmaedje saimnaveediqbal

repo: typst/packages


text:
Inconsiscencies about show rules and use of spaces

Description
I find quite strange that spaces in show rules are very inconsistent depending on what they have before or after.
An example:
#show "Test ": "This will be expanded only if not followed by an alphanumeric symbol "

Test working

Test 0 working

Test - not working

Test : not working

#show ": ": "This will never work"

Not: working

#show " :": "And this neither"

Not :working

The first show rule is working only if the space is followed by something like an alphanumeric character. A symbol will break it. And rules where symbols are preceded or followed by a space won't ever work. Am I missing something?
Reproduction URL
https://typst.app/project/rvPtRiPiQhTOsc4vkpDbIo
Operating system
Windows
Typst version

[X] I am using the latest version of Typst

This is more an error that multiple token (: being a separate token from  ) are not grouped together.
I'm pretty sure this is a duplicate, but I can't find the original issue so I'll leave this one open.

Related issue: #86

Thanks, closing in favour of #86 then.

authors: Dherse Totoro83 frozolotl

repo: typst/typst


text:
Remove modals / popups

Completely remove modal (popup) functionality.
The idea is to get Typus back in a more stable / usable state, then reimplement the popup feature in a cleaner way where it's needed.
Refs: #447, #368

Closing in favour of #478

repo: typus/typus


text:
Direct link mode support

I have had in mind a cellular API for a long time and it has been a real pleasure to find this library. Thank you very much for your amazing work.
Are you planning to include the "direct link" mode in the library?
In order to obtain the maximum throughput of the modem,  I was thinking myself in migrating from AT commands to write/read  to "direct link" mode. It's a pity  because I would also like to migrate to your lib implementation. Is there a reason it is not implemented?

Thanks!  I hope you find it useful.
Ref. direct link mode, I've not looked into it but I guess there's no reason for it not to be supported other than it just hasn't made it to the list yet.  @hkro manages what order we do things in but I'll have a quick look to see how much effort it would be.

Had a very quick look and I guess direct link mode would be supported something like this:

Add an API uCellSockDirectLinkStart(int32_t cellHandle, int32_t sockHandle): this would put the whole cellular interface into direct link mode with the given socket.  The AT parser would stop receiving characters on the UART port, leaving it for the application to handle.  Any attempt to use a cellular API while direct mode is active should probably return a specific error code, e.g. U_CELL_ERROR_DIRECT_LINK_ACTIVE.
Add an API uCellSockDirectLinkStop(int32_t cellHandle, int32_t sockHandle): this would wait for 2 seconds, send the "+++" sequence to leave direct mode and then reconnect the AT parser once more, probably sending "AT" and waiting for "OK" to determine that it is done.
Should probably also add an API to configure the various direct link parameters.

Does that sound like the right approach?  I can't give you a timescale for doing it right now, will need to discuss that internally, just wanted to check if this is what you were thinking of.

Project is discontinued

authors: RobMeades manemannen rquilez

repo: u-blox/ubxlib


text:
bilibili会导致后面的markdown解析出问题？

bilibili tag 放前面
后面的markdown 语法，比喻 markdown表格渲染就会出错，以文本形式出现
其他人有发现这个问题么？
bilibili 放到 西瓜 和 artplayer 后面会渲染不出来，这三个放一个页面测试时发现的
#hexo -v
INFO  Validating config
hexo: 6.1.0
hexo-cli: 4.3.0
os: linux 5.10.60-qnap Debian GNU/Linux 11 (bullseye) 11 (bullseye)
node: 17.8.0
v8: 9.6.180.15-node.16
uv: 1.43.0
zlib: 1.2.11
brotli: 1.0.9
ares: 1.18.1
modules: 102
nghttp2: 1.47.0
napi: 8
llhttp: 6.0.4
openssl: 3.0.2+quic
cldr: 40.0
icu: 70.1
tz: 2021a3
unicode: 14.0
ngtcp2: 0.1.0-DEV
nghttp3: 0.1.0-DEV

不光是表格，它就只能页面单独放视频，不能加其他文字……

好像是高版本的HEXO才会有这个问题，暂时不清楚是什么原因，可能与渲染器有关，可以使用低版本的HEXO

@appotry  @YuanZhou314  经测试，发现是 marked 问题，使用 markdown-it 渲染可解决问题

authors: MonoLogueChi YuanZhou314 appotry


text:
[FEATURE] use HTML format in markdown

I use raw HTML in markdown, hugo doesn't render.
I use  <img src="https://static-1257291176.cos.ap-hongkong.myqcloud.com/pic/1610098201732.jpg" alt="1610098201732" style="zoom:50%;" /> to zoom picture.
This is display properly in Typora, but not in website.

Is it possiable to render raw HTML?

I don't quite understand the problem. I pasted html on my site and it just added a picture.
You can send the sources

I don't quite understand the problem. I pasted html on my site and it just added a picture.
You can send the sources

I am sorry, when I read hugo official document, I realized that I need to set "unsafe = true" in [markup.goldmark.renderer].
Thank you for your patience
reference: https://gohugo.io/getting-started/configuration-markup/

I am sorry, when I read hugo official document, I realized that I need to set "unsafe = true" in [markup.goldmark.renderer].
Thank you for your patience
reference: https://gohugo.io/getting-started/configuration-markup/

yes, I also thought about hugo config but was looking for something like htmlTrue :)

yes, I also thought about hugo config but was looking for something like htmlTrue :)

authors: jtxiaocom uPagge

repo: uPagge/uBlogger


text:
Circular dependencies with uproxy_core in metrics.ts

@jpevarnek and I just spent a while trying to debug some testing errors caused by running a static method of uproxy_core.uProxyCore inside metrics.ts. (The same error occurs if you try to instantiate a uproxy_core.uProxyCore object there as well.)
This is apparently caused by a circular dependency caused by loading uproxy_core.ts's dependencies inside metrics.ts. The first error looks like this:

This can be solved by prepending
import freedomMocker = require('../../../third_party/uproxy-lib/freedom/mocks/mock-freedom-in-module-env');
import mockFreedomRtcPeerConnection = require('../../../third_party/uproxy-lib/freedom/mocks/mock-rtcpeerconnection');
import freedom_mocks = require('../mocks/freedom-mocks');
freedom = freedomMocker.makeMockFreedomInModuleEnv({
    'core.storage': () => { return new freedom_mocks.MockFreedomStorage(); },
    'loggingcontroller': () => { return new freedom_mocks.MockLoggingController(); },
    'metrics': () => { return new freedom_mocks.MockMetrics(); },
    'core.tcpsocket': () => { return new freedom_mocks.MockTcpSocket(); },
    'core.rtcpeerconnection': () => { return new mockFreedomRtcPeerConnection(); }
});

to the top of metrics.spec.ts, which causes a new error:

duplicate of https://github.com/uProxy/uproxy/issues/1737

authors: kennysong salomegeo

repo: uProxy/uproxy


text:
Standardize & fix socks-rtc benchmarking

Trying to run the benchmarking results in socks server giving an error net::ERR_CONNECTION_REFUSED
wup should be added to package.json as a dev dependency
Call to start wup and benchmarking should be made into a grunt task
Error handling in case you forgot to start your webserver should be added to benchmarking

@mollyling sound right to you?

Not sure what you want to do here @mollyling but it seems like this is best assigned to you.

Yeah, sure.

@mollyling ping?

So do we have a way of bringing up the simple-socks-chromeapp automatically?

The networking benchmark tests are the way to do this. see:
https://github.com/uProxy/uproxy-networking/tree/dev-requireify/src/integration-tests/socks-echo
(note: dev-requireify branch)
@bemasc knows about how these tests work pretty well also if you want in person discussion this week :)

@mollyling update?

socks-echo is a jasmine-hosted test, vs the existing benchmark, which is a command-line test.  I spent some time in socks-echo, adding a remote-close test, but didn't see how to report statistics (unless we were just looking for a threshold) in jasmine.
Unless you meant to have a grunt task have to make launch our simple-socks-chromeapp and then call the benchmark around it?  I didn't consider that until I wrote this response....

Splitting into two isses:
https://github.com/uProxy/uproxy/issues/1504

authors: iislucas mollyling trevj


text:
add more redis tags

This adds key information to the most commonly used redis commands.

@yurishkuro what do you think?

LGTM, but would like to have a unit test to exercise OT API.

I'll update this to include a test.

I removed the install fixtures thing from conftest.py and changed it to use a real fixture.

authors: eklitzke yurishkuro


text:
Refactor SQLAlchemy hook

Hello @yurishkuro,
I hope you'll find this PR useful.
These changes also:

Add basic test for SQLAlchemy hook
Clean up boilerplate code

Best regards!

Coverage increased (+2.6%) to 82.889% when pulling 187146e28c7ebfed1a6c7f871be4d90f120770aa on Jamim:feature/refactor-sqlalchemy-hook into 86791edfec15461dd1132f2f253fd2560ed11bbf on uber-common:master.

Hi @yurishkuro,
Do you have any other suggestions?

authors: Jamim coveralls


text:
Tests for the most critical parts of the library

Currently only basic tests for components and tests for scales are provided.
This resolves the issue #18

This is awesome! :+1:

authors: bulyonov chrisirhc

repo: uber-common/react-vis


text:
Merge Activity and Decision matching tests

What changed?
Merge Activity and Decision matching tests

Why?
To reuse test logic for activity and decision tasks

How did you test it?
the test

Potential risks

Release notes

Documentation Changes

Pull Request Test Coverage Report for Build 01874d84-59fe-49b9-a439-ee0a7d7f66be

0 of 0   changed or added relevant lines in 0 files are covered.
38 unchanged lines in 8 files lost coverage.
Overall coverage decreased (-0.006%) to 57.094%

Files with Coverage Reduction
New Missed Lines
%

common/task/weightedRoundRobinTaskScheduler.go
1
89.64%

service/history/queue/timer_queue_processor_base.go
1
77.26%

service/history/queue/transfer_queue_processor_base.go
1
77.62%

common/task/fifoTaskScheduler.go
2
84.54%

service/history/task/fetcher.go
4
91.24%

service/history/task/transfer_standby_task_executor.go
4
86.4%

service/history/decision/task_handler.go
5
72.33%

service/history/task/task_util.go
20
70.57%

Totals

Change from base Build 01874884-43c6-4cf8-b6b8-ecc8c5686563:
-0.006%

Covered Lines:
85270

Relevant Lines:
149351

💛  - Coveralls

Nit: Non-blocking comment - More generally, I know the temptation for putting particularly messy code with lots of duplication into a way which is DRYer is tempting, and for test-code it's probably ok, but having code covered by switch or IF statements does make it tricky to follow.
In this instance you're starting out with
if task == Decision {
 ...
} else {
 ...
}

which is pretty simple, and I think works here. But if there are parts that start to get shared it risks becoming quite hard to follow. I'd lean towards just leaving the code duplicated.

authors: Shaddoll coveralls davidporter-id-au

repo: uber/cadence


text:
Isolation matching

What changed?

Why?

How did you test it?

Potential risks

Release notes

Documentation Changes

Pull Request Test Coverage Report for Build 01874efa-05f8-4ae8-8fe7-1c9640cf7daa

88 of 111 (79.28%)  changed or added relevant lines in 8 files are covered.
90 unchanged lines in 10 files lost coverage.
Overall coverage increased (+0.02%) to 57.097%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

service/matching/config.go
9
13
69.23%

service/matching/taskReader.go
11
16
68.75%

service/matching/matcher.go
39
46
84.78%

service/matching/taskListManager.go
15
22
68.18%

Files with Coverage Reduction
New Missed Lines
%

service/history/execution/mutable_state_util.go
2
35.95%

common/cache/lru.go
3
90.73%

common/persistence/dataManagerInterfaces.go
3
58.66%

common/persistence/statsComputer.go
3
94.29%

common/task/fifoTaskScheduler.go
3
84.54%

service/history/queue/timer_queue_processor_base.go
3
77.26%

service/history/task/transfer_standby_task_executor.go
4
87.34%

common/persistence/nosql/nosqlplugin/cassandra/workflow.go
6
59.1%

service/history/execution/mutable_state_task_refresher.go
29
62.03%

common/persistence/nosql/nosqlplugin/cassandra/workflowParsingUtils.go
34
79.18%

Totals

Change from base Build 01874eaa-bf90-4923-acc0-80c4769a6dac:
0.02%

Covered Lines:
85694

Relevant Lines:
150085

💛  - Coveralls

authors: Shaddoll coveralls


text:
add bitmap layer and skybox example

For #

Background

add bitmap layer
add skybox example using bitmap layer

Change List

modules/experimental-layers/src/bitmap
examples/experimental/bitmap

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

Need a README for the BitmapLayer class.

When I try to start the experimental bitmap layer example with
yarn start-local
I receive the following errors:
Module not found: Error: Can't resolve 'source-map-loader' in '/home/cvalk/deck.gl/examples/experimental/bitmap'
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./app.js

ERROR in multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./app.js
Module not found: Error: Can't resolve 'source-map-loader' in '/home/cvalk/deck.gl/examples/experimental/bitmap'
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./app.js

ERROR in multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./app.js
Module not found: Error: Can't resolve 'source-map-loader' in '/home/cvalk/deck.gl/examples/experimental/bitmap'
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./app.js
webpack: Failed to compile.

Any suggestions on how to fix this?

@coenvalk When using start-local you will need to install in the deck.gl root folder as well as in the example.
We should update the instructions in http://uber.github.io/deck.gl/#/documentation/getting-started/installation?section=running-the-examples to make sure this is clear.

Thanks for that.
From the website you referenced:

While all examples support npm run start-local, there are some caveats when running against local source. Most importantly, you must make sure to run npm install or yarn in the deck.gl root folder before running npm run start-local in an example folder.

Looks like it's included on the website, I just didn't read very carefully.
Now I'm getting the following errors:
ERROR in /home/cvalk/deck.gl/modules/layers/src/geojson-layer/geojson.js
Module build failed: TypeError: Cannot read property 'feature_geometry' of null
    at Scope.createIdentifier (/home/cvalk/deck.gl/examples/experimental/bitmap/node_modules/buble/dist/buble.umd.js:7166:87)
    at handleProperty (/home/cvalk/deck.gl/examples/experimental/bitmap/node_modules/buble/dist/buble.umd.js:2334:23)
    at /home/cvalk/deck.gl/examples/experimental/bitmap/node_modules/buble/dist/buble.umd.js:2279:5
    at Array.forEach (<anonymous>)
    at Object.destructureObjectPattern [as ObjectPattern] (/home/cvalk/deck.gl/examples/experimental/bitmap/node_modules/buble/dist/buble.umd.js:2277:20)
    at destructure (/home/cvalk/deck.gl/examples/experimental/bitmap/node_modules/buble/dist/buble.umd.js:2229:25)
    at /home/cvalk/deck.gl/examples/experimental/bitmap/node_modules/buble/dist/buble.umd.js:6901:8
    at Array.forEach (<anonymous>)
    at Node.transpile (/home/cvalk/deck.gl/examples/experimental/bitmap/node_modules/buble/dist/buble.umd.js:6869:24)
    at /home/cvalk/deck.gl/examples/experimental/bitmap/node_modules/buble/dist/buble.umd.js:894:61
 @ /home/cvalk/deck.gl/modules/layers/src/geojson-layer/geojson-layer.js 27:0-32:19
 @ /home/cvalk/deck.gl/modules/layers/src/index.js
 @ /home/cvalk/deck.gl/modules/main/src/index.js
 @ ./app.js
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./app.js

authors: CLAassistant Pessimistress coenvalk ibgreen xintongxia


text:
MVT Tile Layer

Following #3695 and #3704

Background
Following what we talked about in the previous PR about polygons/lines merging, we thought of implementing that functionality in another layer called MVTTileLayer, so that we can consume MVTs coming from a backend service and represent them within the map.
We followed TileLayer principals to create this layer as there are a lot of similarities between the two of them. Nevertheless, some differences make this layer work with MVTs without implementing a custom getTileData method and avoiding border in represented geometries when clipped by tile limits.
The first topic is solved by getting and decoding tile data from an MVT backend URL with a worker to avoid blocking the UI thread.
The second topic is related to our previous PR, because we are joining all tiles' data into a single tile, and then merging geometries by a common property that contains a unique id within GeoJSON properties using turf for polygons and other strategies for other kinds of features. We know that might not be the most efficient approach, but our other approach was to create derived tiles merging split features into one of the tiles that contained it and remove that feature from the other ones.
Other improvements that we had in mind were to execute that geometry merge in a WebWorker or caching composite tiles' (that's how we call our new tile object) render, but we wanted to get your feedback before continuing that path that might not fit everyone's needs.
So it would be great if you could take a look at this and give us your thoughts about it.
We need to improve workers' integration because they are not inlined yet and a new bundle is generated within dist files, but that'll come later.

Change List

Create MVTTileLayer extending TileLayer
Create CompositeLayer to be able to merge features using different strategies

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

Hello @Pessimistress!
Sorry for disturbing, but as you gave us insightful feedback in our previous PR I’d like to ask if you or any other members/contributors within the team could review this PR and tell us what you think about our current approach and our MVTTileLayer.
Thank you!

@jesusbotella Thank you for the thoughtful PR. Now that we are done with the 8.0 release, I'm happy to resume this conversation.
There are several things I feel worth discussing:
Should we add a MVTTileLayer to the layer catalog?
When we originally released the TileLayer, the answer was no -- deck.gl is not in the market of competing with a base map provider. We didn't want to publish something that depends on a proprietary format/service. There also are many map-specific features that deck simply does not implement, e.g. rendering text labels along a path, repeating worlds at low zoom levels, etc. Eventually, mapbox-gl would always be the most accurate and most efficient in handling their own format.
With that said, I believe you have good reasons to render Mapbox tiles with deck.gl. I think there are a lot of value in sharing this code so that people who have the same needs don't have to jump through the same hoops over and over again. We just have to make it very clear the limitations of this approach.
Coordinate system
There are roughly 3 coordinate systems we deal with in geospatial: world space (degrees in lng-lat), common space ("pixels" on the Web Mercator plane), screen space. When you load a GeoJSON, Mapbox projects world space to common space on the CPU, then common space to screen space on the GPU. deck.gl does both projections on the GPU.
As an optimization, Mapbox tiles are encoded in mercator pixel offsets aka common space. Using @mapbox/vector-tiles to decode it to GeoJSON means unprojecting all points on the CPU, which has a significant perf cost. We should investigate if we can use the raw coordinates with deck's IDENTITY mode.
Decoding
Web worker is definitely going to help performance. We should look at decoding the coordinates directly into flat binary arrays -- another issue of @mapbox/vector-tiles is that it creates a lot of small JS arrays to conform with GeoJSON spec which is very slow. We can also skip normalization assuming the tile data is already validated.
Merging Features
This would be the most controversial one. I have a strong opinion against this approach, as we have previously discussed. I proposed a different solution in another thread -- it would be cheaper to use GPU-based clipping on each tile to remove the overlapping. If autoHighlighting is needed, the MVTTileLayer can implement some internal hover handling to set the highlightedObjectIndex of each tile.

@Pessimistress thanks a lot for all the comments. I can't agree more with the performance improvements you're suggesting! Our original idea was to have something faster with our main requirements without going down to the internals of the library, so it's great to get your guidance for the next steps to bring this for the community.

Should we add a MVTTileLayer to the layer catalog?

Regarding this point, I'd like to add that MVT layers should be a very useful feature to other users because it solves the issue of rendering big datasets in Deck.gl. For example, if you want to visualize census blocks (22M records ~ 8GB). Another interesting use case is time-series datasets, we've time series datasets of 4TB that we're serving via TileLayers, that would be great if we could visualize it via Deck.gl (and integrate them in Kepler).
Absolutely agree with you that competing with a base map provider is not the goal.
MVT has become the standard in the industry for vector tiles and there are different solutions (commercial and OpenSource) out there for that: CARTO (commercial and Open Source, Mapbox, Tegola, DIY by Paul Ramsey

Thank you for your review @Pessimistress, we share your concerns about performance as well, so I think we can discuss it :)

Should we add a MVTTileLayer to the layer catalog?

Our point for rendering MVT tiles with Deck.gl is to be able to use layers with elevation features, aggregations and some other unique features that Deck.gl has.
We are not especially interested in basemaps, but in our own thematic data which are all kinds of points, lines and polygons of diverse domains. MVT provides us a good mechanism to serve the data in our CARTO Platform, with a better performance over other formats for big datasets, so we would be pleased to achieve that using MVTTileLayer integrated in the core library. We are ready to get involved in those tasks with your collaboration.
Which are the limitations that this approach has for you?

Coordinate system

Yes, that’s something that we should take a look at.
I made a little test to get an object with a flat array filled with positions without unprojecting coordinates and another flat array with hole indices from Mapbox’s vector tile library, but I haven’t tried if it would work with IDENTITY coordinate system (COORDINATE_SYSTEM.CARTESIAN). I guess that Deck.gl’s MapView will know how to work with that kind of coordinates.

Decoding

We improved our performance a lot by implementing WebWorkers to decode MVT tiles.
Using flat binary arrays would be much better because creating GeoJSON spec objects is slow. But I am concerned about two topics:

What about multiple ring features? Should we use positions and holeIndices object instead?
We rely on GeoJSON properties for styling features within a map, so if we use flat binary arrays we should implement a mechanism in our MVTTileLayer class to be able to continue using them, right?
As GeoJSON properties will not be included within that array.
About this last specific topic, how do you think we should approach that properties store? Having a store in JS for properties and then matching properties with features by a certain property?

Merging Features

We agree with you that merging features is costly, so it would be faster to implement GPU clipping to tiles. We left it because that was a low-level feature and we decided to go for merging to see how it performs, but it would be great to see a better performance.
It is very relevant for us to get the feature properties, for interaction operations with event handlers (like click, hover, etc.) but also for any other kind of advanced styling and calculations that could be derived from those data, so we saw that the merging option was easier to address than the other one upfront, building on the top of an already working layer, the GeoJSON one.
About the clipping, I saw that you added a v8.1 between parenthesis, is it something that you have in your roadmap?
Thank you very much!

@alasarr @jesusbotella Thank you for the additional context. I think this layer will be a nice addition to the deck.gl layer catalog. There are several technical details that need work on, either in this PR or later as a follow up:
Decoding
Unfortunately we cannot add a webpack-specific dependency (webworkify-webpack). We have many users relying on other bundlers. @ibgreen suggests that we can add a MVTLoader to loaders.gl, which already has a built-in worker solution (basically publish a pre-built worker to npm).

What about multiple ring features? Should we use positions and holeIndices object instead?

I think it's worth a try. I suspect it will be visibly faster. You won't be able to use the GeoJsonLayer though - flat coordinates will cause an error in that layer. The MVTLayer will have to sort its features and render ScatterplotLayer, PathLayer and PolygonLayer directly.

We rely on GeoJSON properties for styling features within a map

You could put the properties back into a protobuf message. Only the coordinates require heavy processing. My understanding is that re-decoding a message on the main thread is very cheap. And you won't be updating the color/radius/etc. attributes constantly.
Coordinate system
I ran some experiments and deck does not seem to handle the combination of COORDINATE_SYSTEM.CARTESIAN and WebMercatorViewport correctly. I will get this fixed.
Merging
Feature clipping is on our 8.1 roadmap (@1chandu). Would you be ok with holding off the merging feature till we compare the performance?

@ibgreen suggests that we can add a MVTLoader to loaders.gl, which already has a built-in worker solution (basically publish a pre-built worker to npm).

Yes, an @loaders.gl/mapbox-vector-tile module would fit well into the loaders.gl catalog of pluggable loaders, and take care of all the worker overhead. We can just copy an existing loader, such as wkt loader.
It should be a fairly simple exercise, happy to assist e.g. if you want to put up an initial PR.

For sure, we think that as well. We would be very pleased seeing these MVTTileLayer changes coming forward.
Decoding
Including an MVTLoader into @loaders.gl would make sense so that we can decouple that functionality from our layer and anyone can use it separately.
I would be happy to start working on that and open up a pull request when I have something to share. You can review the code once I open the pull request, and we can work together on merging those changes into master source code. What do you think?
Styling features via properties
My current approach to property styling is that we can provide feature properties decoded from MVT within each data array element.
So, for example, when using a Polygon Layer, each data item could have this shape:
    {
    	geometry: {
    	  positions: TypedArray,
    	  holeIndices: [ ... ]
    	},
    	properties: { ... }
    }

And then, return geometry property (shaped like one of the current Polygon Layer data formats) within getPolygon data accessor.
That way we would have the same versatility as we had with GeoJSON, and we could retrieve properties easily to be used within getFillColor or any other data accessor to modify each feature style.
Does it make sense?
Coordinate system
Cool. Thanks!
Merging
Yes, sure! We are ok with it. Let us know if you need something, or you want us to test some alpha version of that :)

I would be happy to start working on that and open up a pull request when I have something to share. You can review the code once I open the pull request, and we can work together on merging those changes into master source code. What do you think?

@jesusbotella Great! If you put up an initial PR I will take over, wire up the worker loader and get it merged. It should be fairly obvious what to do, but here are some bullets to get you started.

Copy modules/wkt to modules/mapbox-vector-tile or modules/mvt (I have a slight preference for more readable names to help guide new users through the growing "loader soup", we could call the loader MVTLoader though load(url, MapboxVectorTileLoader) would make for very clear application code).
Add the mapbox mvt module to dependencies.
Search replace WKT in docs/src/test/package.json
Add a couple of MVT test tiles and specify what license those test tiles are under in ../test/data/README.md.
Wire up src and test folders.

Scaffolding all of this should not take you more than 1-2 hours (it may not build/pass tests at that stage but that is OK), then you can hand over to me.

Hello again!
Just an update from our side.
Cartesian Coordinates
We’ve been making progress with the coordinate system and created a fork in our organization for @mapbox/vector-tile-js repository so that we can make changes and try them with your modifications for cartesian coordinates.
At this point, I think we are in the right way but we’ll need some help/guidance from you!
I have two major doubts on how to get those coordinates:

One is the tile offset that we should add to points within tiles
The other one is the point coordinates themselves.

For me, a point in cartesian coordinates can be generated with this formula:
x = horizontalOffset + XpointWithinMVT
y = verticalOffset + YpointWithinMVT
Regarding the offset, if we consider pixel offsets as the index of the tile on screen (vertical or horizontal) * tile size in px, I need the index of the tile within the screen which I don’t know if it is something I can have.
Reading Mapbox Vector Tiles specification, they say that geometry data in a Vector Tile is defined in a screen coordinate system. So, given that our tile extent is 2048, and our tile size on screen is 256px, should we convert all points so that they fit in our tile size of 256? I think so but I am not sure if I am right or if it’s better to change our tile extent or not. That conversion operation would give decimal numbers in some cases and I think it’s not ideal.
I hope the whole story makes sense.
About the PR for the repository containing these changes, we’re not sure if it will get traction from the official maintainers given that the repository is not very active nowadays. If it doesn’t, we could for sure maintain a fork with this improvement so that we can use it for our @loaders.gl MVT parser.
Clipping
I’ve checked the latest pull requests and I haven’t found any open PR or work in progress about that. Given that you have that in your roadmap for 8.1, when do you plan on releasing Deck.gl 8.1 (just an ETA)?

@jesusbotella I don't have a clear answer since I don't fully understand what you are trying to do, but here are some observations that might be helpful:

Many loaders.gl modules include a fork of an existing loader module, rather than just importing it. So replacing the import of the mapbox module with forked src/test directories is certainly an option.
But to do that, we should first agree that your changes to that module make sense for the general case (see below).
Alternatively we could support "dependency injection" - i.e. allow the user to pass in the imported module symbol(s) as an option to the loader, and your app could import the custom version and inject it. (The draco module already has experimental support for this.)

Back to the reason you are making changes...
When you say "cartesian coordinates", are you just referring to correctly handle the local coordinates in mapbox tiles, or are you talking about e.g. supporting WGS84 cartesian coordinates? As you can infer I am not at all clear what problem you are trying to solve.
Also, I remember mapbox had a good blog post a few years ago explaining the 4096x4096 coordinate system they use in their tiles, but I couldn't find it right now. Suspect it would be worth your while digging it up.

Yes, sorry, I think my previous message lacked some context 😁
I am talking about what @Pessimistress told in a message above about using Mapbox Vector tile raw coordinates offset with Deck.gl's IDENTITY mode, so that we don't convert them into WGS84 and then back to "mercator pixel" space.
I used @loaders.gl/mvt parser to get all geometry coordinates in relative tile coordinates (with 2048x2048 grid) and then convert them into a 256x256 grid so that I can render them with Deck.gl IDENTITY coordinate system. But I need to apply an offset to those positions to place them correctly, because coordinate origin is the same for all tiles right now.

We encountered the same issue when working on #3984. A reasonable approach would be:

@loaders.gl/mvt always parses to relative coordinates, i.e. pixels from the tile origin.
The deck.gl MVTTileLayer renders the parsed data with the CARTESIAN coordinate system and a modelMatrix that converts the tile coordinates to deck.gl's common space.

Here's what the props will look like:
import {Matrix4} from 'math.gl';

new GeoJsonLayer({
  ...
  coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
  modelMatrix: getModelMatrix(tile)
});

function getModelMatrix(tile) {
  const extent = tile.extent; // 2048? 4096?
  const WORLD_SIZE = 512; // deck.gl constant
  const worldScale = Math.pow(2, tile.z);

  const xScale = WORLD_SIZE / extent / worldScale;
  const yScale = -xScale;

  const xOffset = WORLD_SIZE * tile.x / worldScale;
  const yOffset = WORLD_SIZE * (1 - tile.y / worldScale);

  return modelMatrix = new Matrix4()
      .translate([xOffset, yOffset, 0])
      .scale([xScale, yScale, 1]);
}

Thank you @Pessimistress! That was SUPER helpful!
I have already implemented the changes and it works good! I have opened a PR for @loaders.gl/mvt changes and I'll push my MVTTileLayer changes using the cartesian coordinate system whenever that PR is ready.

Coverage decreased (-0.09%) to 80.774% when pulling fa89ac44f45248616056431fc1e96d44fdbd3665 on CartoDB:mvt-layer into a2dc8549cc2f4c36de6c52b25955cabc8bd0e8fc on uber:master.

I've just merged master with our branch and resolved the conflicts.
I think the code is OK (if you think it doesn't need any changes), but we need to coordinate the merging of this PR (https://github.com/uber-web/loaders.gl/pull/646).
Mainly because we'd need to update @loaders.gl/mvt dependency version so that the current MVT Tile Layer uses the proper loader code.

@jesusbotella
I landed your loaders.gl PRs and published loaders.gl v2.1.0-alpha.5 with your changes included.

I've been following this issue for a while and am excited to check it out. Congrats everyone who was involved!

Thank you very much for the merge! 🎉

I was just reading through this thread again. Originally @Pessimistress mentioned loading data into flat TypedArrays.

We should look at decoding the coordinates directly into flat binary arrays  -- another issue of @mapbox/vector-tiles is that it creates a lot of small JS arrays to conform with GeoJSON spec which is very slow. We can also skip normalization  assuming the tile data is already validated.

It seems like this got passed over. Was there a conscious decision not to implement this? If not, is there still interest towards this?

Yes decoding features into flat binary arrays is very interesting.
I think this is primarily a loaders.gl issue and we should open an issue there that references this issue. https://github.com/uber-web/loaders.gl/issues/685.
Converting general geojson (with different feature types) to a flat array leads to a rather complex flat array (many different coordinate array structures). Generating a bunch of different flat arrays optimization for the different feature types could also be an option.

authors: CLAassistant Pessimistress alasarr coveralls ibgreen jesusbotella jfrankl kylebarron xintongxia


text:
Polyfill glitching out over large areas bug?

Hi all,
I am attempting to use h3 to generate a GeoJSON polygon that I will then overlay on a mapbox map. When I try and polyfill(blue) a large square polygon(red) the resulting output gets really glitchy (see screenshots)

However when I halve the size of the red box, the polyfill works as intended?

const polygon = [
        [minLon, maxLat],
        [maxLon, maxLat],
        [maxLon, minLat],
        [minLon, minLat]
    ];
    const hexagons = h3.polyfill(polygon, 1, true);

    let hexFeatures = []
    for(let h of hexagons){
        let hexFeature = {
            'type': 'Feature',
            'geometry': {
                'type': 'Polygon',
                'coordinates': [h3.h3ToGeoBoundary(h, true)]
            }
        }
        hexFeatures.push(hexFeature)
    }

let hexGroup = {
        "id": "hex",
        "type": "fill",
        "source": {
            "type": "geojson",
            "data": {
                "type": "FeatureCollection",
                "features": hexFeatures
            }
        },
        'layout': {},
        'paint': {
            'fill-color': '#0000ff',
            'fill-opacity': 0.50
        }
    }

    map.addLayer(worldGroup)

Is this a possible bug?
Thanks

There are two issues here, both (unfortunately) expected and somewhat documented:

The current H3 polyfill algorithm can't deal with polygon segments of greater than 180 degrees longitude. Otherwise, we interpret the bounding box of the polygon as crossing the antimeridian. The alternative was to require incoming polygons to follow the Right Hand Rule, and while we obey this in output we didn't want to enforce it in input. So what you're seeing in the first image is the set of hexagons in the bounding box between the western edge of your real bounding box (interpreted as east) and the eastern edge of your bounding box (interpreted as west).

Mapbox doesn't deal well with drawing polygons that cross the antimeridian. So the cross-globe lines you see in the first image are a rendering artifact, not actual H3 output. The fix is to adjust the geometry to go outside the +-180 degree longitude range (i.e. a segment from longitude -179 to longitude 179 would need to be rewritten as going from -179 to -181).

So unfortunately this is "working as expected". You can polyfill the area by using multiple bounding boxes, and you can draw it correctly by adjusting the output geometry to what Mapbox expects.

Many thanks for a fast, clear & consise reply! Can probably close this issue.

authors: james-berry nrabinowitz visagegod


text:
customized resolution

I am sure if there is already discussion before about this feature, so I raise it here for discussion.
I have an application that needs to index the hexagon cells in different resolution, according to the latitude. On areas with low latitude, the edge length is about 2.0KM, while on areas with high latitude, the edge length is about 5.0KM. According the to H3 resolution table, resolution 5,6,7 is not what I want. Does the H3 library support customized resolution? Can I modify the code a bit for supporting this feature?

The short answer is: No. The fixed resolutions are a result of fundamental aspects of H3’s grid construction, and there’s no way to get a custom cell size. Some other discrete global grid systems do support this feature, but it’s not possible to implement in H3.
The closest we could offer is likely to use gridDisk with different radii at different latitudes.

authors: mikehb nrabinowitz