text:
[core] 8bitdo M30 controller state mismatch

WARNING: Please, read this note carefully before submitting a new issue:
It is important to realise that this is NOT A SUPPORT FORUM, this is for reproducible BUGS with raylib ONLY.
There are lots of generous and helpful people ready to help you out on raylib Discord forum or raylib reddit.
Remember that asking for support questions here actively takes developer time away from improving raylib.

Please, before submitting a new issue verify and check:

[X] I tested it on latest raylib version from master branch
[X] I checked there is no similar issue already reported
[X] My code has no errors or misuse of raylib

Issue description
When the M30 controller is connected as an 8bitdo device (instead of being configured as an XInput), it seems that buttons aren't correctly mapped, even based on index, rather than the consts defined.
My code was reporting that the L1 button was constantly down, even though I wasn't touching the controller. The input example also reports button 9 being depressed when it starts (see first screenshot)
So then I went to check a few other bits using the Windows joystick information, and the Raylib input tester, it seems that:

The "Z" button (which represents button 7 within the Windows driver) is matching button 11 in Raylib.
The "C" button (which represents button 8 in the Windows driver) does not even register on the Raylib example
"L" and "R" (Windows buttons 9 and 10) also do not register within Raylib
Axis 4 is always leaning to -0.01 (but this bit doesn't really bother me)

Environment
Windows 10 x64, 8bitdo M30 controller
Issue Screenshot

Code Example
Just run the Raylib core example "core_input_gamepad" with an M30 controller attached

@pmprog Did you try with latest version from GitHub? Gamepad DB was updated some days ago, actually, you can check that controller configuration on the DB.

@pmprog Did you try with latest version from GitHub? Gamepad DB was updated some days ago, actually, you can check that controller configuration on the DB.

Yes, I did a pull to refresh the repo.
I cannot remember if I even deleted and recloned, but I'll try that again in case something hadn't gone right

Yes, I did a pull to refresh the repo.
I cannot remember if I even deleted and recloned, but I'll try that again in case something hadn't gone right

I have just deleted and recloned the repo; and it's still reporting the same

I have just deleted and recloned the repo; and it's still reporting the same

Ah, managed to find out the problem
The controller is reporting as "8BitDo M30 gamepad", but with an identifer of "03000000c82d00000650000000000000". Where-as in your mapping file, it's got an identifier of "03000000c82d00005106000000000000"
The actual identifier of "03000000c82d00000650000000000000" belongs to "8BitDo M30" on the row above; however, this is configured differently.
I switched the identifiers around, just to test, and the controller buttons work fine now.
I'm not sure where these identifiers came from, or what else they affect, so I've not applied a pull request

Ah, managed to find out the problem
The controller is reporting as "8BitDo M30 gamepad", but with an identifer of "03000000c82d00000650000000000000". Where-as in your mapping file, it's got an identifier of "03000000c82d00005106000000000000"
The actual identifier of "03000000c82d00000650000000000000" belongs to "8BitDo M30" on the row above; however, this is configured differently.
I switched the identifiers around, just to test, and the controller buttons work fine now.
I'm not sure where these identifiers came from, or what else they affect, so I've not applied a pull request

@pmprog Thanks for the investigation and report. It seems it could be an issue in the database... In any case, it is external to raylib so closing this issue.

@pmprog Thanks for the investigation and report. It seems it could be an issue in the database... In any case, it is external to raylib so closing this issue.

license: Zlib


text:
add: cmake config include guard

raylib does not currently guard against multiple inclusion in cmake projects.
This causes issues when you want to first check for existence of a raylib install and actually add it later.
For example, in my case, I first check for a local install of all my dependencies using find_package('dependency here' QUIET). If not found, I then use FetchContent to automatically grab the missing dependency. Works fine when I DON'T have a local install of raylib. But this causes issues when a local install exists and I attempt the find_package(raylib REQUIRED) call because raylib's config will attempt to add an already existing library ("raylib") when calling find_package on it multiple times.
This change will only run the cmake configuration logic if the raylib target does not already exist.

@MyUncle Thanks for the improvement! Merged!

source: gharchive/pull-request

license_type: permissive

license_source: github-api


text:
Syntax highlighting not working properly.

Hello,
Coming from BQNpad I expected a similar experience in VSCode, colour-wise. However, I can't seem to get BQN's syntax highlighting to work. Here's how it look:

Is anyone else having this issue?

oh, sorry for the delay. Can you tell me which theme this is?

oh, one more thing, please paste the text.

I have added new scopes, which you can check  by installing from the repository. From what I can see, the colors are now distinct.
If that is ok, his will be in v0.1.3 once issue 16 is complete.

Apologies for not pasting the text, silly of me. Thank you for addressing this :)

source: gharchive/issue

authors: jacobusmmsmit razetime

repo: razetime/bqn-vscode

license: MIT


text:
How to set timeout for client?

I do not see any option to feed options while creating client. How to set timeouts to ensure that if there is a connection problem or, another failure request terminates with error?

@amitmahbubani idiomatic way that this is managed across go is context. I was developing a AWS lambda where I receive a context with deadline. It would far more easier for me to pass the context rather than compute timeout.

repo: razorpay/razorpay-go


text:
Restyle "welcome back" message

Should fit in the space between the top and the hero content.

This looks good on staging so I'm closing the issue.

repo: razzius/weave


text:
Customize run name based on training configs

wandb and local run name to be generated automatically as per the training configs

wandb will automatically generate a name if none is given by the user. I would advocate against overriding the wandb logic to handle automatic name generation since the naming convention would be very user specific. Thoughts @huguesva ?

We're already overriding the naming convention with this:
datetime.now().strftime("%Y%m%d_%H%M%S.%f")
So I thought I'll make it more meaningful by making it this:
'SimCLR_resnet9_eps_1000_optim_LARS' + '_' + datetime.now().strftime("%Y%m%d_%H%M%S.%f")

Code which overrides run name: https://github.com/rbalestr-lab/stable-SSL/blob/main/stable_ssl/config.py#L178

This is only for local folder, not for wandb. And the date time override is also aligned with Hydra logic and other frameworks (that the minimum info to add to make sure deduplication). However I would advise against using further customization with config args for the naming. If users want more personalization on that they can easily override that logic from the Trainer? @huguesva maybe we can add a method like name_folder that users can use to customize the naming from args?

I agree with @RandallBalestriero that we should not override the wandb logic.

yes ok for the name_foldermethod.

Change not required, closing issue.

repo: rbalestr-lab/stable-SSL


text:
Insecure world writable

Whenever I run my terminal inside the console or visual studio code, I receive a warning message.
/usr/lib/ruby/vendor_ruby/rake/file_utils.rb:54: warning: Insecure world writable dir /home/shaf/.rbenv/libexec in PATH, mode 040777 /usr/lib/ruby/vendor_ruby/rbnacl/libsodium/version.rb:5: warning: Insecure world writable dir /home/shaf/.rbenv/libexec in PATH, mode 040777
I believe my path is wrong in the directory not sure how to solve the problem

This warning isn't coming from rbenv, and as such isn't an rbenv issue.

You can either find out what produces the warning and disable it; or
You can make the directory non-world-writable: chmod go-w ~/.rbenv/libexec.

Thanks for the update and the tip

repo: rbenv/rbenv


text:
Make ruby-build usable on linux distros

root@foo:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.2 LTS
Release:	16.04
Codename:	xenial

root@foo:~# apt-get install ruby-build

Reading package lists... Done
Building dependency tree
Reading state information... Done
ruby-build is already the newest version (20151028-1).
0 upgraded, 0 newly installed, 0 to remove and 20 not upgraded.

The packaged version of ruby-build is currently useless on most
linux distributions because their package update interval doesn't
keep up with the ruby-build update cycle.
ruby-build should stop embedding the definitions and
should rather download and maintain them in a data directory.
I.e. ruby-build --update should become a thing.
This way ruby-build will become usable out of the box even
on distros such as Ubuntu LTS, where the newest packaged version
tends to be very old.

ruby-build already supports the use of additional build definitions by providing RUBY_BUILD_DEFINITIONS (colon-separated list of paths to search for addition build defs)
For instance, use of this plugin https://github.com/jasonkarns/ruby-build-update-defs would support the use case you describe.

I know there's many ways to make it work but my point is: it should just work out of the box.
If another plugin is needed to allow the ruby-build plugin
to perform its single purpose then the distro packages
should include it.
There is no good reason to require manual extra steps
from every ruby-build user.
The following line should just work on any Debian or Ubuntu version:
apt-get install rbenv ruby-build && rbenv install $latest_ruby_version
And ruby-build should auto-update its definitions by default.

The computer should be doing the hard work. That's what it's paid to do, after all.
-- Larry Wall

Not sure those are all "shoulds" considering the tradeoffs involved. The static build definitions provide quite a bit of value that would be lost with dynamic "install whatever is latest". Any custom packages that need installed for a given ruby; dealing with versions of yaml or readline or openssl; custom build flags necessary for given releases or workarounds for issues/patches. As you can see in many of the build definitions (and in the history of the /share directory in particular), these have all been actual scenarios at one point or another. "dynamic" build definitions would be susceptible to breakage as a result. In its current form, any build definition that is included will work out of the box. Dynamic build definitions offer no such guarantee and could break at any given moment, thus rendering CI boxes, build/deploy chains unusable.
Indeed, debian packages themselves are static in the exact same manner. (As are the homebrew formula for the OSX community.) As you know, installing the latest version of ruby-build affords the ability to subsequently install the latest ruby. I fail to see why it should be a given that installing an old version of ruby-build should support installing latest ruby. The underlying issue here is that the debian package is not updated frequently enough. So I'd suggest one of the alternative methods of installing ruby-build, as documented in the readme.
Obviously, I can't speak for the original author(s) or even current maintainers, but I believe the current architecture was designed for stability above all. The plugin architecture thus affords users the ability to "sacrifice" said stability for flexibility, if so desired. As for how to install ruby-build itself, there are many options, each with tradeoffs, that leave the decision to you.

To be clear, I sympathize with your issue (which is why I wrote ruby-build-update-defs in the first place :) )

Hey @m-o-e, thanks for weighing in. This is a duplicate of #51.
@jasonkarns covers the pressures at play. If the definitions were only a collection of Ruby version identifiers and URLs to fetch, then using a separate, updatable manifest could be straightforward. The definitions use the ruby-build API to perform builds, however, so definitions would need to be branched and updated separately for each ruby-build release in the wild. This can certainly be implemented, but should it?
Some options that may be a more natural fit:

Rely on a PPA for software packages with these characteristics.
Volunteer to maintain the upstream ruby-build packages and backport new ruby-build definitions to the build API in the older release.

