Skip to content

Instantly share code, notes, and snippets.

@fdwills
Last active August 29, 2015 14:00
Show Gist options
  • Save fdwills/11026210 to your computer and use it in GitHub Desktop.
Save fdwills/11026210 to your computer and use it in GitHub Desktop.

eclpise无法打开

删除工作目录下的.metadata文件夹

mysql显示数据库没有权限访问,数据库能显示,删除数据库是显示1008error

因为数据库的权限的问题: linux的情况下检查 /var/lib/mysql/ 下面的数据库文件夹 mac的情况下/usr/local/var/mysql下的数据库文件夹 或者更改权限

数据库连接池操作

  • 建立数据库连接池对象(服务器启动)。
  • 按照事先指定的参数创建初始数量的数据库连接(即:空闲连接数)。
  • 对于一个数据库访问请求,直接从连接池中得到一个连接。如果数据库连接池对象中没有空闲的连接,且连接数没有达到最大(即:最大活跃连接数),创建一个新的数据库连接。
  • 存取数据库。
  • 关闭数据库,释放所有数据库连接(此时的关闭数据库连接,并非真正关闭,而是将其放入空闲队列中。如实际空闲连接数大于初始空闲连接数则释放连接)。
  • 释放数据库连接池对象(服务器停止、维护期间,释放数据库连接池对象,并释放所有连接)。

jenkins的mac版本css的丢失

原因jenkins启动时会minify js css在iOS的零时文件夹内。系统会定期清理临时文件夹,所以启动时讲临时文件夹的位置定位为到其他位置即可

/usr/bin/java -jar -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/Users/pf-gdi-sakasho/jenkins_tmp/cache /usr/local/opt/jenkins/libexec/jenkins.war --httpPort=8080

logcat的log过滤

adb logcat Payment:V *:S

Payment loglevel V以上,其他tag的loglevel Silence以上输出

Log level

  • V — Verbose (lowest priority)
  • D — Debug
  • I — Info (default priority)
  • W — Warning
  • E — Error
  • F — Fatal
  • S — Silent (highest priority, on which nothing is ever printed)

xcode无法build现有project的可能性

  • framework缺失
  • 所需的certication file和provision file不对应

clang-format

clang-format -i -style=file  $(find  ../Source/ -name '*.h' -or -name '*.m' -or -name '*.mm')
  • 默认style支持LLVM, Google, Chromium, Mozilla, WebKit.
  • 设定为file的时候读取父目录下的.clang-format文件定义的格式

xcode中定义预编译参数

xcode中搜索compiler,在compiler flag里面加上,例:

-DSAKASHO_MOBAGE

xcode在build事后遇到stl无法连接的问题

修改C++ standard libary为系统默认compiler default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment