Relocate to http://www.leetcode.cn so goodbye my friends:)
Posted on 2017年3月31日 23:20RT
For example, A can have a neighbor called B. Therefore, we may traverse from A to B. An undirected graph implies that B can always traverse back to A. Is it true here? No, because whether B could traverse back to A depends if one of B’s neighbor is A.
The fact that B can traverse back to A implies that the graph may contain a cycle. You must take extra care to handle this case. Imagine that you finished implementing without considering this case, and later being pointed out by your interviewer that your code has an infinite loop, yuck!
https://community.kde.org/Frameworks/Porting_To_qCDebug
http://doc.qt.io/qt-5/qloggingcategory.html#logging-rules
git真是好东东,直接git diff commitid1 commitid2 > patch.txt
但没有git的情况下 diff -Naur standard_moodle my_moodle > patch.txt
打patch -Np1 -i 0001-fixme.patch
Boundary Crossings https://developer.apple.com/library/mac/documentation/Darwin/Conceptual/KernelProgramming/boundaries/boundaries.html
kext https://developer.apple.com/library/mac/documentation/Darwin/Conceptual/KEXTConcept/KEXTConceptIntro/introduction.html
nsSCM这个NSIS的插件提供了windows服务注册、启动、停止、卸除的功能,但是官方文档里木有提供nsSCM::Install中关于多个依赖之间用什么隔开,只好查看其源代码了:
// 7 char* Depend = STRNEW (); if (popstring (Depend)) { STRDEL (Depend); STRDEL (LoadGroup); STRDEL (ServiceFile); STRDEL (ServiceDisplay); STRDEL (ServiceName); RET_DWORD (rc, Tag); } /* fixup end of multistring */ DWORD len = strlen (Depend); Depend [len + 1] = 0; /* replace comma separator on null separator */ for (DWORD i = 0; i < len; i++) if (',' == Depend [i]) Depend [i] = 0;
可以用逗号隔开 bingo
cd ~/Desktop vi script #!/bin/bash cd /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Plug-ins/iPhoneOS\ Build\ System\ Support.xcplugin/Contents/MacOS/ dd if=iPhoneOS\ Build\ System\ Support of=working bs=500 count=255 printf "\x8f\x2a\x00\x00" >> working dd if=iPhoneOS\ Build\ System\ Support of=working bs=1 skip=127504 seek=127504 /bin/mv -n iPhoneOS\ Build\ System\ Support iPhoneOS\ Build\ System\ Support.original /bin/mv working iPhoneOS\ Build\ System\ Support chmod a+x iPhoneOS\ Build\ System\ Support
dev-libs/libffi
eagle
libpng
cairo
gdk-pixbuf-2.0
libudev >= 136
libdrm
man regex中有Byte Offsets这样的一段,介绍遍历满足正则表达式条件的所有子串的rm_so(起始位置)和rm_eo(终止位置);
用到了regmatch_t结构:
typedef struct {
regoff_t rm_so;
regoff_t rm_eo;
} regmatch_t;
有这样的字符串"xzhai=\"Unix/Linux geek\";legendren=\"GOD\";"
想寻找="xxx";里的xxx内容;
while (!regexec(&m_reg, tmp, 1, &m_match, 0)) { // FIXME: Unix regex`s rm_eo is often 0 test under Mac OS X Leopard; // But Linux POSIX regex`s rm_eo is normal test under Gentoo Linux printf("%d - %d\n", m_match.rm_so, m_match.rm_eo); tmp += m_match.rm_eo; }
Linux下rm_eo的值是正确的,而UNIX下rm_eo始终为0,不解