(Explicit social cue: You're using a brusque, exaggerated communication style that, while it does get across your sense of this feature as a basic necessity, also carries a message of condescension and scorn that you may have not intended. This sets up for an adversarial exchange instead of a constructive one.)

Cue taken, I apologize for the tone and thanks for your elaborate replies.
It's been one of those late night tickets after having had to explain one
too many times how to find and update the definitions on linux.

To save some future people's time, if you installed via your distro's package manager, are using the latest version, and you get "definition not found"
$ rbenv install 2.5.1
ruby-build: definition not found: 2.5.1

then download the file from this repo (https://github.com/rbenv/ruby-build/tree/master/share/ruby-build), then reference it instead of the version number:
$ rbenv install ./downloaded-file
Downloading ruby-2.5.1.tar.bz2...

authors: JasonBarnabe jasonkarns jeremy m-o-e

repo: rbenv/ruby-build

license: mit

license_source: bigquery


text:
Use file module to remove /root/.auth_ref.json

Otherwise the upgrade.sh script looks as if it fails and causes
confusion.
Addresses #369

:+1:

:+1: LGTM

authors: cloudnull nrb sigmavirus24

repo: rcbops/rpc-openstack


text:
DO NOT MERGE: Debugging Cirros upload failures

This commit ups the haproxy timeout and adds a keystone check before the
cirros upload task.
The haproxy timeout increase is not intended as a fix,
it is a temporary measure to expose the underlying failure.

recheck - AIO was not started when the pr was opened.
From Jenkins Log:
Created Pull Request #851 on rcbops/rpc-openstack by hughsaunders (hugh@wherenow.org) updated at: 2/22/16 10:03 AM SHA: debug_cirros
Feb 22, 2016 10:03:42 AM SEVERE org.jenkinsci.plugins.ghprb.GhprbPullRequest checkMergeable
Couldn't obtain mergeable status.
java.io.FileNotFoundException: {"message":"Not Found","documentation_url":"https://developer.github.com/v3"}

Hey all, please recheck this until it fails on the cirros upload/504 error. I want to inspect the logs in that case.. Thanks!

recheck - previous succeeded but I want a cirros fail.

recheck -succeeded again

recheck - one rabbit fail, other has passed cirros upload

recheck - passed again

recheck - passed

recheck - passed

Had an interesting failure:
glanceclient.exc.HTTPBadRequest: 400 Bad Request: The HTTP URL is invalid. (HTTP 400)

Which I think means that remote image url passed to glance is invalid. Have added extra debugging to show the URL and attempt to retrieve it before glance does.

recheck failed on apt 404

recheck - failed on join rabbit

recheck - succeeded

Got he failure I wanted:
**16:35:31** TASK: [os_tempest | Debug Test keystone is available and returning a sensible catalog] ***
**16:35:31** changed: [jrpcaioiad-624_utility_container-5180f774]
**16:35:31**
**16:35:31** TASK: [os_tempest | Debug show cirros image url] ******************************
**16:35:31** ok: [jrpcaioiad-624_utility_container-5180f774] => {
**16:35:31**     "var": {
**16:35:31**         "cirros_img_url": "[http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img](http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img)"
**16:35:31**     }
**16:35:31** }
**16:35:31**
**16:35:31** TASK: [os_tempest | Debug download cirros image] ******************************
**16:35:31** changed: [jrpcaioiad-624_utility_container-5180f774]
**16:35:31**
**16:35:31** TASK: [os_tempest | Ensure cirros image] **************************************
**16:35:31** failed: [jrpcaioiad-624_utility_container-5180f774] => {"failed": true, "parsed": false}
**16:35:31** OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
**16:35:31** debug1: Reading configuration data /etc/ssh/ssh_config
**16:35:31** debug1: /etc/ssh/ssh_config line 19: Applying options for *
**16:35:31** debug1: auto-mux: Trying existing master
**16:35:31** debug1: mux_client_request_session: master session id: 2
**16:35:31** Traceback (most recent call last):
**16:35:31**   File "<stdin>", line 1848, in <module>
**16:35:31**   File "<stdin>", line 1845, in main
**16:35:31**   File "<stdin>", line 1765, in route
**16:35:31**   File "<stdin>", line 1818, in create_image
**16:35:31**   File "/usr/local/lib/python2.7/dist-packages/glanceclient/v1/images.py", line 324, in create
**16:35:31**     data=image_data)
**16:35:31**   File "/usr/local/lib/python2.7/dist-packages/glanceclient/common/http.py", line 287, in post
**16:35:31**     return self._request('POST', url, **kwargs)
**16:35:31**   File "/usr/local/lib/python2.7/dist-packages/glanceclient/common/http.py", line 276, in _request
**16:35:31**     resp, body_iter = self._handle_response(resp)
**16:35:31**   File "/usr/local/lib/python2.7/dist-packages/glanceclient/common/http.py", line 93, in _handle_response
**16:35:31**     raise exc.from_response(resp, resp.content)
**16:35:31** glanceclient.exc.HTTPBadRequest: 400 Bad Request: The HTTP URL is invalid. (HTTP 400)

This exception is raised by glance doing a head request on the URL to ascertain the size of the image. As the previous task managed to download the image, the problem is probably an intermittent issue with the server we are downloading the image from.

https://review.openstack.org/#/c/284057/


text:
custom theme style improvements and fixes

Changes
Source Issue https://github.com/rcpch/digital-growth-charts-react-component-library/issues/111

Fixes font-style property being used for setting font-weight values
1.1  Now it supports both font-style and font-weight properties, defaults were kept.

Adds support for customizing a few properties from existing style objects, as well as new ones introduced in this merge request.

CustomThemeStylesChart story was added just as a reference, it can be removed before incorporating this pull request, if you feel so. I thought it would be nice to have a dedicated story to show how customizable the chart is apart of existing themes.

@eatyourpeas

Hi @gdfreitas I am really sorry polluted this PR a bit  - meant to bring it up to date with live before reviewing (I have updated a few things recently) and ended up in merge-conflict purgatory. This all looks great and I am generally happy with it. The story is good to have - if you are happy to add to the RCPCHChart.mdx with some documentation about what you have done and so on would be great. Really useful.
A couple of things - the fonts currently in the component are only montserrat regular, bold and italic. Their weights I think therefore are 400 and 700 and these are the only ones included in the fonts folder. Probably for this reason I am not seeing an impact if I change the prop. I did this partly because we did not need the range of weights. Do you need specific font weights or fonts? If so do you want to add these? They would need converting to b64 and then importing in RCPCHChart.tsx in the GlobalStyle styled-div.
I think best is if you are happy to look at these small items and resubmit a fresh PR and I will be less of a klutz with that one and merge into live, rather than the other way round that turned out more complicated than I expected.

Hi @eatyourpeas as we discussed, I'm closing this in favor of https://github.com/rcpch/digital-growth-charts-react-component-library/pull/117, which is still a work in progress for now. Thank you.

authors: eatyourpeas gdfreitas


text:
request to use Framebuf module

Instead of letting self.block() function send pixels to the LCD, it might be faster if block() updated an internal array, and a display.push_pixels() sent all the pixels directly to the display. You could allow the user to access display.push_pixels(), and call it when the user is done updating the pixel array. It would improve pervormance significantly(especially on ESP32)
I also believe that (most) esp32s have around 1-2 MB psram, if not more

Thank you for your suggestion! You can draw directly to a framebuffer and then copy it to the display, as demonstrated in the example demo_pbm.py. While this example is designed for portable bitmaps, you can still use all of the framebuffer's native drawing and text routines to render graphics and text.
I agree that buffering could improve performance in some cases. However, implementing this change might break compatibility with many boards. There are over 60 ESP32 modules and countless development boards, each with varying features. For example, the ESP32-WROOM series typically does not include PSRAM, while the ESP32-WROVER series almost always does. The ESP32-S series offers models both with and without PSRAM, and the ESP32-C and ESP32-H series generally do not include PSRAM.
It's also important to consider compatibility across all MicroPython boards—not just the ESP32—since many other boards, such as the RP2040, ARM Cortex series, and nRF52, have variants with limited RAM or PSRAM.
Thanks again for your input!

Essentially repeating the above. I have an ESP32 (in a CYD) and the Micropython build I'm using, it does not have enough RAM for a fullscreen (color) framebuffer. Thanks for the library and great examples!


text:
Rdk 42088 mm module

Hi,
Please help the changes to merge in topic/simplification_rdkvs branch.
Changes related to RDK-42088

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.9 out of 10 committers have signed the CLA.:white_check_mark: KaurSup:white_check_mark: npoltorapavlo:white_check_mark: sethulakshmisk:white_check_mark: PriyaPesala:white_check_mark: Dosakaya:white_check_mark: sithanda:white_check_mark: hgfell683:white_check_mark: anand-ky:white_check_mark: apatel859:x: V3110You have signed the CLA already but the status is still pending? Let us recheck it.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.9 out of 10 committers have signed the CLA.:white_check_mark: Dosakaya:white_check_mark: KaurSup:white_check_mark: npoltorapavlo:white_check_mark: anand-ky:white_check_mark: sithanda:white_check_mark: sethulakshmisk:white_check_mark: PriyaPesala:white_check_mark: apatel859:white_check_mark: hgfell683:x: V3110You have signed the CLA already but the status is still pending? Let us recheck it.

Raised against wrong branch 23Q3.. So closing the pull request..

repo: rdkcentral/rdkservices


text:
Return Energy Consumption and Carbon Emissions

Currently we are exporting the Operational carbon emissions for each metric type (CPU/Memory), and the embodied carbon emissions.
We also want to return the energy consumption for each metric type as well (CPU/Memory).

https://github.com/re-cinq/aether/pull/89

repo: re-cinq/aether


text:
How do I get the coordinates of my dropped item relative to the drop target container?

I am working with 1.0.0-rc.
In drag-around-naive:
const boxTarget = {
  drop(props, monitor, component) {
    const item = monitor.getItem();
    const delta = monitor.getDifferenceFromInitialOffset();
    const left = Math.round(item.left + delta.x);
    const top = Math.round(item.top + delta.y);

    component.moveBox(item.id, left, top);
  }
};

At present it looks like I need to get the offset from the page of the original item, then I can find the offset from the page of where I dropped, then I need to find the offset of the drop container from the page, then do that calculation and I have the relative position in my drop target container.
This seems like a lot of work for something pretty common...

Seems like getClientOffset returns me the position relative to the viewport. So then all I have to do is my calculation in my drop target. Do you think its still worth having a convenience method relative to drop target?

Yeah I guess we could have this for symmetry. For now, you can just use findDOMNode(component).getBoundingClientRect(), but I wouldn't mind adding this if more people voice support. Let's keep this open and see what others say.

I would like something like this as well. I need to get the bounding rect/coordinates of the drop target, so when I hover something on it I can calculate if it's on the left, right, top or bottom side inside the drop target.

The relative coordinates can be useful for other use cases. For a Trello-like app, when you drag a card over a list, the list scrolls to bottom when hovering near bottom of drop area, and scrolls up when hovering near the top.
Trivial to implement on user space tho.
Also, I vaguely remember reading that accessing bounding rectangle triggers reflow in browsers and somewhat costly. Not sure if this is still the case.

I don't think there's a way to do this without actually accessing getBoundingClientRect because you never know if the item moved.

For a Trello-like app, when you drag a card over a list, the list scrolls to bottom when hovering near bottom of drop area, and scrolls up when hovering near the top.

That's a great use case.
The perf penalty is indeed, significant, and will be wasted if it's added to React DnD but your app doesn't use it. Therefore, I don't want to add this to React DnD.
It is easy to implement in userland, and you will be able to do things like throttle getBoundingClientRect calls, or put the related scrolling code into an animation frame.
I'm open to adding “scroll on hover at the bottom” as an example to the sortable stress test. This would involve adding another drop target at the Container level that only listens to hover and scrolls inside an animation frame.
However I won't add the DOM coordinate methods to React DnD for the reasons described above.

@gaearon I'm interested in generalized solution. How can we use react-dnd-html5-backend instead of getBoundingClientRect directly?

I solved this by passing the DropTargetMonitor functions getInitialSourceClientOffset and getSourceClientOffset to a callback function inside my onDropevent. This way, my callback function can calculate the correct coordinates related to the view port.
// some code before...

const [, dropRef] = useDrop({
    accept: 'STICKY',
    drop(item, monitor) {
      move(
        item.id,
        monitor.getInitialSourceClientOffset(),
        monitor.getSourceClientOffset()
      );
    },
  });

// I'm updating my state with npm immer (immutable helper) throuthg the produce function...

const move = (id, initialPosition, finalPosition) => {
    setList(
      produce(list, draft => {
        list.map(item => {
          if (item.id === id) {
            item.position = getCorrectDroppedOffsetValue(
              initialPosition,
              finalPosition
            );
          }
          return item;
        });
      })
    );
  };

// and finally, my getCorrectDroppedOffsetValue function
const getCorrectDroppedOffsetValue = (initialPosition, finalPosition) => {
    // get the container (view port) position by react ref...
    const dropTargetPosition = ref.current.getBoundingClientRect();

    const { y: finalY, x: finalX } = finalPosition;
    const { y: initialY, x: initialX } = initialPosition;

    // calculate the correct position removing the viewport position.
   // finalY > initialY, I'm dragging down, otherwise, dragging up
    const newYposition =
      finalY > initialY
        ? initialY + (finalY - initialY) - dropTargetPosition.top
        : initialY - (initialY - finalY) - dropTargetPosition.top;

    const newXposition =
      finalX > initialX
        ? initialX + (finalX - initialX) - dropTargetPosition.left
        : initialX - (initialX - finalX) - dropTargetPosition.left;

    return {
      x: newXposition,
      y: newYposition,
    };
  };

findDOMNode does not work with functional component, and useDrop#drop does not pass any component in. Now if I want to get the ref of my component I have to store it separately and manually call the drop connector to pass it. Is there any more concise way to do this?
function useCustomDrop(onDrop: (info: unknown, xy: Point) => void) {

    const ref = useRef<Element>();

    const [, dropTarget] = useDrop<any, void, unknown>({
        accept: 'item-type',
        drop(item, monitor) {
            const offset = monitor.getSourceClientOffset();
            if (offset && ref.current) {
                const dropTargetXy = ref.current.getBoundingClientRect();
                onDrop(item.ruleTypeInfo, {
                    x: offset.x - dropTargetXy.left,
                    y: offset.y - dropTargetXy.top,
                });
            }
        }
    });

    return (elem) => {
        ref.current = elem;
        dropTarget(ref);
    };
}

@quanganhtran do you have any complete code samples you'd be willing share, please?

@dendrochronology
A contrived example: https://codesandbox.io/s/elastic-liskov-00ldf
The API is nicer when we don't have to store the ref ourselves (useGlobalDrop vs useLocalDrop). Now if only the ref, which I assume react-dnd already obtains, is attached to the monitor object, it would resolves this.

this solution isn't reliable especially when you zoom in the browser or device resolution change. any idea?

i have the same question @sepehr09

Just passing by after a few google searches... Any update on the original question? (obtaining the x/y of a dropped item relative to the drop target)

I guess I'll join the list of those, who needs this. Any help please?

I think this feature very necessary, need to be add in library. Right now, Anyone worked with it, please help us !

I too would benefit of a solution to this problem! Thanks

My workaround is to put a div with element reference around the drop target and use that to measure. Because I also put other stuff inside that container div I position the drop target absolute over the entire container.
Something like this (pseudo-code, copy-paste at your own risk)
const containerRef = useRef<HTMLDivElement | null>();
const [, drop] = useDrop(...)
return (

)

do you have any complete code samples you can share, please?

Here is a working solution on hover:
const [, drop] = useDrop(() => ({
  accept: 'Box',
  hover: (_item, monitor) => {
    const offset = monitor.getClientOffset()

    if (offset && rootRef.current) {
      const rect = rootRef.current.getBoundingClientRect()
      console.log({
        x: offset.x - rect.left,
        y: offset.y - rect.top,
      })
    }
  },
  drop: (_item, monitor) => {
    if (monitor.didDrop()) return

    return {
      id: 'foo',
    }
  },
  collect: () => ({}),
}), [])

Hope it helps.

Thanks @dherault . How do you get rootRef?

Thanks @dherault . This is another way of doing it more explicitly, in case somebody is interested:
function DropTarget(props) {

    const boundingBox = useRef(null)

    const [output_of_collect, drop_ref] = useDrop(
        () => ({
            // ... <your stuff> ... //
            hover: (item, monitor) => {
                const offset = monitor.getClientOffset();
                const deltaX = offset.x - boundingBox.current.x
                const deltaY = offset.y - boundingBox.current.y
                console.log("deltaX = " + deltaX + ", deltaY = " + deltaY)
            },
            // ... < your other stuff > ... //
        }))

    function combinedRef(el) {
        drop_ref(el);
        if (el) {
            boundingBox.current = el.getBoundingClientRect();
        }
    }

    return (

 Content of your div

    )

authors: JanKaram2020 JanMisker NerveClasp darde dendrochronology dherault fachu000 gaearon hakanderyal hungdev minhdongsss nfplay quanganhtran robertbakker schester44 sepehr09 sheerun vjpr

repo: react-dnd/react-dnd


text:
ReactDnD plugin is not working in IE Edge browser?

I'm using ReactDnd for my drag and drop functionality in my new project which works perfectly.
It works perfectly in Chrome and firefox, things turned worse when I've checked it in IE. It throws error while opening page/while page loading.
Errors :
Symbol is not defined.

*Symbol is undefined*
*File: DndProvider.js, Line: 77, Column: 1*

Even the demo codesandbox is not working in IE which is listed in official React DnD page.

Almost, i have finished the functionality with React Dnd, now I struggled to put it in production since it throws errors in IE. Anyone, please help me on this, What I have to do to get this work on IE.
Raised a question on Stackoverflow too : https://stackoverflow.com/questions/59027926/why-reactdnd-plugin-is-not-working-in-ie-edge-browser

With the current React-DnD, you have to bring your own polyfills. I would recommend looking at core-js for a Symbol polyfill.

Thanks, but where I can find this core-js file ? and I hope bringing polyfills will solve my problem, will surely check now.

https://github.com/zloirock/core-js
You install it as a dependency with yarn add core-js and then import 'core-js' or require('core-js') at the top of your application to have it polyfill your environment.


text:
challenge RedBadger - Entry by Shu Uesugi (Mozilla hackathon attendee)

+1

authors: DjebbZ chibicode

repo: react-europe/hackathon


text:
Add Typing of CSS Modules

Resolves #171

Introduced a new plugin gatsby-plugin-css-modules-typings in order to generate type definition files.

It's a plugin for Gatsby, so that we don't need to generate new a d.ts files every time we create a new CSS Module file. It will be generated when you fire up the development server.

Added type definition files of CSS Modules.

wow, that's awesome. thanks a lot for the hard work! <3

repo: react-hook-form/react-hook-form-website


text:
[IOS] Video display crashes on display with it's thumbnail url

Bug
I'm displaying a list of photos and videos from the library on IOS, it works fine when fetching only photos, but when I fetch videos, it obviously returns the thumbnail of the video, trying to display it crashes the app. The same code works on importing CameraRoll directly from react-native core libraries.
Environment info
React native info output:
System:
    OS: macOS 10.14.5
    CPU: (4) x64 Intel(R) Core(TM) i5-4308U CPU @ 2.80GHz
    Memory: 604.50 MB / 16.00 GB
    Shell: 5.3 - /bin/zsh
  Binaries:
    Node: 10.15.3 - ~/.nvm/versions/node/v10.15.3/bin/node
    npm: 6.10.1 - ~/.nvm/versions/node/v10.15.3/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
  IDEs:
    Android Studio: 3.4 AI-183.6156.11.34.5692245
    Xcode: 10.3/10G8 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.8.6 => 16.8.6
    react-native: 0.60.4 => 0.60.4

Library version: 1.1.1
Steps To Reproduce

react-native init myApp
install this library.
Include it in the pod file and run pod install in the ios folder.

And calling the Attachments in the render function of the parent class with the photos passed as props.
...
Describe what you expected to happen:

Display the thumbnails of the video as other photos.

Reproducible sample code
const Attachments = ({ photos }) => {
const [ index, setIndex ] = useState(null);
return (<ScrollView>
              {
                      photos.map((p, i) => {
                        return (
                        <TouchableHighlight
                          style={{ opacity: i === index ? 0.5 : 1 }}
                          key={i}
                          underlayColor="transparent"
                          onPress={() => setIndex(i)}
                        >
                          <Image
                            style={styles.image}
                            source={{ uri: p.node.image.uri }}
                          />
                        </TouchableHighlight>
                      ));
                      }
                  }
            </ScrollView>
);
};

Use getPhotos to get photos
CameraRoll.getPhotos(params)
        .then((r) => {
          this.setState({ photos: r.edges });
        })
        .catch((err) => {
          if (err.message === 'User denied access') {
            showAlert(i18n.t('camera.permission_denied'), i18n.t('camera.permission_denied_message'), null);
          } else {
            showAlert(i18n.t('camera.error'), i18n.t('camera.error_loading_photos'), null);
          }
        });

https://github.com/jzyds/react-native-convert-ph-asset

@talal7860 same issue. you resolved it?

Same here.

This is a duplicate of https://github.com/react-native-community/react-native-cameraroll/issues/52 and the issue is related to ph:// uri's. There are workarounds posted at that other issue as well as using the react-native-convert-ph-asset library posted above by @jzyds . Closing for now.


text:
getPhotos() on Android 10 missing screenshots

Bug
Title is somewhat misleading but is the experience users will get.
Longer, accurate description:
New screenshots are sorted last when using getPhotos(). The net effect of this, on a device with a lot of photos, is that the user thinks screenshots are not showing at all.
The reason for this seems to be that screenshots taken in Android 10 are no longer tagged with DATE_TAKEN but only DATE_ADDED. This change seems to be undocumented. Since it seems the media library is backed by a sqlite database, it's reasonable to believe that NULL values are being sorted last.
I was able to confirm that screenshots were indeed showing, but they were showing as the last items in the gallery. However, prior to upgrading the phone the screenshots would show as expected. After upgrading, old screenshots show in the correct order, however new ones are shown last. This is consistent with the theory that photos are tagged incorrectly at creation.
Given complaints from various support forums, it's possible this is the issue that the FB Messenger team encountered.
Environment info
React native info output:
⚡ react-native info
warn The following packages use deprecated "rnpm" config that will stop working from next release:
  - react-native-check-app-install: https://github.com/redpandatronicsuk/react-native-check-app-install#readme
  - react-native-orientation: https://github.com/yamill/react-native-orientation#readme
Please notify their maintainers about it. You can find more details at https://github.com/react-native-community/cli/blob/master/docs/configuration.md#migration-guide.
info Fetching system and libraries information...
System:
    OS: macOS Mojave 10.14.6
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Memory: 503.42 MB / 32.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 11.15.0 - ~/.nvm/versions/node/v11.15.0/bin/node
    Yarn: 1.17.3 - /usr/local/bin/yarn
    npm: 6.7.0 - ~/.nvm/versions/node/v11.15.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
    Android SDK:
      API Levels: 23, 25, 26, 27, 28
      Build Tools: 27.0.3, 28.0.2, 28.0.3
      System Images: android-25 | Google Play Intel x86 Atom, android-27 | Intel x86 Atom_64, android-27 | Google APIs Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom_64, android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom_64
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.5900203
    Xcode: 10.1/10B61 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0
    react-native: 0.61.2 => 0.61.2
  npmGlobalPackages:
    react-native-custom-components: 1.0.0

Library version: 1.2.1
Steps To Reproduce

Take a screenshot
Call getPhotos()
Screenshot appears last in the results

Describe what you expected to happen:

Take a screenshot
Call getPhotos()
Screenshot appears first in the results

Reproducible sample code
Since the issue requires taking screenshots, I cannot build sample code.
However, I've determined a fix and will submit a PR shortly.

I've tried your PR. It seems that all images and videos have the wrong timestamp now (0, or Jan 01, 1970). Perhaps changing the logic to check if the image has a timestamp of 0, then call the DATE_ADDED tag. Else, call the DATE_TAKEN tag.

@KevinGbalay This PR should not be modifying the timestamps of the images or videos. Are you talking about sorting or image metadata? The latter is not related to this PR.

:tada: This issue has been resolved in version 1.3.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

authors: KevinGbalay bartolkaruza scarlac


text:
react-native link cause error with AntDesign Font with 0.59.0

$ react-native link react-native-vector-icons

info Linking "react-native-vector-icons" iOS dependency
info iOS module "react-native-vector-icons" has been successfully linked
info Linking "react-native-vector-icons" Android dependency
info Android module "react-native-vector-icons" has been successfully linked
info Linking assets to ios project
warn Group 'Resources' does not exist in your Xcode project. We have created it automatically for you.
info Linking assets to android project

error Something went wrong while linking. Error: ENOENT: no such file or directory, copyfile '/front/node_modules/react-native-vector-icons/Fonts/AntDesign.ttf' -> '/front/android/app/src/main/assets/fonts/AntDesign.ttf'
Please file an issue here: https://github.com/react-native-community/react-native-cli/issues
error ENOENT: no such file or directory, copyfile '/front/node_modules/react-native-vector-icons/Fonts/AntDesign.ttf' -> '/front/android/app/src/main/assets/fonts/AntDesign.ttf'

react-native info
  React Native Environment Info:
    System:
      OS: macOS 10.14.1
      CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
      Memory: 159.52 MB / 8.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 11.10.0 - /usr/local/bin/node
      Yarn: 1.13.0 - /usr/local/bin/yarn
      npm: 6.7.0 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
    IDEs:
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.8.3 => 16.8.3
      react-native: 0.59.0 => 0.59.0

Please reinstall react-native package. This was fixed already in a patch release of the CLI

Can you explain why it fails? Do you have a link?

See: https://github.com/react-native-community/react-native-cli/pull/231

repo: react-native-community/react-native-cli


text:
Marker share icon image

Does any other open PR do the same thing?

Looks No.
What issue is this PR fixing?
Android app's memory usage climbs high when there are thousands of markers on the map, even though most of the markers uses same image and the images are only around 1KB.
This update is to use a shared image icon for markers when they share the same image URI, instead of loading and creating bitmap within each marker, which uses more memory in case we have a lot of them.
How did you test this PR?

Ideally you should test it with an app that contains a lot of custom markers that shared a small image pool.
To make it simple, we have also created a new page in example app, named "MassiveCustomMarker", which will place 100 custom markers on tap on the map. You can check it out and run the example app. Open android studio profile and watch the memory usage before and after the update while placing more markers on the map.
As a reference, following is the memory profile before the update, tested on Samsung J2 (Samsung SM-G532G). The app crashed on about 500 markers:

Following is the memory profile after the update, Java memory consumption alomost remains constant regardless of the number of markers added. App does not crash even after 1000 markers.

@zupaox that's awesome ❤
Do we have the same issue on ios?
LGTM @alveig @christopherdro 🐽

@zupaox that's awesome ❤
Do we have the same issue on ios?
LGTM @alveig @christopherdro 🐽

hey rborn,
I think iOS will use cached UIImage (loadImageWithURLRequest, RCImageCache), so it will not have the issue. We don't have iOS app crash reports because of memory issue as well.
I just did a test on simulator, it uses 700MB memory for 10K markers and is quite stable, so should not be an issue.

@alvelig @christopherdro 🐽

authors: rborn zupaox


text:
Modal flashes on iOS while closing

Backdrop will flash in a weird way while closing, after clicking on backdrop.
Platform: iOS
Version: 11.0.1
This is my modal:
			<Modal
				isVisible={this.state.isVisible}
				onBackdropPress={this.toggle}
				backdropOpacity={0.33}
				style={{
					justifyContent: 'flex-end',
					margin: 0,
				}}
				onSwipeComplete={this.toggle}
				swipeDirection="down"
			>

When backdrop is pressed, most of the time (but not always), instead of backdrop's opacity smoothly returns to normal, it will flash (looks like the screen goes to full white).
Note:

This never happens when opening the modal, only closing.
Swiping the modal works fine, only pressing on the backdrop triggers this.
It seems to me flashing consistently happens if I move my finger on backdrop as opposed to just touch it.
hideModalContentWhileAnimating does not help. Note that backdrop flashes, not modal content.

I'm using Expo 32. Happens both in development and production mode.

...This is super visible if I set: backdropTransitionOutTiming={5000}

Weirdly, solved with:
				backdropTransitionOutTiming={0}

as suggested here: https://github.com/react-native-community/react-native-modal/issues/268
What's even more weird is that setting it does not affect animation at all.


text:
declaration of 'RCTConvert' must be imported from module 'React' before it is required

Steps to reproduce

RN share 1.2.1 on React Native 0.59.3, library linked, libRNShare.a in Link Binary with Libraries
Podfile containing following line under Project-tvOSTests

pod 'RNShare', :path => '../node_modules/react-native-share'

Build or Archive in XCode 10.2.1

Expected behaviour
The project should build without any error
Actual behaviour
Approx. 4 out of 5 timese building fails with followig error while compiling WhatsAppShare.m

declaration of 'RCTConvert' must be imported from module 'React' before it is required

node_modules/react-native-share/ios/WhatsAppShare.m:21:27: error: declaration of 'RCTConvert' must be imported from module 'React' before it is required
        NSString *text = [RCTConvert NSString:options[@"message"]];

A random mix of XCode clean build folder, watchman del, and npm --reset-cache makes it work, but I can't determinate the trick.
Environment

React Native version: 0.59.3
React Native platform + platform version: iOS 12.1

react-native-share
npm 1.2.1
Link to repo (highly encouraged)
https://github.com/

you might try using the legacy build system for a "sometimes fails" ios build error.

@mikehardy unfortunately the process isn't stable even under legacy build system. I am inspecting some kind of collision or effect coming from other libraries. Thank you for your answer, I'll keep you guys posted on the issue

I have similar problems and i found out that under product->scheme->manage shemes->targets i have react (missing)

@jliberacki currently testing your solution, thanks. I'll try a few times because of the randomness of the bug, and let you know

This component cannot be used for 0.59.2

With existing minor patch versions up to 0.59.10 I wouldn't stay on 0.59.2 so that doesn't seem like a restriction really?

@jliberacki  Unfortunately your solution doesn't solve the problem. The library keeps building now and then.
@nubwang @mikehardy when the building succeedes everything works just fine under 0.59.3

@grafosecondo you tried with recent versions?

authors: MateusAndrade grafosecondo jliberacki mikehardy nubwang


text:
Could not resolve all dependencies for configuration ':react-native-video:_debugPublishCopy'

Current behavior
I'm trying to run react-native-video but cannot get it to work. Here is the error code is it producing when I try to run it on react native android.
A problem occurred configuring project ':app'.

Could not resolve all dependencies for configuration ':app:_debugApk'.
A problem occurred configuring project ':react-native-video'.
Could not resolve all dependencies for configuration ':react-native-video:_debugPublishCopy'.
Could not find com.android.support:support-annotations:27.0.0.
Searched in the following locations:
file:/C:/Users/Mike/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/support/support-annotations/27.0.0/support-annotations-27.0.0.pom
file:/C:/Users/Mike/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/support/support-annotations/27.0.0/support-annotations-27.0.0.jar
file:/C:/Users/Mike/Dropbox/Programming/Node/CharacterCodeApp/CharacterCode/android/sdk-manager/com/android/support/support-annotations/27.0.0/support-annotations-27.0.0.jar
Required by:
CharacterCode:react-native-video:unspecified > com.google.android.exoplayer:extension-okhttp:2.7.3
CharacterCode:react-native-video:unspecified > com.google.android.exoplayer:exoplayer:2.7.3 > com.google.android.exoplayer:exoplayer-core:2.7.3
CharacterCode:react-native-video:unspecified > com.google.android.exoplayer:exoplayer:2.7.3 > com.google.android.exoplayer:exoplayer-dash:2.7.3
CharacterCode:react-native-video:unspecified > com.google.android.exoplayer:exoplayer:2.7.3 > com.google.android.exoplayer:exoplayer-hls:2.7.3
CharacterCode:react-native-video:unspecified > com.google.android.exoplayer:exoplayer:2.7.3 > com.google.android.exoplayer:exoplayer-smoothstreaming:2.7.3
CharacterCode:react-native-video:unspecified > com.google.android.exoplayer:exoplayer:2.7.3 > com.google.android.exoplayer:exoplayer-ui:2.7.3

My gradle file is as follows:
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
    applicationId "com.charactercode"
    minSdkVersion 16
    targetSdkVersion 26
    versionCode 1
    versionName "1.0"
    ndk {
        abiFilters "armeabi-v7a", "x86"
    }
}
splits {
    abi {
        reset()
        enable enableSeparateBuildPerCPUArchitecture
        universalApk false  // If true, also generate a universal APK
        include "armeabi-v7a", "x86"
    }
}
buildTypes {
    release {
        minifyEnabled enableProguardInReleaseBuilds
        proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
    }
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
    variant.outputs.each { output ->
        // For each separate APK per architecture, set a unique version code as described here:
        // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
        def versionCodes = ["armeabi-v7a":1, "x86":2]
        def abi = output.getFilter(OutputFile.ABI)
        if (abi != null) {  // null for the universal-debug, universal-release variants
            output.versionCodeOverride =
                    versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
        }
    }
}

}
dependencies {
compile project(':react-native-video')
compile project(':react-native-vector-icons')
compile project(':react-native-material-kit')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+"  // From node_modules
}
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
Reproduction steps
A 1, 2, 3, etc. list of what's needed to see the issue happen.
Expected behavior
Describe what you wanted to happen
Platform
I am using api 26 and  and have just updated the android emulator and studio software. I've tried to reinstall the support repository, and have tried to follow the advice to add the Maven code to my gradle file. Although my gradle file seems to be quite different than those previously indicated.
Video sample
If possible, include a link to the video that has the problem that can be streamed or downloaded from.

