text:
react-native package still have react@16.4.1 as peer dependency including bug CVE-2018-6341

Environment
Using react-native@0.56.0.
Description
Versions >=0.56.0 still use react@16.4.1 as part of peer/dev dependencies, which includes a potential XSS vulnerability issue as described in https://github.com/facebook/react/releases/tag/v16.4.2.

When building a project which includes 16.4.1 packages, the following message appears as part of the build output:
warning react-dom@16.4.1: This version of react-dom/server contains a minor vulnerability. Please update react-dom to 16.4.2+. Learn more: https://fb.me/cve-2018-6341

Suggested fix
Package version needs to be upgraded to 16.4.2 in order to include the vulnerability fixes in that release.

According to https://reactjs.org/blog/2018/08/01/react-v-16-4-2.html

Your app might be affected by this vulnerability only if both of these two conditions are true:

Your app is being rendered to HTML using ReactDOMServer API, and
Your app includes a user-supplied attribute name in an HTML tag.

I don't know any server side rendered workflow using react native, and if it will be the case it should be with another home made renderer.
Last but not least the actual renderer are synced from https://github.com/facebook/react to this repository (see for example https://github.com/facebook/react-native/blob/master/Libraries/Renderer/oss/ReactNativeRenderer-dev.js) so the actual repository does not contain the vulnerability, AFAIK.
I think we can close the issue or rename it to "remove warning about react-dom@16.4.1 while building RN".

Thanks for the heads up. This should be taken care of once we sync the React and React Native renderers.

Cool, thanks @hramos.

It might be good to remind folks that react-dom shouldn't be included with RN apps since it's for browser-based applications. Maybe it's only being included in the devDependencies in this case.

Fixed.

authors: c0d3m3nt0r hramos newyankeecodeshop tychota


text:
ScrollView doesn't scroll to focused element

Environment
Android API: 28
Device: AndroidTV emulator and Xiaomi MI BOX
React Native: 0.61.5
Description
Sometimes ScrollView doesn't scroll to currently focused element on AndroidTV devices. Looks like issue is triggered because of two scroll events, one from ReactScrollView.java arrowScroll method and one from requestChildFocus. Issue seems to occur only when scrolling on the bottom of ScrollView.
React Native version:
"0.61.5"
Steps To Reproduce

Navigate with keyboard/remote controller up and down on between last rows of ScrollView.

Expected Results
Scroll follows focused element
Snack, code example, screenshot, or link to a repository:
App.ts example:
import React from 'react';
import {View, StyleProp, TextStyle, ViewStyle, TouchableOpacity, ScrollView, Text} from 'react-native';
const styles: {[name: string]: StyleProp<ViewStyle> | StyleProp<TextStyle>} = {
  container: {
    position: 'absolute',
    width: '100%',
    height: '100%',
    backgroundColor: '#000',
    justifyContent: 'flex-end',
    alignContent: 'center'
  }
};
const rows = [1,2,3,4,5,6,7,8,9];
const columns = ['a', 'b', 'c', 'd', 'e', 'f'];
type Props = {
  text: string;
  number: number;
}
const MyButton = (props: Props) => {
  return (
    <TouchableOpacity
      style={{width: 200, height: 200, margin: 50, backgroundColor: `rgba(100,255,0,0.3)`}}
      key={props.text + props.number}
      onPress={() => {}}
    >
      <Text>{props.text + props.number}</Text>
    </TouchableOpacity>
  );
};
const App = () => {
  return (
    <View style={styles.container}>
      <ScrollView>
        {rows.map((number) => (
          <ScrollView
            horizontal={true}
            key={'scrollview' + number}
          >
            {columns.map((text) => <MyButton text={text} number={number} key={text + number} />)}
          </ScrollView>
        ))
        }
      </ScrollView>
    </View>
  );
};
export default App;

In gif below i navigated up and down only:

Android TV is not officially supported, though folks from the community have contributed code to enable it. I'm going to label this issue as something that would need to be fixed by a pull request from the community if needed.

@Zahoq could you link a minimal reproduction repo (preferably on GitHub as well)?

repo: https://github.com/Zahoq/ScrollViewBug
Issue still reproduces on react-native: 0.62.2

source: gharchive/issue

authors: Zahoq falxcerebri hramos

repo: facebook/react-native

license: MIT

license_type: permissive

license_source: github-api


text:
iOS app crash when new architecture is enabled for RN 0.69

Description
IOS app crash when new architecture is enabled.
Following is the error message
dyld[7584]: Library not loaded: @rpath/hermes.framework/hermes
  Referenced from: /Users/transformhub/Library/Developer/CoreSimulator/Devices/C4701BE2-14AC-4199-9F37-35D16044678B/data/Containers/Bundle/Application/99A862BA-AF04-4583-94E4-1B26AE75EB56/iosapp.app/iosapp
  Reason: tried: '/Users/transformhub/Library/Developer/Xcode/DerivedData/iosapp-flwkvetfogjghcgfttcelwqhnknn/Build/Products/Debug-iphonesimulator/hermes.framework/hermes' (no such file), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/hermes.framework/hermes' (no such file), '/usr/lib/swift/hermes.framework/hermes' (no such file), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/hermes.framework/hermes' (no such file), '/usr/lib/swift/hermes.framework/hermes' (no such file), '/Users/transformhub/Library/Developer/CoreSimulator/Devices/C4701BE2-14AC-4199-9F37-35D16044678B/data/Containers/Bundle/Application/99A862BA-AF04-4583-94E4-1B26AE75EB56/iosapp.app/Frameworks/hermes.framework/hermes' (no such file), '/Users/transformhub/Library/Developer/CoreSimulator/Devices/C4701BE2-14AC-4199-9F37-35D16044678B/data/Containers/Bundle/Application/99A862BA-AF04-4583-94E4-1B26AE75EB56/iosapp.app/Frameworks/hermes.framework/hermes' (no such file), '/Users/transformhub/Library/Developer/CoreSimulator/Devices/C4701BE2-14AC-4199-9F37-35D16044678B/data/Containers/Bundle/Application/99A862BA-AF04-4583-94E4-1B26AE75EB56/iosapp.app/Frameworks/hermes.framework/hermes' (no such file), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/hermes.framework/hermes' (no such file), '/usr/lib/swift/hermes.framework/hermes' (no such file), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/hermes.framework/hermes' (no such file), '/usr/lib/swift/hermes.framework/hermes' (no such file), '/Users/transformhub/Library/Developer/CoreSimulator/Devices/C4701BE2-14AC-4199-9F37-35D16044678B/data/Containers/Bundle/Application/99A862BA-AF04-4583-94E4-1B26AE75EB56/iosapp.app/Frameworks/hermes.framework/hermes' (no such file), '/Users/transformhub/Library/Developer/CoreSimulator/Devices/C4701BE2-14AC-4199-9F37-35D16044678B/data/Containers/Bundle/Application/99A862BA-AF04-4583-94E4-1B26AE75EB56/iosapp.app/Frameworks/hermes.framework/hermes' (no such file), '/Users/transformhub/Library/Developer/CoreSimulator/Devices/C4701BE2-14AC-4199-9F37-35D16044678B/data/Containers/Bundle/Application/99A862BA-AF04-4583-94E4-1B26AE75EB56/iosapp.app/Frameworks/hermes.framework/hermes' (no such file), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/hermes.framework/hermes' (no such file)
Library not loaded: @rpath/hermes.framework/hermes
  Referenced from: /Users/transformhub/Library/Developer/CoreSimulator/Devices/C4701BE2-14AC-4199-9F37-35D16044678B/data/Containers/Bundle/Application/99A862BA-AF04-4583-94E4-1B26AE75EB56/iosapp.app/iosapp
  Reason: tried: '/Users/transformhub/Library/Developer/Xcode/DerivedData/iosapp-flwkvetfogjghcgfttcelwqhnknn/Build/Products/Debug-iphonesimulator/hermes.framework/hermes' (no such file), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/hermes.framework/hermes' (no such file), '/usr/lib/swift/hermes.framework/hermes' (no such file), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/hermes.framework/hermes' (no such file), '/usr/lib/swift/hermes.framework/hermes' (no such file), '/Users/transformh
(lldb)

Version
0.69.0
Output of npx react-native info
info Fetching system and libraries information...
System:
OS: macOS 12.4
CPU: (8) x64 Apple M1
Memory: 44.15 MB / 8.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.13.0 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 8.1.0 - /usr/local/bin/npm
Watchman: 2022.03.21.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK: Not Found
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8609683
Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
Languages:
Java: javac 16 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.0.0 => 18.0.0
react-native: 0.69.0 => 0.69.0
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
Run npx react-native init myapp
cd to ios
Run RCT_NEW_ARCH_ENABLED=1 pod install
Run npx react-native run-ios
Snack, code example, screenshot, or link to a repository
https://github.com/PritishSawant/reactnativeiosappturbomodulesv3

I'm also getting this error after using react-native-community/react-native-typescript-template@6.11.1 ios hermes enabled

This is resolved in RN 0.69.1

is this any way to fix this runtime crash without upgrading to 0.69.1 ?

