vickzhu

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            151 隨筆 :: 0 文章 :: 34 評論 :: 0 Trackbacks

          2013年3月1日 #

          ##通用查詢日志:記錄建立的客戶端連接和執行的語句
          ##慢查詢日志:記錄所有執行時間超過long_query_time值的所有查詢或者不使用索引的查詢
          ##查看數據庫版本
          SHOW VARIABLES LIKE '%version%';
          ##查看通用查詢日志
          SHOW VARIABLES LIKE '%general%';
          ##設置通用查詢日志為開啟
          SET GLOBAL general_log=ON;
          ##設置通用查詢日志為關閉
          SET GLOBAL general_log=OFF;
          ##查看當前慢查詢日志輸出的格式,可以是FILE(存儲在數數據庫的數據文件中的hostname.log),也可以是TABLE(存儲在數據庫中的mysql.general_log)
          SHOW VARIABLES LIKE '%log_output%';
          ##設置查詢日志輸出到文件
          SET GLOBAL log_output='file';
          ##設置慢查詢日志保存的文件
          SET GLOBAL slow_query_log_file="/var/lib/mysql/localhost-slow.log";
          ##查看慢查詢相關設置
          SHOW VARIABLES LIKE '%slow_query%';
          ##設置慢查詢閾值為1,默認為10
          SET GLOBAL long_query_time=1;
          ##設置慢查詢閾值為10,默認為10
          SET GLOBAL long_query_time=10;
          ##查看慢查詢的閾值
          SHOW GLOBAL VARIABLES LIKE '%long_query_time%';
          ##查看有多少慢查詢
          SHOW GLOBAL STATUS LIKE '%Slow_queries%';
          ##睡眠11秒,測試慢查詢
          ##select SLEEP(11);
          posted @ 2018-10-09 16:59 筱 筱 閱讀(192) | 評論 (0)編輯 收藏

          velocity properties加載時是放在HashMap中的,首先會加載configLocation中指定文件的內容,然后加載VelocityConfigurer中通過velocityProperties配置的屬性,
          因此,在VelocityConfigurer中配置的屬性會覆蓋configLocation指定文件中的屬性
          posted @ 2014-08-22 11:03 筱 筱 閱讀(5906) | 評論 (0)編輯 收藏

          1、達到默認最大buffer size
          2、調用HttpServletResponse.flushBuffer()
          3、調用HttpServletResponse.getOutputStream().flush()或者HttpServletResponse.getWriter().flush()
          4、調用HttpServletResponse.sendError()或者HttpServletResponse.sendRedirect()
          posted @ 2014-07-23 13:11 筱 筱 閱讀(5914) | 評論 (0)編輯 收藏

          <plugins>
                <plugin>
                  <artifactId>maven-compiler-plugin</artifactId>
                  <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <encoding>UTF-8</encoding>
                    <compilerArguments>
                      <extdirs>WebContent/WEB-INF/lib</extdirs>
                    </compilerArguments>
                    </configuration>
                  </plugin>
                <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-war-plugin</artifactId>
                  <configuration>
                    <webXml>WebContent/WEB-INF/web.xml</webXml>
                    <warSourceDirectory>WebContent</warSourceDirectory>
                  </configuration>
                </plugin>
              </plugins>
          posted @ 2013-11-01 17:03 筱 筱 閱讀(6471) | 評論 (1)編輯 收藏

          在onPrepareDialog()中添加如下代碼:
          AlertDialog syncDialog = (AlertDialog) dialog;
          Button button = syncDialog.getButton(AlertDialog.BUTTON_POSITIVE);
          button.setText("確定");
          button.setVisibility(View.VISIBLE);
          button.setOnClickListener(new OnClickListener() {
              @Override
              public void onClick(View v) {

              }
          });
          posted @ 2013-03-01 12:51 筱 筱 閱讀(7040) | 評論 (0)編輯 收藏

          主站蜘蛛池模板: 石景山区| 开江县| 莲花县| 珠海市| 定结县| 自治县| 张家界市| 临邑县| 朝阳县| 深水埗区| 中西区| 鄄城县| 河池市| 乌拉特前旗| 玉树县| 沅陵县| 米易县| 酉阳| 怀来县| 夏津县| 亳州市| 桂阳县| 麻城市| 汨罗市| 济南市| 吉安市| 河曲县| 承德县| 桓仁| 岳阳县| 灵宝市| 绥中县| 定日县| 耒阳市| 武强县| 犍为县| 辛集市| 南乐县| 越西县| 阳原县| 葫芦岛市|