I'm such a fool, I was looking in the wrong folder at the android/app/build.gradle
I should have added the
maven {
url 'https://maven.google.com'
}
to the android/build.gradle file instead.  Seems to be working now.


text:
IOS how can continue to play audio mp3 in the lock screen?

I set the following：
<Video
              source={{uri: "https://jnexpert-oss1.oss-cn-beijing.aliyuncs.com/upload/wx_class_voice/132/1480910856819590.mp3"}}
              playInBackground={ true }
              playWhenInactive={ true }
              paused={ this.state.paused }
              onProgress={ this.onProgress.bind(this) }
              onLoad={ this.onLoad.bind(this) }
              ref={(ref) => {
                this.player = ref
              }}
              onEnd={ this.onEnd.bind(this) }
          ></Video>

issue：
In the android, it is in the lock screen can continue to play mp3
but in the ios, the simulator can continue to play in the lock screen state
when ios real machine test, it can continue to play, this should be how to solve . Thank you
Device: iPhone 5s (iOS 10.2)
RN: 0.37.0
RN-Video: master
OS: MacOS

https://www.npmjs.com/package/react-native-audio-streaming

authors: jhabdas luojinghui


text:
Update MenuViewManager.mm

Fixes #751

any idea when we can expect a release? 🙌🏾