I am also facing this issue
Library not loaded: @rpath/hermes.framework/hermes
  Referenced from: <820861D1-8B34-32A1-93AD-515688C99552> /Users/msahu2595/Library/Developer/CoreSimulator/Devices/63B70222-4E95-40F6-8EB9-9399A188F3E3/data/Containers/Bundle/Application/3032952F-549B-47F1-B508-56F0F2CA0F10/bowootApp.app/bowootApp
  Reason: tried: '/Users/msahu2595/Library/Developer/Xcode/DerivedData/bowootApp-ftpnlxrucelfydglzmpeqbmqmquw/Build/Products/Debug-iphonesimulator/hermes.framework/hermes' (errno=2), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/hermes.framework/hermes' (errno=2), '/usr/lib/swift/hermes.framework/hermes' (errno=2, no dyld cache), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/hermes.framework/hermes' (errno=2), '/usr/lib/swift/hermes.framework/hermes' (errno=2, no dyld cache), '/Users/msahu2595/Library/Developer/CoreSimulator/Devices/63B70222-4E95-40F6-8EB9-9399A188F3E3/data/Containers/Bundle/Application/3032952F-549B-47F1-B508-56F0F2CA0F10/bowootApp.app/Frameworks/hermes.framework/hermes' (errno=2), '/Users/msahu2595/Library/Developer/CoreSimulator/Devices/63B70222-4E95-40F6-8EB9-9399A188F3E3/data/Containers/Bundle/Application/3032952F-549B-47F1-B508-56F0F2CA0F10/bowootApp.app/Frameworks/hermes.framework/hermes' (errno=2), '/Users/msahu2595/Library/Developer/CoreSimulator/Devices/63B70222-4E95-40F6-8EB9-9399A188F3E3/data/Containers/Bundle/Application/3032952F-549B-47F1-B508-56F0F2CA0F10/bowootApp.app/Frameworks/hermes.framework/hermes' (errno=2), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/hermes.framework/hermes' (errno=2), '/usr/lib/swift/hermes.framework/hermes' (errno=2, no dyld cache), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/hermes.framework/hermes' (errno=2), '/usr/lib/swift/hermes.framework/hermes' (errno=2, no dyld cache), '/Users/msahu2595/Library/Developer/CoreSimulator/Devices/63B70222-4E95-40F6-8EB9-9399A188F3E3/data/Containers/Bundle/Application/3032952F-549B-47F1-B508-56F0F2CA0F10/bowootApp.app/Frameworks/hermes.framework/hermes' (errno=2), '/Users/msahu2595/Library/Developer/CoreSimulator/Devices/63B70222-4E95-40F6-8EB9-9399A188F3E3/data/Containers/Bundle/Application/3032952F-549B-47F1-B508-56F0F2CA0F10/bowootApp.app/Frameworks/hermes.framework/hermes' (errno=2), '/Users/msahu2595/Library/Developer/CoreSimulator/Devices/63B70222-4E95-40F6-8EB9-9399A188F3E3/data/Containers/Bundle/Application/3032952F-549B-47F1-B508-56F0F2CA0F10/bowootApp.app/Frameworks/hermes.framework/hermes' (errno=2), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/hermes.framework/hermes' (errno=2)
Library not loaded: @rpath/hermes.framework/hermes
  Referenced from: <820861D1-8B34-32A1-93AD-515688C99552> /Users/msahu2595/Library/Developer/CoreSimulator/Devices/63B70222-4E95-40F6-8EB9-9399A188F3E3/data/Containers/Bundle/Application/3032952F-549B-47F1-B508-56F0F2CA0F10/bowootApp.app/bowootApp
  Reason: tried: '/Users/msahu2595/Library/Developer/Xcode/DerivedData/bowootApp-ftpnlxrucelfydglzmpeqbmqmquw/Build/Products/Debug-iphonesimulator/hermes.framework/hermes' (errno=2), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/hermes.framework/hermes' (errno=2), '/usr/lib/swift/hermes.framework/hermes' (errno=2, no dyld cache), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/hermes.framework/hermes' (errno=2), '/usr/lib/swift/hermes.framework/herme
dyld config: DYLD_SHARED_CACHE_DIR=/Users/msahu2595/Library/Developer/CoreSimulator/Caches/dyld/22A380/com.apple.CoreSimulator.SimRuntime.iOS-16-1.20B72 DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot DYLD_LIBRARY_PATH=/Users/msahu2595/Library/Developer/Xcode/DerivedData/bowootApp-ftpnlxrucelfydglzmpeqbmqmquw/Build/Products/Debug-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libBacktraceRecording.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMainThreadChecker.dylib:/usr/lib/libRPAC.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib DYLD_FRAMEWORK_PATH=/Users/msahu2595/Library/Developer/Xcode/DerivedData/bowootApp-ftpnlxrucelfydglzmpeqbmqmquw/Build/Products/Debug-iphonesimulator DYLD_FALLBACK_FRAMEWORK_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks DYLD_FALLBACK_LIBRARY_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib
(lldb)

System:
OS: macOS 13.0
CPU: (4) x64 Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz
Memory: 32.36 MB / 8.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node
Yarn: Not Found
npm: 8.15.0 - ~/.nvm/versions/node/v16.17.0/bin/npm
Watchman: 2022.10.24.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.1, iOS 16.1, macOS 13.0, tvOS 16.1, watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: 2021.1 AI-211.7628.21.2111.8309675
Xcode: 14.1/14B47b - /usr/bin/xcodebuild
Languages:
Java: 11.0.14.1 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: Not Found
react-native: Not Found
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found


text:
Centering things vertically in a container requires the parent of container to have a given height

When trying to use flexbox and centering things vertically that are in a container the parent of the container must have a given height.
I have made an example at rnplay which you can check out here: https://rnplay.org/apps/ZntqsQ
Just uncomment the height of the parent and the text will be centered.
The issue is present in both iOS and Android and React Native 0.11 and 0.12.

Hi there! This issue is being closed because it has been inactive for a while.
But don't worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/centering-things-vertically-in-a-container-requires-the-parent-of-container-to-have-a-given-height
ProductPains helps the community prioritize the most important issues thanks to its voting feature.
It is easy to use - just login with GitHub.
Also, if this issue is a bug, please consider sending a PR with a fix. We rely on the community to provide
bugfixes as the core team is focused on performance.

Hi, I see. Thanks for the response.

authors: drager mkonicek


text:
EXC_BAD_INSTRUCTION when accessing RCTBridge.eventDispatcher after reload

Hey! I’m getting a EXC_BAD_INSTRUCTION runtime error when trying to access myBridge.eventDispatcher after a reload. I’ve also noticed that there are multiple instances of my Swift class hanging around (one is created each time I reload), and I think that this error is coming from an instance attempting to use an event dispatcher that no longer exists.
Indeed, self.bridge.eventDispatcher is nil from the instance created before the reload.
Here’s my Swift class
I don't think that this would be a problem if my old instances were deinit()-ing properly. I suspect that they're not being ARCd because of the blocks attached to firebase references. I could easily clean up these references, which would hopefully allow this old instance to dealloc, but I’m not sure how to tell when to do so. Does react-native call any methods or etc on my component before it reloads the JS application?
Kinda new to swift, sorry if this is a basic mistake. Thanks for your help!

Implementing RCTInvalidate protocol gave me the hook I needed to clean up references and allow old instances to dealloc.
This was pretty difficult to find, I came across it on this excellent blog post. It might be worth adding some of this info regarding native module lifecycle to the documentation!


text:
How do i add shadow and  to a box in react native

this is my code...........
/**
 * Created by Yasi Ahmed on 05-12-2015.
 */
'use strict';

var React = require('react-native');
var BloggerApi = require('./BloggerApi');
var HTMLView = require('react-native-htmlview');
var striptags = require('striptags');
var moment = require('moment');

var {
    ListView,
    StyleSheet,
    Text,
    View,
    TouchableOpacity,
    } = React;

var PostListView = React.createClass({
    getInitialState: function () {
        return {
            dataSource: new ListView.DataSource({
                rowHasChanged: (row1, row2) => row1 !== row2,
            }),
            loaded: false,
        };
    },
    fetchData: function () {
        var items = require("./dummy/posts.json");
        this.setState({
            dataSource: this.state.dataSource.cloneWithRows(items.items),
            loaded: true
        });
        /*
         BloggerApi.fetchPosts()
         .then((responseData) => {
         this.setState({
         dataSource: this.state.dataSource.cloneWithRows(responseData.items),
         loaded: true
         });
         })
         .done();
         */
    },
    componentDidMount: function () {
        this.fetchData();
    },
    render: function () {
        if (!this.state.loaded) {
            return this.renderLoadingView();
        } else {
            console.log(this.state)
        }

        return (
            <ListView
                dataSource={this.state.dataSource}
                renderRow={this.renderPostItem}
                style={styles.listView}
            />
        );
    },
    renderPostItem: function (post) {

        return (
            <TouchableOpacity>
                <View style={styles.rightContainer}>
                    <Text style={styles.title}>{post.title}</Text>
                    <View style={styles.content}>
                        <Text>
                            {striptags(post.content).substring(0, 100)}........
                        </Text>
                    </View>
                    <View style={styles.bottomContainer}>
                        <Text style={styles.date}>{moment(post.published).format("MMM Do YY, h:mm a")}</Text>
                        <Text style ={styles.read_more}>Read more...</Text>
                    </View>
                </View>

            </TouchableOpacity>
        );
    },
    renderLoadingView: function () {
        return (
            <View style={styles.container}>
                <Text>
                    Loading posts...
                </Text>
            </View>
        );
    }
});

var styles = StyleSheet.create({
    container: {
        flex: 1,
        flexDirection: 'row',
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: '#F5FCFF'

    },
    rightContainer: {
        borderWidth: .5,
        borderRadius: .5,
        borderColor: '#000',
        paddingLeft: 15,
        paddingRight: 15,
        flex: 1,
        marginBottom:5,
        marginLeft:5,
        marginRight:5,
    },
    bottomContainer: {
        flexDirection: 'row',
        paddingLeft: 15
    },
    title: {
        fontSize: 20,
        marginBottom: 8,
        textAlign: 'center'
    },
    date: {
        paddingLeft: 25,
        fontSize: 14,
        color: '#2196f3',
        marginBottom: 8

    },
    read_more: {
        paddingRight: 50,
        textAlign: 'right',
        fontSize: 14,
        color: '#2196f3'

    },
    content: {
        paddingLeft: 25,
        height: 100,
        paddingRight: 25
    },
    listView: {
        paddingTop: 20,
        backgroundColor: '#F5FCFF'
    }
});

module.exports = PostListView;

Thankyou.... Any ways i used android studio..... Now im on react native....
I feel a lots of simplicity ....
On 06-Dec-2015 7:23 PM, "Facebook Community Bot" notifications@github.com
wrote:

Hey yasicmd, thanks for reporting this issue!
React Native, as you've probably heard, is getting really popular and
truth is we're getting a bit overwhelmed by the activity surrounding it.
There are just too many issues for us to manage properly.

If this is a feature request or a bug that you would like to be fixed
by the team, please report it on Product Pains
https://productpains.com/product/react-native/. It has a ranking
feature that lets us focus on the most important issues the community is
experiencing.
If you don't know how to do something or not sure whether some
behavior is expected or a bug, please ask on StackOverflow
http://stackoverflow.com/questions/tagged/react-native with the tag
react-native or for more real time interactions, ask on Discord
https://discord.gg/0ZcbPKXt5bZjGY5n in the #react-native channel.
We welcome clear issues and PRs that are ready for in-depth
discussion; thank you for your contributions!
—
Reply to this email directly or view it on GitHub
https://github.com/facebook/react-native/issues/4599#issuecomment-162319411
.

