马克的足迹! html, javascript, css, php, python develop and design

28九/09

window server2008 开启无线支持

1. start -> administrarot tools -> server manager
2. 选中左边中的 features -> 右边增加 ad features
3. wireless lan service -> installl

21九/09

sqliteadmin非常好的sqlite3客户端

开源免费, 还很好用, 最重要的还有中文!
http://download.orbmu2k.de/files/sqliteadmin.zip
没有理由不用啊.

10九/09

Komodo 5.2 Coming Soon!

Komodo IDE 5.2 is now in Beta, and scheduled for release mid-September. Along with some performance and stability improvements, we've added a lot of new things:
Ruby: Debugging support for Ruby 1.9.1 and up.
PHP: New PHP 5.3 support:
Code browser and section list support for namespaces
Code completions for /Namespaces
Syntax coloring of latest keywords ("namespace", "use", "as", etc...)
Updated Xdebug builds to support PHP 5.3
...plus some debugging configuration improvements:
Improved debugger wizard for the first time setup
Support for a wider range of PHP builds on Windows
Sub-language background colors: You can now give sub-languages a different background color in multi-language buffers.
View HTML Source: Drag and drop an http:// or https:// URL onto Komodo to see the contents of the page.
You can see a full list of changes in the release notes.

详细
不知道 komodo edit会不会同步更新

10九/09

数组随机排序

var wangwangList = ['咨询online','咨询online1','咨询online2','咨询online3']; 

	/**
	 * 随机排预
	 * @param 旺旺名字列表
	 * @returns HTML代码
	 **/
	function randomWangWang(A){
	    var B,C;
	    var X = [];
	    var j=0;
	    for(i=A.length;i>=1;i--){
		C=Math.floor(Math.random() * A.length);
		X[j] = outWangWangCode(A[C]);
		A.splice(C,1)
		j++;
	    }
	    return X
	}

	/**
	 * 转化为HTML链接形式
	 * @param 旺旺名字
	 * @returns HTML代码
	 **/
	function outWangWangCode(n){
	    var _n = encodeURIComponent(n);
	    var html='';
	    html += '
  • '; html += '点击这里给我发消息'+n+'
  • '; return html; } /** * 转出全部列表 * @param 写模式还是返回模式 * @returns HTML代码 **/ function writeWangWangHTML(write){ var html = '
      '; var x = randomWangWang(wangwangList); for(i in x ){ html += x[i]; } html += '
    '; return html; } //显示码 document.write(writeWangWangHTML());
    8九/09

    80 端口被占用,启动apache失败的解决方法

    首先用netstat -ano 看是得到占用80端口的进程的PID,然后打开任务管理器,
    选择  查看->选择列,勾上PID(进程标识符),结束这个进程,再启动APACHE就成功了

    可以使用 netstat -ano ->1.txt 产生比较多的内容

    26八/09

    完美的表格(CSS与HTML)

    理论上兼容所有浏览器(FF,GG,IE)其他未测试

    table{ border-collapse:collapse;border:1px solid #CCC;background:#efefef;width:100%}
    table th{ font-weight:bold; padding:.5em 2em .5em .75em; line-height:1.6em; font-size:12px; border:1px solid #CCC;}
    table td{ padding:.5em .75em; line-height:1.6em; font-size:12px; border:1px solid #CCC;}
    
    1
    1
    20八/09

    编码问题导致Javascript报错.

    问题: 报JS标签没有关闭.
    原因: JS没有修改过且线上版本也是正常的,但在测试环境下.

    解决: 跟踪了很久, 变量, 常量, 数组是正常了. 后来看到页面上JS输出的内容乱码.
    这里想到可能是 页面编码 与 JS编码不同导致的问题.


    程序的页面是GB2312的, 但我们写的JS都是UTF8的...

    标签: 没有评论
    18八/09

    C#和Java是工作日语言,Python和Ruby是周末语言

    Stack Overflow是很受欢迎的程序设计问题协作式问答社区,当程序员在编程中遇到问题,他们会在Stack Overflow上发帖讨论,这些问题会涉及到各种语言。于是便提出一个有趣的问题:在工作日程序员通常问何种语言的问题较多,周末呢?

    使用Stack Overflow的存档,Dan Lorenc分析了一周内程序语言的活跃性。结果发现:到了周末询问Python和Ruby相关问题的数量上升,而C#和Java的数量下降。这意味着程序员周末在个人项目上使用较多的是Python和Ruby语言,可能是因为它们用起来让人愉快。下次当Boss让你选择工作语言时,你或许可以向他展示这个结果。

    source:solidot

    15八/09

    使用PHPXref生成PHP开发文档

    PHPXref是一个开源项目使用perl编写.
    phpdoc生成开发文档时要配置一堆东西. 而且又很难用.
    最近发现这个不错

    下载地址:
    http://sourceforge.net/projects/phpxref/files/phpxref/0.7/phpxref-0.7-win32.zip/download

    这个不需要安装prel 环境
    配置 phpxref.cfg

    一般修改4个地方:
    SOURCE=C:\phpxref\source #源代码
    OUTPUT=C:\phpxref\output #输出
    PROJECT=Unnamed Project #项目名称
    CHARSET=utf-8 #中文的话修改一下编码

    其他的还没有我没有用到, 大家可以试试

    最后执行一下 phpxref.exe

    5八/09

    我的第一个python作品

    import os
    
    base = raw_input('base address[d:/svn/]')
    if base=='' :
        base = 'd:/svn/'
    
    module = raw_input('Module Name[search]')
    if module =='' :
        module = 'search'
    
    Version = raw_input('Version[v1]')
    if Version == '' :
        Version = 'v1'
    
    _t = ['css','images','html','js','page']
    _d = ['1y','1m','1w','1d']
    
    base = string.replace(base,'\\','\/')
    base = base + '\/'   
    
    for i in _t :
        if i<>'html' :
            for j in _d:
                url = base + i + '/' + module + '/' + Version + '/' + j + '/'
                print url+ '->ok'
                if os.path.exists(url)== False :
                    os.makedirs(url)
    
    raw_input('done')
    

    主要是用来生成文件目录用了.