RError.com

RError.com Logo RError.com Logo

RError.com Navigation

  • 主页

Mobile menu

Close
  • 主页
  • 系统&网络
    • 热门问题
    • 最新问题
    • 标签
  • Ubuntu
    • 热门问题
    • 最新问题
    • 标签
  • 帮助
主页 / user-288259

sinevik's questions

Martin Hope
sinevik
Asked: 2020-05-31 22:07:59 +0000 UTC

为什么不按索引过滤?

  • 1

这是排序变量的样子 在此处输入图像描述

我正在尝试按索引排序,结果是一个空数组

var sort= [{
  "car": "Pontiac",
  "id": 1
}, {
  "car": "Mitsubishi",
  "id": 2
}, {
  "car": "Toyota",
  "id": 3
}, {
  "car": "Lexus",
  "id": 4
}, {
  "car": "GMC",
  "id": 5
}, {
  "car": "Mazda",
  "id": 6
}, {
  "car": "Saturn",
  "id": 7
}, {
  "car": "Scion",
  "id": 8
}, {
  "car": "Volkswagen",
  "id": 9
}, {
  "car": "Pontiac",
  "id": 10
}];

console.log(sort);
let reuslt = '';
result = sort.filter(index => {
  return index > 2 && index < 4;
});
console.log(result);

javascript
  • 1 个回答
  • 10 Views
Martin Hope
sinevik
Asked: 2020-05-28 17:07:33 +0000 UTC

ES6 语法。怎么写?

  • 4

const handleFiles = () => {
  return async handle => {
    let result;
    result = 'hello';
    return result;
  };
};
handleFiles().then(result => console.log(result)).catch(console.log(e));

为什么这个脚本不起作用?

未捕获的类型错误:handleFiles(...).then 不是函数

javascript
  • 3 个回答
  • 10 Views
Martin Hope
sinevik
Asked: 2020-05-11 03:22:27 +0000 UTC

为什么我不能卸载反应?

  • 0

我删除了反应,但它仍在系统中吗? 在此处输入图像描述

reactjs
  • 1 个回答
  • 10 Views
Martin Hope
sinevik
Asked: 2020-05-10 19:58:35 +0000 UTC

我想从缓存中删除文件,弹出错误

  • 1
