text:
ModuleNotFoundError: No module named 'vector3'

I am a new user to pyunity..
i installed it with
pip install pyunity
I was trying out the examples..
python -m pyunity 1
it resulted in error:
Error log:
PS C:\Users\Lenovo> python -m pyunity 1
Loaded config
Trying GLFW as a window provider
Using window provider GLFW
Traceback (most recent call last):
  File "C:\Program Files\Python38-32\lib\runpy.py", line 185, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "C:\Program Files\Python38-32\lib\runpy.py", line 144, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "C:\Program Files\Python38-32\lib\runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "C:\Program Files\Python38-32\lib\site_packages\pyunity\__init__.py",  line 131, in <module>
    from .audio import *
  File "audio.py", line 13, in init pyunity.audio
  File "core.py", line 1, in init pyunity.core
ModuleNotFoundError: No module named 'vector3'

I have tried whatever i can do.. but i can't fix it nor find any module with name "vector3" on the internet..
Specs (if you need):
Python Version: Python 3.8.9
OS: Windows 7 SP 1
Processor: Intel core i3 (x86)

Ah i know why. Please download this file and put that in your working directory. Then run pip install pyunity-0.4.0.tar.gz which installs the latest build of pyunity. This issue has been marked in issue #7 and has been fixed, but I havent created a new release which has it. In the meantime, clone the repo and install from there (more details at pyunity.readthedocs.io)

i think that the file you gave me is for amd processors with x64 architecture..
and i have intel 32 bit laptop..
is there a file something like: pyunity-0.4.0-cp38-cp38-win32.whl

FINALLY!
FIX:
i cloned the whole repository and went to the directory of the project and opened pwsh and entered python setup.py install
that's it!
it successfully installed PyUnity 0.4.0!
and everything worked fine!

I used the source code of this repository instead and compiled it with python setup.py install
it gave this output
PS C:\Users\Lenovo\Downloads\pyunity-master\pyunity-master> python setup.py install
running install
running bdist_egg
running egg_info
writing pyunity.egg-info\PKG-INFO
writing dependency_links to pyunity.egg-info\dependency_links.txt
writing requirements to pyunity.egg-info\requires.txt
writing top-level names to pyunity.egg-info\top_level.txt
error: package directory 'src' does not exist

I don't think everything was done fine..
so.. any .whl file for me?
or .tar.gz?

Huh? I don’t know why that happened...

Try https://github.com/rayzchen/pyunity/raw/master/dist/0.4.0/pyunity-0.4.0-cp38-cp38-win32.whl

Send the result of dir

ahh ik y now, run python prepare.py first before you build.

pull the new changes and try again

looks like everything is fine but i have another problem..
error: Microsoft Visual C++ 14.0 or greater is required. Get it with microsoft c++ build tools

I thought you can't do any help now!  i just have to install that..
but i am getting irritated by just one thing..
C++ BUILD TOOLS WILL TAKE 3gb+ storage!!
i only have data pack of 2gb!

can you please build a wheel file for the package?
with name something like:
pip install pyunity-0.4.0-cp38-cp38-win32.whl

Ok, here is the link: master/dist/0.4.0/pyunity-0.4.0-cp38-cp38-win32.whl

looks like everything is fine but i have another problem..
error: Microsoft Visual C++ 14.0 or greater is required. Get it with microsoft c++ build tools

I thought you can't do any help now! i just have to install that..
but i am getting irritated by just one thing..
C++ BUILD TOOLS WILL TAKE 3gb+ storage!!
i only have data pack of 2gb!

PyUnity uses Cython compiling to optimize, as a result you must have Microsoft C++ Build Tools. Fortunately, I try to build the package myself for anyone who doesn't have buildtools. In the future, to find relevant packages, look in the dist folder in the master branch or check in the releases branch. In total there are 16 different compiled wheels.

I successfully installed pyunity from the dist folder..
but!
there's a problem!
any time i use the import pyunity or from pyunity import *
error comes!
the error:
PS E:\Penguin> python -u "e:\penguin\my_pyunity_project.py"
Loaded config
Trying GLFW as a window provider
Using window provider GLFW
Traceback (most recent call last):
  File "e:\penguin\my_pyunity_project.py", line 9, in <module>
    from pyunity.examples.example1 import main
  File "C:\Program Files\Python38-32\lib\site-packages\pyunity\__init__.py", line 165, in <module>
    from . import loader as Loader  # lgtm[py/import-own-module]
  File "loader.py", line 10, in init pyunity.loader
  File "C:\Program Files\Python38-32\lib\site-packages\pyunity\scenes\__init__.py", line 10, in <module>
    from . import sceneManager as SceneManager
  File "sceneManager.py", line 13, in init pyunity.scenes.sceneManager
ImportError: cannot import name scenes

Looks like i am finding bugs!

hmm ill look through it

Found the bug, its now fixed but there is no wheel yet, ill build one asap but i cant rn

Found the bug, its now fixed but there is no wheel yet, ill build one asap but i cant rn

you build the wheel and update the pyunity repository then comment here and i will try it.

https://github.com/rayzchen/pyunity/raw/master/dist/0.4.0/pyunity-0.4.0-cp38-cp38-win32.whl here ya go

authors: Whirlpool-Programmer rayzchen

repo: rayzchen/pyunity


text:
Update peer-to-peer search of institutional affiliations to search PCE Site as well as hospitals

Currently institutional affiliations only searched "hospitals where I've completed rotations". Open question: are PCE Site options different from institutional affiliations?

In the search feature, institutional affiliations should pull up both
"hospitals where I've completed rotations" and "PCE site" options.
Essentially, where someone does their clinical year (PCE) is a hospital
where they've completed rotations. The PCE site denotes where they've done
the majority of their clinical rotations.
On Tue, Aug 4, 2020 at 10:45 PM Razzi Abuissa notifications@github.com
wrote:

Currently institutional affiliations only searched "hospitals where I've
completed rotations". Open question: are PCE Site options different from
institutional affiliations?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/razzius/weave/issues/231, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AKOFUULMALGSVUALDN3XSI3R7DBTTANCNFSM4PVAHD5Q
.

source: gharchive/issue

repo: razzius/weave

license: MIT

license_type: permissive

license_source: github-api


text:
Adding Rbenv update command

Adding rbenv update command for easy updating via git.
My first shell code pull request, please let me know any feedback :)

@mislav didn't see #301 before. I couldn't find easy way to update, so i created this. Is the feature is already created somewhere. :)

There's a plugin: https://github.com/rkh/rbenv-update

We don't need to integrate rbenv update because we relied on plugin system.

source: gharchive/pull-request

authors: bekicot hsbt jasonkarns

repo: rbenv/rbenv


text:
Building ruby-2.5.1 on macOS Mojave fails to (re)build essential extensions

Installing MRI Ruby 2.5.1 on macOS Mojave using rbenv install  seems to break because various gem extensions aren't being built. This seems to be especially true if there is an existing ~/.gem directory that was built before upgrading macOS.
In order to work around the problem, the following worked for me:
gem install ffi ffi-yajl libyajl2
gem pristine --all
yes | gem update

There may be a more elegant solution, but that's what got me up and running with rbenv under Mojave.

Thanks for sharing your workaround!
Closing since there haven't been similar reports in the meantime

authors: mislav todd-a-jacobs

repo: rbenv/ruby-build

license: mit

license_source: bigquery


text:
document 为何不是 d 哇？

传了 document 命名为 d，可是还是用的 document
https://github.com/rbind/yihui/blob/703d24b0ce678150a67749ed417dcef532f1b304/static/js/load-typekit.js#L1
https://github.com/rbind/yihui/blob/703d24b0ce678150a67749ed417dcef532f1b304/static/js/load-typekit.js#L16
这一行和后面的代码风格不一致哇。😧
https://github.com/rbind/yihui/blob/703d24b0ce678150a67749ed417dcef532f1b304/static/js/load-typekit.js#L3

谢谢！

authors: yihui zsdycs

repo: rbind/yihui


text:
Text displays on top of another window when using nvim-dap-ui

When using nvim-dap-ui I see text from its windows displayed on top of my main code window. How can I disable it?

I found that it's regulated by "expand_lines" option.

repo: rcarriga/nvim-dap-ui


text:
Kilo to Liberty upgrades fail on bootstrap-ansible.sh due to pip

What version (commit) do you encounter this issue on?
r11.1.8 and master
What type of issue is this (bug, feature, documentation, regression)?
bug
What is the expected behavior?
bootstrap-ansible.sh updates Ansible to the appropriate version on upgrade.
What is actually happening?
bootstrap-ansible.sh fails when upgrading to Liberty because it is using the Kilo version of the repo servers andthey do not have the required version of paramiko.
http://jenkins.propter.net/job/RPC-AIO/5460/consoleFull
How can we reproduce this issue?
Attempt to upgrade from a deployment of r11.1.8.
How can we verify your issue is addressed?
bootstrap-ansible.sh successfully finishes.
If this is a large issue, what can be done immediately to alleviate the issue while working on a longer-term solution?
What is your evaluation on the importance of this issue, and why?
High, this is currently blocking the upgrade check on Liberty branches.
What branches / milestones do you believe this issue should target?
The list below is what is currently supported for backports
Remove branches (lines) you do not wish to target.

[ ] Master
[ ] liberty-12.2
[ ] liberty-12.1

I am looking to address this issue with https://review.openstack.org/#/c/314047/

repo: rcbops/rpc-openstack


text:
Make rounded corners easier to see

I love this repo!!! And maybe I will use it in my project.
There is a bit change to make rounded corners easier to see.

AttributeError: 'NoneType' object has no attribute 'tk'

Oh, yeah, because the parent can be None

Nice. Now it automatically picks up the theme and makes the corners transparent based on the theme background color. Could you show a screenshot of this on Windows?

Wait a minute.

Uhh, what's this weird font?
The four black dots at the corners of the button are because the button background is the same color as the transparent color of the dialog. I will fix it in the theme.

Uhh, what's this weird font?
The four black dots at the corners of the button are because the button background is the same color as the transparent color of the dialog. I will fix it in the theme.

Maybe it is because of I am using windows 10 and it doesn’t have a correct seoge font.

Moved to #5

authors: littlewhitecloud rdbende

repo: rdbende/Sun-Valley-messageboxes


text:
The theme not apply correctly

why it render like this ?

Make sure to use ttk elemenrs, not plain Tk.
Example: Use tkinter.ttk.Label instead of tkinter.Label
Do this for all witgets ecxcept the main tkinter.Tk window and any tkinter.Toplevel s

Make sure to use ttk elemenrs, not plain Tk. Example: Use tkinter.ttk.Label instead of tkinter.Label Do this for all witgets ecxcept the main tkinter.Tk window and any tkinter.Toplevel s

ok and now how can i get white theme ?

Just put in the line sv_ttk.use_light_theme()

repo: rdbende/Sun-Valley-ttk-theme


text:
Add a script for calculating chiral descriptors to Contrib

This set of new descriptors were described in a recent publication, please see:
Schneider, N.; Lewis, R. A.; Fechner N.; Ertl, P.
Chiral Cliffs: Investigating the Influence of Chirality on Binding Affinity.
ChemMedChem, 2018, DOI: 10.1002/cmdc.201700798

Many thanks for your comments Peter! These are really valuable. I will update the pull request accordingly and additionally add some tests to be sure we don't change the code :).