@JClackett released in v1.0.2 🚀

Hmm yeah I've been trying this but still getting this in 1.0.2:
❌  (../../node_modules/@react-native-menu/menu/ios/MenuViewManager.mm:10:9)

   8 | #else
   9 | // OLD ARCH
> 10 | #import <react_native_menu/react_native_menu-Swift.h>
     |         ^ 'react_native_menu/react_native_menu-Swift.h' file not found
  11 | #endif
  12 |
  13 | @interface MenuViewManager : RCTViewManager

Same issue here still.

It is a bit odd that although this fixed my iOS build issues, the react_native_menu-Swift.h file doesn't seem to exist anywhere, regardless of the path.

Still exists for me

@JuanRdBO seems to be fixed in 1.0.3

@JuanRdBO seems to be fixed in 1.0.3

Sadly this still happens to me on 1.0.3 :-/

Yup

1.0.2 included this fix and 1.0.3 went back to
#import <react_native_menu-Swift.h>

But the convention is <ProductName/ProductModuleName-Swift.h> which should be:
#import <react_native_menu/react_native_menu-Swift.h>

Could you confirm this works and it would then be good to revert the change @svbutko

@JustJoostNL @JuanRdBO Does it work if you downgrade to 1.0.2, pod install and build?

@JustJoostNL @JuanRdBO Does it work if you downgrade to 1.0.2, pod install and build?

