我的gradle文件
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Run Code Online (Sandbox Code Playgroud) 我在 reactjs 中制作系统 jsonwebtoken 并使用 nextjs。当我在未定义 localStorage 的浏览器中运行代码时,我发现问题。
这是我在文件 AuthStudentContext.js 中的代码
import React from 'react'
import axios from 'axios'
const axiosReq = axios.create()
const AuthStudentContext = React.createContext()
export class AuthStudentContextProvider extends React.Component {
constructor() {
super()
this.state = {
students: [],
student: localStorage.getItem('student') || {},
token: localStorage.getItem('token') || "",
isLoggedIn: (localStorage.getItem('student' == null)) ? false : true
}
}
login = (credentials) => {
return axiosReq.post("http://localhost:4000/api/login", credentials)
.then(response => {
const { token } = response.data
localStorage.setItem("token", token)
this.setState({
token, …Run Code Online (Sandbox Code Playgroud) 我正在决定构建本机桌面应用程序的选项.
我没有找到有关电子应用程序运行时的最低系统规格(OS/HW)的任何文档.你能帮我吗?
preg_match('/[^0-9A-Za-z/._\-\s]/',$user)
Run Code Online (Sandbox Code Playgroud)
我正进入(状态
警告:preg_match()[function.preg-match]:未知的修饰符'.' 在第4行的F:\ wamp\www\distinctive\include\validate.inc.php中
为什么?