mysql> create database d-d; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-d' at line 1 1064报错:该错误一般出现在表名或者字段名设计过程中出现了mysql关键字导致的.问题确定是数据库名字的
The difference between "-" and "no hyphen" is that the latter keeps your existing environment (variables, etc); the former creates a new environment (with the settings of the actual user, not your own). 带横杠的会创建一个全新的环境,使用的是真实用户的设置. 不带横杠
今天骚凯问了一道变量名冲突的题目,感觉很有意思,顺便也复习一下预解析的一些知识,有不对的地方忘前辈大神指正,题目是这样的: var a=100; function a(){ console.log(a); } a(); 这个串代码执行完会报错 : a is not a function 问题来了,为什么会报这个错误呢? 这里涉及到函数和变量的预解析: 1)函数声明会置顶2)变量声明也会置顶3)函数声明比变量声明更置顶:(函数在变量上面)4)变量和赋值语句一起书写,在js引擎解析时,会将其拆成声
这是.NET反射的一个有趣小例子: 通过反射将变量值转为变量名本身. 当然要先添加命名空间:using System.Reflection; 示例代码如下: class Program { string name = "strA"; string strA = "strB"; string strB = "Hello World~"; static void Main(string[] args) { Program p = new Pro