You can use the elevation property for Android, and the shadow* properties on Android. http://facebook.github.io/react-native/docs/view.html#style
There's an awesome place to ask question like this one: StackOverflow. It's the best system for Q&A. Many people from the community hang out there and will be able to see your question, you can vote on answers and mark question as answered etc. This lets us keep a list of bug reports and feature requests on github and especially Product Pains (again, with voting which is really nice).
If you think StackOverflow works for you please consider posting there instead and closing this issue.
I'm posting this here because github issues haven't been working very well for us and because StackOverflow is so much better. Thanks for reading! :)

I already did that.... But it shows error when i add elevation.....
On 06-Dec-2015 10:22 PM, "Satyajit Sahoo" notifications@github.com wrote:

You can use the elevation property for Android, and the shadow*
properties on Android.
http://facebook.github.io/react-native/docs/view.html#style
There's an awesome place to ask question like this one: StackOverflow
http://stackoverflow.com/questions/tagged/react-native. It's the best
system for Q&A. Many people from the community hang out there and will be
able to see your question, you can vote on answers and mark question as
answered etc. This lets us keep a list of bug reports and feature requests
on github and especially Product Pains
https://productpains.com/product/react-native/?tab=top (again, with
voting which is really nice).
If you think StackOverflow works for you please consider posting there
instead and closing this issue.
I'm posting this here because github issues haven't been working very well
for us and because StackOverflow is so much better. Thanks for reading! :)
—
Reply to this email directly or view it on GitHub
https://github.com/facebook/react-native/issues/4599#issuecomment-162328350
.

And i will post it tomorrow in stackoverflow ......
On 07-Dec-2015 12:07 AM, "Yasi Ahmed" yasicmd@gmail.com wrote:

I already did that.... But it shows error when i add elevation.....
On 06-Dec-2015 10:22 PM, "Satyajit Sahoo" notifications@github.com
wrote:

You can use the elevation property for Android, and the shadow*
properties on Android.
http://facebook.github.io/react-native/docs/view.html#style
There's an awesome place to ask question like this one: StackOverflow
http://stackoverflow.com/questions/tagged/react-native. It's the best
system for Q&A. Many people from the community hang out there and will be
able to see your question, you can vote on answers and mark question as
answered etc. This lets us keep a list of bug reports and feature requests
on github and especially Product Pains
https://productpains.com/product/react-native/?tab=top (again, with
voting which is really nice).
If you think StackOverflow works for you please consider posting there
instead and closing this issue.
I'm posting this here because github issues haven't been working very
well for us and because StackOverflow is so much better. Thanks for
reading! :)
—
Reply to this email directly or view it on GitHub
https://github.com/facebook/react-native/issues/4599#issuecomment-162328350
.


text:
React native 0.28 use fetch get data catch error

use fetch on chrome borwser

use React native 0.28

error

It makes me very confused
use 0.25 fetch is ok,

I put http replace https is ok ,but me don't understand is why

the reason is Apple recommand use https by default.

http://stackoverflow.com/questions/36289125/react-native-fetch-from-https-server-with-self-signed-certificate

Found the problem. Looks like as part of the upgrade, the following changes happened to plist.Info:
Removed :
	<key>NSAppTransportSecurity</key>
	<dict>
		<key>NSAllowsArbitraryLoads</key>
		<true/>
	</dict>
	<key>NSLocationWhenInUseUsageDescription</key>
	<string></string>

Added :
	<key>NSLocationWhenInUseUsageDescription</key>
	<string></string>
	<key>NSAppTransportSecurity</key>
	<!--See http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ -->
	<dict>
		<key>NSExceptionDomains</key>
		<dict>
			<key>localhost</key>
			<dict>
				<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
				<true/>
			</dict>
		</dict>
	</dict>

https://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ for more info. You basically need to add the http domains that you use to the plist.Info

OK，thx ，i already update plist.info , fix it

@faisalil what version of React Native made this change to the xcode project's Info.plist file? Was it in version 28?

Nevermind. I was able to track it down. So to anyone that was curious, this did change in the ios generator in 28
28: https://github.com/facebook/react-native/blob/v0.28.0/local-cli/generator-ios/templates/app/Info.plist
27: https://github.com/facebook/react-native/blob/v0.27.0/local-cli/generator-ios/templates/app/Info.plist

authors: damly ericmasiello faisalil febobo musicode


text:
sync style from native ui component

