现在位置: 首页 > burrito发表的所有文章
  • 03月
  • 03日
综合 ⁄ 共 6字 评论关闭
移步原文查看
阅读全文
  • 08月
  • 06日
综合 ⁄ 共 1898字 评论关闭
以前做过windows xp下的watir部署,今天突然想要在mac下部署下,因为本人现在的电脑是mac,虚拟机启动又慢,双系统也懒得装。所以只好找mac版的watir了。 去了watir的官网“http://watir.com/”,还真的有mac版的watir。进入mac版的安装文档地址:https://github.com/zeljkofilipin/watirbook/blob/master/installation/mac.md 呵呵,我也有些奇怪,为啥跳到github上了。看来github很强大啊,管他呢,貌似跑题了。下面进入正题: github上介绍了mac os x 10.7, 10.6, 10.5 的安装方法,我这里只摘录了10.7的版本(之前版本的童鞋只......
阅读全文
  • 04月
  • 27日
综合 ⁄ 共 200字 评论关闭
我这里提供一种方式,是在项目的classpath下直接看的在你导入的jar点右键——》选择properties——》java source Attachment——》External folder 选择你java开源包的地址,比如我的就是这个D:\Downloads\struts-2.1.8.1-all\struts-2.1.8.1\src\core\src\main\java——》点击OK看到源码了吧。
阅读全文
  • 04月
  • 17日
综合 ⁄ 共 2949字 评论关闭
android wifi之 AsyncChannel类消息通道 1.wifiMonitor和wifiService是wifi的核心。 2.wifiMonitor的startMonitoring()方法开启了一个新的线程,不停的接受来自wpa_supplicant的事件,而wifiStateStackTrace的startMonitoring则是注册了一个广播,允许接收来自stateMachine的广播,继而将 NetWorkInfo以Message的形式发送给了connectivityService的handler在进行相应的处理。 3.AsyncChannel类     看说明文档这个类是一个处理两个handler之间 消息异步传递的问题,这两个handler可以在一个进程也可以处于不同的进程,与Messe......
阅读全文
  • 04月
  • 09日
综合 ⁄ 共 3772字 评论关闭
using System; using System.IO; using System.Text; using System.Collections; namespace PDFGenerator { public class PDFGenerator { static float pageWidth = 594.0f; static float pageDepth = 828.0f; static float pageMargin = 30.0f; static float fontSize = 20.0f; static float leadSize = 10.0f; static StreamWriter pPDF=new StreamWriter("E://myPDF.pdf"); static MemoryStream mPDF= new MemoryStream(); static void ConvertToByteAndAddtoStream(string strMsg) {     Byte[] buffer=null;     buffer=......
阅读全文
  • 03月
  • 17日
综合 ⁄ 共 515字 评论关闭
我们一般的算法是将整数A与整数B转换为二进制数,然后通过移位操作来统计总共有多少位不同,现在我像大家介绍一种更加高效的算法。 int cal(int a, int b) { int M = a ^ b; int num = 0; while(M) { M &= (M-1); num++; } return num; } 如果一个整数不为0,那么这个整数至少有一位是1。如果我们把这个整数减去1,那么原来处在整数最右边的1就会变成0,原来在1后面的所有的0都会变成1。其余的所有位将不受到影响。举个例子:一个二进制数1100,从右边数起的第三位是处于最右边的一个1。减去1后,第三位变成0,它......
阅读全文
  • 02月
  • 09日
综合 ⁄ 共 588字 评论关闭
1、本方案为纯CSS 关键css overflow: hidden; text-overflow: ellipsis; white-space: nowrap; 原理就是利用text-overflow:ellipsis;属性实现,没有什么高深的属性:   以下的实例代码: .icoFontlist:hover { width: 225px; font-size: 12px; border: 0px solid #ddd; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; color:blue; text-decoration:underline; cursor:pointer; } .icoFontlist{ width: 225px; font-size: 12p......
阅读全文
  • 01月
  • 08日
综合 ⁄ 共 1333字 评论关闭
本文介绍css基本语法及派生选择器。 代码整理自w3school:http://www.w3school.com.cn (一)基础部分: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Language" content="zh-cn" /> <head> <style type="text/css"> h1,h2,h3 {color:red;background-color:#ccc} li strong {font-style:italic;}......
阅读全文
  • 12月
  • 26日
综合 ⁄ 共 1209字 评论关闭
jqGrid SDK: 属性: http://www.trirand.com/jqgridwiki/doku.php?id=wiki:options 方法: http://www.trirand.com/jqgridwiki/doku.php?id=wiki:methods 事件: http://www.trirand.com/jqgridwiki/doku.php?id=wiki:events 属性:  1. 获取选中行的ID :  $(this).getGridParam("selrow") ; 2. 获取行数.    var count = $(this).getGridParam("reccount");  当前页的行数    var records = $(this).getGridParam("records"); 总行数   (如果grid显示为分页的话,定义rowNum为20(即每页显示20行),server返回30行记录,则count=20,......
阅读全文
  • 12月
  • 19日
综合 ⁄ 共 3922字 评论关闭
简单版: 一、下载文件 1)FCKeditor_2.3.2.zip(基本文件)  2)FCKeditor-2.3.zip(for java)二、解压文件  1)FCKeditor_2.3.2.zip解压后的目录范例为:FCKeditor_2.3.2/FCKeditor/editor  2)FCKeditor-2.3.zip解压后的目录范例为:FCKeditor-2.3/web/WEB-INF/lib三、复制文件到web项目  1)将FCKeditor_2.3.2.zip解压后的FCKeditor目录复制到项目的根目录下,即FCKeditor目录跟WEB-INF目录平级;  2)将FCKeditor-2.3.zip解压后的lib下的FCKeditor-2.3.jar、commons-fileupload.jar两个文件复制到项目的lib目录里面。四、修......
阅读全文
  • 12月
  • 13日
综合 ⁄ 共 1348字 评论关闭
题目:Park Visit 题意:一个人去公园,想走K个景点,问最短的距离。 思路:求出树的直径(最长的链、最长路径)。从任意点A,找到离A最远点B。再找到离B最远点C,BC就是最长路径。如果K<BC,那只沿着链走就可以了。否则,就要从链上点走出去,再走回来. 代码: #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <iostream> #include <algorithm> #include <queue> #include <stack> #include <vector> #include <set> #incl......
阅读全文
  • 11月
  • 25日
综合 ⁄ 共 2708字 评论关闭
using System; using System.Collections.Generic; using System.Windows.Forms; using System.Diagnostics; namespace ApplyCmd {     static class Program     {         /// <summary>         /// 应用程序的主入口点。         /// </summary>         [STAThread]         static void Main()         {                        string[] commandTexts;             commandTexts =new string[2];             commandTexts[0] = "cd /d d:";             commandTexts[1] = @"xcopy /test1/*.* /test2 /R/E/Y/......
阅读全文