@gedeck : if you are happy with the changes, I will go ahead and merge this.

Thanks for the contribution @NadineSchneider!

authors: NadineSchneider greglandrum

repo: rdkit/rdkit


text:
[rn 0.29.1] Failed to build DependencyGraph: @providesModule naming collision

I use the cocoapods to install all dependencies. With react-native 0.29.1 the depency graph crashes because react is already installed as a dependency and this module installs its own version of react.
project './Camigo.xcodeproj'
source 'https://github.com/CocoaPods/Specs.git'

def share_pods

    pod 'Google/SignIn'

    pod 'React', :subspecs => [ 'Core',
    'RCTImage',
    'RCTNetwork',
    'RCTText',
    'RCTWebSocket',
    'RCTSettings',
    'RCTVibration',
    'RCTLinkingIOS',
    'RCTCameraRoll',
    'RCTPushNotification',
    'RCTGeolocation',
    'RCTCameraRoll',
    'RCTActionSheet' ], :path => '../node_modules/react-native'

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

    pod 'Fabric'
    pod 'Crashlytics'
end

target 'Camigo' do
    share_pods
end

target 'Camigo Staging' do
    share_pods
end

Failed to build DependencyGraph: @providesModule naming collision:
  Duplicate module name: AutoFocusUtils
  Paths: /Users/maluramichael/Development/Work/Camigo/App/node_modules/react-native-maps/node_modules/react/lib/AutoFocusUtils.js collides with /Users/maluramichael/Development/Work/Camigo/App/node_modules/react/lib/AutoFocusUtils.js

This error is caused by a @providesModule declaration with the same name accross two different files.
Error: @providesModule naming collision:
  Duplicate module name: AutoFocusUtils
  Paths: /Users/maluramichael/Development/Work/Camigo/App/node_modules/react-native-maps/node_modules/react/lib/AutoFocusUtils.js collides with /Users/maluramichael/Development/Work/Camigo/App/node_modules/react/lib/AutoFocusUtils.js

This error is caused by a @providesModule declaration with the same name accross two different files.
    at HasteMap._updateHasteMap (/Users/maluramichael/Development/Work/Camigo/App/node_modules/node-haste/lib/DependencyGraph/HasteMap.js:162:15)
    at /Users/maluramichael/Development/Work/Camigo/App/node_modules/node-haste/lib/DependencyGraph/HasteMap.js:127:25

+1

In android, i just remove the node_modules folder inside the react-native-maps directory. But it gets annoying when i have to do this after every npm install

Trying to clean the repo, please comment or mention me to re-open the issue if is still the case. Thanks.

authors: BigPun86 maluramichael rborn

repo: react-community/react-native-maps


text:
Broken iOS chrome debugger

When using a stackNavigator (haven't tried other navigators) I only get a white screen when I start remote debugging. Each of the views separately render nicely in debugger mode when not using the stack navigator, but as soon as I add the navigator back the screen turns white again.
In the chrome console there are no errors, so nothing there that can be helpful for this issue.
I'm using RN 0.42.0, react-navigation 1.0.0-beta6 on mac os

Update: The issue seems to be related to screenProps. When I use the stackNavigator without screenProps the debugger works. When I add the screenProps the remote debugging no longer works and only the white screen shows. I do get a warning in the console
Behaviour of screenProps has changed from initial beta. Components will now receive it as `this.props.screenProps` instead.
This warning will be removed in future.

But I'm setting the screenProps like this
<StackNavigator screenProps={{ setFlag: (bool) => {this.setState({flag: bool}) }}} />

and reading them from this.props.screenProps.setFlag in my screen, so this seems ok to me

Having this problem as well and its definitely related to screenProps.

Update 2: I only have this issue in the iOS simulator, in the android simulator (genymotion) I'm able to debug

The issue seems to be resolved in beta7

authors: GertjanReynaert nolan-m

repo: react-community/react-navigation


text:
We Can resize only with 1 point, we cant resize to 0.5 or 0.8

Please only submit bugs to this tracker. If you have a feature request, please implement it. This is free software and the author is busy with other projects.
Please use the CodeSandbox Template to demonstrate your bug. It is much easier for us to help you if you do.

There is a specific concern regarding the movement behavior observed in the demos, such as the one available at Basic Example.
During resizing or dragging, the grid item moves by 1 point (width/height ± 1), which results in a slightly larger movement than desired.
The question arises: What approach should be taken if the requirement is to achieve movements with values less than 1 point?
@STRML Can you please help here?

repo: react-grid-layout/react-grid-layout


text:
ts.tsx more accurate JP translation.

I think the Japanese TS Support page was grammatically strange, so I updated src/data/jp/ts.tsx file.
Thanks  :blush:

@keiya01 Hey Keiya any chance you could take a look at this PR? (no worries if not, it LGTM just wanted to be sure)

Thank you! I thin i did google translate... 🥺

@keiya01 Hey Keiya any chance you could take a look at this PR? (no worries if not, it LGTM just wanted to be sure)

oops i miss the message above... feel free to adjust @keiya01 🙏

That looks good :)

repo: react-hook-form/documentation


text:
Adding Readme.md and docs

Summary
Readme.md added with documentation included
Compatibility

OS
Implemented

iOS
✅

Android
✅

Checklist

[ ] I have tested this on a device and a simulator
[X] I added the documentation in README.md
[X] I mentioned this change in CHANGELOG.md
[ ] I updated the typed files (TS and Flow)
[ ] I added a sample use of the API in the example project (example/App.js)

Wrt to license reference, I'd prefer a badge over text

authors: DanielSanudo Swaagie


text:
Share Image without Storage permission

Ask your Question

Is it possible to share Image without requesting for storage write permission?
Maybe using bitmap?
https://stackoverflow.com/questions/9049143/android-share-intent-for-a-bitmap-is-it-possible-not-to-save-it-prior-sharing

As far as I know, asking permission is a required step when sharing files.
My suggestion is to ask this on Stack Overflow.


text:
Why this library don't support with Expo

Please do let me know why this library isn't supporting react native app 0.60 which is created by expo?
If it can then let me know how? I'm trying to find a solution.

Expo problems should go to expo repo
If you use the bare workflow it might work
Otherwise you must learn immediately that using Expo managed workflow you may not use non-expo native modules, to the best of my knowledge.

Thank you @mikehardy for providing valuable information. I'm a beginner in react native app development please accept my apologies.

No problem - and welcome to react-native :-)
Expo's a great place to start but does have that limitation, getting very familiar with their documentation will help ensure success on your project


text:
CookieManager not setting cookie if the length of value field is more than 4000

version: 5.0.1
I've a cookie string that has a length of more than 4000. It won't set on the cookies using CookieManager. It would not be available in CookieManager.getAll. I've tried it with a small value then there are no issues.
Does anyone have this issue?

I am also facing the issue. Any solutions?

version: 5.0.1
I've a cookie string that has a length of more than 4000. It won't set on the cookies using CookieManager. It would not be available in CookieManager.getAll. I've tried it with a small value then there are no issues.
Does anyone have this issue?

Is this happening on both Android and iOS? @bibin96

authors: bibin96 renjuramachandran safaiyeh

repo: react-native-cookies/cookies


text:
Android: Fix Gyroscope startUpdates native API

Hi guys! Thank you for the package.
There's one problem with Gyroscope on Android introduced by recent commits: the observable callback is never called, so basically it doesn't work. I use the following workaround for now:
DeviceEventEmitter.addListener('Gyroscope', d => { console.log(d); });

The culprit is startUpdates method. Actually, promises are kind of pointless here (and in Accelerometer code as well), but it's just a quick fix. I'd be great if you release the next major release with appropriate fixes on npm soon.

Hey @baygeldin, thank you for taking the time to a PR and thank you for raising the bug. Rather then doing this quick fix at only one place I would like to see these methods changed back to non-promise ones, as they can't fail anymore due to absent sensors. We would need to change all occurences through all platforms.
It would be cool to see another PR from you, otherwise I will try to tackle this this weekend 👍

No problem, see #56.

authors: DanielMSchmidt baygeldin


text:
The player will stop working after switching to an unloaded fragment

Bug
If I have an unstable connection and I rewind the audio to an unloaded fragment, the player freezes and does not work. Even if the Internet becomes stable.
Platform
Which player are you experiencing the problem on:

iOS
Android

Environment info
React native info output:
System:
    OS: macOS 12.4
    CPU: (8) x64 Apple M1
    Memory: 24.67 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.15.0 - ~/.nvm/versions/node/v16.15.0/bin/node
    Yarn: 1.22.18 - ~/.nvm/versions/node/v16.15.0/bin/yarn
    npm: 8.5.5 - ~/.nvm/versions/node/v16.15.0/bin/npm
    Watchman: 2022.07.04.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.11.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
    Android SDK:
      API Levels: 29, 30, 31
      Build Tools: 29.0.2, 30.0.2, 31.0.0
      System Images: android-29 | Intel x86 Atom, android-29 | Intel x86 Atom_64, android-30 | Google TV Intel x86 Atom, android-30 | Google APIs ARM 64 v8a, android-30 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom_64, android-31 | Google APIs ARM 64 v8a, android-31 | Google APIs Intel x86 Atom_64, android-31 | Google Play ARM 64 v8a, android-31 | Google Play Intel x86 Atom_64
      Android NDK: Not Found
  IDEs:
    Android Studio: 2020.3 AI-203.7717.56.2031.7678000
    Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.12 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2
    react-native: 0.64.2 => 0.64.2
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Library version: 5.2.0
Steps To Reproduce

Make an unstable connection to the Internet (for example, using an android emulator)
Start playing the audio track
Rewind to an unloaded part of a track
Switch to another track
Make your internet connection stable

Expected behavior
A new track is loaded and starts playing.
Current behavior
The player freezes and the track does not play. When switching to other tracks - they also do not play.
Everything works after a hard restart of the application.
This is not always reproduced, but very often.
Reproducible sample code
 <Video
      key={source.uri}
      onError={onError}
      ref={player}
      progressUpdateInterval={1000}
      source={source}
      audioOnly={isAudio}
      ignoreSilentSwitch="ignore"
      playInBackground
      paused={paused}
      rate={rate}
      volume={volume}
      onProgress={onProgress}
      onEnd={onEnd}
      onLoadStart={onLoadStart}
      onLoad={onLoad}
      style={!isAudio ? styles.video : null}
      resizeMode="cover"
      minLoadRetryCount={5}
/>

I close as stale, but last enhancement of 6.0.0-beta.7 can fix this issue

authors: freeboub zhebil

repo: react-native-video/react-native-video


text:
Local files not working on iOS

I'm trying to use react-native-video on iOS to play previously downloaded mp4s.
Android and HTTPS links on iOS work fine, but playing local files is not working.
Any suggestion/idea how to resolve this issue?
Example:
this.props.source is:
{uri: "file:///Users/test/Library/Developer/CoreSimulator/Devices/4DF4423B-11DE-434B-BFAF-5EB196F9A44D/data/Containers/Data/Application/387BE037-28BB-41C0-BA45-45250675AF27/Documents/data/ftp/test/video/SampleVideo_1280x720_2mb.mp4"}
<Video
ref={component => this._videoPlayer = component}
source={this.props.source}
onLoadStart={(err) => console.log("Video load start: " + JSON.stringify(err))}
onLoad={(err) => console.log("Video load: " + JSON.stringify(err))}
onError={(err) => console.log("Video error: " + JSON.stringify(err))}
onProgress={(progress) => this.onSetTime(progress)}
/>
"react-native": "0.49.3"
"react-native-video": "^2.0.0"