It works with 1.0.2! Why do you think it wouldn't work on the latest version?

1.0.3 is working now

@svbutko I was expecting the import to only be executed in the old arch?
#ifdef RCT_NEW_ARCH_ENABLED
// NEW ARCH
#import "MenuView.h"
#else
// OLD ARCH
#import <react_native_menu-Swift.h>
#endif

authors: Gregoirevda JClackett JuanRdBO JustJoostNL Naturalclar swrobel

repo: react-native-menu/menu


text:
[question] Get heading compass

Anyone know how to get the heading compass ?
I try a lot of code to convert accelerometer, but nothing work for the moment.
Any idea on that would be very appreciated.
Thanks !

Can you maybe explain a bit what you mean by heading compass? What are you exactly trying to achieve?

Try to get the true nord.
Magnetometer doesn't return any value
Found this lib https://github.com/yonahforst/react-native-heading but maybe react-native-sensor can do the job ?

Try this - https://github.com/vnil/react-native-simple-compass

That seems pretty nice, maybe we could use it here and move it into the rxjs structure 🤔

There's a file in the source code called magnetometer. Is that supporting the Magnetic Field Sensor (i.e.) the compass? Is it working or is it just in preparation?
And is this thread which was marked as a feature request and moved by "main" to done 14 hours ago, actually done?  If so, is there documentation for how to use it?

I am super unsure what Magnetometer actually means, could be that we already support compass usage, I have just never had a use-case for it. @NoaneDan should no more, he added it in #62.
The automation moves the tickets automatically when they are closed to done 🤷♂

@pashute The magnetometer is functional an is working exactly like the accelerometer and gyroscope.  The sensor reads the ambient geomagnetic field on axes x, y, z. The values are in microtesla and they give you the device's orientation relative to Earth's magnetic field.

Thank you for taking the time to clairify @NoaneDan 👍

And how do you calibrate the compass if needed, or is that something
outside the access to the sensor itself?
On 4 May 2018 at 10:55, Daniel Schmidt notifications@github.com wrote:

Thank you for taking the time to clairify @NoaneDan
https://github.com/NoaneDan 👍
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/react-native-sensors/react-native-sensors/issues/11#issuecomment-386529806,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABsSM8ytsax0aBqBE-qZUmvquUVFltzTks5tvAmCgaJpZM4M0zeM
.

This is something more appropriate for your need:
https://github.com/firofame/react-native-compass-heading

authors: Chathu94 DanielMSchmidt NoaneDan firofame pashute stephanedemotte


text:
No ServiceWorker management in Webview on IOS 12+

Bug description:
I have an application built with Expo which needs to use serviceWorker within Webviews.
I used to handle this with basic Webviews from React Native which had the possibility to specify usage of WKWebview or UIWebview.
By default on IOS, UIWebview was used and serviceWorker worked well since IOS 11.3 or 11.4
I upgraded Expo and React Native versions until I had to migrate to react-native-webview.
Since I did, serviceWorker stopped working on IOS 12+.
It appears that in the navigator spawned by react-native-webview, navigator.serviceWorker is undefined.
I found a pretty old post on Webkit site (with an update) specifying that:

Update: A previous version of this post stated the Service Worker API is available in all applications using WKWebView. At this time it is only available in Safari, applications that use SFSafariViewController, and web applications saved to your home screen.

does react-native-webview use SFSafariViewController or something else ?
if it's not already there, will react-native-webview provide a way to use ServiceWorker in an IOS app ?
Am I missing something ?

To Reproduce:

Start an Expo Project with react-native-webview deps
Add a Webview component opening this URL https://jakearchibald.github.io/isserviceworkerready/
Launch your app in an IOS Simulator
In your app, scroll to navigator.serviceWorker and click on "Test" link
You'll be redirect to a test page with this following result meaning that serviceWorker is not defined :
navigator.serviceWorker,

Expected behavior:
Having ServiceWorker working in Webviews within IOS app.
Following steps, having this as result :
 navigator.serviceWorker, [object ServiceWorkerContainer]
Environment:

OS: IOS
OS version: 12+ (probably 11.4+, 12 and 13 tested)
react-native version: 0.59+
react-native-webview version: 7.0.5, 7.4.3 (installed with expo command on sdk 35 and 36), 8.0.1

@MonsieurBuffle this module uses WKWebView for iOS, I do not believe it is possible to use service works with it.

@safaiyeh Maybe you know why it's not possible to make it work ?
Sorry I'm trying to understand :)
The waiting for the support of ServiceWorker for iOS(11.3) was long and finally it came through. I mean, a lot of people were waiting for it and I think this is somehow an important feature.
Do you know if there is a way that ServiceWorker will work in the future with react-native-webview ?

Any updates on this?

Any update on service worker?

Still not working 2021. :)

Apparently, Apple has decided that little people don't get service workers; you need the com.apple.developer.WebKit.ServiceWorkers entitlement -- which is only usable locally because they won't let anything with it into the app store -- or the com.apple.developer.web-browser entitlement, which is for people designing apps intended to be replacement default web browsers, and which has other baggage attached like not being able to use Universal Links.

It's possible with App-Bound Domains & limitsNavigationsToAppBoundDomains = true

authors: GuySerfaty MonsieurBuffle Stevemoretz edsonayllon mrnerdhair safaiyeh somasekharkakarla


text:
怎么添加android webview的双向认证？

Is your feature request related to a problem? If so, Please describe.

Describe the solutions you came up with

Additional context

Issue has no content. Please fill in template.


text:
Tooltip doesn't work with Link component

I can get the tooltip from examples working fine, but not when trying to decorate a Link component.
Perhaps it's similar to this previous issue:
https://github.com/react-toolbox/react-toolbox/issues/214
?

Yep, that's the same problem. Easy to fix. Would you want to open a PR? :)

I opened one, please check:
https://github.com/react-toolbox/react-toolbox/pull/245

Merged! Thanks @karlmacklin

authors: javivelasco karlmacklin

repo: react-toolbox/react-toolbox


text:
v8 - Major changes and versioning decisions

Planned changelog:
v8.0.0

FUTURE BREAKING CHANGES - PLEASE READ

- Decided that future minor version releases may contain breaking changes introduced by a dependency.  Please review your pinning strategy when upgrading.

Changed

- Upgraded Helm to version 2.13.0 (breaking)
- Upgraded Kubectl to version 1.12.6 (potentially breaking if you are on an old kubernetes version)
- Upgraded Sops to version 3.2.0
- Removed the ability to `pip install` and removed npm publish - Please use ci-images from now on.
- Added a CONTRIBUTING doc

