在macOS终端中搜索命令历史记录的快捷方式是什么?
历史可供搜索多长时间?它存放在哪里?
试图理解组件间通信的原理,产生了一个疑问:Vue 事件总线策略和 Vuex 处理组件通信的主要区别是什么?除此之外,什么时候使用它们的最佳时间以及在同一个项目中使用两者的最佳实践是什么?
我将macOS更新为Sierra,并且我的一些文件消失了。最重要的是Allegro的图书馆。我正在尝试再次安装它,就像我第一次看到的视频(https://www.youtube.com/watch?v=UJtmJfWNTJY)一样,但是显示了以下错误消息:
'$Users/macbookpro/Downloads/allegro/include/allegro5/platform/alosx.h:43:12: fatal error:
'QuickTime/QuickTime.h' file not found'
#import <QuickTime/QuickTime.h>
Run Code Online (Sandbox Code Playgroud)
我进行了搜索,发现这只是Xcode中的更改参数,但是,尽管使用了终端,但我没有使用Xcode来编译我的代码。有什么提示吗?
我正在创建表之间的关系,这是自动增加两列id_quotation
和所必需的seq_quotation
。id_quotation
我正在引用另一个表(tb_core_process_id_quotation)列,我已经在其中增加了它。
下面的表 (tb_core_process_customer_data) 将被其他表用来捕获公共数据和主要客户数据。为了做到这一点,这三个验证键是必要的:cpf_cnpj
,id_quotation
并且seq_quotation
对于该数据库中的整个表来说是通用的。
tb_core_process_customer_data 查询:
CREATE TABLE tb_core_process_customer_data(
cpf_cnpj VARCHAR(255) NOT NULL,
id_quotation INT NOT NULL,
seq_quotation INT NOT NULL AUTO_INCREMENT,
name VARCHAR(255),
dt_birth DATE,
cd_insurance_type INT,
PRIMARY KEY (cpf_cnpj, seq_quotation, id_quotation),
FOREIGN KEY (cd_insurance_type) REFERENCES tb_nm_insurance_type(cd_insurance_type),
FOREIGN KEY (id_quotation) REFERENCES tb_core_process_id_quotation(id_quotation)
);
Run Code Online (Sandbox Code Playgroud)
tb_core_process_id_quotation 查询:
CREATE TABLE tb_core_process_id_quotation(
id_quotation INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY (id_quotation)
);
Run Code Online (Sandbox Code Playgroud)
因此,我很难将这三个键联系起来并进行验证。当我尝试创建 tb_core_process_customer_data 时,以下消息让我失望:
ERROR 1075 (42000): Incorrect table definition; there …
我正在学习Redux,React和ES6.我已经用JS开发了,但是这个ES6的新世界让我很惊讶,有许多新的东西,比如"=>"来声明箭头函数和其他.然而,在这个新的Redux研究中,我...
在我的代码中间面对.
贝娄我有一个例子:
import { combineReducers, createStore } from 'redux'
const userReducer = (state={}, action) => {
switch(action.type) {
case 'CHANGE_NAME':
state = {...state, name: action.payload};
break;
case 'CHANGE_AGE':
state = {...state, age: action.payload};
break;
}
return state;
};
const tweetsReducer = (state=[], action) => {
return state;
};
const reducers = combineReducers ({
user: userReducer,
tweetsReducer: tweetsReducer,
});
const store = createStore(reducers);
store.subscribe(() =>
console.log('The chage was: ', store.getState())
);
store.dispatch({type: 'CHANGE_NAME', payload: 'Will'})
store.dispatch({type: 'CHANGE_AGE', payload: 21}); …
Run Code Online (Sandbox Code Playgroud) 我开始在我的应用程序中使用react-router,但我注意到当URL(/url/
)末尾带有斜杠时,它不起作用。我对其进行了更多搜索,阅读了所有文档和react-router问题并尝试使用<Redirect from='/*/' to="/*" />
,但这不是一个好的解决方案,因为它也无法正常工作。因此,阅读更多内容后,我发现了/?
在URL末尾插入的建议,但仍然没有用。
route.js的代码:
export default (
<Route path="/" component={App}>
<IndexRoute component={ProfileFillComponents} />
<Route path="/seguro-residencia" handler={require('./components/Forms/Residencial/ProfileFill/profileFillComponents')} />
<Route path="/seguro-residencia/informacoes-pessoais" component={CotationNumber} />
</Route>
)
Run Code Online (Sandbox Code Playgroud)
index.js的代码:
render((<Router history={browserHistory} routes={routes} />), document.getElementById('root'));
Run Code Online (Sandbox Code Playgroud)
进行更多搜索后,我发现一个人提供了强制在URL末尾加斜杠的功能,然后我决定做出相反的选择,强制不使用斜杠。
使用无尾部斜杠功能更新route.js代码:
export default (
<Route onEnter={forceTrailingSlash} onChange={forceTrailingSlashOnChange}>
<Route path="/" component={App}>
<IndexRoute component={ProfileFillComponents} />
<Route path="/seguro-residencia" handler={require('./components/Forms/Residencial/ProfileFill/profileFillComponents')} />
<Route path="/seguro-residencia/informacoes-pessoais" component={CotationNumber} />
</Route>
</Route>
)
function forceNoTrailingSlash(nextState, replace) {
const path = nextState.location.pathname;
if (path.slice(-1) === '/') {
replace({
...nextState.location,
pathname: path.slice(1,path.lastIndexOf('/')-1)
});
} …
Run Code Online (Sandbox Code Playgroud) 我是Haskell的新手,并实现了计算BMI(身体质量指数)的功能.但我必须采取两种方式:
-- Calculate BMI using where clause
:{
calcBmis :: (RealFloat a) => [(a, a)] -> [a]
calcBmis xs = [bmi w h | (w, h) <- xs]
where bmi weight height = weight / height ^ 2
:}
-- Input: calcBmis [(70, 1.7), (90, 1.89)]
-- Output: [24.221453287197235, 25.195263290501387]
Run Code Online (Sandbox Code Playgroud)
和
-- Calculate BMI using just list comprehension
:{
calcBmis :: (RealFloat a) => [(a, a)] -> [a]
calcBmis xs = [bmi w h | (w, h) <- xs]
bmi …
Run Code Online (Sandbox Code Playgroud) 如何从我的目录中删除myentire git历史记录和任何其他git数据?
javascript ×3
macos ×2
allegro ×1
bash ×1
directory ×1
ecmascript-6 ×1
git ×1
github ×1
haskell ×1
history ×1
installation ×1
macos-sierra ×1
mysql ×1
react-router ×1
reactjs ×1
redux ×1
repository ×1
sql ×1
vue.js ×1
vuejs2 ×1
vuex ×1
xcode ×1