Can be closed.
Try to use "encodeURI("file://" + video.path)" instead of the raw path.

Can be closed.
Try to use "encodeURI("file://" + video.path)" instead of the raw path.

It does not work.

This issue still persist @eliasws
It doesn't work

@Aycom366 Sry, cannot help here as I haven't worked with this library for seven years.

Can be closed.
Try to use "encodeURI("file://" + video.path)" instead of the raw path.

not working


text:
Drawer Lock Mode - Cannot disable Drawer

I have tried every example and cannot get this to work - pulling my hair out with this.
This is my latest setup
import { createAppContainer, createDrawerNavigator } from 'react-navigation';
import App from '../components/App';
import HomeView from '../components/HomeView';
import CheckIn from '../components/CheckIn';
import LoginView from '../components/LoginView';
import LrmDocs from '../components/LrmDocs';
import Rota from '../components/Rota';
import SideMenu from '../components/util/SideMenu';
const AuthStack = createDrawerNavigator({
AppContainer: App,
LoginViewContainer:LoginView,
});
const RootStack = createDrawerNavigator({
Login:AuthStack,
HomeViewContainer: HomeView,
RotaContainer: Rota,
CheckInContainer:CheckIn,
LrmDocsContainer: LrmDocs,
},
{
drawerPosition: 'right',
contentComponent: SideMenu,
cardStyle: { backgroundColor: '#FFFFFF'},
}
);
AuthStack.navigationOptions = () => {
return { drawerLockMode: 'locked-closed' };
};
export default createAppContainer(createDrawerNavigator(
{
Root: RootStack,
}));
// export default Navigation;
but the simulator still drags out the menu in the loginview
(the logincontainer is nested within the app container)

delete

Have also just tried below - still no luck...
import { createAppContainer, createDrawerNavigator, createStackNavigator } from 'react-navigation';
import App from '../components/App';
import HomeView from '../components/HomeView';
import CheckIn from '../components/CheckIn';
import LoginView from '../components/LoginView';
import LrmDocs from '../components/LrmDocs';
import Rota from '../components/Rota';
import SideMenu from '../components/util/SideMenu';
const AuthStack = createStackNavigator({
AppContainer: App,
LoginViewContainer:LoginView,
});
const RootStack = createDrawerNavigator({
Login:AuthStack,
HomeViewContainer: HomeView,
RotaContainer: Rota,
CheckInContainer:CheckIn,
LrmDocsContainer: LrmDocs,
},
{
drawerPosition: 'right',
contentComponent: SideMenu,
cardStyle: { backgroundColor: '#FFFFFF'},
}
);
AuthStack.navigationOptions = ({ navigation }) => {
let drawerLockMode = 'unlocked';
if (navigation.state.index > 0) {
drawerLockMode = 'locked-closed';
}
return {
drawerLockMode,
};
};
export default createAppContainer(createDrawerNavigator({Root: RootStack, Auth:AuthStack}));
// export default Navigation;
I am using latest version of react native, latst xcode and latest React Nav as of today.
Please help - driving me insane - been trying to get it to work in various guises for a day now.

dependecies as follows:

Was this solved? Because I'm having the same issue

Any update on this?

authors: Elias-Graf andresmtz98 pablodance

repo: react-navigation/drawer


text:
Typescript react-spring/dist/addons

This isn't an issue, but I wanted to a solution for getting typescript to resolve Parallax or any other addons that may live in dist/addons in the future.
Declare the following in global.d.ts at your project root or you can do what I did, which was create types/react-spring-addons.d.ts, and then include the file in tsconfig.json e.g. "files": ["types/react-spring-addons.d.ts"]
declare module 'react-spring/dist/addons' {
  import { Parallax, ParallaxLayer } from 'react-spring'
  export { Parallax, ParallaxLayer }
}

I am working on a PR for types for the hooks and I had to solve this problem as well while doing it, so if I get this thing to work it'll probably be fixed in react-spring soon 👍

It's fixed as of the currently published version (can import react-spring/addons) :tada:

Oh that's awesome! I'm going to close this issue then since it should just work according to the existing docs.

authors: Kovensky smdern

repo: react-spring/react-spring


text:
useTransition and immediate

immediate key fails when used with update: or enter: or whatever keys on uaseTransition. is there any way to immediately snap an update to its destination, for example? would this require an API change?

i think you don't need transition at all in this case, it's been made for situations where immediate actions are intercepted in order to animate items in and out.

sure, that's what I'm using it for -- I want to animate transitions like enter/exit/update, but also want to conditionally snap certain transitions to their destination some of the time. immediate is an option that exists in useSpring, for example -- is there something that conceptually prevents such an option in useTransition?

the issue is manifesting with animating display: grid cells. imagine using useTransition to manage adding/removing/moving grid rows smoothly.
upon adding a row to the grid, the existing cells in rows below have to be shifted down 1 row -- once they're in position, the grid-row of each cell must be incremented simultaneously with their transform: translateY snapping back to 0. this doesn't seem possible with useTransition currently without an option like immediate.

Please provide a CodeSandbox that demonstrates the issues you're having. Thanks! 👍

https://codesandbox.io/s/ql21yr2l4?fontsize=14
it's very possible that there's a way to fix this specific implementation, or that it doesn't make technical sense to implement immediate properties for useTransition, but it does seem like it would be convenient here.

You can use v9 like this now: yarn add react-spring@next
Let us know how it goes: #642

authors: aleclarson drcmda nervestaple


text:
fix: devtools to patch api.setState

Close #171.
~There are a few technical issues:~
~1. we need to fix types in vanilla.ts and index.ts too.~
~2. we can't chain middleware that only patches set.~
~Due to 2), I'm a bit hesitant to this approach.~

@TkDodo Here's your example with this change. https://codesandbox.io/s/agitated-stonebraker-bg7bi

Okay, this f4c6239 should be much better.
https://codesandbox.io/s/wonderful-lovelace-rjego

Thanks! From what I can tell, the code looks good. I understand that we cannot change the interface of  set, so there won't be the possibility to give those "actions" a name, but this is an understandable limitation 👍

@TkDodo Did you try the sandbox?
It would be nice if you could try and find possible bugs.

we cannot change the interface of set, so there won't be the possibility to give those "actions" a name

By set, do you mean the first argument of the creator function, or api.setState?

Did you try the sandbox?
It would be nice if you could try and find possible bugs.

Yes, I did try the codesandbox and it works fine for me. I made a test case for testing it in combination with the redux middleware: https://codesandbox.io/s/react-forked-xbjg9
From what I can see, the INCREASE action is logged twice (once as action and once as INCREASE). This is the same as the previous behaviour, so this PR didn't introduce this. However, setState is now logged as well (wasn't logged before), so that's good. Is this worth a follow up issue maybe?

By set, do you mean the first argument of the creator function, or api.setState?

I mean api.setState. set in the creator function is patched / typed so that we have a third argument "name", but that's not the case for api.setState

Thanks!

From what I can see, the INCREASE action is logged twice

Maybe, I can fix it in this PR.

I mean api.setState. set in the creator function is patched / typed so that we have a third argument "name", but that's not the case for api.setState

Yeah, totally correct. Let's leave it as a limitation because types would be too messy, if we were to support this. (I think it's technically possible.)
If you are adventurous, it might be able to do like this:
const useStore = create(devtools((set, get, api) => {
  api.setState = set
  return {
    // ...
  }
}))

https://codesandbox.io/s/react-forked-6czzc
Looks good?

Yeah, totally correct. Let's leave it as a limitation because types would be too messy, if we were to support this. (I think it's technically possible.)

yes, sounds good.

If you are adventurous, it might be able to do like this:

Yes, I am actually doing that already as a workaround until this PR lands:
let setState: SetState

const useState = create<State>(
    devtools((set) => {
        setState = set
        return { ... }
}))

Oh, but this will stop logging if you use set with redux middleware.

hm, how would you even do that ? In the example, we only pass the reducer to redux, and useState.setState is now correctly logged ... 🤔

This 99a9f64 is probably better, even thought it's unlikely that people don't use set with redux middleware.

@TkDodo Would you do the final test? If it's OK, we release it.

using the redux example with 99a9f64 now logs increase button twice, first as setState and then as INCREASE
https://codesandbox.io/s/angry-mestorf-qymx1

Oops!

Reverted. 😄
https://codesandbox.io/s/react-forked-661ih

👍

Published: https://www.npmjs.com/package/zustand/v/3.0.3

authors: TkDodo dai-shi

repo: react-spring/zustand


text:
"Error: socket hang up" on local CMS fetch

My react-static project resides in http://mywebsite and I'm trying to fetch from a local CraftCMS install: const projects = await axios.get('http://craftapi/projects?page=1')
But I get an error saying Error: socket hang up
Is it some CORS issue? I tried using this approach https://github.com/nozzle/react-static/issues/380 but to no avail. Is there another way?

This can be caused by quite a few things, most of which would have nothing to do with react-static.

CORS errors generally will show up in your (browser) console, and displayed as such.
why are you redirecting to a local installation? You can use localhost for now, and later add logic to use the public address in production.

authors: SleeplessByte riccardolardi

repo: react-static/react-static


text:
[Suggestion][PRWIP] Move CodeSandbox examples to GitHub and use auto-import

To maintain the codesandbox samples automatically from within this repo, I've tested a POC of using the auto import functionality described in the codesandbox API docs. I'd happily complete a full a PR if this seems useful.
https://github.com/JasonRitchie/react-table/compare/master...JasonRitchie:codesandbox