Also Fixes #225 and fixes #226

These changes look great! I think it would be good to update these references to ci-images v7 to v8 as well, but that doesn't have to be part of this specific PR.

I went ahead and fixed them.


text:
Update composition-vs-inheritance.md

I close this PR due to this file path does not exist in new website.

I close this PR due to this file path does not exist in new website.


text:
Translation of the "AJAX and APIs" page

#1

cc: @cezaraugusto @WendellAdriel can see this PR?! For me looks good to me! :)

@glaucia86 I updated with changes to standardize the translation of the word call. It's fine?

@glaucia86 @cezaraugusto @lazaroalvarenga
I really think that we shouldn't translate code blocks, I put that as the first item on #4

@glaucia86 @cezaraugusto @lazaroalvarenga
I really think that we shouldn't translate code blocks, I put that as the first item on #4

ok! Sorry for that. I'll unmake the code blocks translation.

@lazaroalvarenga todos os acertos que vc for fazendo de acordo com review marque como 'Resolve Conversation' ;)

cc: @cezaraugusto @lazaroalvarenga already did the changes here. I think that we can approve his request. What do u think?

authors: WendellAdriel glaucia86 lazaroalvarenga


text:
Act on actions inside a component.

Hello,
I am creating an app which is based on canvas. I am using react-redux. I have some color pickers, text size components, etc. What I want to achieve is; e.g. user changes the color in the picker an action fires which updates the UI and also the canvas component can listen to it and act accordingly. I don't want to pass handlers explicitly to the canvas component, that would be messy. I am really confused how to handle this situation in a neat way.

Please see https://github.com/reactjs/react-redux/issues/251 and the issues linked from there. If you have a component that cares about specific actions and can’t derive the UI from the current state, your best bet is a custom middleware that emits all actions to some kind of global pubsub system. We don’t provide this but it should be possible to create with an event emitter. If you have issues with this please create a question on StackOverflow with the code that you tried, leave a link here, and I’ll try my best to reply.

authors: gaearon mahadazad

repo: reactjs/react-redux


text:
Add back basename support in match()

Fixes #3003
Looks like we broke this inadvertently back in #2743. Specifically, we did so here: https://github.com/rackt/react-router/pull/2743#discussion_r48084686
Users should use a custom history from now on, but this maintains BC with 1.0.

I tried to get this working in my example repo https://github.com/wordofchristian/react-router-error-demo, it seems to be broken for a different reason. The match does not seem to match at all when using the url with the basename.  I've tried a few different configuration approaches but haven't been able to get it to work. Perhaps we need an official example on how to do server side rendering with a basename.

I'm facing the same problem and would be very interested in getting an example on how to use basename with server side rendering.

authors: bastien03 timdorr wordofchristian

repo: reactjs/react-router


text:
Store Issue in Popup

const store = createStore(reducer, devToolsEnhancer());
window.store = store;

render(
  <Provider store={window.opener == null ? store : window.opener.store}>
      <App />
  </Provider>,
  document.getElementById('root')
)

I like to send store from Opener to Popup inorder to keep single Store
This works well in Chrome unfortunately in IE11. I'm having an issue
SCRIPT5002: Function.prototype.toString: 'this' is not a Function object
This issue is happening in Dispatch->PeformAction->IsPlainObject.

Please don't open duplicate issues.

repo: reactjs/redux


text:
Scalameter 0.8 SNAPSHOT

Can you ensure scalameter 0.8 SNAPSHOT is published or depend on 0.7

Realised though they are not on Central they can be found in Sonatype

Indeed they can. However, the stable version should not depend on any snapshots, and this particular dependency should only exist for tests. I will publish a new major version.

Note: the 0.6.1 version should have the correct dependencies, and not depend on ScalaMeter snapshot in the main configuration.

repo: reactors-io/reactors


text:
[RFC] Remove all callable type hints for consistency and performance reasons

I'm filing this PR as an RFC to see if it makes sense to drop these type hints.

I've seen a 5% to 10% performance improvement running any of the benchmarks from the examples/folder and have also seen some similar performance improvements in running some higher level applications (I/O intensive) with this applied.
Note that I'm not suggesting we remove all type hints. This PR merely aims to remove the callable type hint only – also for consistency reasons with the whole API. Also note that this does not contradict our efforts to eventually update to PHP 7 only (https://github.com/reactphp/react/issues/374), in which case we will likely reconsider adding consistent type hints for all relevant APIs.

I can't reproduce any improvements in examples/94-benchmark-timers-delay.php either. Which benchmark specifically did you run and which numbers did you get?

authors: clue kelunik

repo: reactphp/event-loop


text:
JSX equivalent?

From @drewda on February 26, 2015 17:39
Any plans for including a markup DSL like JSX?
To give this a Ruby flavor, maybe let users embed Haml or Slim markup?
Copied from original issue: zetachang/react.rb#8

From @zetachang on February 26, 2015 18:46
Since the reason why JSX exist is that Javascript is not expressive enough to make building DOM hierarchy easily (all the React.createElement noises)
But in Ruby this would not be a problem. That's why a element building DSL could be easily designed. And if your goal is to separate render method into another file, this will against the React.js philosophy to encapsulate UI into component rather than view.
Hope this will clarify :smile:

From @mbajur on February 26, 2015 18:5
Oh yes, using custom markup engine would take render method to the next level! I actually think that if such thing would be available, it would be much more comfortable to use react as react.rb than a vanilla / coffee equivalent (cause i really hate the way my render method looks right now).
+10000

From @zetachang on February 26, 2015 18:37
Hi, thank you guys for your interest on this project. Currently we support an element building DSL as a replacement of JSX (see below)
def render
  div do
    h1 { "Title" }
    h2 { "subtitle"}
    div { span { "some text #{interpolation}"} }
    present FancyElement
  end
end

Is this something you guys want?

From @vais on March 1, 2015 15:28
This is a matter of taste (and maybe my background), but this:
def render
  div do
    h1 { "Title" }
  end
end

looks more readable to me than this:
def render
  present <<-HTML

%{title}

  HTML
end

@zetachang for what's it worth, I think you are on the right track with the Ruby DSL vs HTML. :+1:

From @Bertg on March 1, 2015 14:37
Hi would it be possible to do something like this?
def render
  present <<-HTML

#{title}

  HTML
end

def render
  present <<-HTML

%{title}

  HTML
end

I don't know enough about the react/opal internals to know if this is doable. However I do think this could be more "readable" for a developer.

From @Bertg on March 2, 2015 10:37
@vais I guess it depends on ones background.
I'm actually more interested if it would be possible to do it like that.
I see that the JSX translates the "HTML" part to individual node creation calls, I guess that the overhead of parsing the HTML at runtime would be deadly to performance.
So the only way would be for OPAL to understand that the <<-HTML section should be transpired to react specific code, which I don't see happening.
Maybe something like this would be possible instead:
def render
  present <<-HTML.react_jsx

%{title}

  HTML
end

But that starts to become less clean.

From @zetachang on March 3, 2015 1:5
Just came up with some approach to avoid modifying the compiler:
def render
  %x{

#{title}

  }
end

This would get compiled to JS, by feeding this to a JSX transpiler, we would get valid JS as result. But still some issues needed to be addressed.

Does Opal support chaining preprocessing with file extension like .js.es6.opal ?
React.create_element need to be modified to make JSX work (component class should be exposed in the render method, etc)

Above is the easy way, the hard way may be rolling out our own transpiler which compile HTML markup inside your code to valid Ruby code (just as JSX did). Which will allow you to write,
def render

#{title}

end

From @elia on March 3, 2015 23:25
It should work chaining with the react compiler, not sure about es6.
Also i suggest to use .rb instead of .opal.

From @zetachang on March 8, 2015 9:30
@elia ,thanks, it's great that Opal plays well with Sprockets,which makes life easier to support another transformer.
https://github.com/zetachang/react.rb/pull/11 is proposed to have basic support of JSX in Opal's x-interpolation.  An example is also added to demonstrate more details.

From @zetachang on March 29, 2015 12:36
It's released in latest 0.1.0. Feel free to reopen it if you got any other concerns or suggestion. :wink:

repo: reactrb/reactrb


text:
Navigation tree view ul container with div descendants instead of li list items

Related issue: https://github.com/readium/readium-desktop/issues/671

Related issue: https://github.com/readium/readium-desktop/issues/676

The divs should be embedded inside their logical parent lis.

repo: readium/readium-desktop


text:
manage pid and log files

the role does not have the following variables, kibana_pid_file, kibana_pid_dir, kibana_log_dir, and kibana_log_file.
similar to https://github.com/reallyenglish/ansible-role-fluentd/issues/38

as for PID file and directory, it is not a good idea to rely on PID file. using regex in process table is better.

repo: reallyenglish/ansible-role-kibana

license: ISC


text:
Refr: Message area code can be refactored

The message area is the section that shows users whose turn to play or if one clicked the right pit. Review this section to optimize the logic or style.
Pull from develop branch and submit a PR

https://github.com/realm-of-ra/mancala/blob/976e237378cd09a837ce80cac3e2cd26f56d939b/client/src/pages/games/Gameplay.tsx#L499
The source is here

I can work on this.
On Mon, 10 Jun 2024, 01:00 Xpan Victor, @.***> wrote:

https://github.com/realm-of-ra/mancala/blob/976e237378cd09a837ce80cac3e2cd26f56d939b/client/src/pages/games/Gameplay.tsx#L499
The source is here, can start here
—
Reply to this email directly, view it on GitHub
https://github.com/realm-of-ra/mancala/issues/73#issuecomment-2156909578,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AKOUVHK7HQUJ3EOLMF3YPHDZGTUDLAVCNFSM6AAAAABJBJDITGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJWHEYDSNJXHA
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

@all-contributors please add @xpanvictor for code.

authors: fishonamos okhaimie-dev xpanvictor

repo: realm-of-ra/mancala


text:
Is there a way to compress encrypted realm file?

hi, i am using "realm.writeCopyToPath(  path, encryptionKey: getKey())" to create a encryption file, but if i zip it, the size didnot become smaller: 94.9M-->94.2M;  the realm without encryption can zip to:  94.9M-->30M. is there a way i can resize the encryption file? thanks.

Your only option is to compress before encrypting.
Encryption turns your data into high-entropy data, usually indistinguishable from a random stream. Compression relies on patterns in order to gain any size reduction. Since encryption destroys such patterns, the compression algorithm is unable to give you much reduction in size if you apply it to encrypted data.

thanks，@mrackwitz。
I,have already compressed the file before encrypting. i think the only way is,to encrypt on the app's first run, fetching realm file without encryption from a zip with password. when finish,delete the zip file and the temp realm file. but there is still some risk before deleting the temp realm file. the data is not safe until the encryption finished.
is there some tip to solve this issue? thanks

