又到一年毕业季。
毕业总是令人伤感的。
也预祝即将参加高考的师弟师妹们马到成功。
又到一年毕业季。
毕业总是令人伤感的。
也预祝即将参加高考的师弟师妹们马到成功。
原定于 4 月 29 日晚 23 时 50 分发车的 K6624 次列车,在广州站发生大面积晚点的背景下,晚点 3 小时又 10 分钟,终于在 30 号的凌晨三点钟拉响了出发的汽笛。经过 8 个小时的不眠煎熬,我们终于在十一时许到达了长沙火车站。
【珍爱生命,远离绿车】
今天终于稍稍得空来写两句话。
这段时间真是忙得透不过气。
在终端(Terminal)中,我们可以使用组合键 control + D 来输入一个 EOF,但是此法在 Xcode 控制台中行不通。有两个在控制台输入 EOF 的方法。
编辑 rc.local 脚本:
sudo vim /etc/rc.local
若脚本已在 /etc/init.d 中且权限已设置为 755:
#添加启动项,NN为启动顺序 sudo update-rc.d ServiceName default NN #禁用启动项 sudo update-rc.d -f ServiceName remove
https://g.32ph.com/post/mac-ssh-remote-authorized-key.html
def my_abs(x): if not isinstance(x, (int, float)): raise TypeError('...'); elif x>0: return x; else: return -x;
class String { public: friend ostream& operator<<(ostream&, const String&); friend istream& operator>>(istream&, String&); //other members private: char *str; }; ostream& operator<<(ostream& os, const String& str){ int i=0; while (*(str.str+i)!='class String { public: friend ostream& operator<<(ostream&, const String&); friend istream& operator>>(istream&, String&); //other members private: char *str; }; ostream& operator<<(ostream& os, const String& str){ int i=0; while (*(str.str+i)!='\0') os<<*(str.str + i++); return os; } istream& operator>>(istream& is, String& str){ is>>str.str; return is; }') os<<*(str.str + i++); return os; } istream& operator>>(istream& is, String& str){ is>>str.str; return is; }
在 OS X 系统下使用 MySQL 可能会遇到错误:
Warning: mysql_connect(): [2002] No such file or directory
解决方法不难:
检查 /tmp 和 /var/mysql 下是否有 mysql.sock 这个文件。
若前者有此文件而后者没有,执行以下命令:
cd /var sudo mkdir mysql sudo chmod 755 mysql cd mysql sudo ln -s /tmp/mysql.sock mysql.sock
若后者有此文件而前者没有,执行以下命令:
cd /tmp ln -s /var/mysql/mysql.sock mysql.sock
问题一般能够解决。