There have been challenges with the codesandbox "individuality" (the owner).  If we combine this with the ability to now actually share codesandbox repos (it's a new feature - I have not tried it yet) - we might get a more maintainable outcome (rather than people just creating them all over the place and submitting PRs to fix things).

Should I go ahead with a full PR covering all the codesandbox samples or should I hold off for now?

What kind of changes will that entail?
On Tue, Mar 27, 2018 at 6:17 PM Jason Ritchie notifications@github.com
wrote:

Should I go ahead with a full PR covering all the codesandbox samples or
should I hold off for now?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/react-tools/react-table/issues/878#issuecomment-376717292,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFUmCZKePapvSUPENp0QIZ84_nejCUppks5titasgaJpZM4S9J0c
.

It should be a seamless transition with no change to the user experience, if my proof of concept works correctly for all the examples. I linked my own Fork where I tested this and I was able to use yarn run docs and see this in action.
I might suggest that I go ahead and put together a small PR as a work-in-progress perhaps to be merged into a branch to see how this would look, if you like.

I'd probably like @tannerlinsley to be across this before going too far - but it is probably definitely worth doing.

Yep. Throw together a proof of concept and let's see where it leads us
On Tue, Mar 27, 2018 at 6:48 PM Gary Menzel notifications@github.com
wrote:

I'd probably like @tannerlinsley https://github.com/tannerlinsley to be
across this before going too far - but it is probably definitely worth
doing.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/react-tools/react-table/issues/878#issuecomment-376722513,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFUmCccy-EqYj50ei6PJzuDed6EnyUReks5tit3ZgaJpZM4S9J0c
.

created https://github.com/react-tools/react-table/pull/880

Closing due to issue age. If you think this issue needs to be reopened or if it should be turned into a pull-request, please check the latest version of React-Table for the issue or feature once more and reopen or create a PR if appropriate. Thanks!

authors: JasonRitchie gary-menzel tannerlinsley

repo: react-tools/react-table


text:
2021-04-14T18:46:51.522Z error: Object.entries(...).filter(...).flatMap is not a function

I don't know what is going on. This comes when I send a message.
I was trying to use the webhook thingy. Without it works just fine.
My config:
[{
        "nickname": "StackHub",
        "server": "irc.freenode.net",
        "discordToken": "XXX",
        "autoSendCommands": [
                ["PRIVMSG", "XXX", "Up"]
        ],
        "channelMapping": {
                "#questions": "##stackhub"
        },
        "format": {
                "commandPrelude": "Command sent by {$nickname}",
                "ircText": "<{$displayUsername}> {$text}",
                "urlAttachment": "<{$displayUsername}> {$attachmentURL}",
                "discord": "**<{$author}>** {$withMentions}",
                "webhookAvatarURL": "https://robohash.org/{$nickname}"
        },
        "ircNickColor": true,
        "ircNickColors": ["light_blue", "dark_blue", "light_red", "dark_red", "light_green", "dark_green", "magenta", "light_magenta", "orange", "yellow", "cyan", "light_cyan"],
        "parallelPingFix": true,
        "commandCharacters": ["!", "."],
        "ircStatusNotices": true,
        "webhooks": {
                "#questions": "https://discord.com/api/webhooks/XXX"
        }
}]

Hey! I can't seem to reproduce this issue locally when using webhooks.
Could you please provide this information so I can investigate further?

Node + NPM versions (node --version && npm --version)
discord-irc version (discord-irc --version, or if you built it from source, git rev-parse --short HEAD)
The full log of the error (line numbers and the stack trace may be important!)

I'm also getting this error.
NPM version 5.8.0
Node version 10.24.0
discord-irc version 2.9.0
The error is exactly as shown:
$ discord-irc --config config.json
2021-05-09T11:37:00.770Z info: Connected to Discord
2021-05-09T11:37:01.577Z info: Connected to IRC
2021-05-09T11:37:10.747Z error: Object.entries(...).filter(...).flatMap is not a function

Ah, I see! I think that explains it: I googled a bit, and flatMap was added in Node 11, so it's not available in Node 10.
Node 10 recently went EOL, so I recommend upgrading your system node for most apps anyway, but in particular, due to our reliance on the discord.js library, we dropped support for old Node versions (6, 8 and 10) in version 2.9.0, in October 2020, which was necessary for some upcoming Discord API changes. We've got a notice in the README, but maybe it's not prominent enough:

Note: discord-irc requires Node.js version 12 or newer, as it depends on discord.js. Future versions may require newer Node.js versions, though we should support active releases.

Could you try upgrading your system Node version, and see if that helps?

repo: reactiflux/discord-irc


text:
PreparedQuery order by using position references

Hello everyone,
I'm using rxPreparedQuery method in order to get user's information in an asynchronous way. Just like I was using a PreparedStatement I'm using references in order to avoid SQL injection attacks.
Query: SELECT u.* FROM user u WHERE u.name = $1 ORDER BY $2 DESC LIMIT $3 OFFSET $4
Tuple: [limadelrey, u.name, 50, 0]
Using this example it is possible to filter and to limit the results. However, for some reason I can't order using position references at the moment I'm writing this issue.
Is it a mistake of mine? Or is it impossible to use position references to order results?
Thanks in advance.

have you tried this query with another client to compare ?

closing as it's a question

I haven't tried because this query syntax and tuple API are specific to reactive-pg-client. However, I think that the usual PreparedStatement with JDBC client doesn't allow to order with a reference either.

I am not a specialist of ordering this way, can you elaborate what is so specific ?

On 2 Apr 2019, at 21:07, limadelrey notifications@github.com wrote:
I haven't tried because this query syntax and tuple API are specific to reactive-pg-client. However, I think that the usual PreparedStatement with JDBC client doesn't allow to order with a reference either.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub https://github.com/reactiverse/reactive-pg-client/issues/261#issuecomment-479152231, or mute the thread https://github.com/notifications/unsubscribe-auth/AANxipIZ58M8llzANrZfQVdUHDtkahGTks5vc6qCgaJpZM4cYzBJ.

authors: limadelrey vietj

repo: reactiverse/reactive-pg-client


text:
VS.NET 2019 and Core 2.2 not working

I just installed VS 2019 and .Net Core 2.2 and created a new doc per your tutorial. I tried to install React.aspnet and immediate got these errors in the NuGet package manager output:
I'm using these library versions:

ReactJS.NET:
JavaScriptEngineSwitcher:
react and react-dom: (N/A if using bundled react, or version number)
webpack: (N/A if using bundled react)
node: (N/A if using bundled react)

Runtime environment:
Windows 10
VS.NET 2019
.NET Core 2.2
Steps to reproduce
Create new project .NET Core MVC. Open NuGet package manager and install React.aspnet

Error		Package restore failed. Rolling back package changes for 'ReactTest3'.

Error	NU1107	Version conflict detected for Microsoft.Extensions.CachingAbstractions. Install/reference Microsoft.Caching.Abstractions 2.2.0 directly to project ReactTest3 to resolve this issue.
 ReactTest3 -> Microsoft.Extensions.Caching.Abstractions 2.2.0
 ReactTest3 -> Microsoft.AspNetCore.App 2.1.1 -> Microsoft.Caching.Abstractions (>= 2.1.1 && < 2.2.0).

Warning	MSB3101	Could not write state file "obj\Debug\netcoreapp2.1\ReactTest3.csprojAssemblyReference.cache". The process cannot access the file 'C:\Users\bisch\source\repos\ReactTest3\ReactTest3\obj\Debug\netcoreapp2.1\ReactTest3.csprojAssemblyReference.cache' because it is being used by another process.

Error	MSB3491	Could not write lines to file "obj\Debug\netcoreapp2.1\ReactTest3.csproj.CoreCompileInputs.cache". The process cannot access the file 'C:\Users\bisch\source\repos\ReactTest3\ReactTest3\obj\Debug\netcoreapp2.1\ReactTest3.csproj.CoreCompileInputs.cache' because it is being used by another process.

Sorry. I see that even though I have .NET Core 2.2 installed, when creating a new project VS select .NET Core 2.1 as the default version. Odd. I created a new project and specified 2.2 and now the React.aspnet NuGet package loaded.


text:
Translation of data fetching with react server components

Traduzindo post 'Introducing Zero-Bundle-Size React Server Components'

@jhonmike opa, tinha passado despercebido rsrs, muito obrigado pelo toque!😁

@jhonmike opa, tinha passado despercebido rsrs, muito obrigado pelo toque!😁


text:
Feature request use mapStateToProps in mapDispatchToProps

Hello
First of all I would thank you for this awesome library been using it in all my projects lately!
There is just one thing that is bugging me. I often would like to use the state props I pick from the mapStateToProps in mapDispatchToProps. Right now I use a library called recompose and a hoc called withHandlers to do this.
Example how I do today.
compose(
  connect(
    (state) => ({
      someProp: state.someState,
    }),
    (dispatch) => ({
      onSomeAction: (someProp) => dispatch(someAction(someProp)),
    }),
  ),
  withHandlers({
    onSubmit: ({ someProp, onSomeAction }) => (e) => {
      e.preventDefault();
      onSomeAction(someProp);
    },
  }),
)(DumbComponent);

Suggested feature.
connect(
  (state) => ({
    someProp: state.someProp,
  }),
  (dispatch) => ({
    // If the dispatch prop is executed and returns a functions then run that function automatically with the latest props
    onSubmit: ({ someProp }) => (e) => {
      e.preventDefault();
      dispatch(someAction(someProp));
    },
  }),
)(DumbComponent);

This has been asked for many times.  We don't allow this because it would result in re-creating methods every time the store state is changed.
We actually just added an FAQ entry on this.  We don't have the docs republished yet, but the writeup can be seen at FAQ - Design Decisions: Why no state in mapDispatch?.

Thanks for answer.
I don't have any knowledge about your code base but those statement seems wrong. Here are some conceptual code that I just wrote in 10 minute that should work.
const defaultMergeProps = (stateProps, dispatchProps, ownProps) => ({
  ...ownProps,
  ...stateProps,
  ...dispatchProps
});

const returnEmptyObject = () => ({});

const connect = (
  mapStateToProps,
  mapDispatchToProps,
  mergeProps = defaultMergeProps
) => ComposedComponent => class WithConnect extends Component {
  static displayName = `connect(${ComposedComponent.displayName || ComposedComponent.name || 'Component'})`;
  static contextTypes = {
    store: PropTypes.object,
  };
  state = {};
  proxies = {};
  componentWillMount() {
    const { store } = this.context;
    this.unsubscribe = store.subscribe(() => this.refresh(store.getState(), this.props));
    this.refresh(store.getState(), this.props);
  }
  componentWillUnmount() {
    this.unsubscribe();
  }
  componentWillReceiveProps(nextProps) {
    this.refresh(this.context.store.getState(), nextProps);
  }
  refresh(state, props) {
    const { store } = this.context;
    this.dispatchers = (mapDispatchToProps || returnEmptyObject)(
      action => store.dispatch(action),
      props
    );
    // Creates proxy functions for each dispatch prop and uses old proxy if already exist.
    this.proxies = Object.keys(dispatchers)
      .reduce((obj, dispatchPropName) => {
        if (dispatchPropName in this.proxies) {
          // Reuse the proxy dispatch
          obj[dispatchPropName] = this.proxies[dispatchPropName];
        } else {
          // Create a new proxy for dispatch
          obj[dispatchPropName] = (e) => {
            const handle = this.dispatchers[dispatchPropName](e);
            if (typeof result === 'function') handle(this.state.mergedProps);
          };
        }
        return obj;
      }, {});
    const mergedProps = mergeProps(
      (mapStateToProps || returnEmptyObject)(state, props),
      this.proxies,
      props
    );
    this.setState({ mergedProps });
  }
  render() {
    const { mergedProps } = this.state;
    return <ComposedComponent {...mergedProps} />;
  }
};

The above should support.
connect(
  (state) => ({
    hello: state.world,
  }),
  (dispatch, ownProps) => ({
    onKeyDown: (e) => dispatch(someAction()), // Old way should work
    onKeyUp: (e) => (mergedProps) => dispatch(someOtherAction(mergedProps.hello)), // New way
  })
)(SomethingDumb);

If we also cache the mapStateToProps result we could pass that to the proxy handle. This could be handy when you omit props in mergedProps.
Example:
connect(
  (state, ownProps) => ({
    aPropToOnlyUseInDispatch: state.something[ownProps.someId],
  }),
  dispatch => ({
    onSubmit: e => (mergeProps, stateProps) => dispatch(stateProps.aPropToOnlyUseInDispatch),
  }),
  someOmitHelperForConnect('aPropToOnlyUseInDispatch'),
)(SomeComponent)

@gaearon Any thoughts about the conceptual code?

@EloB Please actually read the link Mark provided.

This is probably doable with connectAdvanced. I'll post an example later.

Like this:
connectAdvanced((dispatch) => {
  let state;
  let props;

  let result = {
    onSubmit: e => {
      e.preventDefault();
      dispatch(someAction(state.someProp));
    }
  };

  return (nextState, nextProps) => {
    state = nextState;
    props = nextProps;
    return result;
  }
})(DumbComponent);

I disagree that this is an anti-pattern.  Only one instance of onSubmit is created per component. In fact, since it returns the same result instance every time and doesn't have to expose someProp to DumbComponent, it will never trigger a re-render, even when someProp has changed. This is the most performant solution.
I personally would just use withHandlers like in the original code. I'd only do it this way if state.someState was changing frequently enough that it was causing too many re-renders, and accessing the state in the action creator itself (with redux-thunk, for example) was not a good option.

Hmm.  Interesting.  I would still heavily recommend that people write an explicit handler method in their components, like:
handleClick = () => {
    this.props.onClick(this.props.someValue);
}

But, that approach is worth noting down.  I'll see if I can add a mention of this to that new FAQ entry.

Yeah, that's what I was meaning. You can certainly overload the functionality of connect, but that makes it less React-like and it's easier to miss bugs and harder to hook into standard dev tools that way. It's a design anti-pattern.

@markerikson Don't you think that the components will be smarter then they have to be then? I really like to write really stupid components and make them smart by my container. I don't like to many dependencies either. Right now I need like recompose (compose and withHandlers) this also is bad for performance because it's extra components etc. The code I provided doesn't create new functions every time you pass new props or state and it won't break pure either. The community has asked for this feature before as you said and my POC show it's totally possible without any big performance hits.

The first issue is that the sample you provided appears to reimplementing connect() from scratch.  I suppose that may be for the sake of illustration, but you'd be better off showing where it would fit in to the actual current implementation.
The second issue is the overall approach.  My own recommendation is to use action creators as much as possible, and use the "object shorthand" form of mapDispatch to bind those, without even writing an actual mapDispatch function.  I dislike the idea of re-binding parameters to methods any time they change.  There's nothing wrong with a component knowing that it needs to pass a certain prop as a parameter into a callback function, and that has nothing to do with whether or not a component "knows" about Redux.
If you really want to do that kind of thing, the "approved" workaround is to use mergeProps, or do something like the use of connectAdvanced that Jim showed.

I'd just use the getState arg in redux-thunk, personally. Way more testable that way.

@markerikson The code I provided was just for demonstration. As I wrote above I have zero knowledge about your codebase and it's pretty big to jump into. My rewrite took me about 10-15 min to write. So just wrote a conceptual code to prove that it doesn't have to pass new functions all the time. If I have to time I could do a PR but I won't waste my time if the concept won't be approved...
About the action creator thing I always do that I just noticed my example was wrong and my code example fits that as well.
I really don't like the current solution with compose and withHandlers. It's actually worse performance because of extra components and more code to read and creates a mess in React debug tool by all hocs... 😭

Looking at your example more closely, I'm pretty sure this will completely fail in the case where the passed-in function is a thunk:
    this.proxies = Object.keys(this.dispatchers)
      .reduce((obj, dispatchPropName) => {
        obj[dispatchPropName] = this.proxies[dispatchPropName] || (...args) => {
          const result = this.dispatchers[dispatchPropName](...args);
          if (typeof result === 'function') return result(this.state.mergedProps);
          return result;
        };
        return obj;
      }, {});

Overall, connect() is already pretty complex in terms of overloads and edge cases.  I don't see value in adding more complexity and more edge cases at this point.

Looking at your example more closely, I'm pretty sure this will completely fail in the case where the > passed-in function is a thunk:

I can't see how this couldn't work? It's still runs the normal store.dispatch in the end.

Mmm... I may be mixing up cases in my head between using the object shorthand and using an actual mapDispatch function.  I'll have to look at this again later.
I still stand by my point that I don't think this is worth another edge case.

authors: EloB jimbolla markerikson timdorr

repo: reactjs/react-redux


text:
useState reference on official React docs website

This page was provided by meta for Additional resources, but this page does not work.

Can you provide more detail on the issue? What is the expected and actual behavior?

@shaghayeghrabiee
Can you please share the link and screenshots?

I guess you're looking for this -> https://react.dev/reference/react/useState

Yup, as @kprakhar said, this doc exists here: react.dev/reference/react/useState

authors: farhanhalai30 kprakhar lunaleaps rickhanlonii shaghayeghrabiee


text:
Fixes #44 : Update CodeEditor to display the complete content

The code at the bottom of the CodeEditor in the examples was hidden, due to overflow : 'hidden' to the parent element. Made changes to show complete code. Also, hid the scroll-bar for better UI.

@bvaughn @gaearon Please review :)