What's your whole use case for that? What do you want to achieve?

i want to release an app with some initialized data in realm, the data is about 100M, with realm in zip it is 30M, with  encryption  realm it is more than 90M, too big.
I want to keep realm file on iphone encrypted, so i have to pack an realm unencrypted, and encrypt it when user run the app(use "writeCopyToPath",to create a new realm), and i have to keep the data safe In the process( encryption will take 2 minute)。
so in this 2 minute, i haven't found a way to keep data safe.

and I thought about pack the app with json data, but the migration to realm will take much more time.

As you would bundle static encrypted(?) data into your app, the two minutes, where the data is accessible in plain text on disk seem negotiable from my perspective, as the weakest link in the chain is that you need access to the symmetric encryption key locally which is inherently unsafe. So a potential attacker could instead of trying to get access to the plain data on disk at a specific moment in time, extract the key - which you can harden by obfuscation, but not prevent - and use it to decrypt the bundled zip. Both scenarios are subject to matter only on jailbroken devices, where FairPlay won't protect you.

repo: realm/realm-cocoa


text:
Document how to avoid eager Realm access

A common problem users hit is that properties on their Swift classes with default values (e.g. let persons = try! Realm().objects(Person)) which then get evaluated before applicationDidFinishLaunching and therefore prior to a migration block being set on the Realm.Configuration.

We've updated the docs to clarify this: https://realm.io/docs/swift


text:
Need to re-authenticate after migrating 2.x -> 3.x (ROS 1.x -> 2.x)

Goals
Check status of SyncUser.current to determine whether re-authentication is needed, or throw a SyncAuthError.
Expected Results

ROS 1 to 2 migration means client will need to log in again. After updating a 2.x client to 3.x, either SyncUser.current?.state != .active, or SyncManager.shared.errorHandler should be executed.
Actual Results
After updating a 2.x client to 3.x, SyncUser.current?.state == .active, and no SyncAuthError is thrown.
Steps to Reproduce

Update a client using RealmSwift 2.x to 3.x. Include the code below in the app delegate of the client using 3.x, then attempt to Realm.openAsync with current user.
Code Sample
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        ...
        assert(SyncUser.current?.state != .active)
        ...

        SyncManager.shared.errorHandler = { error, session in
            print("error=\(error), session=\(String(describing: session))") // never executed
        }
        ...
        return true
    }

Version of Realm and Tooling

Realm framework version: Swift 3.0.2
Realm Object Server version: 2.0.23
Xcode version: 9.2
iOS/OSX version: iOS 11.2
Dependency manager + version: Carthage 0.26.2

This may be related to #5188

I believe we fixed this in a later sync release - closing

authors: ianpward raudabaugh


text:
Add support for remaining session API

This adds support for connection state change notifications on the sync session and extends the session user test.
Fixes https://github.com/realm/realm-dart/issues/596
Fixes https://github.com/realm/realm-dart/issues/595

The test failures all seem to be related to https://github.com/realm/realm-dart/pull/639, so I'll merge this as is and hope failures will be fixed by the http trampoline PR.

repo: realm/realm-dart


text:
Investigate Ktor setup

Looking into some failing unit tests in https://github.com/realm/realm-kotlin/pull/759 I'm noticing something strange.
Depending on whether or not logging is set to WARN or ALL, some network requests will randomly fail. This looks like some Ktor setup issue similar to what we previously saw by selecting the wrong HttpEngine.
Right now I can reproduce the following sequence of events on Android:

Run only retryCustomConfirmation() and registerUser(). RegisterUser will always fail trying to register the user.
If you change the log level from WARN to ALL, the tests will now succeed.

Unclear if there is any connection to https://github.com/realm/realm-kotlin/issues/480

Looks like a duplicate of https://github.com/realm/realm-kotlin/issues/519

repo: realm/realm-kotlin


text:
关于积分统计的建议

希望积分统计里的项目可以增加时间显示，比如出售的某主题是几月几日几时几分出售的

4bf7887

辛苦佬了


text:
Check the labels during parsing

The idea is to untangle the label processing (construction, checking, getters), and make the check during parsing. The whole code looks more sane.
One of the test now fails: test/bin/mdx-test/expect/labels/test-case.md as the error is now showed in stderr instead of copied in the block. (previously it resluted as an Error block, but it can't be the case anymore as it would require to keep the erroneous values of the labels attached to this block, and it's not possible with the now typed labels). Are you okay with this new behavior?

I suspect that this is just an intermediate step before some further improvements on Block. If that's the case then don't put too much effort into fixing my comments there.

Indeed it is, as I think the checking of labels can be done independently from the rest of block data, and it makes a smaller PR, but I will try to address all of your comments.

@NathanReb do you want to review one more time or is it good to go?

It looks much better with the regexp!
I have a few minor comments but then it's good to go!

I think I addressed everything

repo: realworldocaml/mdx


text:
XBYA: button position rather than name

See http://hpics.li/76dc755

Seems good for me.
@rockaddicted ?

For me too

repo: recalbox/recalbox-emulationstation


text:
How to use the AddMLine?

I know how to use the AddLine or the AddCircle. But i don't find the answer.Could someone tell me?

from pyautocad import Autocad
import array

acad = Autocad(create_if_not_exists=True)

points_3d = [0, 0, 0, 1, 1, 0, 2, 1, 0]
points_double = array.array("d", points_3d)
mline = acad.model.AddMLine(points_double)

mline.MLineScale = 1

repo: reclosedev/pyautocad


text:
Add Profile: vkprogrammer-001

A pull request should be created from this issue if not kindly ping @dinxsh ⚠

@all-contributors please add @vkprogrammer-001 for review

@vansh-codes can you help me with this, its not automatically raising PR anymore

repo: recodehive/awesome-github-profiles


text:
Making saveSelected() also work for new annotations

I'm trying to add keyboard shortcuts to my widget, by mapping the rumber row on the keyboard to a set of pre-defined buttons which represent classes. The desired behavior is to have these shortcuts both set the class and save the annotation which is currently being created, but I can't find a way to do it reliably.
saveSelected only seems to work when editing an already existing annotation, and I can't click the OK button trough the DOM, because a new version of the widget with the annotation class correctly set has not been rendered yet, making the OK button just close the widget.
I suggest making saveSelected work in those cases when the actual annotation hasn't been saved yet, but I'm open to any workarounds.

Are you using this in headless mode?

No, I'm using it with the editor enabled.

Added this to OpenSeadragon version, too: https://github.com/recogito/annotorious-openseadragon/commit/4bb7ff2551c241fdf2685dd6c96bee080011dddc

repo: recogito/annotorious


text:
Remove "Validate" button for TextClassification in bulk actions

I think this button does nothing for TextClassification, right? @frascuchon @leiyre

You can select multiple records and validate predictions. I don't know what kind of use cases are covered by this feature, but it exists

ah, right. Maybe we could add tool tips that explain in a bit more detail what each button does, or rename the button to "Validate predictions".

authors: dcfidalgo frascuchon

repo: recognai/rubrix


text:
Add custom behaviour to DataModelUtils.saveModel

Hello,
using the saveModel method of the DataModelUtils it is not possible to specify a field delimiter that is used to write the lines on the file.
In order to be consistent with the loading procedure (implemented by SimpleParser), the method that can be used to save the model should allow users to specify the field delimiter. Do you think that it is an appropriate request?
P.S.
Why do you insert a "-1" as an additional column? Is it required?
Best,
Alessandro

Good point!
DMU should receive a field delimiter in both methods.
The "-1" is added to have the same field generated with a DataModel or a TemporalDataModel.
Best,
Alejandro

I have implemented a fix for this issue in my fork. Here there is the related commit: https://github.com/aleSuglia/rival/commit/e9f996f1aedd252f0bbdc2d7ae4bdc5bb328d9ee

@aleSuglia perfect! Please do a pull request an we'll merge it.

authors: abellogin alansaid aleSuglia

repo: recommenders/rival


text:
rados restructure singleton for downstream - dump-stuck

Signed-off-by: Rachanaben Patel racpatel@redhat.com

http://pulpito.ceph.redhat.com/racpatel-2020-05-19_00:39:18-rados:downstream:singleton-nautilus-distro-basic-argo/

repo: red-hat-storage/ceph


text:
Add more tests to increase coverage for controller code

@rexagod @naveenpaul1 I have added few more test case scenarios in this patch.
Latest coverage shows 65.3 from 59%
Please review and provide your comments.

/test all

65.5% coverage 🎉

/test all

/test all

@aspandey You can check for any lint errors on your local using the same target: make lint.

@aspandey Just an FYI, you can check for any lint errors on your local as well by using the same target: make lint.

Thanks Pranshu. This time I have made sure that there are no lint error as per "make lint". Lets see if we have any other issue.

@rexagod , why am I not able to run tests using "/test all"?
I got this message " Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message."
but we should be able to run these tests at least.

@aspandey Can you try doing /test all once more? I just want to make sure this is the case before I ping Ohad.

/test all

@rexagod same message again..

Ack.

/test all

@rexagod Do I need to do anything else on this ? Or it is ready to be merged?

@aspandey PTAL https://github.com/red-hat-storage/mcg-osd-deployer/pull/31#discussion_r874739936

@rexagod do you think this patch is in good shape and we can merge it now?

@naveenpaul1 Is it +1 from your side :)

/test all

authors: aspandey rexagod

repo: red-hat-storage/mcg-osd-deployer


text:
Implement reconciliation for ManagedCluster and create ManagedClusterView

Added reconciliation logic for ManagedCluster
Added tests for ManagedClusterReconciler reconciliation logic and ensure ManagedClusterViews function.
Reconciliation for ManagedCluster creates ManagedClusterView which pulls the ‘odf-info’ configmap onto the hub.
Updated RBAC rules in config/rbac/role.yaml to include permissions for ManagedClusterView resources. (ManagedCluster RBAC already there)
Plumbing to make the controllers work like the items above
Updated go.mod and go.sum to include github.com/stolostron/multicloud-operators-foundation.

/test integration-test

Added initialization for ManagedClusterViewReconciler in manager.go to setup the ManagedClusterView controller.
Creates or updates configMap odf-client-info which maps client to it provider cluster
Created comprehensive unit tests to cover the creation and update scenarios of the ConfigMap.

/test unit-test

/test unit-test

/test integration-test

/lgtm

Isn't it conceptually incorrect to call it client-info ConfigMap ?? There can be non-Provider deployments as well (eg: normal internal, external), this flow will remain same for that.
Same is true for the entity which will consume this ConfigMap (say console), used while creating a DRPolicy, which is unrelated to just Provider-Client. Am I missing anything ??

 or purpose of this ConfigMap is to only be used by Provider-Client cases ?? in which case I don't think it is very useful for console.