Hi,
Since the animation is very slow on js thread, I would like to implement a view in native ui component.
I made the view rotate 90 degree in the objective-c. How can I make the flexbox goes smooth? It keeps the same space on js side. :(

@facebook-github-bot stack-overflow

Hey @WitzHsiao and thanks for posting this! @DanielMSchmidt tells me this issue looks like a question that would be best asked on StackOverflow. StackOverflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only. Will close this as this is really a question that should be asked on SO.


text:
Navigator.NavigationBar - cannot set property '_key' of undefined

"react-native": "0.32.0",

tested with the example code still getting this error ?
test code
class App extends Component {
  render() {
    const routes = [
      {title: 'First Scene', index: 0},
      {title: 'Second Scene', index: 1},
    ];
    return (
      <Navigator
        initialRoute={routes[0]}
        initialRouteStack={routes}
        renderScene={(route, navigator) =>
          <TouchableHighlight onPress={() => {
            if (route.index === 0) {
              navigator.push(routes[1]);
            } else {
              navigator.pop();
            }
          }}>
          <Text>Hello {route.title}!</Text>
          </TouchableHighlight>
        }
        style={{padding: 100}}
        navigationBar={
           <Navigator.NavigationBar
             routeMapper={{
               LeftButton: (route, navigator, index, navState) =>
                { return (<Text>Cancel</Text>); },
               RightButton: (route, navigator, index, navState) =>
                 { return (<Text>Done</Text>); },
               Title: (route, navigator, index, navState) =>
                 { return (<Text>Awesome Nav Bar</Text>); },
             }}
             style={{backgroundColor: 'gray'}}
           />
        }
      />
    );
  }
}

I have a similar issue. undefined is not and object (evaluating '_this._key = guid()') in NavigatorNavigationsBar.js:114 after upgrading to 0.32.
Building with Xcode 8 for iOS 10 - not sure if related.

Seeing a similar looking issue with the WebView component "Cannot read property 'props' of undefined" in  WebView._this2._onLoadingStart. The error goes away if I downgrade to RN 0.31.0.

Also getting undefined is not an object (evaluating '_this._key = guid()') on RN 0.33.0.

I still have the same issue using RN 0.35.0

 <Navigator
                style = { styles.container }
                navigationBar={
                    <Navigator.NavigationBar
                        routeMapper={{
                            LeftButton: (route, navigator, index, navState) =>
                            { return (<Text>Cancel</Text>); },
                            RightButton: (route, navigator, index, navState) =>
                            { return (<Text>Done</Text>); },
                            Title: (route, navigator, index, navState) =>
                            { return (<Text>Awesome Nav Bar</Text>); },
                        }}
                        style={{backgroundColor: 'gray'}}
                    />
                }
                initialRoute = { { name: ROUTES.TODOS } }
                renderScene = { this.renderScene.bind(this) }
                configureScene = { () => { return Navigator.SceneConfigs.FloatFromRight; } } />

Any updates on this?
Cloned a project at work with react-native 0.35.0 and get the react native undefined is not an object (evaluating '_this._key = guid()') error. It works for all others, though.

Found the solution. npm install guid --save. It's imported from react native, but not required. Such a mess :fire:

@PhillippOhlandt I tried your suggested solution, but I'm still getting the same error as soon as I'm using the built in Navigator.NavigationBar, did you change anything else? can you paste your .babelrc file? Thanks

@AWDGroup ok, what I also had to do:
Commenting the line _this._key = guid() (the one he complained) out, restart the packager and app, see it working, uncomment the line again and see it working again. I am pretty sure this isnt a real fix but at least I was able to work. Did I already say that it's a mess?

Navigator has been deprecated in favor of the react-navigation library.

authors: AWDGroup PhillippOhlandt andyfen chrise86 hramos johnryan samuelkraft


text:
Stop using bolts for memory pressure handling

Summary:
An ANR recently surface in Fb4a: T152128771. The stack points into the Bolts task library. (It's on the memory pressure handling code-path).
This diff mitigates that ANR: it migrates the memory pressure handling path off Bolts tasks.
There is server-side gating, in case we want to disable this fix server-side.
Changelog: [Internal]
Reviewed By: fkgozali
Differential Revision: D45461419

Landed as https://github.com/facebook/react-native/commit/4337dbcdf47b88e50c1455603a9a2cf8e72dee4a

source: gharchive/pull-request

authors: RSNara javache


text:
TurboModule > Make MethodInvoker a std::function

Summary:
Changelog: [Internal]
The current C style invoker does not allow capturing additional values which is beneficial when dynamically creating Turbo Module methods.
Differential Revision: D52760715

Closing as abandoned internally

authors: christophpurrer cortinico


text:
Fix ANDROID_ID segment for inspector device ID

Summary:
Fixes a bug where page IDs would collide for multiple connected Android devices running the same React Native app. The Secure.ANDROID_ID key (not value!) was being substituted in the ID string (pre-hashing) — now this segment is fixed.
Changelog:
[Android][Changed] - Update constructor signature of DevServerHelper
Differential Revision: D58134323

Merged in https://github.com/facebook/react-native/commit/a1e81185416a53c7c7d0cfc67e40079fd0073e7c.


text:
feat(image): support for resizeMode and objectFit value of 'none'

Summary:
As part of https://github.com/facebook/react-native/issues/34425, objectFit value of 'none' needs to be supported for the Image component.
In order to support this, a new value must also be added to support the equivalent in resizeMode. With this new value, the image will not be resized at all and keeping it in the initial position within a container (see in the screenshots).
In this PR the support is added for both Fabric and Paper.
Changelog:
[GENERAL] [ADDED] - image resizeMode and objectFit support for 'none'.
Test Plan:
Using the rn-tester, there is a new image example for both resizeMode and objectFit.
See below the results for both Android and iOS:

Fabric screenshots
Android:

Resize Mode
Object Fit

iOS:

Resize Mode
Object Fit

Paper screenshots
Android:

Resize Mode
Object Fit

iOS:

Resize Mode
Object Fit

Thanks for the PR! The native changes seem relatively simple so happy to merge this. Please have a look if you can make this work with Paper too, so we don't need to add a compatibility notice (I think it will already work on Android paper as-is). If it adds additional complexity, let's leave it as-is.

Thanks for taking a look @javache! I've added the support for Paper as well in 4af97a86f0fa865e04bf407e711b2853c6bb8ee7

authors: javache mateoguzmana


text:
Created empty requestBody to solve the issue - "POST has no body"

Created empty requestBody to solve the issue - "POST has no body" - similar to https://github.com/facebook/react-native/issues/3371

Once you update, I'll pull it in though.

@dmmiller @lexs I have incorporated your review comments. Please review

@facebook-github-bot shipit

@dmmiller Let me know if you need any more changes from my side before the merge. I have another unrelated commit, and will send the pull request once you merge this one.

@facebook-github-bot-0 shipit

We've been having issues with the bots for the last day or so, they are supposed to be fixed, so let's see :)

@facebook-github-bot shipit

Closed in https://github.com/facebook/react-native/commit/a7521a23aeef1fade75c265331ae2bcdfca2936c

Not sure why the bot didn't close properly.

authors: dmmiller sreesharp


text:
Making babel to use the babelrc file if we find it

This PR tells babel where the babelrc file is if it has been found in the project root. I know you guys are relying on babel to find it when you tell babel the filename and sourceFilename, this works fine in normal js/node projects, here is an example where this will not work.
We have a big repo that can contain a few react-native / js projects. Our build system is similar to BUCK and we keep our third party dependencies in a separate folder (having a global package.json at the project route is not feasible as everyone will have to install every apps dependencies even when they don't need them), the structure looks a bit like this:
third_party/js/. packages from node_modules
common/js/ common code used by numerous apps, common components, services etc.
my_app/native the app
What's happening is something from my_app/native (where the .babelrc file is) is requiring something from common/js which is then requiring something from third_party/js and so babel has no idea what .babelrc file to use and we get compilation errors.
This PR fixes that by telling babel to extend the .babelrc file found in the first project root.

@skevy does this seem good to you? LGTM if you think so.

Any update on this. I assume I have to fix that ci check failure?

It's been a while since the last commit was reviewed and the labels show this pull request needs review. Based on the blame information for the files in this pull request we identified @skevy as a potential reviewer. Could you take a look please or cc someone with more context?

Does this merge the .babelrc or uses only the new .babelrc?

It extends the supplied babelrc (as described here: https://babeljs.io/docs/usage/options/). Which then get's extended by the following line with react-natives extraConfig:
let config = Object.assign({}, babelRC, extraConfig);

@facebook-github-bot shipit


text:
[NativeAnimated][iOS] Add support for native animated events on iOS

This adds native support for Animated.event on iOS.
Test plan
Tested in the native animated UIExplorer example that it works properly like on Android.

By analyzing the blame information on this pull request, we identified @kmagiera and @buba447 to be potential reviewers.

cc @ritzau

Pinged @ritzau on messenger.

I'll try to get someone with iOS knowledge to look at this, but it will probably be next week.

@janicduplessis updated the pull request - view changes

@janicduplessis updated the pull request - view changes

@janicduplessis updated the pull request - view changes

@foghina Rebased on top of the Android PR so this should be good to review!

@majak - ping ;>

Any chance we might see this make 0.37? Keen to make use of the potential performance benefits for nav transitions especially.

@rh389 - this particular PR isn't related to navigation transitions, rather it lets you update animations on the main thread in response to events (in particular, onScroll)

@brentvatne is it not a prerequisite for an approach like https://github.com/facebook/react-native/pull/10289 ? (Or am I barking up the wrong tree?)

It isn't needed for it, the gesture for navigation-experimental will still be driven by JS since this PR doesn't work with PanResponder anyway.

What is missing mostly is springs on iOS (which I will be landing soon). I actually tried it a bit with ex-navigation and there was also a few bugs that will need to be fixed first before it can work properly.

The tvOS tests in Travis are failing, the failure does look related:
Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_RCTEventAnimationDriver", referenced from:
      objc-class-ref in libRCTAnimation-tvOS.a(RCTNativeAnimatedModule.o)
ld: symbol(s) not found for architecture x86_64

Perhaps there's a separate tvOS project or target to which the RCTEventAnimationDriver.m file needs to be added?

@janicduplessis Do you know who should be the right reviewer for this? Looks like @buba447 and @ryangomba based on the history?

@ide Yea I think so, same thing happened with another animated PR, I'll look at it.
@mkonicek: I've worked with @ryangomba on some other animated stuff so he'd be a good reviewer. @ide can probably review this too. It would be nice to also have someone from fb who can review native animated PRs.

@janicduplessis there's also a CocoaPods change you need to make (just including the Drivers directory):
  # React.podspec
  s.subspec 'RCTAnimation' do |ss|
    ss.dependency       'React/Core'
    ss.source_files   = "Libraries/NativeAnimation/{Drivers/*,Nodes/*,*}.{h,m}"
  end

Ah yes, I think this was my oversight.

tvOS is still failing with
Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_RCTEventAnimationDriver", referenced from:
      objc-class-ref in libRCTAnimation-tvOS.a(RCTNativeAnimatedModule.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@ide Should be good now

@facebook-github-bot shipit

Great work @janicduplessis ! Must just credit your remarkable work on the NativeAnimations!


text:
don't apply sugar to Js.t({.}) and Js.t({..})

There's a bug in the printer which formats Js.t({.}) to {.}. (Idem for Js.t({..})).
This PR gives the following printing.
type x = Js.t({.});
type y = Js.t({..});
type z = {. "foo": bar}; /* idem for {.. "etc": baz} */

Well, I guess it's not too bad not having the sugar {.. ""} since we also don't have it for empty js.t obj values...

authors: IwanKaramazow chenglou

repo: facebook/reason


text:
Usage with Server Components and React Native

Hello,
I have two questions regarding StyleX, and I apologise if this is not the correct way to ask them.
1st question: StyleX + Server Components
I couldn't find any detailed information about usage of StyleX in React Server Components.
I've found this in the docs:

The design of the theming APIs in StyleX are directly inspired by React's Context APIs. Variables are defined with default values similar to how React Contexts are created, and themes can be created to “provide” different values for these variables for UI sub-trees.

which implies that StyleX might have the same issue as Styled Components when it comes to React Server Components, and that doesn't seem right.
I've found one Jack Herrington's article that states that the usage is possible, but it doesn't clearly state that all features will work as expected.
I've seen your NextJS example but that still doesn't fully answer my question.
Will all the StyleX features work without restrictions in all React components?

2nd question: StyleX + React Native
Same question as before, does it work, what are the constrains etc...
Thanks.

Will all the StyleX features work without restrictions in all React components?

Yes. All of StyleX will work with React, Next and React Server Components.

The design of the theming APIs in StyleX are directly inspired by React's Context APIs.

This only refers to the API design:

createContext -> defineVars
context.Provider -> createTheme

We generate static CSS variables, we don't have the same limitations as React Context.

StyleX + React Native

This does not exist at the moment. We are working on this as a completely separate project.

Hi @nmn,
Thanks for the explanation. All clear now, I'll close the issue.

Hi @nmn

This does not exist at the moment. We are working on this as a completely separate project.

Any timeline on this separate project "to support StyleX for React Native"?
Is there already a public repository for this?
I am starting a new React Native / Expo project, and would like to use StyleX instead of Nativewind.

@akashdevcc I don't have a timeline at this moment, but don't expect it anytime soon. It's not a big team, and we're currently focussed on making StyleX for the web stable enough for the vast majority of common use-cases.

Our solution for using StyleX on native is now open source: https://github.com/facebook/react-strict-dom

@necolas is "react-strict-dom" ready to be used in production react-native/expo apps? And is it already being used internally in Meta by any Meta app?

@akashdevcc Please follow the link and read the Readme.md.

authors: akashdevcc necolas nmn rimoslav

repo: facebook/stylex


text:
HHVM 3.15-dev changed xhp_x__composable_element::__xhpChildrenDeclaration()

Updated to HHVM 3.15-dev (2016.08.28) and now get:
Strict: Non-static method xhp_x__composable_element::__xhpChildrenDeclaration() should not be called statically in /var/www/hrmweb/vendor/facebook/xhp-lib/src/core/ComposableElement.php on line 274
10	xhp_x__element->toString( );	../Groups.class.php:1988
11	xhp_x__element->asyncToString( );	../Element.php:23
12	xhp_x__element->__flushRenderedRootElement( );	../Element.php:27
13	xhp_x__element->__renderAndProcess( );	../Element.php:62
14	xhp_x__composable_element->validateChildren( );	../Element.php:39
15	xhp_x__composable_element::__xhpReflectionChildrenDeclaration( );	../ComposableElement.php:567

I'm not sure if this is a XHP issue or a HHVM one.

HHVM issue, will dig into it though; static actually makes more sense, but this is a BC break.
cc @sgolemon

Actually, this hasn't changed in a long time, what's changed is HHVM's willingness to invoke it incorrectly.

Will replace bogus static calls with ReflectionClass::newInstanceWithoutConstructor()

HRMsimon: do you have a way to reproduce this with the standard test suite? It makes sense, but I'd expect the test suite to catch this, and I can't make it do so; I guess something in your config raises this up?

@fredemmott looks like you need an error handler that shows E_STRICT errors. I can't get HHVM to show them without a custom error handler. Small replication:
<?hh

require 'vendor/autoload.php';

set_error_handler(
  function($code, $msg) {
    echo $msg, "\n";
  },
);

echo
Hello!
;

Ok, best way to isolate this then is probably remove the HH_FIXME's from there so the typechecker complains about it :)

authors: HRMsimon fredemmott

repo: facebook/xhp-lib

license_source: bigquery


text:
Integers are bounded to 32bit

The spec says:

Integers may be positive or negative, and arbitrarily large.

Currently, integers are limited to 32bit. We should make them arbitrarily large. Currently 32bit integers are packed into the Value pointer, which is something we want to continue doing, so they need to "overflow" into a Rust BigInt stored on the heap when necessary.

I had a quick look at crates.io and we could use num-bigint crate for this. It looks like the most mature BigInt implementation in Rust.
Also it's probably a good idea to go back to regular i32 when arithmetic operation's result fits in it.

That all sounds very sensible to me, and looks like a suitable crate to base it off.

Could this be made configurable? E.g. feature flags. I would be interested specifically in 64bit and would quite dislike if it was dynamic like BigInt (application embedded devices).
Is there a big roadblock, other than work having to be put into it?

Could this be made configurable?

I think that would be right.
I also think we should have a config option to disable floats.

Could this be made configurable?

Before making things like int/float configurable, I'd like to see the need. Given things like lists are already allocated on the tuple, does using BigInt for large integers (of which there are likely to be few) actually cause a problem for emebedded devices?  Are there some targets which are both powerful enough to run Starlark, yet not powerful enough to have float?

Is there a big roadblock, other than work having to be put into it?

As to the whole BigInt, there is a bit of work around Rust-level API's to handle more types of number (but that has got easier since @pierd's work to add float) and then a bunch of work writing the numerics that overflow only when required. Nothing huge, but not trivial either.

The problem is not the MCU power. The problem is dynamic changes of the bit representation when working with registers. I do not want to employ this on a MCU but in https://probe.rs which flashes MCUs ;)

@Yatekii - I'd be curious to understand more how the limitation to 32 bit helps there. Is it that you have a poke call or similar to set memory addresses, and they want to be bound? If so, wouldn't it be better if internally the values were all unbounded and you then asserted they were within a range at the call to poke? Or are you thinking of something else?

It sounds like you might be better off with a register or bits type that is exactly the right size and semantics (I imagine you want unsigned too) - there's no real requirement that you use the builtin int type. The only thing builtin int has is that literals written in the code are int, but that could be fixed (Haskell has overloaded numeric literals, for instance, Starlark could do similar) and might not even be necessary.

I was actually going to start the implementation of bigint support. I can put it behind a feature flag (especially since it'll add num-bigint crate increasing the size while not everyone will need bigint).
Given how we handle numbers currently (boxed i32, heap allocated f64) adding yet another type/size (say i64) is possible but not trivial - I would estimate it as similar amount of work as adding bigint support.

We currently always depend on various libraries for LSP/DAP support, that are way bigger than num-bigint, so I wouldn't bother putting that dependency behind a flag. The approach was always to be fairly lax with dependencies until it causes people real problems, and num-bigint seems fairly safe as a dependency.

This is now done.

Awesome, thank you!

authors: Yatekii ndmitchell pierd stepancheg

repo: facebookexperimental/starlark-rust


text:
Unable to build from branch 'main'

I've just tried to build from branch 'main' using Rust 1.68.2 and got the following errors:
    Building [=======================> ] 346/348: below-view
error[E0308]: mismatched types
   --> below/view/src/controllers/open_source/mod.rs:25:5
    |
25  |     Event::Char('u'),
    |     ^^^^^^^^^^^^^^^^ expected struct `Vec`, found enum `Event`
    |
   ::: below/view/src/controllers/controller_infra.rs:220:36
    |
220 |             fn default_events() -> Vec<Event> {
    |                                    ---------- expected `Vec<cursive::event::Event>` because of return type
    |
    = note: expected struct `Vec<cursive::event::Event>`
                 found enum `cursive::event::Event`

error[E0308]: mismatched types
   --> below/view/src/controllers/open_source/mod.rs:33:5
    |
33  |     Event::Char('g'),
    |     ^^^^^^^^^^^^^^^^ expected struct `Vec`, found enum `Event`
    |
   ::: below/view/src/controllers/controller_infra.rs:220:36
    |
220 |             fn default_events() -> Vec<Event> {
    |                                    ---------- expected `Vec<cursive::event::Event>` because of return type
    |
    = note: expected struct `Vec<cursive::event::Event>`
                 found enum `cursive::event::Event`

error[E0308]: mismatched types
   --> below/view/src/controllers/open_source/mod.rs:42:5
    |
42  |     Event::Char('G'),
    |     ^^^^^^^^^^^^^^^^ expected struct `Vec`, found enum `Event`
    |
   ::: below/view/src/controllers/controller_infra.rs:220:36
    |
220 |             fn default_events() -> Vec<Event> {
    |                                    ---------- expected `Vec<cursive::event::Event>` because of return type
    |
    = note: expected struct `Vec<cursive::event::Event>`
                 found enum `cursive::event::Event`

error[E0308]: mismatched types
   --> below/view/src/controllers/open_source/mod.rs:51:5
    |
51  |     Event::Char('x'),
    |     ^^^^^^^^^^^^^^^^ expected struct `Vec`, found enum `Event`
    |
   ::: below/view/src/controllers/controller_infra.rs:220:36
    |
220 |             fn default_events() -> Vec<Event> {
    |                                    ---------- expected `Vec<cursive::event::Event>` because of return type
    |
    = note: expected struct `Vec<cursive::event::Event>`
                 found enum `cursive::event::Event`

For more information about this error, try `rustc --explain E0308`.
error: could not compile `below-view` due to 4 previous errors

Thanks for reporting this! I'll put up a fix now

#8184 should fix it

repo: facebookincubator/below


text:
Drop obsolete browser support

With the recent release of React 16, React is beginning to depend on more browser features such as Map, Set, and requestAnimationFrame.
This issue proposes dropping support for IE9 and IE10, as they had reached End-of-Life on January 12, 2016.
IE 11 has basic support for Map and Set, enough for React to function:

IE 11 also has support for requestAnimationFrame and cancelAnimationFrame.

fetch is not supported in any version of Internet Explorer, nor is Object.assign() or Promise, so all existing polyfills would have to remain.
This will prevent us from having to add about ~6kb in polyfills, and has the added benefit of increasing our syntax support level to that of IE 11.
This allows users to use let, const, and block level function declarations [in depended upon packages]!

Additionally, we may leave the syntax level IE 9 (var everything), and then provide an additional polyfill for users who still want IE9 support (including Map, Set, requestAnimationFrame, and cancelAnimationFrame).

@Timer Maybe splitting to 2 builds by using nomodule feature for the newer browsers?

Very welcome. However I suggest to not to create ie9 polyfill. By letting the very small amount of people using obsolete browsers, giving them life jackets to continue doing so will lessen the chances of them upgrading to a more secure version of their current browser.

authors: Timer andriijas oriSomething

repo: facebookincubator/create-react-app

license: mit


text:
Add Travis for created apps

In addition to local Jest test, I think it is still useful to include .travis.yml in the generated app.  For example, like CRA, the app could be built and tested in both Node 4 and 6 for every pushed commit.
Travis is harmless for users who don't want to use it.

I would like to add a discussion label for this issue.

You are correct on CRA using travis: https://github.com/facebookincubator/create-react-app/blob/master/.travis.yml as an open source project.
I think it would be a tad too opinionated to push a CI service on an individual as there are many other providers.  Travis is awesome for open source however many tend to utilize other services due to the cost of Travis for personal projects.
Just my .02

Yea, we won't be doing this. You can always add it yourself, and it's indeed too opinionated. Thanks for the suggestion though!

@gaearon would be nice to put an entry in the readme on how to setup travis. Should be pretty easy

Agree now that we have testing.
@Jiansen Would you like to work on a PR adding this doc note?

@vjeux I like the idea of a CI section, where it could eventually show how to setup different CI services(similar to the deployment section). I'm more than happy to help with this one :)

Oops sorry :( I posted my comment a minute after @gaearon... If @Jiansen is planning on working on this then that sounds great also! :) :)

@rogeliog Issue is pretty old so I think it’s fine if you take it. 👍 If @Jiansen is also interested, they can express their interest here later and maybe collaborate.

@gaearon , I am happy to adding Travis set up process to a doc note.
@rogeliog , if you wanted to take it and/or add process of setting up other CIs, I am sure it will be very useful for some users.   Just let me know if you may want me to work on the note for Travis.

@Jiansen, yeah, if you want to add the note for Travis I think that it makes sense and you should take it 😄  that is more than fine with me 👍 We can worry about adding notes for other CIs when the need comes :)

Anyone used create-react-app and nightwatch on travis? I can get tests to run fine locally with npm start & npm run test-e2e but in travis I always get

authors: Jiansen QuantumInformation gaearon rogeliog ryanyogan vjeux


text:
npm test does not detect new test file changes

Hi
I created a brand new app using create-react-app. When the npm test is run i get following message
I am using node v4.6.1 and npm 2.15.9

No tests found related to files changed since last commit.
Press a to run all tests, or run Jest with --watchAll.
Watch Usage
› Press a to run all tests.
› Press p to filter by a filename regex pattern.
› Press q to quit watch mode.
› Press Enter to trigger a test run.

Even if the App.test.js file is changed that doesnt trigger the npm test.

What do you see when you run git status in that project?

I see

Your branch is up-to-date with 'origin/master'.

Then this is by design: you have committed the changes.
Please see the message:

No tests found related to files changed since last commit.

The test runner assumes that you don't commit code that fails the tests. This lets it run the tests much faster on larger projects because it only runs tests related to "dirty" files.
When you want to run all tests, press "a" in the test runner:

Press a to run all tests, or run Jest with --watchAll.

Hi @gaearon Thanks for the reply. I Changed App.test.js and did git add
Then i created a new file called alert.test.js
Now this is the git states for those changes

Your branch is up-to-date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD ..." to unstage)
    modified:   src/App.test.js

Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git checkout -- ..." to discard changes in working directory)
    modified:   src/App.test.js

Untracked files:
(use "git add ..." to include in what will be committed)
    src/components/common/alert/alert.test.js

None of these changes trigger the npm test. When press 'a' it returns
No tests found
  59 files checked.
  testPathDirs: [path here] - 0 matches
  testRegex: (/__tests__/.*|\.(test|spec))\.(js|jsx)$ - 2 matches
  testPathIgnorePatterns: [path here]\\(build|docs|node_modules)\\ - 59 matches

Watch Usage
 › Press o to only run tests related to changed files.
 › Press p to filter by a filename regex pattern.
 › Press q to quit watch mode.
 › Press Enter to trigger a test run.

If you are running the test from an IDE or have the command stored somewhere. Add a after the command: npm test a

Hi I am having the same issue : I get the "No tests found related to files changed since last commit." error-I see  the test passing locally, but when I run the same job with jenkins it says : no tests found"
I have compared the workspace of jenkins , src code and the git repo .. all have the same code..
thanks for any help--
Naveen 👍

Hello
I am having the same behavior. I committed everything, then I modify 1 file and its test and I get the "No tests found related to files changed since last commit."
But then, if I modify "App.test" it does trigger the test on that file. There are also some other components that do trigger the test. But I can't find why some do and some other don't...

authors: NaveenDK fah7eem gaearon sameera-rez sebelga


text:
(WIP) Long term hashing

I can’t quite figure out the right combination to get this working.
cc @insin who probably knows how to fix this.

Currently trying to clean this up a bit in nwb, will share whatever I come up with.

I just want to make sure that

React is separate and its hash doesn't change when you change the app
Changing CSS doesn't change hashes of app scripts
Preferably, changing code split chunk shouldn't change hash of main chunk

I don't really care how to accomplish this but these seems like common sense requirements. The last one is a bonus because we don't explicitly advertise code splitting anyway yet.

It seems like this is a lot of work if you just want React to a separate chunk, unless I'm missing something. React ships a perfectly good minified bundle. Is there not some easier way to not have every app using create-react-app do the effort of splitting out an identical optimized React chunk?

I'd like to use them but this is currently at odds with how addons work AFAIK. If there is a simpler way to allow using addons via npm packages while using React dist bundles we should definitely offer that.
(Still, I'd like to get to the point where chunks are hashes correctly.)

Superseded by #227

authors: gaearon insin taion


text:
Add to support byte input stream back by file

Current spill leverage SpillInputStream to handle the byte stream read from spilled file. SpillInputStream is a
derived class from ByteInputStream and its implementation a bit hack as most of operations of ByteInputStream
doesn't apply for SpillInputStream as we don't support backward seek on a file for now. It just works for now.
It is better to split them and make a generic file based input stream which can be used in other cases as well.

Thanks % some nits

authors: tanjialiang xiaoxmeng

repo: facebookincubator/velox


text:
Add function serialiedSize to allocate fixed size memory for OutputStream in VectorSerializer

Arrow class arrow::io::FixedSizeBufferWriter can be wrapped as velox::OutputStream, then flush to this Stream.
So we need to know the accurate flushSize.
https://github.com/oap-project/gluten/blob/main/cpp/velox/memory/ArrowMemory.h
Arrow also provide class BufferOutputStream which has initial size and can resize to get more buffer, but it does not have function seek which is used in velox funtion flush(OutputStream* out).
Besides, allocate a fixed size buffer at once can optimize the flush performance.

Could you help review this PR? @mbasmanova

Fixed all the comments, can you help review again? @mbasmanova

Seeing some linter warnings. Would

you fix these?

@jinchengchenghh Would you rebase so I could merge?

authors: jinchengchenghh mbasmanova


text:
How to train with negative samples of my training set?

❓ Questions and Help
Hello,
My data have only two classes first is background = 0 and object = 1.
While training I it necessary for me to present to the net negative samples i.e images without an object, just background. In this case I don't have segmentation contour. How do I add those images to the training?
I use COCO-style annotations for the images, saved in json format.
Thanks in advance.

I think thishttps://github.com/facebookresearch/maskrcnn-benchmark/issues/144 can help you.

@wjp0408  Not so much, issue 144 handle with negative samples  simply by filtering them and not including in training at all.
I do not want to exclude them but use them while training.

Hi
One image should contain two things: a positive element and a negative element.
This is always the case for detection, except if your bounding boxes are of the full size of the image, in which case you might be looking for object classification, and not object detection?

@fmassa  Thanks for the answer.
If I understand right "One image should contain two things: a positive element and a negative element."
is true for evaluating the net not for training.
I'll elaborate a little bit more on what I aim to do.
For example I want to train Mask-rcnn to detect and segment giraffes. So I provide 1000 sample of images and masks of giraffes. But I have also 10 image that look like the animal [for example blanket with giraffes pattern] and I want to include them in my training process but obviously masks of those images will be blank.
Thus I want to be able to add images without segmentation mask.
Thanks

I see, thanks for the explanation!
It is possible to support your use-case, but you'll need to adapt a few things in the code for that.
The first issue you'll see is this one: https://github.com/facebookresearch/maskrcnn-benchmark/issues/31
You can make the Matcher return a tensor of size N, but you'll afterwards probably face a few other issues down the road that will need to be addressed.
Let me know if you get stuck in a particular problem.  It might be interesting to see, once the code is working, what it would take to make it work, so that we might potentially send a PR to add support for this in the codebase.

Thanks I'll check it.

I have the same objective of being able to train on negative examples (images where there is nothing to detect).
My goal is both one of learning from negative data (the fact that there is nothing should at least help train the RPN) and calibration (most of my images have nothing, so training only on positive data tends to lead to overconfident predictions).
Would be great if this was supported, although I can see how it would make many things harder (e.g: sampling, dimensions, etc.)

I'd be willing to support this use-case, so if you have troubles getting the code to work for those images just let me know and I'd help you with that so that we could have a PR for it. There might be a few tricky things to tune though.

I have the same objective of being able to train on negative examples (images where there is nothing to detect).

I have the same question.

@LU4E I still have the same answer as before :-)

@Iwontbecreative it would be a very nice addition!
Could you briefly summarize what were the things that you did that made it work nicely?

This is probably not the right form and not directly tested on the new codebase but should be the main changes I did.
`
diff --git a/maskrcnn_benchmark/modeling/matcher.py b/maskrcnn_benchmark/modeling/matcher.py
index 35ec5f1..074734c 100644
--- a/maskrcnn_benchmark/modeling/matcher.py
+++ b/maskrcnn_benchmark/modeling/matcher.py
@@ -53,9 +53,9 @@ class Matcher(object):
if match_quality_matrix.numel() == 0:
# empty targets or proposals not supported during training
if match_quality_matrix.shape[0] == 0:

           raise ValueError(

               "No ground-truth boxes available for one of the images "

               "during training")

           length = match_quality_matrix.shape[-1]

           device = match_quality_matrix.device

           return torch.ones(length, dtype=torch.int64, device=device) * (-1)
       else:
           raise ValueError(
               "No proposal boxes available for one of the images "

diff --git a/maskrcnn_benchmark/modeling/roi_heads/box_head/loss.py b/maskrcnn_benchmark/modeling/roi_heads/box_head/loss.py
index 2c21f6c..bed4bbc 100644
--- a/maskrcnn_benchmark/modeling/roi_heads/box_head/loss.py
+++ b/maskrcnn_benchmark/modeling/roi_heads/box_head/loss.py
@@ -38,7 +38,11 @@ class FastRCNNLossComputation(object):
# NB: need to clamp the indices because we can have a single
# GT in the image, and matched_idxs can be -2, which goes
# out of bounds

   matched_targets = target[matched_idxs.clamp(min=0)]

   if target.bbox.shape[0]:

       matched_targets = target[matched_idxs.clamp(min=0)]

   else:

       target.add_field ("labels", matched_idxs.clamp(min=1, max=1))

       matched_targets = target
   matched_targets.add_field("matched_idxs", matched_idxs)
   return matched_targets

@@ -63,9 +67,13 @@ class FastRCNNLossComputation(object):
labels_per_image[ignore_inds] = -1  # -1 is ignored by sampler
         # compute regression targets

       regression_targets_per_image = self.box_coder.encode(

           matched_targets.bbox, proposals_per_image.bbox

       )

       if not matched_targets.bbox.shape[0]:

           zeros = torch.zeros_like(labels_per_image, dtype=torch.float)

           regression_targets_per_image = torch.stack((zeros, zeros, zeros, zeros), dim=1)

       else:

           regression_targets_per_image = self.box_coder.encode(

               matched_targets.bbox, proposals_per_image.bbox

           )

       labels.append(labels_per_image)
       regression_targets.append(regression_targets_per_image)

diff --git a/maskrcnn_benchmark/modeling/rpn/loss.py b/maskrcnn_benchmark/modeling/rpn/loss.py
index 0847231..a3dae25 100644
--- a/maskrcnn_benchmark/modeling/rpn/loss.py
+++ b/maskrcnn_benchmark/modeling/rpn/loss.py
@@ -43,7 +43,10 @@ class RPNLossComputation(object):
# NB: need to clamp the indices because we can have a single
# GT in the image, and matched_idxs can be -2, which goes
# out of bounds

   matched_targets = target[matched_idxs.clamp(min=0)]

   if matched_idxs.clamp(min=0).sum() > 0:

       matched_targets = target[matched_idxs.clamp(min=0)]

   else:

       matched_targets = target
   matched_targets.add_field("matched_idxs", matched_idxs)
   return matched_targets

@@ -55,6 +58,7 @@ class RPNLossComputation(object):
anchors_per_image, targets_per_image
)

       matched_idxs = matched_targets.get_field("matched_idxs")
       labels_per_image = matched_idxs >= 0
       labels_per_image = labels_per_image.to(dtype=torch.float32)

@@ -66,9 +70,13 @@ class RPNLossComputation(object):
labels_per_image[inds_to_discard] = -1
         # compute regression targets

       regression_targets_per_image = self.box_coder.encode(

           matched_targets.bbox, anchors_per_image.bbox

       )

       if not matched_targets.bbox.shape[0]:

           zeros = torch.zeros_like(labels_per_image)

           regression_targets_per_image = torch.stack((zeros, zeros, zeros, zeros), dim=1)

       else:

           regression_targets_per_image = self.box_coder.encode(

               matched_targets.bbox, anchors_per_image.bbox

           )

       labels.append(labels_per_image)
       regression_targets.append(regression_targets_per_image)

@@ -95,6 +103,8 @@ class RPNLossComputation(object):
     sampled_inds = torch.cat([sampled_pos_inds, sampled_neg_inds], dim=0)

   objectness_flattened = []
   box_regression_flattened = []
   # for each feature level, permute the outputs to make them be in the

`

On my own dataset it seemed to have helped, but we have ~100 times as much unlabelled data (and it comes from a slightly different distribution, with our evaluation not being mainly about bounding box prediction).
I have not done any experiment on COCO sadly, sorry. Could be a configuration flag maybe?

Hi @fmassa, @Iwontbecreative,
based on this comment and @jgbos's success, it seems that submitting a PR of this patch would be quite useful.
@AdanMora, could you help making a unit test for this patch?

@botcs I agree, if someone could send a PR with unit tests I'll be more than happy to merge it!

@botcs @fmassa Excellent, I'll take a look and try to get some unit test.

@botcs @fmassa Excellent, I'll take a look and try to get some unit test.

could you also add the metric mAP for the negative samples when testing?

@qq237942920 nyeh. Sounds like a simple task but I have a hunch that you cannot compute mAP for negative samples. I mean, you iterate over different IoUs Precision and Recall values when evaluating AP for a single class. What you could do is to compute F1 or Prec/Rec with the following classification:
[Positive: has prediction][TruePostive: has annotaion and has prediction]...
(or one extremely ugly trick could be annotating the background as an object category, and make a Dataset with this approach, but I have never said this)

@qq237942920 nyeh. Sounds like a simple task but I have a hunch that you cannot compute mAP for negative samples. I mean, you iterate over different IoUs Precision and Recall values when evaluating AP for a single class. What you could do is to compute F1 or Prec/Rec with the following classification:
[Positive: has prediction][TruePostive: has annotaion and has prediction]...
(or one extremely ugly trick could be annotating the background as an object category, and make a Dataset with this approach, but I have never said this)

Thank you for your patient reply! Maybe I didn't express myself well in the last comment. Computing the mAP for the negative samples is mean that when my dataset both have positive and negative samples, will the coco_eval eval the mAP including fp on the negative samples(no gt in the img)?

@Iwontbecreative
the code matched_idxs.clamp(min=0).sum() > 0 in maskrcnn_benchmark/modeling/roi_heads/box_head/loss.py is not correct, when there are only one fg, matched_idxs.clamp(min=0).sum() equal to zero, cause the matched target idx is 0.

how to assign category_id for negative samples images, is it should be 0?

@Iwontbecreative @fmassa Can you write detailed process about how to train model on negative samples ? Thanks!

@cltdevelop all the information that I know about I've already written here, but if @Iwontbecreative has time and wants to send a PR adding a more detailed information, I'd be happy to merge it

@fmassa @Iwontbecreative I have prepared a synthetic DebugDataset which I use for unit tests. It just puts random number of white boxes on a black plane. It could be also used, as is, for sanity check of your implementation.

@tpys
You are right!!

@Iwontbecreative
the code matched_idxs.clamp(min=0).sum() > 0 in maskrcnn_benchmark/modeling/roi_heads/box_head/loss.py is not correct, when there are only one fg, matched_idxs.clamp(min=0).sum() equal to zero, cause the matched target idx is 0.

it should be something like this:
if len(target):
       matched_targets = target[matched_idxs.clamp(min=0)]
else:
       matched_targets = target

Has anyone run into troubles with the fix above using the latest master?  I'm getting an error that a number of the proposals provided to the mask head now have zero width or height which causes the code to crash on this line
https://github.com/facebookresearch/maskrcnn-benchmark/blob/eb4d3352be7e968b96260c8999a331e8431da95f/maskrcnn_benchmark/modeling/roi_heads/mask_head/loss.py#L37
Where a divide by zero error happens on this line
https://github.com/facebookresearch/maskrcnn-benchmark/blob/eb4d3352be7e968b96260c8999a331e8431da95f/maskrcnn_benchmark/structures/segmentation_mask.py#L277

Thank you for the details!
In the most recent state of the code, is it sufficient to initialize the BBox list with 0s and set the label to 0?
For example, in maskrcnn-benchmark/maskrcnn_benchmark/data/datasets/coco.py adding the following check:
    def __getitem__(self, idx):
        img, anno = super(COCODataset, self).__getitem__(idx)

        if not anno:
            boxes = [[0, 0, 0, 0]]
            boxes = torch.as_tensor(boxes).reshape(-1, 4)  # guard against no boxes
            target = BoxList(boxes, img.size, mode="xywh").convert("xyxy")
            target.add_field("labels",torch.tensor([0]))
        else:
            # filter crowd annotations
            # TODO might be better to add an extra field
            anno = [obj for obj in anno if obj["iscrowd"] == 0]

            boxes = [obj["bbox"] for obj in anno]
            boxes = torch.as_tensor(boxes).reshape(-1, 4)  # guard against no boxes
            target = BoxList(boxes, img.size, mode="xywh").convert("xyxy")

            classes = [obj["category_id"] for obj in anno]
            classes = [self.json_category_id_to_contiguous_id[c] for c in classes]
            classes = torch.tensor(classes)
            target.add_field("labels", classes)

        target = target.clip_to_image(remove_empty=False)

        if self._transforms is not None:
            img, target = self._transforms(img, target)

        return img, target, idx

For @Igal20 question I think for a class of just 1-object and 0-background in terms of binary segmentation, using a no groundtruth(mask) or segmentation contour in few training samples will simply affect the accuracy of your training since semantic segmentation is performed pixelwise and considering your target. If you have nothing of positive pixels in your target then during backpropogation the weights of the learned features will be reversed back to non learned weights. (i.e. for example if you have equal amount of positive targets(ground truth with segmentation contours) and negative targets(ground truth with no segmentation targets) the features learned during the positve targets will be reversed back if you feed in also the negative targets in each backprop). So may be in classification it is actually needed but in segmentation the only way is to avoid it.

repo: facebookresearch/maskrcnn-benchmark


text:
[MUGEN] Update VQVAE builders

Stack from ghstack (oldest at bottom):

#251
#237
-> #236
#235

Summary
Add VQVAE builder for MUGEN. Update existing builder with correct VideoGPT default parameters. Simplify API for video_vqvae builder. Add missing tests.
Test Plan
pytest test/models/test_video_vqvae.py -vv

Codecov Report

:exclamation: No coverage uploaded for pull request base (gh/RdoubleA/26/base@0fa6c2b). Click here to learn what that means.
The diff coverage is n/a.

@@                  Coverage Diff                   @@
##             gh/RdoubleA/26/base     #236   +/-   ##
======================================================
  Coverage                       ?   93.19%
======================================================
  Files                          ?       48
  Lines                          ?     2983
  Branches                       ?        0
======================================================
  Hits                           ?     2780
  Misses                         ?      203
  Partials                       ?        0

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@langong347 made the videogpt specific builder more generic without default params. mugen builder will be moved to exmaples in next PR.

@RdoubleA has imported this pull request.  If you are a Facebook employee, you can view this diff on Phabricator.

authors: RdoubleA codecov-commenter

repo: facebookresearch/multimodal


text:
Poor results when using previous binary segmentation

Hello!
When I try to input a previous binary segmentation into SAM I observe poor results compared to using logits. Is there any way to perform corrections on a pre-existing binary segmentation?

Hi!
I'm also interested in editing an existing mask with SAM. I did try to generate the logits from a grid of clicks based on a binary mask but it's doesn't really work. The initial logits is ok but it's not really editable from subsequent clicks:

TOP: Grid of clicks determined by a binary mask (left) and the resulting logits (right)
BOTTOM: Logits from previous step and negative click (left) and the resulting logits (right)
The result is a really low confidence logits that is basiclly non-usable. I got similar result with diffrent images.
If you find a way to edit a mask from SAM, feel free to share!

authors: etiennedub joshmyersdean

repo: facebookresearch/segment-anything


text:
pytorch Version

Hello, I need to compile pytorch, could you tell me the pytorch version the project ued? thank you!

@chaoyuaw Hi, I am reading your codes and I am not sure about the scale operation, in the code, there is theta_phi = model.Scale(theta_phi, theta_phi, scale=latent_dim**-.5). What dose it mean? Is every element divided by scale? Thank you.

Yes, it's element-wise scaling by a factor of (1 / sqrt(latent_dim)). We follow Sec-3.2.1 & footnote 4 of https://arxiv.org/pdf/1706.03762.pdf for this design choice.

Thank you very much.
| |
SJTU 顾智浩
邮箱：gzhmsy@126.com
|
签名由 网易邮箱大师 定制
On 07/15/2020 12:25, Chao-Yuan Wu wrote:
Yes, it's element-wise scaling by a factor of (1 / sqrt(latent_dim)). We follow Sec-3.2.1 & footnote 4 of https://arxiv.org/pdf/1706.03762.pdf for this design choice.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

authors: Holmes-GU chaoyuaw jiaszhang


text:
Building JS UI fails on  build: $_ ./node_modules/webpack/bin/webpack.js -p

So on windows and linux from fresh master repo clone. On 16.04.1-Ubuntu SMP with apt-get npm distro:
:~/visdom$ npm run build

> visdom@1.0.0 build /home/username/visdom
> $_ ./node_modules/webpack/bin/webpack.js -p

Usage: npm <command>

where <command> is one of:
    access, add-user, adduser, apihelp, author, bin, bugs, c,
    cache, completion, config, ddp, dedupe, deprecate, dist-tag,
    dist-tags, docs, edit, explore, faq, find, find-dupes, get,
    help, help-search, home, i, info, init, install,
    install-test, issues, it, la, link, list, ll, ln, login,
    logout, ls, outdated, owner, pack, ping, prefix, prune,
    publish, r, rb, rebuild, remove, repo, restart, rm, root,
    run-script, s, se, search, set, show, shrinkwrap, star,
    stars, start, stop, t, tag, team, test, tst, un, uninstall,
    unlink, unpublish, unstar, up, update, upgrade, v, verison,
    version, view, whoami

npm <cmd> -h     quick help on <cmd>
npm -l           display full usage info
npm faq          commonly asked questions
npm help <term>  search for help on <term>
npm help npm     involved overview

Specify configs in the ini-formatted file:
    /home/username/.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config

npm@3.5.2 /usr/share/npm

npm ERR! Linux 4.10.0-37-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! visdom@1.0.0 build: `$_ ./node_modules/webpack/bin/webpack.js -p`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the visdom@1.0.0 build script '$_ ./node_modules/webpack/bin/webpack.js -p'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the visdom package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     $_ ./node_modules/webpack/bin/webpack.js -p
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs visdom
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls visdom
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/username/visdom/npm-debug.log

Same with latest npm:
npm@3.5.2 /usr/share/npm

npm ERR! Linux 4.10.0-37-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! visdom@1.0.0 build: `$_ ./node_modules/webpack/bin/webpack.js -p`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the visdom@1.0.0 build script '$_ ./node_modules/webpack/bin/webpack.js -p'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the visdom package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     $_ ./node_modules/webpack/bin/webpack.js -p
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs visdom
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls visdom
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/username/visdom/npm-debug.log

A fix would look like this:
use  "build": "webpack -p" instead of "build": "$_ ./node_modules/webpack/bin/webpack.js -p" in package.json file, resulting in:
 npm run build

> visdom@1.0.0 build /home/username/visdom
> webpack -p

Hash: 516dcf2183e5aa4972ef
Version: webpack 1.15.0
Time: 2641ms
               Asset     Size  Chunks             Chunk Names
py/static/js/main.js  29.9 kB       0  [emitted]  main
   [0] multi main 28 bytes {0} [built]
    + 6 hidden modules

@OlegJakushkin oh thanks for this! I've been relying on using webpack directly rather than the scripts. Forgot I was still using what was technically a hacky fix. I'd be happy to accept the fix if you want the PR, otherwise I'll put it up before the days up

"put it up before the days up"=)

authors: JackUrb OlegJakushkin

repo: facebookresearch/visdom


text:
Cubbie to JSON converstion, restrict the values of IntSeq and DoubleSeq data structures

Restrict the values of IntSeq and DoubleSeq data structures included  in json string. Fixes bug in serialization when documents are empty. The minimum size of an IntSeq is 4 and this causes a violation of the assertion in SectionTokensAndSentencesSlot when the document is empty.
If there is a more efficient or more conventional way to handle this let me know.
Thanks!

There seem to be some more issues with handling empty lists that this PR doesn't fix. I'll try to resolve those soon and resubmit.

repo: factorie/factorie


text:
Design overhaul

Is your feature request related to a problem? Please describe.
No problem directly, but I think it could be even more user-friendly and modern
Describe the solution you'd like
I think the website design (UI/UX) could get a overhaul. A bit more modern, a bit more responsive and a bit more fancier.
Describe alternatives you've considered
As example the visualizer could use something like totals flow or something else (maybe even self developed).
Additional context
I'm a developer myself. A full stack developer to be exactly and I think we could bring this project to a higher level. I could, if you insist, even help you pretty much. In the present I developed a work flow visualizer for a business. I am pretty familiar with many js/ts frameworks (including angular) and many frontend frameworks (like bootstrap or bulma).
So if you would like to create a "version 2", a complete overhaul, a completely new design, I would love to help you, and go trough this big change with you together. If not, it's okay, but I think it would be a good idea and everyone would love to see it.
Let me know what's your opinion on this.

Question: Do you play Factorio? I ask mainly because the UI went through an overhaul at the end of 2020 to align with Factorio styles, and I feel is generally pretty authentic to the game at this point.
If there are things you feel are specifically confusing about the UX, I'm interested, as I don't consider myself to be an expert on UX and I know some aspects are confusing.
The totals flow you linked does look interesting, but also doesn't seem to be free to use?
In general I'm very open to help and to accepting external contributions, but I think I'd need to see a mockup to be convinced a UI redesign is called for. I'd like the styles to stay reflective of Factorio.

Also, interestingly, I wrote #618, the immediate predecessor to this issue, with the intent of redoing the flow visualization, so if that was your main intent I am on board for that.

Questions

Question: Do you play Factorio?

Not currently, but I played it for a fair amount of time (I also used your website in the past for it)

I ask mainly because the UI went through an overhaul at the end of 2020 to align with Factorio styles, and I feel is generally pretty authentic to the game at this point.

This is a valid point especially because the repository was named after it, but I would suggest, precisely because other (modern) games have been implemented in the meantime (DSP, Satisfactory) and therefore also reorient, change and make it "universal" (also in terms of design).

If there are things you feel are specifically confusing about the UX, I'm interested, as I don't consider myself to be an expert on

UX and I know some aspects are confusing.
Because of my (working) past I was very UI/UX oriented (Shop systems etc). I'll inspect every single detail and post a update with everything I found.

The totals flow you linked does look interesting, but also doesn't seem to be free to use?

Since I was just looking for something as an example, I didn't look at it very carefully. However, I just made up for this and found out that it is open source and was released under the MIT license (see attachment)

In general I'm very open to help and to accepting external contributions, but I think I'd need to see a mockup to be convinced a UI redesign is called for. I'd like the styles to stay reflective of Factorio.

Since you are the owner, I don't have to decide and can only try to make good arguments that might convince you and IMO this could be a good way to improve everything. And if you want to stay with the topic of Factorio, we could plan something together, create mockups and while everything is being mordernized, but somehow stay with the topic of factorio, or a "modern" type of Factorio. For example, we could build completely on Bootstrap or Bulma and then add Factorio content or at least create the beginning.

Also, interestingly, I wrote #618, the immediate predecessor to this issue, with the intent of redoing the flow visualization, so if that was your main intent I am on board for that.

Yes. I saw this issue and because of it I opened a more detailed one, because I thought that I would be very happy to help and that if you / we are already at it, everything could also mordernise a bit.

Screenshot

Update
Here I will list everything which could / should be changed to help improving UI/UX
I'll list it like this:

Category / problem

Additional Information

Suggestion how to fix it

Scrolling behavior

If you add explosives in the game Factorio, go into the flow, the complete site is scroll-able horizontally. This occurs on desktop and mobile. It also occurs on some recipes if you have the settings tab open.

In general, you should try to ensure that the page does not move horizontally, let alone move horizontally in the first place. As example: Just let the div scroll, not the entire page or make it a zoom-able canvas.

Settings tab

Currently the settings are shown as a tab button. On click it vanishes and a side navigation opens. This could confuse users, as one prepares for the fact that it only switches to the tab, but then a new window opens that moves the entire page.

This could be remedied by either really making it an independent tab, turning it into a cogwheel that, for example, is placed at the top right and with this variant it should definitely open as a modal over the side.

Flow

In my opinion, the current flow is quite confusing. For items with a few steps, the bars take up a lot of space and for items with many steps, they overlap or you no longer know what belongs to which step.

The flow should definitely be clearer (and should also be feasible). This would work, for example, by displaying it as lines instead of blocks (as in the library above). With the animations, we could also make it easier for users to identify exactly where what has to "flow".

Delete all settings

The "delete all settings" button in the settings is a bit confusing because it is assumed that it only resets the settings made in the menu.

This could be remedied if it either really only resets these settings or if it were to be positioned at a global location.

Issues already opened

You also opened a few issues, I don't necessarily have to repeat these

N/A

This is a valid point especially because the repository was named after it, but I would suggest, precisely because other (modern) games have been implemented in the meantime (DSP, Satisfactory) and therefore also reorient, change and make it "universal" (also in terms of design).

I don't necessarily disagree. I've considered pivoting to use the angular material or other component library in place of the Factorio styles. The funny thing is that it was right around the same time I finalized the UI updates to match the Factorio styles that someone branched and added support for DSP, and since then DSP has been the most popular game used with FactorioLab. I'm sure it's awkward a bit to DSP players.
The truth is I don't think it's likely I'll have time to redo the whole UI to be generic. In general I prefer to add features and my backlog has always had a pretty steady flow to keep me busy with that and fixing bugs. Maybe things will slow down enough at some point. I'm open to contributions, but this is also likely an area I'll be highly opinionated on. Maybe if we can break this down into smaller pieces rather than doing one huge overhaul, you can contribute towards it in a steady way without running into unexpected blocks from me. For example, I would prefer to implement a generic UI using the angular material library rather than using a css framework like Bootstrap.

In general, you should try to ensure that the page does not move horizontally, let alone move horizontally in the first place. As example: Just let the div scroll, not the entire page or make it a zoom-able / drag-able canvas.

The flow was modeled on Kirk McDonald's Visualize tab, which generally expands to require even more horizontal scrolling than FactorioLab's does. However, I wonder if it'd be feasible/preferable to tilt the whole diagram 90 degrees so that it flows from top to bottom or vice versa instead. Vertical scroll is definitely preferable, the issue is that it's impossible to really fit an even slightly complex sankey diagram in a tiny horizontal space.
Generally, I think this could be addressed as part of #618. Could try the easier fix of changing the scrollable areas, too - I know I've played with that in the past and it wasn't as easy as I thought it would be although I don't remember very well.

Currently the settings are shown as a tab button. On click it vanishes and a side navigation opens. This could confuse users, as one prepares for the fact that it only switches to the tab, but then a new window opens that moves the entire page.
This could be remedied by either really making it an independent tab, turning it into a cogwheel that, for example, is placed at the top right and with this variant it should definitely open as a modal over the side.

The settings were originally accessed via a cogwheel in the upper left corner. No one noticed it, they thought it was just the site logo since Factorio's logo is a gear. Can't tell you how many people I had to explain how to find the settings. I agree that the current behavior is not intuitive but I wanted to keep the left-panel settings to see them at the same time as the list, while making it easily discoverable by making it an explicit tab.
If you have a suggestion that resolves both of these issues I'm interested, but I don't want it to be an independent tab because you should see the list and how the settings affect it while you're changing things, and making it a cogwheel in the upper left was not discoverable enough. Perhaps the best would be to make it a "hamburger" (three horizontal lines) button in the upper left, a la material design UX. That would at least make it clear it's not a logo but rather a menu.

In my opinion, the current flow is quite confusing. For items with a few steps, the bars take up a lot of space and for items with many steps, they overlap or you no longer know what belongs to which step.
The flow should definitely be clearer (and should also be feasible). This would work, for example, by displaying it as lines instead of blocks (as in the library above). With the animations, we could also make it easier for users to identify exactly where what has to "flow".

Sure, there is definitely room for improvement, hence #618 😄

The "delete all settings" button in the settings is a bit confusing because it is assumed that it only resets the settings made in the menu.
This could be remedied if it either really only resets these settings or if it were to be positioned at a global location.

I'm not sure this is a major issue, I don't intend for this to be commonly used and there is a warning dialog the user has to confirm before deleting the settings.

Before our answers take on the length of books, here is a short answer to everything: I would love to help you with anything! Just give me a few tasks and I'll try to implement them in my free time and to relieve you a little.

If you're interested in contributing, you're welcome to open new issues or work on any of the open issues in the list you're interested in. I would prefer you pick out something rather than assigning a task to you. If you're worried about whether it's something I would approve of, feel free to ask. But in particular, if there are design quirks that especially bother you, I'd encourage you to try to tackle those however you see fit.
I'm going to close this issue simply because I don't think a design overhaul will happen as a single issue. If you would like to replace it with a smaller, more actionable issue(s) then I wouldn't object to that.

repo: factoriolab/factorio-lab