我试图在android中的expo应用程序上运行create-react-native-app.
首先,我通过编写命令创建了项目
create-react-native-app test
然后我执行了
npm开始
然后从expo app扫描qr代码.
但扫描QR码后,我收到以下错误:
Uncaught Error: Java.net,sockettimeoutException: failed to connect to after 10000ms
Run Code Online (Sandbox Code Playgroud)
Github问题:
https://github.com/react-community/create-react-native-app/issues/144#issuecomment-296631692
react-native react-native-android expo create-react-native-app
我正在为我的项目使用laravel 5.3.现在我将它设置为服务器.
这样做时出现了问题.而且我遇到了这个错误点.
我跑的时候
作曲家安装--no-dev
命令跟随错误发生:
Problem 1
- Installation request for fgrosse/phpasn1 1.5.2 -> satisfiable by fgrosse/phpasn1[1.5.2].
- fgrosse/phpasn1 1.5.2 requires ext-gmp * -> the requested PHP extension gmp is missing from your system.
Problem 2
- Installation request for mdanter/ecc v0.4.2 -> satisfiable by mdanter/ecc[v0.4.2].
- mdanter/ecc v0.4.2 requires ext-gmp * -> the requested PHP extension gmp is missing from your system.
Problem 3
- Installation request for pusher/pusher-php-server 2.6.3 -> satisfiable by pusher/pusher-php-server[2.6.3].
- pusher/pusher-php-server 2.6.3 requires …Run Code Online (Sandbox Code Playgroud) 当我转到我的主机ao.dev:8000或ao.dev时,显示"无法访问此站点,ao.dev拒绝连接".
我的yaml文件:
我也是我的观点文件:
我检查过:
我通过访问Homestead目录运行vagrant up命令.
另见:https://stackoverflow.com/questions/38801375/vagrant-up-not-forwarding-all-portshomesteadlaravel-5-2windows-10
我想让我的应用程序应用程序连接到私人频道上的推送器.
但是我收到以下错误:
pusher.js?b3eb:593 POST http:// localhost:8000/broadcasting/auth 404(Not Found)
可能是错误的原因以及如何解决它.
我有用户列表,每个用户在列表中都有自己的显示图像.
我正在尝试的是每当用户按下显示图像时,通过stackNavigation重定向到他/她的个人资料.
CustomTabView:
const CustomTabView = ({ router, navigation }) => {
const { routes, index } = navigation.state;
const ActiveScreen = router.getComponentForState(navigation.state);
const routeNav = addNavigationHelpers({
...navigation,
state: routes[index],
});
const routeOptions = router.getScreenOptions(routeNav, 'tabBar');
return (
<View style={styles.container}>
<CustomTabBar
navigation={navigation}
activeRouteName={routes[index].routeName}
icon={routeOptions.tabBarIcon}
/>
<ActiveScreen
navigation={addNavigationHelpers({
...navigation,
state: routes[index]
})}
/>
</View>
);
};
Run Code Online (Sandbox Code Playgroud)
StackNavigator: // goToProfile.js //也试过放在index.anndroid.js但没找到出口的方法
const goToProfile = StackNavigator({
Profile: {
screen: Profile,
navigationOptions: ({ navigation }) => ({
title: `${navigation.state.params.person.name.first} ${navigation.state.params.person.name.last}`
})
},
})
Run Code Online (Sandbox Code Playgroud)
自定义标签: …
我在laravel 5.2中使用summernote js.
在表单中,当用户单击编辑按钮时,summernote编辑器应该为字段打开.实际上它适用于单个字段,但是当我将其应用于多个字段时,它不起作用.
我的看法:
<form action="{{route('account')}}" id="acc" class="ac" method="post">
<div class="col-lg-3"><label>Estado</label>
@foreach($accounts as $account)
@if($user== $account->user)
{!! $account->estado !!}
<textarea style="display:none;" name="textfield4" id="textfield4"></textarea>
<div class="col-lg-2 estado " id="estado"></div>
@endif
@endforeach
</div>
<div class="col-lg-4"></div>
</div>
<div class="row">
<section class="col-lg-3 "><label for="textfield5">I'm Good At:</label>
@foreach($accounts as $account)
@if($user== $account->user)
{!! $account->goodat !!}
<textarea style="display:none;" name="textfield5" id="textfield5"></textarea>
<div class="col-lg-2 col-md-2 es" id="goodat"></div>
@endif
@endforeach
<br /><div><button type="button" class="btn btn-info edit">Edit</button>
<button type="submit" class="btn btn-success" id="btn-send-message" >Save</button>
<input type="hidden" value="{{Session::token()}}" name="_token">
</div>
</form> …Run Code Online (Sandbox Code Playgroud) 我在laravel 5.2中使用chart.js.当我转到我的页面时,所有图表都会自动加载(但这不应该发生).另外,我没有使用window.load或window.onload函数.
它应该只在点击时打开(这里,点击图片)
jsfiddle链接:https://jsfiddle.net/Lxdhhj7j/
<div class="container-fluid">
<div id="myNav1" class="overlay">
<a href="javascript:void(0)" class="closebtn" onclick="closeNav1()">×</a>
<div class="overlay-content">
<script>
var year1 = ['FIRST','SECOND','THIRD', 'FOURTH' , 'FIFTH'];
var data_viewer = <?php echo $viewer; ?>;
var data_viewer1 = <?php echo $viewer1; ?>;
var data_viewer2 = <?php echo $viewer2; ?>;
var data_viewer3 = <?php echo $viewer3; ?>;
var data_viewer4 = <?php echo $viewer4; ?>;
var data_viewer5 = <?php echo $viewer5; ?>;
var data_click = <?php echo $click; ?>; …Run Code Online (Sandbox Code Playgroud)我正在使用RN v0.46.4,react-navigation和sendbird.
我正在开发一个聊天应用程序.
我想要做的是用两个参数导航用户到Msg屏幕item(包含用户信息)和createdChannel.
它们只通过一次,即每次我导航到Msg不同用户的屏幕时,我都会收到我先按下的相同值.
聊天屏幕
_chat(item){
// console.log(item);
const { navigate } = this.props.navigation
var userIds = [item.id,1];
sb = new SendBird({appId: APP_ID});
sb.connect(1, function(user, error) {
//console.log(user);
sb.GroupChannel.createChannelWithUserIds(userIds, true, item.firstname, function(createdChannel, error) {
if (error) {
console.error(error);
return;
}
//console.log(createdChannel);
navigate('Msg', { item, createdChannel })
});
Run Code Online (Sandbox Code Playgroud)
此外,当我createdChannel进入控制台时_chat function,它会按预期提供roght信息.
但是当我在Msg屏幕上控制它时,我只收到创建的第一个createdChannel,已在上面说过.
消息屏幕
super(props);
console.log(props.navigation.state.routes[1].params.createdChannel);
Run Code Online (Sandbox Code Playgroud)
我的路由器结构:
const CustomTabRouter = TabRouter(
{
Chat: {
screen: ChatStack,
path: ""
}
} …Run Code Online (Sandbox Code Playgroud) 我需要找到最大数量,然后将其从数组中删除。(仅限单个实例)
令数组为
a=[91,65,91,88,26]
Run Code Online (Sandbox Code Playgroud)
我正在使用Math.max()找到最大值
k=Math.max(...a)
Run Code Online (Sandbox Code Playgroud)
现在使用filter()它
a=a.filter(e => e!=k);
Run Code Online (Sandbox Code Playgroud)
但它过滤了最大数量的实例。
如何解决呢?
我正在更新我的项目,当尝试将其上传到我的存储库时,出现以下错误:
已经做了
git pull --rebase origin master
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://*******/production.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Run Code Online (Sandbox Code Playgroud)
我需要更新我的网站,但无法这样做。
编辑 1:
> git status 给出:
正在变基;到 cda02b2 您当前正在将分支 'master' 重新设置为 'cda02b2'。(修复所有冲突:运行“git rebase --continue”)
无需提交,工作目录干净
我正在使用create-react-native-app。我想使用react-native-vector-icons
但它没有在 android 屏幕上显示任何内容(我在 expo 应用程序上查看它)
这是我所做的:
应用程序.js:
const Courses = TabNavigator({
ReactCourses: { screen: ReactCourses },
NativeCourses: { screen: NativeCourses },
}, {
tabBarOptions: {
activeTintColor: '#e91e63',
swipeEnabled: true,
showIcon:true,
},
});
Run Code Online (Sandbox Code Playgroud)
ReactCourses.js:
import Icon from 'react-native-vector-icons/MaterialIcons';
static navigationOptions = {
tabBarLabel: 'React Courses',
tabBarIcon:({ tintColor }) => (
<Icon
name={'home'}
size={26}
style={[styles.icon, {color: tintColor}]} />
)
}
Run Code Online (Sandbox Code Playgroud) android react-native react-navigation expo create-react-native-app
laravel ×4
react-native ×4
javascript ×3
php ×3
expo ×2
jquery ×2
laravel-5.3 ×2
android ×1
arrays ×1
bitbucket ×1
chart.js ×1
composer-php ×1
ecmascript-6 ×1
email ×1
git ×1
github ×1
homestead ×1
html ×1
html-email ×1
html-table ×1
laravel-5.2 ×1
laravel-echo ×1
master ×1
pusher ×1
reactjs ×1
sendbird ×1
summernote ×1
vagrant ×1
vuejs2 ×1