Let me know if this ConfigMap is only for Provider-Client use case and not for other deployments. Because it make sense if so, but I am not sure why to make it so specific.

@SanjalKatiyar
For the above queries, the purpose of the current configmap was to serve as a quick everse lookup for clients for provider consumer scenarios. The current configmap could not be used due to the way data is structured, there will be lot of redundant data.  We will add and extend the design later releases to add to the same or a different configmap for non provider mode deployments
For now, UI may need to consume MCV's created by MCO directly.

@SanjalKatiyar For the above queries, the purpose of the current configmap was to serve as a quick everse lookup for clients for provider consumer scenarios. The current configmap could not be used due to the way data is structured, there will be lot of redundant data. We will add and extend the design later releases to add to the same or a different configmap for non provider mode deployments
For now, UI may need to consume MCV's created by MCO directly.

Thanks for the confirmation (that was my guess too). But, is Provider specific current ConfigMap needed by any operator ?? I mean why are we creating it at all ?? and if we are then we should have created it for all use cases instead of specific case, it's just a re-arrangement of data.
Keeping key as clusterName/storageClusterName/storageClusterNamespace should have reduced the current redundancy as well IIUC.
But anyway, this is just a question. My main concern has already been answered. Console will rely on MCV, instead of the ConfigMap.

This won't function as reverse lookup for client information as we may need to look through all keys. Your concern is valid though, we will work upon the design to cover all scenarios.

authors: rewantsoni vbnrh


text:
[WIP] Swift 3 Compatibility

:tophat: What? Why?
Swift 3 Compatibility. Will merge when Swift 3 is out of beta
:ghost: GIF

Looks travis is using Xcode8b4 and you compiled against a different one?

Yep, of course. As it is a WIP PR, I'll leave Travis as it is, knowing that it is going to fail. Whenever we reach a stable Swift 3, this PR is not going to be merged until Travis passes ☺
The idea of this PR is to give RRC users the visibility that we are working on adapting it to Swift 3

👌
On Thu, 25 Aug 2016 at 12:33, Pol Quintana notifications@github.com wrote:

Yep, of course. As it is a WIP PR, I'll leave Travis as it is, knowing
that it is going to fail. Whenever we reach a stable Swift 3, this PR is
not going to be merged until Travis passes ☺
The idea of this PR is to give RRC users the visibility that we are
working on adapting it to Swift 3
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/redbooth/RealmResultsController/pull/82#issuecomment-242344388,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAMemzVaq4XJi4q6XxMY6Vw1yXJ1qxwdks5qjW-UgaJpZM4JsJ3y
.

authors: fegabe poolqf

repo: redbooth/RealmResultsController


text:
어느순간 set 설정시 무한루프로 죽어버림

음 언제일까..다른창 왔다갔다 하다가 그런거 같은데..암튼 무한루프를 도는지 먹통이 되어버림

어..죽은게 아니었음. 정확하게는 apply를 눌렀을때 먹통이다가
다른 창에 갔다가 다시 오면 반영됨

음이건 division이 겁나많을떄 느려서 그런듯하네요...
루프부분 개선을 하것어요...
그냥 map돌고있는부분만 풀어도 개선될듯

흠 상태업데이트 문제인데 고민좀해볼꼐요

코드하이라이터가 제일 큰문제였고...
제거하고 많이 개선되었으나..
개별 코드 뽑아내는 루프부분도 정리좀 하면 더좋아질듯요

컬러레이어가 많아 짐에 따라

이걸 그리리는 비용도 증가...
스크롤 위치에 따라.... 적절갯수만 그리는식으로 변경해야함

처리완

authors: hikaMaeng redcamel

repo: redcamel/RedGradient


text:
Add Config to RecordFactory

This adds a Config class to RecordFactory and uses it for the
record factories default args and a factories lookup. This is part
of the effort to update MR factories to support better
configuration and allow specifying the factory that an association
should use. This sets up configuring association factories on a
record factory and having it and any stacks it creates use the
configured factories.
This adds a Config class that takes a record class and handles
building the default args for the record class. This optimizes
some logic that the factory previously used to handle. The factory
would previously build a hash of args based on a records columns
everytime it generated a record. This is unecessary overhead since
a records columns typically don't change as a test suite runs (in
the case they do change a new factory should be built). The
factory would then apply column arg defaults, then apply any user
defined default args and finally apply any passed args. Now the
Config builds column default args once and when it a factory
goes to apply the configured default args the config merges the
column default args with the user default args and only applys
them. This means we don't rebuild column default args for every
record generated and only have to apply one set of default args.
The Config class also contains a factories hash that for now
only lazily builds record factories as they are requested. In a
future effort the Config class will allow updating this hash
with user configured factories. This should also be a slight
performance improvement because as a test suite is run the
factories hash should fill up with all the factories ever needed
to build a record (especially from a stack) and new factories
won't have to be built to generate new stack records.
Next, this updates the RecordStack class to expect a factory
config when it is built and use it whenever it builds records.
This doesn't change any current functionality but once a user
can configure the factories hash stacks will automatically start
using the configured factories.
Finally, this temporarily updates the ModelStack to build a
record factory config so it can build a RecordStack. This will
be changed in an upcoming effort once model factories and stacks
have their own Config classes.
@kellyredding - Ready for review.

@kellyredding - Forgot to mention that once I got this running on our large apps test suite it ran about 19s faster for me. This was just one run so it could have been optimal but I think thats significant enough to show this is a performance improvement.

@jcredding I'm good with this 👎

authors: jcredding kellyredding

repo: redding/mr


text:
Add percentage config helper and fix docs

This closes #78 and fixes a small documentation thing I noticed.
:eyeglasses: @ckwang8128 @krishnan-chandra

:fish:

repo: reddit/baseplate


text:
Unhandled exception on calling .cancelAIGenerate() during an .onChatCompletionSSE

While I'm listening for the data on the .onChatCompletionSSE method and making a call to .cancelAIGenerate() I get an exception with the stack:
[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: type 'HttpException' is not a subtype of type 'DioError' in type cast
#0      OpenAIClient.sse..                          openai_client.dart:198
#1      _RootZone.runBinaryGuarded (dart:async/zone.dart:1606:10)
#2      _BufferingStreamSubscription._sendError.sendError (dart:async/stream_impl.dart:358:15)
#3      _BufferingStreamSubscription._sendError (dart:async/stream_impl.dart:376:7)
#4      _BufferingStreamSubscription._addError (dart:async/stream_impl.dart:280:7)
#5      _SinkTransformerStreamSubscription._addError (dart:async/stream_transformers.dart:75:11)
#6      _EventSinkWrapper.addError (dart:async/stream_transformers.dart:17:11)
#7      _HandlerEventSink.addError (dart:async/stream_transformers.dart:226:12)
#8      _SinkTransformerStreamSubscription._handleError (dart:async/stream_transformers.dart:119:24)
#9      _HttpClientResponse.listen. (dart:_http/http_imp<…>`
All the calls to the .onChatCompletionSSE after that are throwing the exception:
`status code :500  message :null
Did anyone meet this behaviour?

@raduistrati hi you can try new version and i add new cancel request style https://pub.dev/packages/chat_gpt_sdk

@raduistrati hi you can try new version and i add new cancel request style https://pub.dev/packages/chat_gpt_sdk

Thank you very much, you saved my day! :)

authors: raduistrati redevrx


text:
How to implement Redux?

Hi guys, any idea how to implement Redux? where can I find example Redux + React Server?

Here's a basic example, a reimplementation of the Redux counter app in react-server:
https://github.com/hzhu/react-server-redux-basic
Now how you structure a react-server, Redux application is up to you.

Whoa! @hzhu that's awesome!
We should link to that example from our docs.  Leaving this open as a reminder.

@hzhu @gigabo what about pulling it into react-server-examples?

Yeah I was planning on that! How about I submit a PR for review in a day or two?

Even better!  Thanks @hzhu!

@hzhu thanks a lot!!

@incubus8 I realized that the Counter example isn't too useful once one introduces data fetching & user interaction. Here's a better use case with react-server & redux. It's still a work in progress, but seems to work. https://github.com/hzhu/react-server-redux
It's a bit messy, but once I learn how to cleanly setup a redux project with react-server, I'll make the PR to react-server-examples

@hzhu Any chance you've had any luck using the RootElement's 'where' with Redux?  I'd like to render a component only when an async data call has completed, but 'where' requires a Promise, and my dispatch will no longer work if I return a promise instead of a function.
https://react-server.io/docs/guides/understanding-rendering

@woomike, did you mean RootElement's when attribute?
You can try representing your async data fetching as a promise, and put that, as the value to when.
For example..
const myPromise = new Promise((resolve, reject) => {
  // data fetch
  // async stuff here
})

<RootElement when={myPromise} />

Or more likely you might want to use ReactServerAgent.get() to fetch data from an api.
ReactServerAgent is a promise that represents the eventual result of the fetch.
I have a working demo of rendering async data using redux and react-server. The specific line you might want to check out is https://github.com/hzhu/react-server-redux/blob/master/src/pages/explore/index.js#L35
Note: I'm finding it very difficult to structure a redux app properly in react-server, i.e. how to manage store/stores & reducers. Let me know if you have some tips :)

@hzhu Thanks so much for getting back to me.  My apologies on the typo, yes I meant when.  I ended up being able to properly implement when and dispatch by using the handleRoute built into react-server.
	handleRoute(next) {
		this.data = Promise.resolve(store.dispatch(getFoo()));
		return next()
	}

	<RootElement key={0} when={this.data}>

authors: doug-wade gigabo hzhu incubus8 woomike

repo: redfin/react-server


text:
Documentation update: add details about node GC

Added a note about ensuring Node's garbage collection settings configured properly when running react-server in a memory-constrained environment.

Awesome.  Thanks @drewpc!

authors: drewpc gigabo


text:
Appstudio update test-component-pac-tqjo

Pipelines as Code configuration proposal
To start the PipelineRun, add a new comment with content /ok-to-test
For more detailed information about running a PipelineRun, please refer to Pipelines as Code documentation Running the PipelineRun
To customize the proposed PipelineRuns after merge, please refer to Build Pipeline customization

Pipelines as Code CI/test-component-pac-tqjo-on-pull-request has successfully validated your commit.

StatusDurationName

✅ Succeeded
16 seconds
init

✅ Succeeded
19 seconds
clone-repository

✅ Succeeded
30 seconds
build-container

✅ Succeeded
24 seconds
inspect-image

✅ Succeeded
27 seconds
deprecated-base-image-check

✅ Succeeded
15 seconds
clair-scan

✅ Succeeded
1 minute
clamav-scan

✅ Succeeded
9 seconds
sbom-json-check

✅ Succeeded
22 seconds
label-check

✅ Succeeded
6 seconds
show-sbom

✅ Succeeded
6 seconds
show-summary