我想按照本教程(https://facebook.github.io/react-native/docs/getting-started.html)开始学习react-native。
我遵循了第一步,在命令行上遇到了一些问题:expo init AwesomeProject
这是日志:
PS C:\Users\ANTD\react_native> expo init AwesomeProject2
? Choose a template: blank
[09:06:11] Extracting project files...
Process exited with non-zero code: 2
ERROR: C:\Users\ANTD\.expo\starter-app-cache\blank-31.0.0.tar.gz
C:\Users\ANTD\.expo\starter-app-cache\blank-31.0.0.tar.gz
Open ERROR: Can not open the file as [gzip] archive
ERRORS:
Is not archive
Process exited with non-zero code: 2
[09:06:11] Customizing project...
[09:06:11] ENOENT: no such file or directory, open 'C:\Users\ANTD\react_native\AwesomeProject2\app.json'
[09:06:11] Set EXPO_DEBUG=true in your env to view the stack trace.
Run Code Online (Sandbox Code Playgroud)
我在github页面和论坛上搜索,但未找到相关信息。我也尝试过这个:
deleted files in .expo folder
npm …Run Code Online (Sandbox Code Playgroud) 我是 React JS 的新手,我在处理 onClick 事件时遇到了一些麻烦。我尝试了很多东西,但由于我是新手,我肯定错过了一些东西。我正在使用带有 react-router-dom 的 codeandbox。
这是我的代码,我试图删除不需要的部分。
class Game extends React.Component {
state = { selectedCharacters: [], minPlayer: 10, };
selectCharacter = clickedCharacter => {
this.setState(prevState => ({
selectedCharacters: prevState.selectedCharacters.concat(clickedCharacter)
}));
};
render() {
const { selectedCharacters } = this.state;
return (
<div>
<CharactersSelection availableCharacters={this.props.availableCharacters} selectedCharacters={selectedCharacters} selectCharacter={this.selectCharacter}/>
</div>
);
}
}
const CharactersSelection = props => {
return (
<div>
<div className="row">
<div className="row justify-content-center">
{props.availableCharacters.map((char, i) => (
<CharacterCardSelection
imgName={char.imgName}
name={char.name}
maxInGame={char.maxInGame}
onClick={() =>props.selectCharacter(char)}
/>
))} …Run Code Online (Sandbox Code Playgroud) 我有以下查询:
SELECT forecastDate, to_char(to_date(forecastDate),'WW') AS WEEK_NUMBER
FROM ACT_FORECAST
Run Code Online (Sandbox Code Playgroud)
这给了我这个结果:
forecastDate | WEEK_NUMBER
14/07/2017 28
15/07/2017 28
16/07/2017 29
Run Code Online (Sandbox Code Playgroud)
但在我所在的地区,周一开始的一周,我应该有 28 个 2017 年 7 月 16 日。
我的数据库的 NLS_TERRITORY 值是“法国”。
我尝试了多种方法,但没有任何效果。
有任何想法吗?
谢谢