@bvaughn Made the requested changes :)

@bvaughn Thanks for merging :) This was my first PR to the org :smile: Many more to come! :fireworks:

We're excited to hear that!

authors: akshatnitd bvaughn


text:
Created a boilerplate app, what's the best place to put it into?

So we've created the app boilerplate. Starting a new app is as simple as that: brunch new dir -s redux && cd dir && brunch watch --server. Much simpler than webpack. The app would also receive hot reload just in a bit.
I think this is useful for beginners. What is the best place to add the info?

If approved it would go in docs/introduction/Ecosystem.md. You can always make a PR if you think it would be beneficial to the community.

We’ve shied away from adding boilerplates to Ecosystem because of the monstrosities those usually are.
This one looks pretty simple but if we merge this, we’ll also need to be on the lookout for similar Browserify, Webpack, and Rollup examples so that it doesn’t appear we are promoting Brunch specifically.
I’d say for now it’s best to submit a PR to https://github.com/xgrommx/awesome-redux and https://github.com/markerikson/react-redux-links. If you’d like to compile an up-to-date list of simple boilerplates for different bundlers, then I think we can add them all together to Ecosystem page.
Cheers!

authors: Aweary gaearon paulmillr

repo: reactjs/redux


text:
🛑 Bellshade Website is down