git rm --cached ios/build/*

致命的:没有-r不递归删除 'ios/build/Build'

告诉我它是什么?

git
  • 1 个回答
  • 10 Views
Martin Hope
sinevik
Asked: 2020-05-04 05:21:52 +0000 UTC

它如何理解从数据库中获取哪个特定用户?

  • 1

var user = firebase.auth().currentUser;

if (user) {
  // User is signed in.
} else {
  // No user is signed in.
}
https://firebase.google.com/docs/auth/web/manage-users#get_the_currently_signed_in_user

它如何理解从数据库中获取哪个特定用户?

firebase
  • 1 个回答
  • 10 Views
Martin Hope
sinevik
Asked: 2020-04-23 20:50:11 +0000 UTC

为什么字符串中的变量不起作用?

  • 2

marginTop: '${this.inputMarginTop}%'

如何将等于数字的变量作为百分比插入到 marginTop

style={{marginLeft: 10, marginBottom: 8, marginTop: '${this.inputMarginTop}%'}}

this.inputMarginTop 是,输出到控制台

reactjs
  • 1 个回答
  • 10 Views
Martin Hope
sinevik
Asked: 2020-03-21 15:07:38 +0000 UTC

告诉我如何通过点击获得钥匙?

  • 1

click(e){
    console.log(e.key);
}


    
render() {
    let array = this.state.array;
    let unit = array.map((item, index) => {
                return (
                <a key={index}
                style={{display:"block"}}
                onClick={this.click.bind(this)}
                >Hello, {item}</a>
                )
            });   

如何在点击时查看链接键?

reactjs
  • 1 个回答
  • 10 Views
Martin Hope
sinevik
Asked: 2020-03-21 01:05:21 +0000 UTC

如何通过这条线并删除所有相同的相邻字母?

  • 0

let string = "wwsndaadowffdennn";
let strintwo = "";
for (var i = 0; i < string.length; i++) {
  if (string[i] !== string[i - 1]) {
    strintwo += string[i]
  }
}
console.log(strintwo);

应该是斯诺登。底线是当你删除双打时,由于位移会出现新的双打

javascript
  • 2 个回答
  • 10 Views
Martin Hope
sinevik
Asked: 2020-03-20 17:39:40 +0000 UTC

如何在本机反应中将数据输出到控制台?

  • 0

安装反应原生。窗户系统。我正在使用安卓工作室。请告诉我在哪里观看 console.log()

import React from 'react';
import { Button, View, Text, Image, TouchableOpacity} from 'react-native';
import { StackNavigator } from 'react-navigation';
import Modal from "react-native-modal";

class HomeScreen extends React.Component {
  state = {
    isModalVisible: false,
    datanews: []
  };

  _toggleModal = () => {
    this.setState({ isModalVisible: !this.state.isModalVisible });
  }
  componentWillMount(){
        var req = new XMLHttpRequest();
        var arr;
        req.onload = () => {
            arr = req.response;
            this.setState({datanews: arr});
            
        }
        req.open("GET", "https://www.btcnn.com/wp-json/wp/v2/posts", true);
        req.responseType = "json";
        req.send();
    }

  render() {
    let obj = this.state.datanews;
    console.debug(obj);
  }
}

在此处输入图像描述

react-native
  • 1 个回答
  • 10 Views
Martin Hope
sinevik
Asked: 2020-03-19 18:15:43 +0000 UTC

如何制作点击处理程序?onPress 的红场?

  • 0

import React from 'react';
import { Button, View, Text, Image } from 'react-native';
import { StackNavigator } from 'react-navigation'; // Version can be specified in package.json

class HomeScreen extends React.Component {
  render() {
    return (
      <View style={{height:100, backgroundColor:'#263137'}}>
          <View style={{width: 20, height:20, backgroundColor:'red'}}>
          </View>
      </View>
    );
  }
}

在此处输入图像描述

我知道有 onPress,但它只适用于按钮。如何在红色方块上做一个老生常谈的点击??????

react-native
  • 1 个回答
  • 10 Views
Martin Hope
sinevik
Asked: 2020-03-19 03:44:16 +0000 UTC

React Native 中的方法是如何工作的?

  • 0

import React, { Component } from 'react';
import { Alert, AppRegistry, FlatList, Text, TextInput, View } from 'react-native';

export default class PizzaTranslator extends Component {
  constructor(props) {
    super(props);
    this.state = {text: ''};
  }
  _onload() {
    this.abc.scrollTo({x: 0, y: 0, animated: true});
  }

  render() {
    return (
      <View>
        <FlatList
          data={[
            {key: 'Devin'},
            {key: 'Jackson'},
            {key: 'James'},
            {key: 'Joel'},
            {key: 'John'},
            {key: 'Jillian'},
            {key: 'Jimmy'},
            {key: 'Julie'},
            {key: 'Devin'},
            {key: 'Jackson'},
            {key: 'James'},
            {key: 'Joel'},
            {key: 'John'},
          ]}
          renderItem={({item}) => <Text>{item.key}</Text>}
          onScrollBeginDrag={this._onload}
          ref={(FlatList) => {this.abc = FlatList;}}
        />
      </View>
    );
  }
}

// skip this line if using Create React Native App
AppRegistry.registerComponent('AwesomeProject', () => PizzaTranslator);
http://facebook.github.io/react-native/docs/scrollview.html#scrolltoend

如何使用 scrollTo 方法?它是如何工作的?

reactjs
  • 1 个回答
  • 10 Views
Martin Hope
sinevik
Asked: 2020-03-15 01:48:46 +0000 UTC

简单的svg编辑器[关闭]

  • 1
关闭。这个问题不可能给出客观的答案。目前不接受回复。

想改进这个问题? 重新构建问题,以便可以根据事实和引用来回答。

4年前关闭。

改进问题

这个世界上是否有像绘画一样的简单 svg 编辑器?画一个简单的图画

在此处输入图像描述

请帮帮我

svg
  • 1 个回答
  • 10 Views
Martin Hope
sinevik
Asked: 2020-03-13 18:32:35 +0000 UTC

告诉我移动端适配的底部滚动是从哪里来的?

  • 1

.main
{		
	width: 1500px;
	margin: 0 auto 0;
}

.suprecipes
{	
	width: 960px;
	margin: 0 auto 0;
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-ms-flex-wrap: wrap;
	    flex-wrap: wrap;
	padding: 0;
	-webkit-box-orient: horizontal;
	-webkit-box-direction: normal;
	    -ms-flex-direction: row;
	        flex-direction: row;

}
.recipes
{	
	margin-top: 2.6%;
	width: 33.3%;
	height: 111px;
	background: #eabc74;
	line-height: 111px;
}
.recipes-second-row
{	
	margin-top: 17px;
	height: 80px;
	line-height: 0px;
}
.recipes-center-color
{
	background: #f1962e;
}

.recipes-text
{	
	display: inline-block;
	vertical-align: middle;
	width: 62%;
	height: 37px;
	line-height: 37px;
	background: #ee7b00;
}

.recipes-text-caption
{	
	font:  18px/30px 'Mouse Memoirs',sans-serif;
	padding-left: 0.7em; 
	color: #131313;
}
.recipes-text-row-two
{
	font:  12px/12px 'Open Sans',sans-serif;
	line-height: 12px;
	margin-left: 2.8em;
	display: block;
}

.recipes-text-caption-row-two
{	
	font:  18px/30px 'Mouse Memoirs',sans-serif;
	padding-left: 0.7em;
	margin-top:0.8em;
	margin-left: 1.3em;
	margin-bottom: 0.1em;  
	color: #131313;
	width: 100%;
	display: inline-block;
	vertical-align: top;
}

@media screen and (max-width: 480px) 
{
  
  
  .main
	{
		width: 100%;
	}
  .suprecipes
	{	
		width:100%;
		-webkit-box-orient: vertical;
		-webkit-box-direction: normal;
		    -ms-flex-direction: column;
		        flex-direction: column;
		        
	}
  
  .recipes
	{
		width:100%;
		margin-left: 0px;
	}
	.recipes-second-row
	{
		width: 100%;
		height: auto;
		margin-left: 0px;
	}
  
  .recipes-text-row-two
	{
		margin-bottom: 5px;
	}
  
  
 
}
<!DOCTYPE html>
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<div class="main">
    <section class="suprecipes">
		<div class="recipes recipes-second-row">
			<p class="recipes-text-caption-row-two">Special Diets</p>
			<span class="recipes-text-row-two">Low-salt, egg-free, dairy-free and gluten-free are just some of the options.</span>
		</div>
		<div class="recipes recipes-second-row recipes-center-color">
			<p class="recipes-text-caption-row-two">Vegetarian</p>
			<span class="recipes-text-row-two">Tempting meat-free meals and other vegetarian fare.</span>
		</div>
		<div class="recipes recipes-second-row">
			<p class="recipes-text-caption-row-two">Need Inspiration?</p>
			<span class="recipes-text-row-two">Use our refined recipe search to help you find the dish that suits you</span>
		</div>
	</section>
	</div>
</body>
</html>

告诉我移动端适配的底部滚动是从哪里来的?

在此处输入图像描述

html
  • 2 个回答
  • 10 Views

Sidebar

Stats

  • 问题 10021
  • Answers 30001
  • 最佳答案 8000
  • 用户 6900
  • 常问
  • 回答
  • Marko Smith

    我看不懂措辞

    • 1 个回答
  • Marko Smith

    请求的模块“del”不提供名为“default”的导出

    • 3 个回答
  • Marko Smith

    "!+tab" 在 HTML 的 vs 代码中不起作用

    • 5 个回答
  • Marko Smith

    我正在尝试解决“猜词”的问题。Python

    • 2 个回答
  • Marko Smith

    可以使用哪些命令将当前指针移动到指定的提交而不更改工作目录中的文件?

    • 1 个回答
  • Marko Smith

    Python解析野莓

    • 1 个回答
  • Marko Smith

    问题:“警告:检查最新版本的 pip 时出错。”

    • 2 个回答
  • Marko Smith

    帮助编写一个用值填充变量的循环。解决这个问题

    • 2 个回答
  • Marko Smith

    尽管依赖数组为空,但在渲染上调用了 2 次 useEffect

    • 2 个回答
  • Marko Smith

    数据不通过 Telegram.WebApp.sendData 发送

    • 1 个回答
  • Martin Hope
    Alexandr_TT 2020年新年大赛! 2020-12-20 18:20:21 +0000 UTC
  • Martin Hope
    Alexandr_TT 圣诞树动画 2020-12-23 00:38:08 +0000 UTC
  • Martin Hope
    Air 究竟是什么标识了网站访问者? 2020-11-03 15:49:20 +0000 UTC
  • Martin Hope
    Qwertiy 号码显示 9223372036854775807 2020-07-11 18:16:49 +0000 UTC
  • Martin Hope
    user216109 如何为黑客设下陷阱,或充分击退攻击? 2020-05-10 02:22:52 +0000 UTC
  • Martin Hope
    Qwertiy 并变成3个无穷大 2020-11-06 07:15:57 +0000 UTC
  • Martin Hope
    koks_rs 什么是样板代码? 2020-10-27 15:43:19 +0000 UTC
  • Martin Hope
    Sirop4ik 向 git 提交发布的正确方法是什么? 2020-10-05 00:02:00 +0000 UTC
  • Martin Hope
    faoxis 为什么在这么多示例中函数都称为 foo? 2020-08-15 04:42:49 +0000 UTC
  • Martin Hope
    Pavel Mayorov 如何从事件或回调函数中返回值?或者至少等他们完成。 2020-08-11 16:49:28 +0000 UTC

热门标签

javascript python java php c# c++ html android jquery mysql

Explore

  • 主页
  • 问题
    • 热门问题
    • 最新问题
  • 标签
  • 帮助

Footer

RError.com

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

帮助

© 2023 RError.com All Rights Reserve   沪ICP备12040472号-5