In 92f9053, Bellshade Website (https://bellshade.org) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Bellshade Website is back up in 0344b43 after 7 minutes.


text:
🛑 Bellshade API is down

In 6397b35, Bellshade API (https://api.bellshade.org) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Bellshade API is back up in 79d2af8.


text:
🛑 Bellshade API is down

In 33e5c25, Bellshade API (https://api.bellshade.org) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Bellshade API is back up in 9c98ab0.


text:
Always use Resolver with default DNS to match Socket component

This PR updates this component to always have a default Resolver if none has been given explicitly. This is now consistent with the default Connector from the Socket component.
Builds on top of #19

For the reference: I've filed #21 to keep track of the fact that this defaults to using Google' public DNS server by default. This should be addressed in a follow-up PR, similar to https://github.com/reactphp/socket/issues/90 :shipit:

repo: reactphp/datagram


text:
TabContent vs TabPane

I went over the docs and dont quite understand what the difference between tabcontent and tabpane is. Is TabContent a single container to hold all Tabpanes, and Tabpane a div itself? Then why is <TabContent activeTab={this.state.activeTab}> in the examples

TabContent is a context container for the TabPane. It makes it easier to conditionally show which tab when its active rather than having to conditionally check if the activeTab == tabId in some HOC.
If you see the below link to the TabPane its just grabbing the activeTabId context from the TabContent component in order to hide itself if the tabIds are not equal.
https://github.com/reactstrap/reactstrap/blob/master/src/TabPane.js#L18

repo: reactstrap/reactstrap


text:
Highlights on Internet Explorer 11

This issue is a Bug
Expected Behaviour
I would like to remove highlights when I click on them
Observed behaviour
I can remove highlights when the highlights are not on the first chapter page
Steps to reproduce

Open this epub with Internet Explorer 11: http://readium.github.io/readium-js-viewer/?epub=http%3A%2F%2Freadium.github.io%2Freadium-js-viewer%2Fepub_content%2Femerald-city-oz&
Go to chapter 1
Change page.
Select some text.
Click on highlight text button
Click on the new highlight for remove it

More Info
I think the problem is in boundHighlightCallback function (group.js file) when get pageX and pageY
Product

Readium cloud reader app

Hi,
Any good news?

Hello, I have just noticed that your cloud reader link ( http://readium.github.io/readium-js-viewer/ ) references an older version (2.23.0-alpha: Tue, 02 Feb 2016 15:30:31 GMT).
The official web reader instances are actually uploaded at:
https://readium.firebaseapp.com (with a backup / fallback mirror at https://readium.surge.sh )
(from the develop branch, automatically deployed via the TravisCI continuous integration service)
2.28.0-alpha: Fri, 08 Sep 2017 09:12:34 GMT
https://readium-master.surge.sh
(from the master branch, manually deployed at each release)
2.27.0: Mon, 12 Jun 2017 08:48:20 GMT
Now, the "highlight" plugin has recently been deactivated in the latest default builds (you can still activate it yourself, but you have to rebuild the app and deploy it on your sever). So, here is a correct cloud reader link using the latest master release (which still had the "highlight" plugin):
https://readium-master.surge.sh/?epub=https%3A%2F%2Freadium.github.io%2Freadium-js-viewer%2Fepub_content%2Femerald-city-oz&goto={"idref"%3A"main1"%2C"elementCfi"%3A"%2F4%2F2%2F2[chapter_10198]%2F2%2F2%2F2%2F1%3A0"}

authors: danielweck tmoreno

repo: readium/readium-shared-js


text:
feat: updating our callout emoji regex to use emoji-regex

Fix RM-3635

🧰 Changes
This updates our emoji regex in callouts to use the emoji-regex package.
We now require a space between the icon and title for callouts

This PR was released!
🚀 Changes included in v6.47.0

authors: erunion rafegoldberg

repo: readmeio/markdown

license: ISC


text:
feat: update emoji url

🧰 Changes
Updates the emoji url to include /public.
🧬 QA & Testing

Broken on production.
Working in this PR app.

This PR was released!
🚀 Changes included in v6.61.0

authors: kellyjosephprice rafegoldberg


text:
fix: inline mdx images

🧰 Changes
Fixes loading inline images.
The editor was throwing away inlined MDX images! This PR converts them to plain inline markdown images.
🧬 QA & Testing

Broken on production.
Working in this PR app.

Won't converting ‘em to raw ![]() image syntax loose details like the [border] or [align] properties?

So this will convert any inline image to the raw ![]() image syntax? Won't that loose details like the [border] or [align] properties?

Hmm, I guess I was trying to maintain parity with existing behavior. But MDX makes it a lot easier to support inline images. Yea, ignore this, I'll fix this in the editor.

Kept the tests around though!

This PR was released!
🚀 Changes included in v7.6.5


text:
Mark the extension as safe for parallel reading and writing

This allows projects that use this theme to enable parallel building of documentation.
See http://www.sphinx-doc.org/en/stable/extdev/#extension-metadata for more details.
Tested on the documentation of the BuildBot project which produces 10MB of identical HTML files in both parallel and sequencial sphinx modes.

Ah, it seems this changed when translations were added. My bad!


text:
How to link a existed class instance to another class' property

In my realm database, I have had a class instance, how could I return it ang assign it to another class' property without save it again?
Do I need to use a RLMResults?
For Example:
class Dog:
property: name;
property:owner;
class Pig:
property:name;
property:owner;
class Person:
property:id(primary key)
property:name;
Now I have a Dog with a person in the realm database.
How could I get the person in the database, and then resign it to the pig without saving the person again?
Or I just donot have to make the person as a property of the Dog or Pig. I just need to save its ID?
Since when I save a Dog or Pig instance into the database, it will save a person into the Person table.
How could I avoid to save the same instance or reuse the instance?

Or I have a misunderstanding with Realm?

Realm is a object store and not a relational database. If you link / assign the same person to a Pig and a Dog, it is the same entry which will be referenced to both, so you will automatically reuse the same instance until you explicitly create a new instance. You don't operate on copies, but instead the actual data.
let person = Person()
person.name = "Arthur"

let dog = Dog()
dog.name = "Rex"
dog.owner = person

realm.write {
    realm.add(person)
    realm.add(dog)
}

let arthur = Realm.objects(Person).filter("name = %@", "Arthur")
let pig = Pig()
pig.name = "Babe"
pig.owner = arthur

assert(pig.owner == dog.owner, "It is the same owner for both animals.")

@mrackwitz Thanks! Got it.
I have a album which has a owner, and user lists who loves it, user list who comment on it. I try to save album with the users once. Then I got the problem:  primary key cannot be the same.
Now I check and save each user when I init user the album contains.
The problem has been solved.
+ (instancetype) initUserWithDictionary:(NSDictionary *)dictionary{
    NSInteger userID = [dictionary[@"uid"] integerValue];
    UserModel *aUser = [UserModel objectForPrimaryKey:@(userID)];

    if (aUser != nil) {
        return aUser;
    }

    UserModel *user = [[UserModel alloc] init];
    user.userID = [dictionary[@"uid"] integerValue];

    if ([UserModel isNullWith:dictionary[@"userName"]]) {
        user.userName = @"";//nil;
    } else {
        user.userName = dictionary[@"userName"];
    }

 // the first time I did not save each user when its init method
// I tried to save an album with all users related to the album, and some users are the same
// then problem has come

// now save it each time when init
// problem has been solved
   // persist data
    RLMRealm *realm = [RLMRealm defaultRealm];
    [realm transactionWithBlock:^{
        [realm addObject:user];
    }];
    return user;
}

Oh, I see. I think what you really want to do is perhaps rather:
NSMutableDictionary *userData = dictionary.mutableCopy
if ([UserModel isNullWith:userData[@"userName"]]) {
    userData[@"userName"] = @"";//nil;
}
UserModel *user;
RLMRealm *realm = [RLMRealm defaultRealm];
[realm transactionWithBlock:^{
    user = [UserModel createOrUpdateInRealm:RLMRealm.defaultRealm withValue:userData];
}];
return user;

This takes care of auto-updating the user and creates it only if doesn't already exist via the primary key.

@mrackwitz Elegant! Thanks a lot!

authors: mrackwitz wakaryry

repo: realm/realm-cocoa


text:
Expose a logging mode or log level in debug builds

Is it possible to log Realm activity (queries, insertions, etc) with something like CocoaLumberjack?
Some times while debugging it would be nice to see what queries are going on on Realm. Like what values are being inserted and what not.

I haven't used it a lot, but I think you're looking for RBQRealmChangeLogger.

I haven't used it a lot, but I think you're looking for RBQRealmChangeLogger.

Not quite. That's the sub-component of https://github.com/Roobiq/RBQFetchedResultsController responsible for tracking mutating operations manually (insertions, moves, updates, etc.). It doesn't log anything to the console or other logs.
If you wish to log some of Realm's internal operations while debugging, I'd recommend using symbolic breakpoints in Xcode.
Or if you use CocoaPods, you could edit Realm's source to insert logs and other instrumentation against your app. Just remember to revert those when you ship!

Okay, It would be nice to have something that does that.
Perhaps some time down the road.

Okay, It would be nice to have something that does that.

Agreed. Core Data's logging was invaluable whenever I've had to debug it, so I've made this ticket a feature request so we can track this.

As written in https://github.com/realm/realm-cocoa/issues/4474 I think this would be a very helpful addition.
Re-posting this small excerpt from Slick, something like this would be great.

To chime in here - we experienced unexpected results by incorrectly using .all and passing in an empty array which blew away existing data.

           realm.add(data, update: .all)

           realm.add(data, update: .modified)

If it was my framework and people were using this - I'd like to log out a print saying
WARNING - destroying all data.

authors: TiagoVeloso beloso i-schuetz johndpope jpsim kylebshr


text:
Specify an operation queue to associate with realm at init-time.

Hi Friends!
This is a feature request.
Goals
It would be incredibly useful, for purposes of dependency injection and testing, to be able to specify at init-time what operation queue (or dispatch queue if you want to go down to that level) to associate with a Realm. That way I don't have to do some weird thing like:
func realmFactory(operationQueue: NSOperationQueue, callback: Realm -> Void) {
    operationQueue.addOperationWithBlock {
        callback(try! Realm())
    }
}

in order to get a realm to work on a background thread. This will also make testing and such easier, as I can still structure my code to mostly work on the main thread.
Expected Results
I'd love the interface to look something like:
struct RealmConfiguration {
    [...]
    init([...], operationQueue: NSOperationQueue = NSOperationQueue.mainQueue())
    [...]
}

That way I don't have to have to be in callback hell, and can write my code as:
func realmFactory(operationQueue: NSOperationQueue) -> Realm {
    let configuration = Realm.Configuration(operationQueue: operationQueue)
    return try! Realm(configuration: configuration)
}

Actual Results
n/a
Steps to Reproduce
n/a
Code Sample
n/a
Version of Realm and Tooling
Doesn't exist as of Realm 0.98.3

Of course, it would be immensely helpful if it was even possible to use Realm in the way I described. Should really have looked into this more before I wrote the issue up.

Can you illustrate your use case a little more? It's not exactly clear to me, why you would ever want to retrieve a Realm instance initialized on a background thread, at least with the current thread model. You won't be able to use that instance on any other thread.

Can you illustrate your use case a little more? It's not exactly clear to me, why you would ever want to retrieve a Realm instance initialized on a background thread, at least with the current thread model. You won't be able to use that instance on any other thread.

At the time, I hadn't completely grok'd realms (lack of) threading model. Essentially, the request is that it would be awesome if I could pass in, say, a dispatch queue or an NSOperationQueue to bind the realm to, INSTEAD of a thread that realm implicitly binds itself to (meaning that if a queue was passed in, have the thread-checking code check against the queue, otherwise check against the thread). This way, I wouldn't have to pass around the Realm configuration file whenever I wanted to use the Realm in the background, and could instead just pass around a single object that talks to the database file for me.
Additionally, this would also solve the issue of "each time I run a new operation on a queue, I have to take time to new-up a new Realm, which is more overhead than I'd like".
What I did to work around that overhead was to have my RealmService class keep a private dictionary of [NSThread: Realm], that basically works like:
class RealmService {
  private var realms: [NSThread: Realm] = [:]
  var realm: Realm {
    if let realm = self.realms[NSThread.currentThread()] {
      return realm
    }
    let realm = try! Realm(configuration: self.realmConfiguration)
    self.realms[NSThread.currentThread()] = realm
    return realm
  }
  [...]
}

However, I find that this is pretty ugly and a code smell. (Also because I can conceivably have many Realm objects trying to talk to a single database file, which I've found can produce main-thread-blocking behavior in code that should be run entirely in the background.)

Essentially, the request is that it would be awesome if I could pass in, say, a dispatch queue or an NSOperationQueue to bind the realm to, INSTEAD of a thread that realm implicitly binds itself to (meaning that if a queue was passed in, have the thread-checking code check against the queue, otherwise check against the thread).

That just wouldn't work given how threads work because the initialization would need to be done on exactly the given (queue's) thread. Furthermore that wouldn't solve the underlying issue, as you would get an object with which you can't work on the current thread, but which still needs to be passed around.

What I did to work around that overhead was to have my RealmService class keep a private dictionary of [NSThread: Realm], that basically works like:

Exactly that sort of caching is already happening under the hood by Realm per path. So as long as you keep alive at least one accessor (Realm, Object, Results) on a given thread, the Realm for that thread will be directly returned when initializing a new instance. You're just paying the little overhead of allocating a new wrapper object, which is negligible.

Exactly that sort of caching is already happening under the hood by Realm per path. So as long as you keep alive at least one accessor (Realm, Object, Results) on a given thread, the Realm for that thread will be directly returned when initializing a new instance. You're just paying the little overhead of allocating a new wrapper object, which is negligible.

Ah, I'm immediately moving from a Realm object to my own thread-safe model structs, so that I don't leak what kind of backend I'm using to the app. (I have my apps broken up into the frontend app [the app], and a dynamic framework [the kit] that actually performs the work of talking to the network, the database, and other non-ui concerns. Part of this is also having thread-safe model structs that can be (de)serialized to/from Core Data, Realm, even raw data [which makes testing easy]).
So, uh, in my particular case, I'm not keeping hold of any Realm, Object, or Results object long-term, outside of my RealmService object/struct doing the "cache by thread" thing.

So, uh, in my particular case, I'm not keeping hold of any Realm, Object, or Results object long-term, outside of my RealmService object/struct doing the "cache by thread" thing.

Okay, then this RealmService idea might help and actually speed up things. If you have other ideas how that can be still solved in a general manner, they are welcome. Perhaps we could also improve our docs around what is happening here under the hood.

Perhaps we could also improve our docs around what is happening here under the hood.

That would be welcome. I'll close this issue.

authors: mrackwitz younata


text:
KVO notification after Realm is updated via realm.add(_, update: true) - possible?

Hi, I am trying to understand if it is already possible to use KVO to get updates from Realm when updating object's properties via realm.add(_, update: true) method.
Was this supposed to work already (RealmSwift 0.98.3)?
func NewChildObject() -> ChildObject
{
	let res = ChildObject()
	res.userId = NSUUID().UUIDString
	res.pwd_guid = NSUUID().UUIDString
	res.name = "Peppa"
	return res
}
// ...
context("object in Realm") {
	var child: ChildObject!
	var observedName: String?
	var observationName: DisposableType?
	beforeEach {
		child = NewChildObject()
		// add to Realm
		try! realm.write { realm.add(child) }
		// then it's possible to observe changes via KVO
		observationName = child.rValueForKeyPath("name", sendInitial: true, retainStrongly: true).observe { name in
			observedName = name
			}.scopedDisposable
		expect(observedName) == child.name
	}
	afterEach {
		observationName?.dispose()
		observationName = nil
	}

	it("propagates object properties' changes to other instances with the same primary key once saved to Realm") {
		let child2 = NewChildObject()
		child2.userId = child.userId // primary key
		child2.name = "George"

		// update object
		try! realm.write { realm.add(child2, update: true) }

		// changes are propagated to other instances with the same primary key
		expect(child.name) == child2.name // (1)
		expect(observedName) == child2.name // <<<--- failed - expected to equal <George>, got <Peppa> (2)

		// another try
		try! realm.write { child2.name = "Alice" }
		expect(child.name) == child2.name // (3)
		expect(observedName) == child2.name // but this one works! (4)
	}
}

Since the original child.name property was updated as expected (1), I supposed that KVO notification would also be sent (2). Since case (4) already works when updating object via property setter, do you think making (2) work will take much effort?
Thank you!

This is fixed by https://github.com/realm/realm-cocoa/pull/3295.

authors: impopappfactory tgoyne


text:
🛑 CDN2 is down

In 268f2f6, CDN2 (https://cdn2.realya.ch/) was down:

HTTP code: 500
Response time: 94 ms

Resolved: CDN2 is back up in a08b6aa.

repo: realya/Status


text:
executor, add job status polling

closes #33
Initial implementation of this PR relied on both file checking and polling in two separate threads. I don't think it was a good idea, so the final version completely relies on the polling job controller.
How to test:

Check out this branch and ensure that snakemake-engine Docker image is updated.

There are 3 main scenarios:

workflow success,
workflow failed due to an error inside workflow (e.g, incorrect command),
workflow failed because k8s or something else decided to stop it (e.g, due to timeout).

You can easily test the first two scenarios. The third one requires more setup, check the review notes below for more details. The most important thing is to check that no bugs were introduced.

Check if the progress state is displayed correctly in reana-client list --include-progress

Check if engine and jobs logs are displayed

Review notes:

I checked that the kubernetes_job_timeout parameter will work with this PR

I tested it on reana-demo-cms-h4l and reana-demo-root6 workflows

Codecov Report

Merging #34 (ae76a58) into master (7269f5a) will decrease coverage by 0.66%.
The diff coverage is 0.00%.

@@            Coverage Diff            @@
##           master     #34      +/-   ##
=========================================
- Coverage    4.92%   4.26%   -0.67%
=========================================
  Files           6       6
  Lines         142     164      +22
=========================================
  Hits            7       7
- Misses        135     157      +22

Impacted Files
Coverage Δ

reana_workflow_engine_snakemake/executor.py
0.00% <0.00%> (ø)

The logs from failed jobs are still gone, I assume is part of this issue.

Not sure about that, might be more related to this issue. Could you, please, share what did you do exactly to get this error?

The logs from failed jobs are still gone, I assume is part of this issue.

Not sure about that, might be more related to this issue. Could you, please, share what did you do exactly to get this error?

Yeah, might be. This problem wasn't there before because we performed many tests involving wrong memory values and it was reported back to the user. Here is the validation logic. Could it be related to the new changes?
In addition, checking the workflow-engine logs, I see that when the job is reported as failed, we don't capture its ID properly.
$ kubectl logs reana-run-batch-foo workflow-engine
...
2022-01-10 11:17:44,222 | reana-workflow-engine-snakemake | MainThread | INFO | Job 'helloworld' received, command: python code/helloworld.py --inputfile data/names.txt --outputfile results/greetings.txt --sleeptime 0
2022-01-10 11:17:44,222 | reana-workflow-engine-snakemake | MainThread | INFO | Environment: python:2.7-slim
2022-01-10 11:17:44,504 | reana-workflow-engine-snakemake | MainThread | ERROR | Error submitting job helloworld: Job submission error: The "kubernetes_memory_limit" provided 128MB has wrong format.
2022-01-10 11:17:44,507 | reana-workflow-engine-snakemake | MainThread | INFO | failed job: None
...

This problem wasn't there before because we performed many tests involving wrong memory values and it was reported back to the user.

It is reported in Yadage and Serial but not in Snakemake (and, I think, also CWL). You can test a wrong value with Snakemake master branch. There will be no logs with reana-client logs.

In addition, checking the workflow-engine logs, I see that when the job is reported as failed, we don't capture its ID properly.

Same, it happens with the master branch too. This is due to a reason that submission fails so the job doesn't have an ID.

authors: VMois codecov-commenter mvidalgarcia


text:
docs: update installation instructions

(closes #4)

Signed-off-by: Diego Rodriguez diego.rodriguez@cern.ch

closes or rather addresses in the commit log message?  (because of the introduced FIXME...)

authors: diegodelemos tiborsimko

repo: reanahub/reana


text:
The search window should be fixed

Currently, when I moved from the top page to the API page, the search input position moves from right to left. This is little uncomfortable.

The search UI will be reworked in a later point in time. There's some UX testing we need to do first. For now #84 will remove the search bar in favor of a search icon

This issue is closed since the navigation has changed since then. Should be uniform right now

Cool!

authors: imbsky ryyppy


text:
Add openSettings to Linking API

I think RN 0.60 is about to arrive, perhaps we can include this in our release

Should we also comment the binding for version?

I'll add proper documentation in a short while, perhaps adding the information to the bindings won't be necessary.

authors: MoOx sgny

repo: reasonml-community/bs-react-native


text:
Function not shown in the structure panel with "let ... and" and optional parameter

plugin version: 0.74
Description

maybe_unwrap and expand_rule should be shown in the structure panel
Probably get_prods and maybe_unwrap should be shown as hideable subnodes of maybe_add_nt since they are available on in the scope of maybe_unwrap

Commenting out various functions changes which functions are missing in the structure panel.  I couldn't infer what might be happening.

let rec maybe_add_nt edited_nt name sym =
  let maybe_unwrap ?(multi=false) = (* need the optional
     parm to see the error, commenting out
    makes get_prods disappear and expand_rule appear *)
    Printf.printf ""
  in
  let get_prods nt =  (* removing this makes maybe_unwrap
    disappear from the structure panel *)
    Printf.printf ""
  in
  Printf.printf ""

and expand_rule b  =
  Printf.printf ""

I don't know, I'm not a fan of showing local functions in the structure view.

expand_rule is a top level function, so it should definitely appear in the structure panel.
I am seeing some local functions and variables appear in the structure panel.  I assumed that was intentional.  Some examples below.  Sometimes local are nice to see.  IIRC the structure panel used to have more options (e.g. for Java); showing local functions could be an option.  Or not.
This shows local variables.  Removing the ?(plist=false) makes them disappear:

let prod_to_str ?(plist=false) prod =
  let p = ref prod in
  let res = ref [] in
  while !p <> [] do
    let need_semi = 0 in
  String.concat "" (List.rev !res)

Another example. Removing the ?(multi=false) on the second line makes all the non-local symbols go away.:

let rec maybe_add_nt edited_nt name sym =
  let maybe_unwrap ?(multi=false) sym =
    Printf.printf ""
  in
  let get_prods nt =
    let unw sym = List.hd (maybe_unwrap sym) in
    Printf.printf ""
  in
  let find_name nt =
    let nt' = ref "" in
    let i = ref 1 in
    let is_new = ref true in
    while !nt' = "" do
      let trial_name = if !i = 1 then nt else nt ^ (string_of_int !i) in
      try
        if NTMap.find trial_name !nt_map = get_prods trial_name then begin
          nt' := trial_name;
          is_new := false
        end else i := !i + 1
      with Not_found -> nt' := trial_name
    done;
    !nt', !is_new
  in
  let insert_nt new_nt =
    List.concat (List.map (fun nt ->
      if nt = edited_nt then [nt; new_nt] else [nt])
    !nt_order)
  in
  let nt', is_new = find_name nt in
  if is_new then begin
    let prods = (get_prods nt') in
    nt_order := insert_nt nt';
    nt_map := NTMap.add nt' prods !nt_map;
    expand_rule (nt', prods)
  end;
  nt', is_new

(* expand LIST*, OPT and add "empty" *)
(* todo: doesn't handle recursive expansions well, such as syntax_modifier_opt *)
and expand_rule b  =
  let nt_regex = Str.regexp "^[a-zA-Z_][a-zA-Z0-9_\\.]*$" in
  let (edited_nt, rule) = b in
  let insert_point = ref edited_nt in
  let good_name name = if Str.string_match nt_regex name 0 then name else "" in
  let map_name s =
    let s = match s with
    | _ -> s
    in
    good_name s
  in
  let rec get_name sym =
    Printf.printf ""
  in
  let rec expand prod0 =
    Printf.printf ""
  in
  let rule' = List.map expand rule in
  nt_map := NTMap.add edited_nt rule' !nt_map

Also: nt' should be tagged as a variable, not as a function.  edited_nt and rule should be separate entries:

0.75

Mostly fixed, but still not entirely right:

nt' should be tagged as a variable

is_new should be shown in the structure panel.
With an even simpler example:

let nt', is_new = (1,2)

This ils a différent issue

authors: giraud jfehrle

repo: reasonml-editor/reasonml-idea-plugin


text:
Contact US

[x] The Crypto Masters email => info@thecryptomasters.com
[x] Find library for contact form
[x] Contact us form -- basic outreach to email above
[ ] Add to homepage

Additional Emails:

brian@thecryptomasters.com
katie@thecryptomasters.com
ross@thecryptomasters.com

The tutorial above still requires a subscription. I will just have an email on homepage


text:
ct and eunit for builds

changes in this pr:

tests (src in /test) are now compiled to the appropriate app's ebin dir (but are filtered and excluded from being included in the app file)
bare tests (those that don't belong to an application) are compiled to _build/PROFILE/ebin. i am not sure this is the best place for them and am open to suggestions for where they should be placed
added add_to_profile/3 function to rebar_state for modifying profiles from within rebar
renamed the logdir for ct tests from logs to _logs to better match other meta directories (it could also be renamed _ct probably)

this pr supersedes #190 so it can now be closed if no one objects

this passed both locally and on travis for me under r15b03, could we try rerunning tests?

Should the logs dir be in _build/logs or whatever?

Yea, _build/logs would be good.

Ugh, I didn't mean to merge this.
Lets get a change in to move logs to _build/logs

should i move '_cover' too?

@talentdeficit yeah. Users should have to ignore _build and not much else from us in their gitignore config, ideally.

authors: ferd talentdeficit tsloughter


text:
Generate JSON-LD Context using TreeLDR

I've rewritten all the specs in spec/openapi in TreeLDR in the spec/tldr folder. For the moment it also include parts of other schemas such as schema.org in the spec/tldr/extern sub folder. I've also included the www.w3c.org/2018/credentials/v1 LD context in the spec/extern/www.w3c.org/2018/credentials folder, which is used as base context to generate the Rebase LD context.
There are a lot of stuff commented out for now that will be useful when generating JSON Schemas from the same specification (but I'll need to refine TreeLDR a bit before).
I've replaced the openapi-to-context.js script with a tldr-to-context.sh script that calls the TreeLDR compiler.
I tried to adapt the CI, but I have no idea how to test it.

Wrong PR target.


text:
v2.2.0 Breaks all my controller specs where .generate_card_token is used twice

Thanks to everyone for all the hard work on the 2.2.0 version!  It does break some of my controller tests, any specs which use StripeMock stuff calling .generate_card_token more than once break with the following error:
Failure/Error: card_two.process! # AASM state machine event
      NoMethodError:
        undefined method `create' for #<Stripe::StripeObject:0x871457e4> JSON: {
          "data": null
        }

This only happens if I am making sources twice in a spec, for example when mocking a couple cards for an #index controller action.  If I make only one, there are no errors, for example in the following example the errors go away if I delete one of the cards.  All other tests in the specs pass (typical controller CRUD tests).  Here is the code for the thinest controller test that I can repeat this with:
require 'rails_helper'
require 'stripe_mock'
require 'sidekiq/testing'

describe CardsController, :type => :controller do

  before(:each) do
    StripeMock.start
  end

  subject(:logged_in_user){ sign_in_user(create(:user), no_capybara: true)}

  subject(:card_one) do
    visa_token = StripeMock.generate_card_token(
      last4: "4242",
      brand: "Visa",
      exp_year: 2019,
      exp_month: 3 )
    card_one = Card.initialize_stripe_card(logged_in_user, visa_token)
    card_one.save!
    card_one.process! # AASM state machine event
    card_one
  end

  subject(:card_two) do
    mastercard_token = StripeMock.generate_card_token(
      last4: "4444",
      brand: "Mastercard",
      exp_year: 2019,
      exp_month: 3 )
    card_two = Card.initialize_stripe_card(logged_in_user, mastercard_token)
    card_two.save!
    card_two.process! # AASM state machine event
    card_two
  end

  after(:each) do
    StripeMock.stop
    Warden.test_reset!
  end

  subject(:logged_in_user_cards){ [card_one, card_two] }
  before{ logged_in_user_cards }

  describe "GET#index" do

    before(:each) do
      get :index
    end

    it "assigns @cards with the User's Cards," do
      expect(assigns(:cards)).to eq(logged_in_user_cards)
    end

    it "renders the index template," do
      expect(response).to render_template :index
    end
  end
end

I am using AASM state machines and Sidekiq to process my Stripe transactions, and it is not easy to initialize Cards properly in my tests, which is why I am doing it the way I do.  If someone can suggest a cleaner way (or even better, one that isn't broken) I would be interested to hear about it.  Thanks in advance.  Seems like there are some holes in test coverage which aren't catching changes that are breaking for controller specs.  Either that or my usage needs improving!

:+1:

@reconstructions have you tried with this PR? https://github.com/rebelidealist/stripe-ruby-mock/pull/266 Not sure if it will fix your particular problem, but I encountered similar problem to yours and it fixed mine. Let me know if it helps.

@louim, thanks for the pointer.  Curious if PR #266 might also fix Issue #253.

@louim, I tried the 2.2.0 master today, looks like you merged your PR #266 4 days ago, but I get the same error.  Sorry, and thanks for the contribution.  Here is my stack trace:
      # /Users/reconstructions/.rvm/gems/ruby-2.1.0/gems/stripe-1.27.2/lib/stripe/stripe_object.rb:241:in `method_missing'
      # ./app/models/card.rb:187:in `set_stripe_card'
      # ./app/models/card.rb:87:in `create_stripe_card'
      # /Users/reconstructions/.rvm/gems/ruby-2.1.0/gems/aasm-4.3.0/lib/aasm/core/event.rb:132:in `invoke_callbacks'
      # /Users/reconstructions/.rvm/gems/ruby-2.1.0/gems/aasm-4.3.0/lib/aasm/core/event.rb:49:in `fire_callbacks'
      # /Users/reconstructions/.rvm/gems/ruby-2.1.0/gems/aasm-4.3.0/lib/aasm/aasm.rb:132:in `aasm_fired'
      # /Users/reconstructions/.rvm/gems/ruby-2.1.0/gems/aasm-4.3.0/lib/aasm/aasm.rb:92:in `aasm_fire_event'
      # /Users/reconstructions/.rvm/gems/ruby-2.1.0/gems/aasm-4.3.0/lib/aasm/persistence/active_record_persistence.rb:148:in `block in aasm_fire_event'
      # /Users/reconstructions/.rvm/gems/ruby-2.1.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
      # /Users/reconstructions/.rvm/gems/ruby-2.1.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'
      # /Users/reconstructions/.rvm/gems/ruby-2.1.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
      # /Users/reconstructions/.rvm/gems/ruby-2.1.0/gems/activerecord-4.2.4/lib/active_record/transactions.rb:220:in `transaction'
      # /Users/reconstructions/.rvm/gems/ruby-2.1.0/gems/aasm-4.3.0/lib/aasm/persistence/active_record_persistence.rb:148:in `aasm_fire_event'
      # /Users/reconstructions/.rvm/gems/ruby-2.1.0/gems/aasm-4.3.0/lib/aasm/base.rb:102:in `process!'
      # ./spec/models/card_spec.rb:47:in `block (2 levels) in <top (required)>'
      # ./spec/models/card_spec.rb:279:in `block (3 levels) in <top (required)>'
      # ./spec/rails_helper.rb:197:in `block (2 levels) in <top (required)>'

On line 87 of card.rb I called:
stripe_card = stripe_customer.sources.create(source: stripe_token_id)

@reconstructions Would you mind sharing what you are doing in ./app/models/card.rb:187:in set_stripe_card'?

Not at all, thanks for looking at this.  Here is the stripe bit, the rest is AR stuff:
I am making/retrieving the Stripe customer from stripe_customer_object and using it to create a source:
stripe_customer = Card.stripe_customer_object(self.user)
stripe_card = stripe_customer.sources.create(source: stripe_token_id)

Here is the function I use to make a customer object the first time and retrieve it
after that:
def self.stripe_customer_object(user)

      unless user.customer_id?
        customer_object = Stripe::Customer.create(email: user.email )
        user.customer_id = customer_object.id
        user.save
      else
        customer_object = Stripe::Customer.retrieve(user.customer_id)
      end
      customer_object
  end

So perhaps this is a problem with the hash for the customer object.

Any one else manage to reproduce this one?  StripeMock is my only gem which is outdated, I wouldn't want to get left behind...

in 2.2.0 used Stripe 1.28.1 - try to update your gem - I see 1.27.2 in your log.
Also do you save customer after creating a card?
stripe_customer = Card.stripe_customer_object(self.user)
stripe_card = stripe_customer.sources.create(source: stripe_token_id)
stripe_customer.save

I can't reproduce your error. It works for me.

Thanks for the input, @alexmamonchik.  Yep, I save my customer after creating a Card:
stripe_customer = Card.stripe_customer_object(user)
      stripe_customer.default_source = self.stripe_card_id
      stripe_customer.save

Because I am only having these problems in controller specs (my model specs are fine), I suspect that that could be a factor.  So if other people aren't able to repeat this, but only in their model specs, that doesn't mean it couldn't be a bug for those who use controller specs.  It is also possible it has something to do with how I am using state machine calls (AASM) in mocking my cards.
I will try again using Stripe 1.28.1.  I first rolled forward to 2.2.0 the day it was released, and 1.27.2 was the latest Stripe release at that time.
Hope I don't get left behind for much longer by this release.  I just had to tear Compass Rails out of my app after they abandoned their gem and left me locked at sprockets 2 for more than a year.

Same result with stripe 1.30.2 and stripe-ruby-mock 2.2.0.  I have 25 test failures.  Most of them are something along this line:
Failure/Error: customer.subscriptions.create(
      NoMethodError:
        undefined method `create' for #<Stripe::StripeObject:0x3fc73a54f588> JSON: {
          "data": null
        }
      # /Users/reconstructions/.rvm/gems/ruby-2.1.7@sfrc/gems/stripe-1.30.2/lib/stripe/stripe_object.rb:288:in `method_missing'
      # ./spec/controllers/subscriptions_controller_spec.rb:52:in `block (2 levels) in <top (required)>'
      # ./spec/controllers/subscriptions_controller_spec.rb:192:in `block (3 levels) in <top (required)>'
      # ./spec/rails_helper.rb:197:in `block (2 levels) in <top (required)>'

Or things downstream from these failures.
Here's what I am doing on line 52 of my subscriptions_controller_spec.rb:
customer = Stripe::Customer.retrieve(user.customer_id)
customer.subscriptions.create( plan: stripe_plans.first.id, card: card)

This works fine with Stripe 1.30.2 in my app, it is only the tests that fail... Thanks in advance.

@reconstructions Same problem here. :+1: Did you find a solution?

if you both have the same problem it is a bug. Please, provide more information - I can't reproduce it. For example version of Stripe API or something else.

I'm using stripe 1.30.2, Stripe API 2015-02-18 and stripe-ruby-mock 2.2.0.

@berpj thanks. Do you use the same code example?

Thanks for looking into the problem. Yes it's the same. I'm now using stripe 1.20.1 and stripe-ruby-mock 2.1.1 and it works: all tests pass.

@reconstructions Can you get last code of gem and check your test again? Updated to stripe 1.31.0

It's still broken, here are some typical stack traces.  In a couple days I might have some time to try and put together a minimum app which demonstrates this bug.
33) SubscriptionsController GET#show renders the show template
      Failure/Error: customer.subscriptions.create(
      NoMethodError:
        undefined method `create' for #<Stripe::StripeObject:0x3ffa662d34a8> JSON: {
        }
      # /Users/reconstructions/.rvm/gems/ruby-2.1.7@sfrc/gems/stripe-1.31.0/lib/stripe/stripe_object.rb:281:in `method_missing'
      # ./spec/controllers/subscriptions_controller_spec.rb:52:in `block (2 levels) in <top (required)>'
      # ./spec/controllers/subscriptions_controller_spec.rb:73:in `block (3 levels) in <top (required)>'
      # ./spec/rails_helper.rb:197:in `block (2 levels) in <top (required)>'

All the errors come down to stripe_object.rb:281:in method_missing'`.  I didn't do any additional looking into this, but I will try to put together a demo app at some point if I can finish the other stuff I am working on.
Thanks for working on this!

Whoops, clicked close by accident, sorry.

@reconstructions can you check your test with new version of gem 2.2.1 ?

That fixed it, great job!

authors: PlugIN73 alexmamonchik berpj louim reconstructions

repo: rebelidealist/stripe-ruby-mock


text:
Images for README

You can use this issue to put your images here and GitHub will store them for you outside of the repository, and then you can put just a link on them in README. Like this

I'd recommend rather to put it on the folder /.github/ of the root from the repository, like most repositories do.

Also, a place for people to share their configs.

Better use wiki for this!


text:
cancelSelected fired when selecting other annotation programmatically

If you select an annotation using selectAnnotation(), selectAnnotation event won't be launched (nice!), but if another annotation was previously selected it will launch cancelSelected event (not nice).
Is this intended? Is there a way to detect such situations (that selection was cancelled because another annotation was selected)?
Thanks!

Yes that's the intended behavior. Deselect (without save/update) corresponds to a cancel event. There's currently no way to distinguish a "deselect-cancel" from an explicitly triggered cancel.

authors: enekonieto rsimon

repo: recogito/annotorious-openseadragon


text:
Error when updating centralLabel

I get this error in Chrome 71.0.3578.98 every time, when I change the value for the centralLabel in a background process. The values in the chart is changed correctly but the error message is written in the console output.
ERROR TypeError: Cannot read property 'currentValue' of undefined
at GaugeChartComponent.push../node_modules/angular-gauge-chart/fesm5/angular-gauge-chart.js.GaugeChartComponent.ngOnChanges (angular-gauge-chart.js:87)
at checkAndUpdateDirectiveInline (core.js:8941)
at checkAndUpdateNodeInline (core.js:10209)
at checkAndUpdateNode (core.js:10171)
at debugCheckAndUpdateNode (core.js:10804)
at debugCheckDirectivesFn (core.js:10764)
at Object.eval [as updateDirectives] (PageComponent.html:12)
at Object.debugUpdateDirectives [as updateDirectives] (core.js:10756)
at checkAndUpdateView (core.js:10153)
at callViewAction (core.js:10394)

Fixed in #18

authors: cherurg mknaa

repo: recogizer/angular-gauge-chart