目录: 〖学习笔记〗


20个免费的Web UI元素包下载

来源:我烧网-科技

毫无疑问,每一个网页设计师花了很多时间无休止的重复一些网页和元素,因此,每一个设计师都应该有一个可重复使用的,统一的Web用户界面元素,这样我们就可以节省出大量时间,也可以在涉及项目的初始阶段有一个很好的控制。
在本文中,我们有20套完全免费的WEB UI,或许对你项目的初始阶段有所帮助。该工具包大多是AI或PNG格式,但你还可以找到一些Omnigraffle模具和一些工具。SVG格式。 因此,无论您的首选格式是什么,您一定会为您找到最完美的工具包。

Modern Web UI Set (.psd)

clip_image001This free Web UI Set has everything included in the PSD file in well organized in folders, and fully editable using vector layers in Photoshop, from the button shapes, to the gradients, and text. Having every element editable means you can recreate anything you need that is not included in the file, just by using existing items as your base.
Modern Web UI Set (.psd) →

Massive Web UI & Button Set (.psd)

clip_image002This free UI set contains all of the following elements in three distinct styles: glossy, satin/light gradient, and one-color. The satin/light gradient set is available in 7 different colors (which you’ll find all of in the psd file).
Massive Web UI & Button Set (.psd) →

Web UI Element Pack (.psd)

clip_image003This User Interface Element Pack in PSD format, contains 19 elements including Loading Bar, Button in normal and clicked state, Button toggle, close, next, previous and paging icon and slider.
Web UI Element Pack (.psd) →

Web UI Wireframe Kit (.psd)

clip_image004This web UI template kit is made completley with shape objects and in some cases converted into SmartObjects. So they’re totally scalable.
Web UI Wireframe Kit (.psd) →

Browser Form Elements (.psd)

clip_image005Browser Form Elements (.psd) →

Web Page Elements (for Omnigraffle)

clip_image006With the open-source “Bitstream Vera” font set, free icons from FamFamFam and this Omnigraffle web ui set, you should have most of your common web page elements covered, including headings, form elements, content management function, image placeholders, etc.
Web Page Elements (for Omnigraffle) →

Wireframe Kit (Google Drawings)

clip_image007Google Drawings is still in its early and simple form and didn’t have any notable UI kits, until now. These kits have been specifically designed for Google Drawings, and you have a choice of four templates, that include: The main blank template, product detail page, landing page and item list view.
Wireframe Kit (Google Drawings) →

Sketching & Wireframing Kit (.ai, .eps, .pdf & .svg)

clip_image009
Sketching & Wireframing kit is a free set of elements for sketching and wireframing. It consist of form elements, icons, indicators, feedback messages, tooltips, navigation elements, image placeholders, embedded videos, sliders and common ad banners.
The Kit comes in two vector formats, one for Adobe Illustrator and the other in SVG vector format that can be easily modified. It can also be downloaded in PDF and EPS formats.
Sketching & Wireframing Kit →

Wireframe Symbols (.ai)

clip_image010This download contains the symbol library and a full Adobe Illustrator file with all of the elements spread out on the art board. To install this library just drag and drop the file named “Wireframe Symbols.ai” into your Adobe Illustrator Symbols directory. Once you are in Illustrator go to your Symbols Palette and load the library.
Wireframe Symbols (.ai) →

Yahoo Design Stencils (.xml, .pdf, .svg, .png and Omnigraffle)

clip_image012
The popular Yahoo! Design Stencil Kit version 1.0 is available for OmniGraffle, Visio (XML), Adobe Illustrator (PDF and SVG), and Adobe Photoshop (PNG), and covers the following topics: Ad Units, Calendars, Carousels, Charts and Tables, UI Controls, Form Elements, Grids, Menus and Buttons, Mobile, Navigation and Pagination, OS Elements, Placeholder Text, Screen Resolutions, Tabs and Windows and Containers.
Yahoo Design Stencils (.xml, .pdf, .svg, .png and Omnigraffle) →

Ext JS v3.0 Stencil (for Omnigraffle)

clip_image013This is the updated version of the Omnigraffle ExtJS stencil Ext JS. This update contains many improvements and additions, namely that the developers have recreated most Ext JS elements as Graffletopia shapes or groups. This is especially helpful for resizing titles, tables cells, and so on.
Ext JS v3.0 Stencil (for Omnigraffle) →

165 Vector Icons in 5 Colours (.ai, .jpg and .svg)

clip_image014This huge kit, from Liquidicity, contains 165 icons and are available in these five colors: Red, green, blue, black and white.
165 Vector Icons in 5 Colours (.ai, .jpg and .svg) →

Flex 3 Stencil (for Omnigraffle)

clip_image015This Omnigraffle stencil contains all of the Flex components from the Flex 3 Style Guide: panels, data grid, buttons, fields, links, toggle, menu, scrolls, accordion, tabs, list, data picker, tool tip, errors.
Flex 3 Stencil (for Omnigraffle) →

Twitter Widget Stencil (for Omnigraffle)

clip_image016This stencil includes a selection of useful Twitter badges and widgets.
Twitter Widget Stencil (for Omnigraffle) →

Web Designer Toolkit (.psd)

clip_image017Web Designer Toolkit (.psd) →

Facebook GUI (.psd)

clip_image019
Facebook GUI (.psd) →

Facebook Applications (Omnigraffle)

clip_image021
This is a pretty sizable collection of Facebook related elements to use in creating wireframes for Facebook applications.Facebook Applications (Omnigraffle) →

Web Elements Kit (.psd)

clip_image022
This huge set of various web elements with 17 easy to modify modules, with each module comes with four different color options.Web Elements Kit (.psd) →

Flex Darkskin UI (.psd)

clip_image023This beautiful and polished free Flex UI skin is available for free from psdthemes.com, but you do need to signup first.
Flex Darkskin UI (.psd) →

WEB UI Treasure Chest

clip_image025
WEB UI Treasure Chest →

Comments (1)

将Excel表转换为TiddlyWiki格式文件

TiddlyWiki 是个不错的工具,但对于表格的处理比较繁琐,如果能用Excel处理表格而将结果导入TiddlyWiki,将大大提高效率,减少差错。

下面这个Excel宏来自 http://groups.google.com/group/TiddlyWiki/browse_thread/thread/575a9789ffc0ce0b 和这里 http://www.lacher.com/examples/a960521b.htm (这两个地址可能在国内无法访问!)

具体用法是:将下面的VBS代码作为宏载入一个Excel文件,关于Excel宏怎样添加及运行请在Excel中看有关帮助(按F1键),每次要转换Excel表,须先选中要转换的数据区域,然后运行此宏,按提示输入目标文件路径和文件名(Enter the destination filename with complete path),转换后的内容保存于此文件中,将其拷贝到TiddlyWiki就能看到效果,很棒!

Sub TiddlyWikiExport()

    ‘ Dimension all variables
    Dim DestFile As String
    Dim FileNum As Integer
    Dim ColumnCount As Integer
    Dim RowCount As Integer
    Dim Clipboard As String

    ‘ Prompt user for destination filename

    DestFile = InputBox("Enter the destination filename" _
    & Chr(10) & "(with complete path):", "Quote-Comma Exporter")

    ‘ Obtain next free file handle number
    FileNum = FreeFile()

    ‘ Turn error checking off
    On Error Resume Next

    ‘ Attempt to open destination file for output
    Open DestFile For Output As #FileNum

    ‘ If an error occurs report it and end
    If Err <> 0 Then

        MsgBox "Cannot open filename " & DestFile
        End

    End If

    ‘ Turn error checking on
    On Error GoTo 0

    ‘ Loop for each row in selection
    For RowCount = 1 To Selection.Rows.Count

        ‘ Write the initial table tag
        Print #FileNum, "|";

        ‘ Loop for each column in selection
        For ColumnCount = 1 To Selection.Columns.Count

        ‘ Write the background color tag
        If Selection.Cells(RowCount, ColumnCount).Interior.Color <> vbWhite Then
            ColorToRGB CStr(Selection.Cells(RowCount, ColumnCount).Interior.Color), r, g, b
            Print #FileNum, "bgcolor(#" & r & g & b & "): ";
        End If

        ‘ Write the initial bold tag
        If Selection.Cells(RowCount, ColumnCount).Font.Bold = True Then
            Print #FileNum, "”";
        End If

        ‘ Write the initial italics tag
        If Selection.Cells(RowCount, ColumnCount).Font.Italic = True Then
            Print #FileNum, "//";
        End If

        ‘ Write the initial strikethrough tag
        If Selection.Cells(RowCount, ColumnCount).Font.Strikethrough = True Then
            Print #FileNum, "—";
        End If

        ‘ Set right alignment
        If Selection.Cells(RowCount, ColumnCount).HorizontalAlignment = xlRight Or Selection.Cells(RowCount, ColumnCount).HorizontalAlignment = xlCenter Then
            Print #FileNum, " ";
        End If

        ‘ Write the initial font color tag
        If Selection.Cells(RowCount, ColumnCount).Font.Color <> vbBlack Then
            ColorToRGB CStr(Selection.Cells(RowCount, ColumnCount).Font.Color), r, g, b
            Print #FileNum, "@@color(#" & r & g & b & "):";
        End If

        ‘ Write the initial hyperlink tag
        If Selection.Cells(RowCount, ColumnCount).Hyperlinks.Count > 0 Then
            Print #FileNum, "[[";
        End If

        ' Write current cell's text
        Print #FileNum, Selection.Cells(RowCount, ColumnCount).Text;

        ' Write the initial hyperlink tag
        If Selection.Cells(RowCount, ColumnCount).Hyperlinks.Count > 0 Then
            Print #FileNum, "|" & Selection.Cells(RowCount, ColumnCount).Hyperlinks(1).Address & "]]";
        End If

        ‘ Write the ending font color tag
        If Selection.Cells(RowCount, ColumnCount).Font.Color <> vbBlack Then
            Print #FileNum, "@@";
        End If

        ‘ Set left alignment
        If Selection.Cells(RowCount, ColumnCount).HorizontalAlignment = xlLeft Or _
            Selection.Cells(RowCount, ColumnCount).HorizontalAlignment = xlCenter Then
            Print #FileNum, " ";
        End If

        ‘ Write the ending strikethrough tag
        If Selection.Cells(RowCount, ColumnCount).Font.Strikethrough = True Then
            Print #FileNum, "—";
        End If

        ‘ Write the ending italic tag
        If Selection.Cells(RowCount, ColumnCount).Font.Italic = True Then
            Print #FileNum, "//";
        End If

        ‘ Write the ending bold tag
        If Selection.Cells(RowCount, ColumnCount).Font.Bold = True Then
            Print #FileNum, "”";
        End If

        ‘ Write the ending table separator
        Print #FileNum, "|";

        ‘ Check if cell is in last column
        If ColumnCount = Selection.Columns.Count Then
            ‘ If so then write a blank line
            Print #FileNum,
        End If

        ‘ Start next iteration of ColumnCount loop
        Next ColumnCount

    ‘ Start next iteration of RowCount loop
    Next RowCount

    ‘Close destination file
    Close #FileNum

End Sub

Sub ColorToRGB(ByVal Color As String, ByRef r, ByRef g, ByRef b)

On Error GoTo Solution
Dim SStr As String
SStr = "000000" & Hex(Color)
SStr = Right(SStr, 6)
b = Mid(SStr, 1, 2)
g = Mid(SStr, 3, 2)
r = Mid(SStr, 5, 2)

If Len(r) < 2 Then r = "0" & r
If Len(g) < 2 Then g = "0" & g
If Len(b) < 2 Then b = "0" & b

Solution:
    If Err.Number <> 0 Then
        r = -1
        g = -1
        b = -1
    End If
End Sub

 

其他代码参考:

1 >> Exporting Excel Data in Special Formats

You can use a VBA procedure to export data in comma delimited format. Or, change the delimiting character to export the data separated by semicolons, etc.

Microsoft Knowledgebase Article

PSS ID Number: Q123183
Article last modified on 09-15-1995
PSS database name: EXCEL
5.00 5.00c 7.00 | 5.00
WINDOWS | MACINTOSH
——————————————————————–
The information in this article applies to:
- Microsoft Excel for Windows, versions 5.0, 5.0c
- Microsoft Excel for Windows 95, version 7.0
- Microsoft Excel for the Macintosh, version 5.0 ——————————————————————–
SUMMARY
=======
In Microsoft Excel, there is no menu command to automatically export
data to a text file so that the text file is exported with quotation
marks AND commas as delimiters. For example, there is no command to
automatically create a text file that contains the following:
"Text1","Text2","Text3"
You can create this functionality in Microsoft Excel by using a
Visual Basic procedure.
MORE INFORMATION
================
You can use the Print # statement in a Visual Basic procedure similar to the following to export a text file with quotation marks AND commas as the delimiters. For the procedure to function properly, you must select the cells that contain your data before you run it. Microsoft provides examples of Visual Basic procedures for illustration only, without warranty either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. This Visual Basic procedure is provided ‘as is’ and Microsoft does not guarantee that it can be used in all situations. Microsoft does not support modifications of this procedure to suit customer requirements for a particular purpose. Note that a line that is preceded by an apostrophe introduces a comment in the code–comments are provided to explain what the code is doing at a particular point in the procedure. Note also that an underscore character (_) indicates that code continues from one line to the next. You can type lines that contain this character as one logical line or you can divide the lines of code and include the line continuation character. For more information about Visual Basic for Applications programming style, see the "Programming Style in This Manual" section in the "Document Conventions" section of the "Visual Basic User’s Guide."

Sub QuoteCommaExport()

‘ Dimension all variables
Dim DestFile As String
Dim FileNum As Integer
Dim ColumnCount As Integer
Dim RowCount As Integer

‘ Prompt user for destination filename

DestFile = InputBox("Enter the destination filename" _
& Chr(10) & "(with complete path):", "Quote-Comma Exporter")

‘ Obtain next free file handle number
FileNum = FreeFile()

‘ Turn error checking off
On Error Resume Next

‘ Attempt to open destination file for output
Open DestFile For Output As #FileNum

‘ If an error occurs report it and end
If Err <> 0 Then

MsgBox "Cannot open filename " & DestFile
End

End If

‘ Turn error checking on
On Error GoTo 0

‘ Loop for each row in selection
For RowCount = 1 To Selection.Rows.Count

‘ Loop for each column in selection
For ColumnCount = 1 To Selection.Columns.Count

‘ Write current cell’s text to file with quotes
Print #FileNum, """" & Selection.Cells(RowCount, _
ColumnCount).Text & """";

‘ Check if cell is in last column
If ColumnCount = Selection.Columns.Count Then

‘ If so then write a blank line
Print #FileNum,
Else

‘ Otherwise write a comma
Print #FileNum, ",";

End If

‘ Start next iteration of ColumnCount loop
Next ColumnCount

‘ Start next iteration of RowCount loop
Next RowCount

‘Close destination file
Close #FileNum

End Sub

For additional information, please see the following article(s) in the Microsoft Knowledge Base:

ARTICLE-ID: Q103985

TITLE : Macro to Export Text File with Comma AND Quote Delimiters

KBCategory: kbprg kbcode

KBSubcategory:

Additional reference words: 7.00 5.00 5.00c export quotes commas csv

——

2 >> Using Visual Basic

(Original code: http://tiddlywiki.pastebin.com/f7848a6a7)

Rem  *****  BASIC  *****
Sub TiddlyWikiExport()   ' Dimension all variables
    Dim TableData As String
    Dim ColumnCount As Integer
    Dim RowCount As Integer
    Dim ClipboardData As New DataObject   ' Loop for each row in selection
    For RowCount = 1 To Selection.Rows.Count   ' Write the initial table tag
        TableData = TableData & "|"   ' Loop for each column in selection
        For ColumnCount = 1 To Selection.Columns.Count   ' Do header formatting for the first row
        If RowCount = 1 Then
            TableData = TableData & "!"
        Else   ' Write the background color tag
            If Selection.Cells(RowCount, ColumnCount).Interior.Color <> vbWhite Then
                ColorToRGB CStr(Selection.Cells(RowCount, ColumnCount).Interior.Color), r, g, b
                TableData = TableData & "bgcolor(#" & r & g & b & "): "
            End If   ' Write the initial bold tag
            If Selection.Cells(RowCount, ColumnCount).Font.Bold = True Then
                TableData = TableData & "''"
            End If   ' Write the initial italics tag
            If Selection.Cells(RowCount, ColumnCount).Font.Italic = True Then
                TableData = TableData & "//"
            End If   ' Write the initial strikethrough tag
            If Selection.Cells(RowCount, ColumnCount).Font.Strikethrough = True Then
                TableData = TableData & "---"
            End If   ' Set right alignment
            If Selection.Cells(RowCount, ColumnCount).HorizontalAlignment = xlRight Or _
                Selection.Cells(RowCount, ColumnCount).HorizontalAlignment = xlCenter Then
                TableData = TableData & " "
            End If   ' Write the initial font color tag
            If Selection.Cells(RowCount, ColumnCount).Font.Color <> vbBlack Then
                ColorToRGB CStr(Selection.Cells(RowCount, ColumnCount).Font.Color), r, g, b
                TableData = TableData & "@@color(#" & r & g & b & "):"
            End If   ' Write the initial hyperlink tag
            If Selection.Cells(RowCount, ColumnCount).Hyperlinks.Count > 0 Then
                TableData = TableData & "[["
            End If
        End If   ' Write current cell's text
        content = Replace(Selection.Cells(RowCount, ColumnCount).Text, Chr$(10), "<br>")
        TableData = TableData & content   If RowCount <> 1 Then   ' Write the initial hyperlink tag
           If Selection.Cells(RowCount, ColumnCount).Hyperlinks.Count > 0 Then
               TableData = TableData & "|" & Selection.Cells(RowCount, ColumnCount).Hyperlinks(1).Address & "]]"
           End If   ' Write the ending font color tag
           If Selection.Cells(RowCount, ColumnCount).Font.Color <> vbBlack Then
               TableData = TableData & "@@"
           End If     ' Set left alignment
           If Selection.Cells(RowCount, ColumnCount).HorizontalAlignment = xlLeft Or _
               Selection.Cells(RowCount, ColumnCount).HorizontalAlignment = xlCenter Then
               TableData = TableData & " "
           End If   ' Write the ending strikethrough tag
           If Selection.Cells(RowCount, ColumnCount).Font.Strikethrough = True Then
               TableData = TableData & "---"
           End If   ' Write the ending italic tag
           If Selection.Cells(RowCount, ColumnCount).Font.Italic = True Then
               TableData = TableData & "//"
           End If   ' Write the ending bold tag
           If Selection.Cells(RowCount, ColumnCount).Font.Bold = True Then
               TableData = TableData & "''"
           End If
        End If
        code
        ' Write the ending table separator
        TableData = TableData & "|"   ' Check if cell is in last column
        If ColumnCount = Selection.Columns.Count Then
            ' If so then write a blank line
            TableData = TableData & Chr$(10)
        End If   ' Start next iteration of ColumnCount loop
        Next ColumnCount   ' Start next iteration of RowCount loop
    Next RowCount   ' Copy data to the clipboard
    ClipboardData.SetText TableData
    ClipboardData.PutInClipboard
End Sub   Sub ColorToRGB(ByVal Color As String, ByRef r, ByRef g, ByRef b)   On Error GoTo Solution
Dim SStr As String
SStr = "000000" & Hex(Color)
SStr = Right(SStr, 6)
b = Mid(SStr, 1, 2)
g = Mid(SStr, 3, 2)
r = Mid(SStr, 5, 2)   If Len(r) < 2 Then r = "0" & r
If Len(g) < 2 Then g = "0" & g
If Len(b) < 2 Then b = "0" & b   Solution:
    If Err.Number <> 0 Then
        r = -1
        g = -1
        b = -1
    End If
End Sub

发表评论

给Web设计师的50个省时省力的强大工具

clip_image001
clip_image002 clip_image003 clip_image003[1]慢慢研究吧 :)

Being a web designer is not easy. Not only do we need to have a good understanding about visual design, typography, information architecture, psychology and a plethora of other disciplines; in our work, we need to take care of so many details, so that our job becomes more and more time-consuming, requiring dozens of tools, attention span and an effective workflow for beautiful, timely and functional results.

And this is where small time-savers become handy. Be it a handy checklist, batch installer, dummy image generator or converter from Excel spreadsheet to HTML — all these things can save us a couple of minutes every day, making our work easier and more efficient. And this is why we keep collecting them for Smashing Magazine’s readers. Whether you like lists or not: this one will probably help you find those little nuggets out there that will help you avoid headaches and stress. Below we present useful time-savers for web designers.

You may want to subcribe to Smashing Magazine’s E-Mail Newsletter (32,600 subscribers) to keep updated about new useful tools, techniques and resources. The newsletter is sent out once every two weeks.

[Offtopic: by the way, did you already get your copy of the Smashing Book?]

Time-Savers For Web Designers

LaunchList
This tool helps you review important items before the big launch. By default, the tool provides 28 items to be checked, but it also allows you to add custom items to the list. Each item can be commented on or crossed out. Once you’re done, you can send the report along with project’s details to multiple recipients via email. Alternatives: Ultimate Website Launch Checklist and Paul Boag’s The Ultimate Website Prelaunch Checklist.

clip_image004

Pencil Project: Sketching and Prototyping with Firefox
Pencil is an open source GUI prototyping tool. It contains built-in stencils for diagrams and prototyping, on-screen text editing with rich text support as well as standard drawing operations. Works in Firefox 3.5+.

clip_image005

Zootool
Zootool is a bookmarking website and tool for collecting images, documents, links and videos from anywhere on the Web. A bookmarklet allows you to collect items quickly and easily. You can then tag and organize your saved items in Zootool’s back end. You can also integrate Zootool with Tumblr, Twitter, Delicious and FriendFeed to share what you find. Screenshot via MacStories.

clip_image006

Bounce
A fun and easy way to share ideas on a website. The tool allows you to make notes, write feedback in an overlay of every site and then share your notes with friends.

clip_image007

Ninite Batch Installer
Ninite lets you pick your favorite software from among an extensive list (Web browsers, messaging, media, images, documents, security, runtimes, file sharing, utilities, compression, developer tools and more), creates a batch installer for them and then installs them for you automatically. Alternative: Allmyapps allows you to bundle your favourite applications, install them in a single click and reinstall them whenever you need to.

clip_image008

Support Details
When in doubt, send your customers to this tool. Their data will be automatically read out of the browser (including Flash version, operating system, cookies, JavaScript status, screen resolution, browser size and more) and can be copied, sent directly to you via email or saved.

clip_image009

MugTug’s Darkroom
When you need to modify a picture but don’t have your favorite software on hand, you can use the all-in-one image processor MugTug’s Darkroom which was created for photographers. You are able to adjust levels, white balance, exposure, contrast and saturation and apply a few photographic effects. In addition, Darkroom allows to upload pictures from Picasa and Flickr. Alternatives: Pixlr and Sumo Paint.

clip_image010

Visual Website Optimizer
Visual Website Optimizer is undoubtedly the best A/B, split and multivariate testing software ever created by mankind.

clip_image011

Keyonary
This site a nice little application for finding shortcuts in Mac OS X, Photoshop and so on. Currently, more than 250 Photoshop shortcuts have been added. Simply type the name of application in the search box, and it spits out a long shortcut list.

clip_image012

gridr buildrrr
This generators allows you to choose the grid for your layout and preview it online.

clip_image013

Instant Blueprint – Create a web project framework in seconds.
Instant Blueprint allows you to quickly create a web project framework with valid HTML/XHTML and CSS in only a matter of seconds, allowing you to get your project up and running faster!

clip_image014

Hummingbird
Hummingbird lets you see how visitors are interacting with your website in real time. Hummingbird is built on top of Node.js, a new javascript web toolkit that can handle large amounts of traffic and many concurrent users.

clip_image015

jsFiddle
Online Editor for the Web, with support of JavaScript, MooTools, jQuery, Prototype, YUI, Glow and Dojo, HTML and CSS. The tool lets you save and run your applications within the web browser.

clip_image016

String: create a multi-language website or app
Essentially, String is a version control for localization. This tool allows you to manage your language files – from PHP to PO to Rails to iPhone apps. You can invite users to translate your content, and keep track of changes. You can add new sections and languages as you go and then download your updated language files and place them in your app.

clip_image017

Titanpad
This tool allows you to edit documents simultaneously with other users, highlighting each user’s edits in a different color. Editing is done in true real time. Nice solution for everybody who works collaboratively on text documents, whether in the same office or on the other side of the world.

clip_image018

Pixelnovel Timeline: Version Control for Adobe Photoshop
This tool basically integrates a Subversion client in Adobe Photoshop with an Adobe Photoshop plug-in. You can preview versions right in Photoshop and manage version control directly from Photoshop. Not free.

clip_image019

0to255
A simple tool that helps web designers find variations of any color. Simply pick the color that you want to start with and 0to255 gives you a range of colors from black to white using an interval optimized for web design. Then, just click the variation you want to use and the hex code is automatically copied to your clipboard.

clip_image020

Load Impact: Website load/stress test
The tool lets you find out the performance limits of your website before you learn the hard way. It is an online service that simulates users accessing your site and creates test report graphs to find out how many users your site could handle.

clip_image021

Ideone: Online IDE & Debugging Tool
This tool is an online compiler and debugging tool which allows to compile and run code online in more than 40 programming languages, among them C++, Java, JavaScript, Perl, PHP, Python and Ruby. Nice alternatives online: PHP Anywhere (online PHP editor) and CodeRun (allows you to develop, test and debug ASP.NET, PHP and Ajax applications online).

clip_image022

Online Dummy Image Generator
This online tool generates dummy images for you site: you can specify size, background and foreground colors, image format and add custom text. You can also use shortcuts for several standard dimensions including ad sizes (mediumrectangle, skyscarper, leaderboard etc.), screen resolution sizes and video standards (ntsc, pal, hd720, hd1080).

clip_image023

HiFi RegExp Tool
Regular expressions can be a pain. The HiFi RegExp tool is 100% JavaScript using jQuery. This tool was created to help developers learn, practice, and compose regular expressions.

clip_image024

Tableizer
Clients often provide data in spreadsheet form, and reformatting it into HTML can be a real pain. This tool generates HTML tables out of spreadsheet data. Just copy and paste the cells from your spreadsheet, choose your options (font, font size and header color) and you have a properly formatted HTML table for your data.

clip_image025

FollowUpThen: Easy Email Reminder
If you don’t mind sending your e-mails to a third-party, try this tool for easy email reminders. On your next email just include time-interval@followupthen.com and the tool will follow up after the time interval you specify. No account is required.

clip_image026

Divine: Conversion tool from PSD to HTML
Divine is a plug-in that sits on top of Photoshop. Once you’ve finished designing in Photoshop, launch Divine plug-in in Photoshop, assign WordPress roles to the main elements (e.g. #footer, #header, etc.), and then the plug-in will prepare all the files you need. Once you set FTP access, the tool uploads the theme automatically to your server. Absolutely free.

clip_image027

Kaleido
This tool allows you to create meaningful visuals for code and can be used to plan, organize and navigate code in a more intuitive way.

clip_image028

Sketchpad
This application is a powerful online image editor. Its tools are organized in handy, draggable boxes that can be positioned very much as you would see in traditional image-editing applications.

clip_image030

Unicode code converter
Type or paste text in any of the green or grey shaded boxes and click on the button Convert button above it. Alternative representations will appear in all the other boxes. You can then cut & paste the results into your document.

clip_image031

Grid System Generator
This tool generates grid systems in valid css / xhtml for rapid prototyping, development and production environments. The grid system generators offer the ability to customize the width, no. of columns and margin(s) to allow more flexibility for various designs.

clip_image032

ud.com namecheck
The tool checks availability of social usernames, domain names and trademarks.

clip_image033

Typograph — Scale & Rhythm
A useful tool for testing typographic scale and rhythm. It lets you set factors such as the typographic scale (traditional, 3:5 Fibonacci, Le Corbusier, etc.), the font size in percentage, line height, the layout, padding and the line height for h1, h2 and h3 headings.

clip_image034

ColorBrewer Intro – Selecting Good Color Schemes for Maps
ColorBrewer is an online tool designed to help people select good color schemes for maps and other graphics.

clip_image035

CSS Inliner Tool
If you’ve ever sent an email campaign, you know that if your CSS is not coded inline, it is likely to get stripped out by email clients, which can make your email design pretty funky looking. Writing CSS inline can be time consuming, and repetitive. MailChimp has a CSS inline conversion tool built right in that will automatically transform all of your local styles into inline styles. Designers have found it so useful, we thought we’d share it with everyone else – even if you don’t have a MailChimp account.

clip_image036

HTML Purifier – Filter your HTML the standards-compliant way!
HTML Purifier is a standards-compliant HTML filter library written in PHP. HTML Purifier removes malicious code (better known as XSS) and make sure your documents are standards compliant.

clip_image037

Rendera
Rendera helps you learn HTML5 and CSS. Type in your HTML code and see it rendered in real-time. Then style it with CSS. You can use any of the HTML 5 or CSS3 tags your browser supports. The tool supports HAML and SASS, too.

clip_image038

RegExr
An intuitive tool for learning, writing, and testing Regular Expressions.

clip_image039

try ruby! (in your browser)
This tool allows you to try out Ruby code in the prompt command line online. It supports Ruby’s built-in methods, and contains a step-by-step tutorial for Ruby newbies.

clip_image040

Google Command Line
GoogleCL is a command-line utility that provides access to various Google services. It streamlines tasks such as posting to a Blogger blog, adding events to Calendar, or editing documents on Google Docs.

clip_image041

Tiny Fluid Grid
Simple tool that generates code for fluid grid-based layouts.

clip_image042

Fonolo.com
This online tool lets you skip the phone menus for hundreds of companies and makes it less frustrating to call large companies. For business owners, Fonolo allows your customers to actually see your phone menu options, before they call you.

clip_image043

Producteev: Creating To-Do Lists with Emails
Forward your important emails to task@producteev.com and the tool will create to-do lists on the fly and send you alerts when needed. It can be integrated in E-mails, IM, Web, iPhone, Gmail, Google Calendar etc.

clip_image044

AddUse – User research made easy
AddUse is a web based tool that helps you create, manage and present your user research in a simple, easy to use and cost efficient way. It’s a tool to use at any given moment in your development process. It presents the results from your user tests, surveys and questionnaires in a graphical way, efficiently helping engineering, marketing and management groups make the right decisions.

clip_image045

bookwhen
Online registration for events, workshops, classes and courses. The free version allows for 150 events with 300 bookings per month.

clip_image046

Further useful tools

see[Mike]code: tool for remote coding interview
This simple tool lets you conduct a short coding interview remotely: it creates a disposable page for the job candidate and allows you to discover people who struggle to code on big or small problems.

jsdo.it
This tool allows you to write code your browser, fork and modify any code, fix bugs and add features and also ask the community about your problems.

JavaScript Error Tracking
The service tracks JavaScript errors that occur on your site and provides you with a stack trace to help you debug. Similar errors are grouped together.

Old Version
Old Version has exactly that, the older version of some of your favorite programs. Why? Because newer is not always better. Sometimes the newer versions cause conflicts. This way, you can always go back to the older version that worked for you.

Onbile
Onbile is a free platform for creating and managing your Mobile Website version for iPhone, Android and Blackberry users

Free Bookkeeping, Accounting, & Tax Services; Self Employment & Freelance Success
Easily import from online accounts to put your bookkeeping on autopilot and prepare taxes. Get up-to-date reports that give you visibility into your P&L, income, and expenses.

iSendr
iSendr lets you send files to your friends directly, without uploading to a server.

seekWP
WordPress documentation search engine.

speedtracer
Speed Tracer is a tool to help you identify and fix performance problems in your web applications. It visualizes metrics that are taken from low level instrumentation points inside of the browser and analyzes them as your application runs. Speed Tracer is available as a Chrome extension and works on all platforms where extensions are currently supported (Windows and Linux).

the Awesome Highlighter
This tool lets you highlight text on web pages and then gives you a small link to the highlighted page.

OpenWith.org
This page provides detailed information about most file extension and links to free programs that can open and create each type of file.

Last Click

Kuku Klok
Online alarm clock and wake-up call for those of us who often work too much and fall asleep in front of the screen. Open the website, select the desired alarm time and set your favorite wake-up call. Keep the browser tab open. Happily, this online alarm clock works even if your Internet connection goes down. The available sounds are “Classic Clock,” “Electronic,” “Slayer Guitar,” “Military Trumpet” and “Cockerel.”

clip_image047

What the Hex?
Among the variety of methods of representing color values, some are easier to identify than others. The hexadecimal system, though, often looks incomprehensible. If you feel you know colors pretty well, then this is a simple game for you. All you have to do is match the hexadecimal code (which is actually a group of three hex numbers: #rrggbb) with the corresponding color. Of course, this is easier said than done, but you can adjust the difficulty by displaying between 2 and 48 possible answers.

clip_image048

Would you like to see more similar round-ups on Smashing Magazine?

Would you like to see more similar round-ups on SmashingMag?Market Research

Related Posts

You may be interested in the following related posts:

发表评论

别逼我翻墙,成吗?

Dropbox 也会被墙……

Comments (1)

如何使用Google Checkout购买dreamhost主机

dreamhost现在只接受googlecheckout来支付了,而且用它支付有97天退款保证,如何使用Google Checkout购买dreamhost?

  1. 首先,你需要有国际信用卡,推荐 招行,工行,中行 的visa信用卡。
    Dreamhost优惠券,折扣代码,最便宜有效的Promo Code
  2. 在购买dh前,先去申请Google的在线支付系统,地址是:http://checkout.google.com
    • 注册Google Checkout 的注意事项
    • 国家里可能没有china,请选择hongkong
    • 信用卡用visa和master卡比较容易通过
    • 有些银行卡需要先给银行打电话申请开通国际网站的支付功能,例如 工行visa卡等
      如未开通国际支付功能,会显示 信用卡无效 的英文提示(打完电话立刻就开通了支付功能)
    • 申请成功后,可能会从你的卡里冻结1-2美金,作为验证卡的过程
    • 地址,姓名,都必须填写英文
    • 邮箱,将作为登陆用,非常重要,最好用gmail,sina,163,sohu,收信快速,可靠。
    • 表格填写的图片范例: 点击查看
  3. checkout的填写,一定要认认真真的填写,任何一个框都不要乱填,不然不仅无法支付,还影响你的信誉(国内信用卡的开户银行可以查到你的填写情况)
  4. google checkout注册成功后,再回到dh去购买(当然,先在dh填表购买,在要求支付的页面点击googlecheckout支付按钮,再按照上面的步骤作也是可以的)。
  5. 在dreamhost购买,直接选择最便宜的一款,购买1年,使用优惠码A50可以在总价格上优惠50美金,送1个免费域名,1个独立IP,即一年只要22.4美金
  6. 购买dh技巧:可以暂时不填写赠送的com域名,先直接用dh的二级域名。等能登录控制面板后,再去申请免费送的com域名。只要你一直使用dh的空间,此com域名一直免费。 详情:2008年dreamhost购买图解,购买dh图例教程
  7. 支付的时候,选择google checkout支付。
  8. 支付成功后,你会收到如下一些email:
    • 1-2小时内,查询注册gg checkout的信件,你会收到来自google checkout的信件,告知你支付了一笔款。
    • 几个小时内会收到来自dreamhost的email:This is an email receipt for the Google Checkout payment you just made to us.
    • 24-48小时内,会收到来自dreamhost的帐号开通邮件:The purpose of this email is to let you know that your FTP account www.tsas.cn has just been activated, and you can begin uploading any
      files you wish to it (including those for your web site).
    • 当时,我等待得不耐烦,就回复了第一份dreamhost发来的邮件“Hi, My account www.tsas.cn still pending,please hurry up”,几小时后,我就得到了回复“We can confirm that your Google Checkout payment made it through to us,and we’ve just activated your account. Thanks very much for yourpatience! ”
    • 如果你需要ssh,等FTP开通后,可以试一试ssh是否也开通了。我上次就是直接开通了ssh。如果没有开通,再回信告诉dh你需要ssh。
  9. 登录你的dh控制面板 panel.dreamhost.com 如果顺利,你就可以开始使用dh了,祝你dh空间用的愉快。
  10. dh的空间对纯静态页的网站,支持得特别好。我就有网站达到每天2万IP的。本站使用的hbcms建站系统,一个好处是可以选择生成批量静态页的数目(10-1000)。我通常是选择每次生成20个静态页,这样在ssh观察cpu情况,就几乎不会提高服务器的负载。个人认为,不影响服务器,就不会导致自己的帐号被封。
  11. 本站的优惠码VIP50可以在总价格上优惠50美金,送1个免费域名,1个独立IP
  12. 点击这里查看dreamhost空间详细情况(2007年9月,dh推出500G空间)
  13. 在空间页面点击“sign up”或直接点击这里进入dh最便宜空间注册页

原文:http://hi.baidu.com/51webhost/blog/item/cdf09f8d3a165ff6503d9298.html

Comments (1)

AJAX+PHP: 一个文件实现单页面即时聊天

一个仅22K的文件,无需数据库,完美实现在线聊天,不做详细说明,代码中都有注释。

演示地址:http://bbs.okajax.com/demo/37/

下载的话直接保存以上代码为chat.php文件即可。

论坛交流地址:http://bbs.okajax.com/thread-4602-1-1.html

<?php
//****************参数设置****************
//显示在线用户
$disonline = true;
//新登陆时显示最近内容的条数(默认为30条)
$leastnum = 30;
//默认的房间名(默认是每天换一个文件),如果去掉d,则是每月换一个文件
$room = date("Y-m-d");
//房间保存路径,必须以/结尾
$roomdir = "rooms/";
//编码方式
$charset = "UTF-8";
//客户端最大显示内容条数(建议不要太大)
$maxdisplay = 300;
//语言
$lang = array(
//聊天室描述
"description"=>"欢迎来到迷你AJAX聊天室。Email:domain@mifanpu.com",
//聊天室标题
"title"=>"欢迎进入迷你聊天系统",
//第一个到聊天室的欢迎
"firstone"=>"<span style=’color:#16a5e9;’>系统广播:</span>",
//当信息有禁止内容时显示
"ban"=>"请使用文明用语!禁止发布非法信息!",
//关键字
"keywords"=>"聊天室",
//发言提示
"hereyourwords" => "在这里发言!"
);
header("content-type:text/html; charset=utf-8");
$get_past_sec = 3; //如果发现丢话,可以适当调大这个值
$touchs = 10; //检查在线人数的时间间隔
$title = $lang["title"];
$earlier = 10;
$description = $lang["description"];
$origroom = $room;
$least = ($_GET["dis"])?intval($_GET["dis"]):$leastnum;
$touchme = $_POST['touchme'];
if (!is_dir($roomdir)) @mkdir($roomdir) or die("error when creating folder $roomdir");
$room = $_GET['room'];
if (!$room) $room = $_POST["room"];
$room = checkfilename($room);
if (!$room) $room = $origroom;
$filename = $roomdir.$room.".dat.php";
$datafile = $roomdir.$room.".php";
if (!file_exists($filename)) @file_put_contents($filename,’<?php die();?>’."\n".time()."|".$lang["firstone"]."\n");
if (!file_exists($datafile)) @file_put_contents($datafile,’<?php die();?>’."\n");
$action = $_POST["action"];
if (!function_exists("file_get_contents"))
{
function file_get_contents($path)
{
if (!file_exists($path)) return false;
$fp=@fopen($path,"r");
$all=fread($fp,filesize($path));
fclose($fp);
return $all;
}
}
if (!function_exists("file_put_contents"))
{
function file_put_contents($path,$val)
{
$fp=@fopen($path,"w");
fputs($fp,$val);
fclose($fp);
return true;
}
}
function checkfilename($file)
{
if (!$file) return "";
$file = trim($file);
$a = substr($file,-1);
$file = eregi_replace("^[.\\\/]*","",$file);
$file = eregi_replace("[.\\\/]*$","",$file);
$arr = array("../","./","/","\\","..\\",".\\");
$file = str_replace($arr,"",$file);
return $file;
}
function get_ip()
{
global $_SERVER;
if ($_SERVER)
{
if ( $_SERVER[HTTP_X_FORWARDED_FOR] )
$realip = $_SERVER["HTTP_X_FORWARDED_FOR"];
else if ( $_SERVER["HTTP_CLIENT_ip"] )
$realip = $_SERVER["HTTP_CLIENT_ip"];
else
$realip = $_SERVER["REMOTE_ADDR"];
}
else
{
if ( getenv( ‘HTTP_X_FORWARDED_FOR’ ) )
$realip = getenv( ‘HTTP_X_FORWARDED_FOR’ );
else if ( getenv( ‘HTTP_CLIENT_ip’ ) )
$realip = getenv( ‘HTTP_CLIENT_ip’ );
else
$realip = getenv( ‘REMOTE_ADDR’ );
}
return $realip;
}
function array2json($arr)
{
$keys = array_keys($arr);
$isarr = true;
$json = "";
for($i=0;$i<count($keys);$i++)
{
if ($keys[$i] !== $i)
{
$isarr = false;
break;
}
}
$json = $space;
$json.= ($isarr)?"[":"{";
for($i=0;$i<count($keys);$i++)
{
if ($i!=0) $json.= ",";
$item = $arr[$keys[$i]];
$json.=($isarr)?"":$keys[$i].’:';
if (is_array($item))
$json.=array2json($item);
else if (is_string($item))
$json.=’"’.str_replace(array("\r","\n"),"",$item).’"’;
else $json.=$item;
}
$json.= ($isarr)?"]":"}";
return $json;
}
function keeponline()
{
global $disonline,$datafile;
if (!$disonline) return;
$name = $_POST['name'];
$ip = get_ip();
$onlines = @file_get_contents($datafile);
$s1 = "|{$name}|{$ip}|";
if (strpos($onlines,$s1) === false)
{
if (strpos($onlines,"|".$name."|") === false)
{
$fp = @fopen($datafile,"a+");
if ($fp)
{
if (@flock($fp, LOCK_EX))
{
@fputs($fp,time()."|".time().$s1."\n");
@flock($fp, LOCK_UN);
}
@fclose($fp);
}
}
else
{
echo "NAME";
die();
}
}
}
if ($action == "write")
{
$color = $_POST["color"];
if (!eregi("[0-9a-fA-F]{6}",$color) || $color == "#000000") $color = "";
$color = "#".$color;
$size = intval($_POST["size"]);
$name = str_replace(array("\n","\r"),"",$_POST['name']);
if (!$name) die("No Name!!");
$ip = get_ip();
keeponline();
$s = "";
$style = "";
$font = $_POST["font"];
if ($font == "songti") $font = "宋体";
else if ($font == "heiti") $font = "黑体";
else if ($font == "kaiti") $font = "楷体_GB2312";
else $font = "";
$style .= (!$font)?"":"font-family:".$font.";";
$style .= (!$_POST["bold"])?"":"font-weight:bold;";
$style .= (!$color || $color == "#")?"":"color:{$color};";
$style .= (!$size || $size == "16")?"":"font-size:{$size}px;";
$t = time();
$arr = explode("\n",$_POST['content']);
for($i = 0;$i<count($arr);$i++)
{
$content = $arr[$i];
$content = trim($content);
$content = str_replace(array("\n","\r"),"",$content);
if (!$content) continue;
$content = htmlspecialchars($content);
$content = preg_replace("~\[img\](http:\/\/[a-zA-Z0-9\.-_\+%\?]*)\[\/img\]~i", "<img src=’$1′ />", $content);
$content = ($style)?"<span style=’{$style}’>{$content}</span>":$content;
$s.= $t."|".$name.":".$content."\n";
}
if (!$s) die("No Content!!");
$fp = @fopen($filename,"a+");
if (!$fp) die("repeat");
$re_time = 0;
while(!@flock($fp, LOCK_EX))
{
sleep(1);
$re_time++;
if ($re_time >=4) break;
}
if ($re_time <4)
{
@fputs($fp,$s);
@flock($fp, LOCK_UN);
}
else die("repeat");
@fclose($fp);
echo "OK";
}
else if ($action == "read")
{
$first = $_POST["first"];
$lastmod = intval($_POST["lastmod"]) – $get_past_sec; //得到两秒以内的所有发言,
$alastmod = @filemtime($filename);
$name = $_POST['name'];
$name = str_replace("\n","",$name);
$ip = get_ip();
$json = array();
$json["lastmod"] = time();
$item = array();
$newonline = array();
$offline = array();
$fp = @fopen($filename,’r');
flock($fp,LOCK_EX);
$s = fread($fp,filesize($filename));
flock($fp,LOCK_UN);
fclose($fp);
$lines = explode("\n",$s);
if ($alastmod >= $lastmod && !$first)
{
foreach($lines as $l)
{
$item2 = array();
$l = str_replace(array("\n","\r"),"",$l);
if (strpos($l,"|") === false) continue;
$arr = explode("|",$l);
$t = intval($arr[0]);
if ($t >= $lastmod)
{
$item2["time"] = date("H:i:s",$t);
$item2["word"] = addslashes($arr[1]);
$item[] = $item2;
}
}
}
else if ($first)
{
$item = array();
$total = count($lines);
for($i=$total-1;$i>=$total-$least;$i–)
{
if ($i<=0) break;
$item2 = array();
$l = str_replace(array("\n","\r"),"",$lines[$i]);
if (strpos($l,"|") === false) continue;
$arr = explode("|",$l);
$t = intval($arr[0]);
$item2["time"] = (date("m-d",time()) == date("m-d",$t))?date("H:i:s",$t):date("m-d H:i",$t);
$item2["word"] = addslashes($arr[1]);
$item[] = $item2;
}
$item = array_reverse($item);
}
$s = "";
$nt = time();
$onlines = array();
if($disonline && $touchme)
{
$users = @file($datafile);
foreach($users as $l)
{
$l = str_replace(array("\r","\n"),"",$l);
if (strpos($l,"|") === false)
{
$s.=$l."\n";
continue;
}
$arr = explode("|",$l);
if ($nt – intval($arr[1]) < $touchs*3)
{
if (trim($name) == trim($arr[2]))
{
$s.= $arr[0]."|".time()."|".$name."|".get_ip()."|\n";
}
else $s.=$l."\n";
$onlines [] = $arr[2];
}
}
@file_put_contents($datafile,$s);
$json["onlines"] = $onlines;
}
$json["lines"] = $item;
echo array2json($json);
}
else if ($action == "keep" )
{
keeponline();
echo "keep ok";
}
else if ($action == "quit")
{
$name = $_POST['name'];
if($disonline)
{
$users = @file($datafile);
foreach($users as $l)
{
$l = str_replace(array("\r","\n"),"",$l);
if (strpos($l,"|") === false)
{
$s.=$l."\n";
continue;
}
$arr = explode("|",$l);
if (trim($name) == trim($arr[2])) continue;
else $s.=$l."\n";
}
@file_put_contents($datafile,$s);
echo "OK";
}
die();
}
else
{
?>
<html>
<head>
<title>迷你聊天 | <?php echo $title;?></title>
<meta http-equiv=’Pragma’ content=’no-cache’ />
<meta http-equiv=Content-Type content="text/html; charset=<?php echo $charset;?>" />
<meta name="keywords" content="<?php echo $lang["keywords"];?>">
<meta name="description" content="Mini AJAX Chatroom By Longbill. <?php echo $description;?>">
<style type=’text/css’>
body { text-align:center; color:#333333; font-size:12px; font-family:宋体;}
a { text-decoration:none; color:#a2b700; }
.mydiv { text-align:left; margin:5px; padding:5px; border:1px solid #ff8c05; background-color:#fdd283; width:600px; }
.inputtext { border:0px; border-bottom:1px solid #333333; background-color:transparent;}
.submit { border:1px solid #ff8c05; background-color:transparent; }
.contents { border:1px solid #ff8c05;margin:5px; margin-top:10px;background-color:#ffffff; overflow:auto;word-break:break-all;word-wrap :break-word;}
.bg { background-color:#ffffff; }
.content { border:0px;background-color:transparent;width:auto; font-size:16px; font-family:Fixedsys; margin:2px; padding:1px; }
.time { color:#aaaaaa; font-size:10px; font-family:Arial;}
.online { margin:5px; padding:0px; display:inline; }
.mybut { width:20px; height:20px; background-color:#ff8c05; text-align:center; font-size:18px; color: #333333;}
</style>
<script>
function $(obj)
{
return document.getElementById(obj);
}
function setCookie(name,value,t)
{
var cookieexp = 5*30*24*60*60*1000; //5 months
var cookiestr=name+"="+escape(value)+";";
var expires = "";
var d = new Date();
var t2=(!t)?cookieexp:t*60*1000;
d.setTime( d.getTime() + cookieexp);
expires = "expires=" + d.toGMTString()+";";
document.cookie = cookiestr+ expires;
}
function getCookie(name)
{
var start = document.cookie.indexOf( name + "=" );
var len = start + name.length + 1;
if ( ( !start ) && ( name != document.cookie.substring( 0, name.length ) ) ) return "";
if ( start == -1 ) return "";
var end = document.cookie.indexOf( ";", len );
if ( end == -1 ) end = document.cookie.length;
return unescape( document.cookie.substring( len, end ) );
}
function createAJAX()
{
if (window.XMLHttpRequest)
{
var oHttp = new XMLHttpRequest();
return oHttp;
}
else if (window.ActiveXObject)
{
var versions = [
"MSXML2.XmlHttp.6.0",
"MSXML2.XmlHttp.3.0"
];
for (var i = 0; i < versions.length; i++)
{
try {
var oHttp = new ActiveXObject(versions[i]);
return oHttp;
} catch (error) {}
}
}
throw new Error("Your browser doesn’t support XMLHttpRequest");
}
function pickColor()
{
if (!window.isIE) return;
var sColor = $(’dlgHelper’).ChooseColorDlg();
var color = sColor.toString(16);
while (color.length<6) color="0"+color;
window.color = color;
color = "#"+color;
$(’div_color’).style.backgroundColor = color;
$(’div_color’).value = color;
}
var isIE = (document.all && window.ActiveXObject) ? true : false;
</script>
</head>
<body >
<center>
<div class="mydiv login" id=’div_description’>
<?php echo $description;?>
</div>
<div class="mydiv rooms" id=’div_msg’>
<div class=’contents’ style=’height:350px;’ id=’div_contents’>Loading…</div>
</div>
<div class="mydiv login" id=’div_name’ style=’display:block;’>
昵称:<input type=text class="inputtext bg" size=8 id=’chat_user’ value=” />
<OBJECT id=dlgHelper CLASSID="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b" WIDTH="0px" HEIGHT="0px"></OBJECT>
<input class="inputtext" style=’width:50px;cursor:hand;10px;background-color:#000000;color:#ffffff;’ id=’div_color’ onClick="pickColor()" value="#000000" onBlur="this.style.backgroundColor=this.value;window.color=this.value.replace(’#',”);" />
字体大小:<input class="inputtext bg" type=text style=’width:20px’ maxlength=3 id=’input_size’ value=’16′ />(px)
字体:<select id=’input_font’ class=’inputtext bg’ style=’width:70px;’>
<option value=’Fixedsys’>Fixedsys</option>
<option value=’heiti’>黑体</option>
<option value=’songti’>宋体</option>
<option value=’kaiti’>楷体</option>
</select>
加粗:<input type=checkbox id=’input_bold’ class=’inputtext’ style=’border-bottom:0px;’ />
窗口:<a class=’mybut’ href=’#’ onclick=’resize(1)’>+</a>
<a class=’mybut’ href=’#’ onclick=’resize(0)’>-</a>
<a href=’#’ onclick=’clearAll()’>清屏</a>
</div>
<div class="mydiv login" id=’div_word’>
<textarea type=text class="inputtext bg" rows=1 scrolling=no style=’height:20px;overflow:hidden;width:500px;’ id=’chat_word’ onFocus="if (this.value == ‘<?php echo $lang["hereyourwords"];?>’) this.value=”;"
onkeydown="return check_send(event);" ><?php echo $lang["hereyourwords"];?></textarea>
<input type=button class=submit value=’ 发 表 ‘ onClick="chat_send();$(’chat_word’).style.height=20;" onFocus="this.blur();"/>
</div>
<div class=’mydiv’ style=’display:<?php if (!$disonline) echo "none";?>’ id=’div_online’>在线用户:<br />Loading online…</div>
<script>
var debug = 0;
var lastmod = <?php echo time()-$earlier*60;?>;
var login = 1;
var loading = false;
var olduser = getCookie(’chatusername’);
if (olduser != "") $(’chat_user’).value = olduser;
var room = "<?php echo $room;?>";
var first = 1;
var dis = "<?php echo $least;?>";
var lastword;
var color=”;
var touchs = <?php echo $touchs;?>;
var dotouch = true;
var maxdisplay = <?php echo $maxdisplay;?>;
var nowdisplay = 1;
var sending = 0;
var loaded_lines = [];
function encode(s)
{
return (encodeURIComponent)? encodeURIComponent(s):s;
}
var keep_ajax;
function keeponline()
{
var name = $(’chat_user’).value;
if (!name) return;
keep_ajax = createAJAX();
keep_ajax.open(’POST’,'<?php echo basename(__FILE__);?>’,1);
keep_ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
keep_ajax.onreadystatechange = function ()
{
if (keep_ajax.readyState == 4 && keep_ajax.status == 200)
{
//alert(keep_ajax.responseText);
}
}
keep_ajax.send("action=keep&name="+encode(name));
}
setInterval("keeponline()",touchs*1000);
function quitroom()
{
if(confirm("你真的要离开聊天室吗?"))
{
var ajax = createAJAX();
ajax.open(’POST’,'<?php echo basename(__FILE__);?>’,0);
ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
ajax.send("action=quit&name="+encode($(’chat_user’).value));
//alert("sending close action=quit&name="+encode($(’chat_user’).value));
//alert("response:"+ajax.responseText);
}
else return ”;
}
document.body.onbeforeunload = quitroom;
setInterval(" load_word()",(debug)?6000:1000);
var load_word_ajax;
//下载完成后的处理函数
function load_word_change()
{
if (load_word_ajax.readyState == 4)
{
if (load_word_ajax.status != 200)
{
load_word_error();
return;
}
window.loading = false;
var body = $(’div_contents’);
try {
if (debug) alert(load_word_ajax.responseText);
eval("var arr = "+load_word_ajax.responseText);
} catch(e)
{
alert(’Error 101\nJSON syntax error!\n\n’+load_word_ajax.responseText);
return;
}
if (!arr || !arr.lastmod || typeof(arr.lastmod) == "undefined" )
{
return;
}
var html = "";
var line = arr.lines;
var i = 0;
var v1 = 0;
var div_online = $(’div_online’);
if (window.first)
{
body.innerHTML = "";
window.first = false;
}
if (arr.onlines)
{
$(’div_online’).innerHTML = "";
for(var i=0;i<arr.onlines.length;i++) addonline(arr.onlines[i]);
}
for(var i=0;i<line.length;i++)
{
var linekey = line[i].word.substring(line[i].word.length-20,line[i].word.length)+line[i].time;
if (window.loaded_lines[linekey] === true)
{
if (debug) alert("jump:"+linekey);
continue;
}
var div1 = document.createElement("div");
window.nowdisplay ++;
if (window.nowdisplay > window.maxdisplay) window.nowdisplay = 1;
if ($("contentitem"+window.nowdisplay)) body.removeChild($("contentitem"+window.nowdisplay));
div1.className = "content";
div1.id = "contentitem"+window.nowdisplay;
div1.innerHTML = line[i].word+" <span class=’time’>("+line[i].time+")</span>";
body.appendChild(div1);
window.loaded_lines[linekey] = true;
body.scrollTop = 655350;
v1 = 1;
}
if (v1)
{
window.focus();
document.body.focus();
window.lastmod = arr.lastmod;
if(debug) alert("lastmod = "+arr.lastmod + " \nwindow.lastmod="+window.lastmod);
if ($(’chat_word’).disabled == false) $(’chat_word’).focus();
}
}
}
function load_word_error()
{
window.loading = false;
window.status = ‘Error 102:while loading words’;
setTimeout("window.status = ”;",5000);
}
function load_word()
{
load_word_ajax = createAJAX();
if (window.loading)
{
try
{
load_word_ajax.abort();
window.loading = false;
}catch(e) {}
}
if (!window.lastmod)
{
alert("window.lastmod="+window.lastmod);
return;
}
load_word_ajax.open(’POST’,'<?php echo basename(__FILE__);?>’,true);
load_word_ajax.onreadystatechange = load_word_change;
var urlstring = ”;
urlstring += "lastmod="+window.lastmod;
urlstring+= "&room="+room;
urlstring+= "&action=read";
urlstring+= "&name="+encode($(’chat_user’).value);
if (window.first)
{
urlstring+= "&first=true";
urlstring += "&dis="+dis;
}
//如果到了取得在线用户的时间
if (window.dotouch)
{
urlstring+= "&touchme=true";
window.dotouch = false;
//垃圾内存回收
try { CollectGarbage(); } catch(e) {}
}
window.loading = true;
if (debug) alert("sending:"+urlstring);
load_word_ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
load_word_ajax.send(urlstring);
}
function touchme()
{
window.dotouch = true;
setTimeout("touchme()",window.touchs*1000);
}
function showalert(a,n)
{
if (!n) n=0;
if (n>3) return;
if (!a)
{
a = 0;
b = 1;
}
else
{
a = 1;
b = 0;
}
document.title = mytitle[a];
setTimeout("showalert("+b+","+(n+1)+");",500);
}
function addonline(name)
{
if ($(name)) return;
var d1 = document.createElement("div");
d1.id = name;
d1.innerHTML = name;
d1.className = "online";
$(’div_online’).appendChild(d1);
}
touchme();
function check_send(e)
{
if (!e) e = window.event;
var obj = $(’chat_word’);
if (isIE) obj.style.height = obj.scrollHeight+3;
if (e.keyCode == 13)
{
if ((!e.shiftKey && !e.altKey && !e.ctrlKey) || !isIE)
{
chat_send();
obj.style.height = 20;
return false;
}
else if (isIE) obj.style.height = obj.scrollHeight+18;
}
return true;
}
var send_ajax;
send_ajax_change = function()
{
if (send_ajax.readyState == 4)
{
if (send_ajax.status != 200)
{
send_ajax_error();
return;
}
if (debug) alert("send_ajax response:"+send_ajax.responseText);
if (send_ajax.responseText.indexOf("NAME")!=-1)
{
alert(’该昵称已被人占用了!’);
$(’chat_user’).value = "";
$(’chat_user’).focus();
}
else if (send_ajax.responseText.indexOf("repeat")!=-1)
{
$(’chat_word’).value = window.lastcontent;
}
on_send_ok();
if (!window.loading)
{
window.dotouch = true;
load_word();
}
}
}
function on_send_begin()
{
with($(’chat_word’))
{
disabled = true;
style.backgroundColor = "#eeeeee";
}
window.sending = 1;
}
function on_send_ok()
{
window.sending = 0;
with($(’chat_word’))
{
value = ”;
disabled = false;
focus();
style.backgroundColor = "#ffffff";
}
}
function on_send_error()
{
window.sending = 0;
with($(’chat_word’))
{
disabled = false;
focus();
style.backgroundColor = "#ffffff";
}
}
function send_ajax_error()
{
alert(’Error 103\nwhen send words\n\nYou can send them again!’);
$(’chat_word’).value = window.lastcontent;
window.sending = 0;
on_send_error();
}
function chat_send()
{
send_ajax = createAJAX();
send_ajax.open(’POST’,'<?php echo basename(__FILE__);?>’,true);
send_ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
send_ajax.onreadystatechange = send_ajax_change;
var urlstring = ”;
var name = $(’chat_user’).value.replace("\n","");
var content = $(’chat_word’).value;
var bold = ($(’input_bold’).checked)?"bold":"";
var size = parseInt($(’input_size’).value);
var font = $(’input_font’).value;
if (name == "")
{
alert(’Please enter your nick name first!!’);
$(’chat_user’).focus();
return;
}
if (content == "" || content == "\n" || content == "\n\n" || content == "\n\n\n")
{
alert(’Please enter your words!’);
$(’chat_word’).focus();
$(’chat_word’).value = "";
return;
}
if (size>100) size = 100;
else if (size<0) size = 1;
urlstring+= "action=write";
urlstring+= "&name="+encode(name);
urlstring+= "&content="+encode(content);
urlstring+= "&bold="+bold;
urlstring+= "&color="+window.color;
urlstring+= "&size="+size;
urlstring+= "&font="+font;
urlstring+= "&room="+room;
window.sending = 1;
window.lastcontent = content;
on_send_begin();
if (debug) alert("sending:"+urlstring);
send_ajax.send(urlstring);
setTimeout("if (window.sending) send_ajax.abort(); on_send_error();",5000);
setCookie("chatusername",$(’chat_user’).value);
}
function resize(s)
{
var o = $(’div_contents’).style;
var h = parseInt(o.height);
h = (s)?h+50:h-50;
if (h<=50 || h>=3000) return;
o.height = h;
$(’div_contents’).scrollTop = 655350;
}
function clearAll()
{
$(’div_contents’).innerHTML = "";
}
</script>
</center>
</body>
</html>
<?php
}
?>

发表评论

域名投资经验谈

    玩米,资金和眼光都是至关重要的!眼光可以不断地经验积累,但资金一定要预算好将来续费的压力等等。多看多思考,少煮少竟少跟风!多花时间去国外论坛和竟价网站观看国际形势,因为国内米市直接受国际米市形势的波动影响!

(阅读全文…)

发表评论

godaddy 的免费相册

在 Godaddy 购买域名,会有10多款免费产品供选用。其中我认为有价值的,搜集了一些其他人发在网上的使用经验。

(阅读全文…)

发表评论

Godaddy 的免费电子邮件账户

在 Godaddy 购买域名,会有10多款免费产品供选用。其中我认为有价值的,搜集了一些其他人发在网上的使用经验。

(阅读全文…)

发表评论

1link.in 多个网址压缩成1个短网址

网址:http://1link.in/

Simply put multiple links into one short link!

Would you like to send your friend list of the links of 5 most popular search engines? Simply put your links into the text field and click 1link. Enter one URL per line.

clip_image001

Your one link is created and automatically copied to the clipboard. You can send the link to your friend. Check our example 1link: http://1link.in/mnmse

clip_image002

Enter created link. Click open. It will open all contained links in new tabs or new windows (depends on your browser settings).

clip_image003

You will open 5 links just by one click!

clip_image004

clip_image005

发表评论

Wordpress Short URL Plugin 缩址插件及安装[辑]

辑自:小众软件

Short URL Plugin 安装起来和一般的插件不同,这里就详细说明一下吧。

1. 上传 short-url.phpu.php 两个文件到 /wp-content/plugins/ 文件夹。
2. 从后台激活插件。
3. 在 .htaccess 文件中添加下面的语句:RewriteRule ^u/([0-9]+)$ wp-content/plugins/u.php?$1
4. 访问后台 > 插件 > ShortURL 就可以添加,删除或者修改链接了。

在第三步中,很多人添加后还是不能实现跳转,可以试试将那句话放在 RewriteEngine On 下面。

默认是使用 u 作为调整链接的,如果你想和小众一样使用 down 就需要修改插件了。打开插件,把里面的 u 改成 down 就可以了,很容易的。

前往官方下载:http://wordpress.org/extend/plugins/short-url-plugin/

发表评论

urlShort 安装与使用 你也可以做缩址服务[辑]

转自:http://www.chinaz.com/Webbiz/Exp/1020952552009_2.html

缩短网址服务的源程序有多种选择:最早之前介绍过用 Google Apps 等方法,后来也介绍过 Yourls 这款优秀的程序,这次介绍的是 urlShort 这款免费开源的 php 程序。详情演示: http://aa.cx/

urlShort 作为一款开源软件,运行在 http://u.mavrev.com/ 已经有一段时间,缩短了几百万个网址速度照样不减,可见 php + MySQL 的强大。

第一次看到 http://u.mavrev.com/ 这个网站,是用偶的英文站注册 TwitterFeed 的时候,有时候会用这个网址来缩短文章的地址,可是太长了。

后来,看到 urlShort 已经开源,然后就第一时间下载来使用, http://37y.cn/ 这个山寨版就是用 urlShort 1.1.2 搭建的。

今天看到 urlShort 2.0.0 版本发布,功能更加强大,忍不住就写一篇博文来介绍这款优秀的开源程序。

一、安装篇

安装 urlShort 2.0.0 版本很简单,下载地址:http://code.google.com/p/urlshort/downloads/list
(站长下载:http://down.chinaz.com/soft/25574.htm

1、解压,上传,Apache 空间伪静态已经给你写好,Nginx 或者其他平台的用户也不用担心复杂的设置,因为, urlShort 的伪静态规则和 WordPress 的一模一样!是的,就有这么神奇,调用 index.php 来处理伪静态,太他妈有才了!赞一个,让我给短网址系统打分的话,就这一点,可以给 urlShort 打100分!至于 WordPress 的伪静态规则,这篇《》已经有详细的介绍。

上传完毕,确保 includes 目录可写(不推荐官方的说法权限777,危险,755即可)

2、运行浏览器,输入 http://你的地址/install/ 如图:

clip_image002

开头的 MySQL 信息就不用我多说了,Optional Features 选项可以根据自己的需要,分别是嵌入.mp3 .flv 或 .gif .jpg .png 格式,自动生成展示预览该媒体的页面,而不是网址转向,后面会详细介绍。

注意事项:最好填写 PhishTank 的 API ,自动过滤黑名单地址,至于什么是 PhishTank ,这个被 OpenDNS 收购的公司,可以参考维基百科上关于 PhishTank 的介绍。

接着点最下方的 Install ,信息正确则会出现安装成功画面:

clip_image004

安装完毕,下面介绍 urlShort 2.0.0 的特色功能

二、使用篇

urlShort 2.0.0 增加了如下三个特色功能,这是其他短网址系统都没有的:

1、网址预览功能

开启网址预览功能以后,默认不会直接 301 跳转到原始地址,而是给一个预览页面,有原始的地址,可以自行判断是否要继续,鼠标移动到网址还有通过 Snap.com 生成的缩略图:

clip_image006

当然,这一切得用户开启网址预览功能才有:http://aa.cx/warn/ 通过 cookies 记录(当然不会记录用户隐私),请开启浏览器相关功能

2、MP3/FLV/图片

默认开启 Optional Features 里的选项之后,插入 .mp3 音乐 、 .flv 视频 、 .jpg/gif/png 图片不会自动跳转,而是来个预览页面,给演示:

MP3:http://aa.cx/5
FLV:http://aa.cx/flv
JPG/GIF/PNG:http://aa.cx/pic

很酷吧?

3、PhishTank 黑名单过滤

PhishTank 是 OpenDNS 的子公司,专门收集网络上的黑名单地址,一旦网址被列入 PhishTank 黑名单,那么使用 OpenDNS 的童鞋就会受到警告,所以, urlShort 能确保你的网址缩短最安全。安装时需输入 PhishTank 的 API ,申请地址:http://www.phishtank.com/api_register.php (疑似服务器被攻击或者在墙外,自行解决)

三、汉化以及 BUG

没有专门的语言文件,需要自行修改如下文件:

index.php
boo.php
api/index.php
boo/index.php
includes/footer.php
includes/header-one.php
includes/header-two.php
includes/recent.php

注意编码,默认是没有编码的,自行在 includes/header-one.php 加上 UTF-8 编码:

《meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″ /》

urlShort 2.0.0 的 Bug 不少,比如 api/index.php 和 boo/index.php 里的地址都不正确,直接访问会出现如下错误:

clip_image008

只要自行修改 《?php include ‘includes/config.php’; echo INSTALL_PATH; ?》 为你的绝对地址即可,比如 http://aa.cx/

api.php 也有 bug ,用 1.*.* 的版本替换即可,旧版本 api.php 下载:http://files.zou.lu/urlShort-api.zip

四、广告时间

AA.CX 短网址即搭建在 urlShort 的基础上,网址够短,有API、网址预览、媒体预览等强大功能,并且会一直更新官方的版本,欢迎使用并且提出意见: http://aa.cx/

统计功能实际上是有的,只是前台还看不到,正在努力开放让他直接显示出。

喜欢 Twitter 和 Echofon (即以前的 TwitterFox)的童鞋,corrie 童鞋推荐的可以自定义 API 和短网址的最新版本:http://www.corrie.net.cn/e/1137.htm

其中,AA.CX 短网址设置如下:

http://aa.cx/api.php?url={url}

以下是我的山寨版的完全设置:

clip_image010

发表评论

用Google和百度的工具全面考察域名的价值[转]

如果你看中一个域名,但又犹豫有没有购买的价值,这时候在论坛里询问几乎很难有结果,因为各人的判断标准不一样,而且你也不方便把未成交的域名的全部信息告诉别人,让人很难替你判断,这时候最好就是借助Google和百度的工具自己判断。对于一个域名所代表的关键词的价值,Google和百度提供了很多好用的工具。

1、搜索引擎工具,了解域名的收录量。

在Google或baidu上搜索一下自己的域名所代表的关键词,了解一下收录的网页量,很多米农都会做这项工作,但事实上大多数米农不了解这个数字对域名的意义,往往是检索量大就沾沾自喜,检索量小就垂头丧气。检索量大,反映了一个关键词所拥有的网络信息和网络资源多,容易用现成的资讯和资源建立网站,所以可能会有很多站长需要,也从一个侧面反映了人们对该词的关注,但真正反映人们对一个关键词的关注程度的应该是——

2、指数工具,了解域名的受关注程度。

了解域名的关注度指数,有两个重要的参考工具:
谷歌趋势:
http://www.google.com/trends?hl=zh-CN
百度指数:
http://index.baidu.com/
谷歌趋势是只要有少少流量的关键词都能从中看到趋势,包括最关心这个关键词的是哪个国家的哪个城市。而百度指数只是按需要显示一些关键词,很多关键词,如果他觉得没有商业价值,即使关注度很高也不会显示指数。
另外还有两个工具可以了解你的域名每日的搜索量,这是公众对这个关键词的关注度的重要参考:
百度火爆地带:
http://f.baidu.com/fs/inquire/price.php
谷歌关键词工具:
https://adwords.google.com/select/KeywordToolExternal
谷歌关键词工具除了了解你的域名每月网民搜索量,还是一个非常强大的判断域名商业价值的工具——

3、商业价值分析工具,了解域名的商用价值。

上面说到的谷歌关键词工具,你可以了解你的域名所代表的关键词的广告客户竞争程度、每次点击的平均价格、搜索量趋势和出现最高搜索量的具体时间。
广告客户竞争程度,广告客户对该词的关注度,他们可能是你的域名的真正用家,即我们所说的终端。每次点击的平均价格,需要在谷歌关键词工具搜索结果页面中,从“选择要显示的列”下拉菜单中选取,才会显示,这个价格应该是该关键词在实际的广告点击产生的价格,对域名的实用价值是个重要的参考。有很多关键词,特别是一些我们日常生活接触不多的专业词汇,可能搜索出来的页面数量不大,或者每月搜索量很小,但终端用户竞争激烈,愿意花很高的价钱买广告位,这样的域名很有可能比我们常见的词汇的域名有价值。
搜索量趋势和出现最高搜索量的具体时间,则可供分析一个关键词是不是仅仅一时热的彗星关键词,以后是否还有再热的可能和应用价值。
谷歌关键词工具还有一个重要的功能,就是对相关词汇做出参考,这给你的域名注册也有很大帮助,例如我想注册一个旅游域名,就可以把旅游的几个关键词输入搜索,就能从中了解哪些词汇别人也很关注,商家竞争也很激烈,广告点击价格很高,用这些词汇注册域名,至少比自己创意强一百倍。
百度也有一个工具是商业价值分析必用的,那就是百度推广平台:
http://www2.baidu.com/inquire/price.php
这里可以知道一个关键词在百度购买排名的所有商家,以及购买价格,这样我们可以很直观了解商家对这个词汇的需求。

4、新闻搜索,了解传统媒体的关注度。

尽管进入网络时代,但大多数平民百姓还是不上网的,最接近普罗大众的媒体还是传统的报纸刊物,而且现在的网上的比较严肃可信的新闻主要来源也还是传统媒体,所以从新闻搜索中了解你的关键词的关注度很有必要,有很多词汇,如果搜索引擎收录的网页数量很大,但媒体关注度很小,那就有必要了解清楚是什么原因。百度指数和谷歌趋势都有媒体关注度,你还可以从新闻搜索中具体了解你的域名都曾经在哪些新闻里出现过,这样还可以开阔思维,扩大域名的应用范围。
百度新闻:
http://news.baidu.com/
谷歌资讯
http://news.google.cn/

5、辞典工具,深入了解域名的含义。

米农中很多人都在用谷歌的语言工具:
http://translate.google.cn/
这个工具有个很好的作用,就是翻译的一些新词汇比国内很多辞典更符合当前的英语国家的实际,而且还有搜索链接引导你到出现过这些词汇的网页,使你了解更多与该词汇相关的情况,对于米农准确造词有帮助,例如猪流感,很多中国人自然而然会翻译成pig flu,但事实上更准确的是Swine flu.
百度百科:
http://baike.baidu.com/
是我们了解词汇的另一个工具,很多新词、老词和不常用词都可能在这里找到解释。找新词来注册域名,这里是个去处,而且,如果你对自己的域名所代表的词汇有正确的理解,而百度百科上有没有这个词汇,你还可以在上面发表你的词条,让更多人能理解它。

6、网店是了解产品词汇的天堂。

尽管它们并不是什么工具,但我是把百度有啊和淘宝等商城当作了解产品域名的一个工具。很多产品名,尽管用户每日搜索量和搜索引擎收录量不是很庞大,但在网店上会有很多产品在买卖,而且种类繁多,这所名该词汇市场很大,这样的词汇是值得拥有的。所以产品域名应该关注商城、b2b平台而不仅仅是搜索引擎。
百度有啊的网址是:
http://youa.baidu.com/

发表评论

dot.tk is fun

DotTK免费顶级域名除了支持转发外,已经可以设置A、CNAME、MX记录和修改DNS服务器!DotTK免费顶级域名不太稳定,时不时无法访问,适合赏玩,不适合建站!

DotTK提供yourname.TK的免费顶级域名,网站有简体中文版,具有很多年的历史,应该是最先免费的顶级域名了!过去曾经屏蔽中国用户IP,最近发现中国大陆地区已经重新可以访问注册.TK域名了!(.TK是南太平洋岛国托克劳的国家域名)免费注册一个帐户可以任意申请.TK域名,支持域名转发(可隐藏原URL)、电邮转发、A记录解析、CNAME别名记录、MX邮件记录、设置DNS服务器等服务。另外还有很多看起来不错的域名是不免费的,要交费才能注册使用!

网址:http://www.dot.tk

如果你注册的域名在90天内访问量少于25个,你的域名将被删除!如果你开通的电邮转发在90天内收到的邮件少于10封,你的电邮转发服务将被停止!

发表评论

.nfo文件是什么文件?

nfo的意思就是info,nfo文件应该是普通文本文件,你可以用word,notpad等程序打开。
它里面一般是一些关于这个软件的信息,比如这个软件是干什没么的,名字,操作系统,
需要磁盘空间。也有些 nfo文件里面没有这些信息,而只是一些介绍某个组织的东西。 nfo文件是怎么产生呢?假设你是一个国际网络上一个地下盗版软件交流组织的成员,
每当你得到一个软件并且将之压缩打包之后,你是否想在里面加上一些你们组织的信
息呢?这样得到这个软件的人就会知道该组织的存在,将来也许会参加或者提供软件。
于是你可以写一个nfo文件,里面写上“我们是XXX组织,多少人,多少硬盘,你想
参预怎么办”等等。这只是nfo文件多数情况下的意义,但并不表示只要是nfo文件就
一定是盗版软件。一些软件破解中的说明文件也是用.nfo的。总之nfo表示告诉你一些
信息的意思。NFO是破解组织放在自己发行的软件包,如DVD RIP文件夹中用来表明该软件一切有关
信息的。对应发布的产品一般都会有一个NFO文件,里面有发布软件的介绍及相关说明
,当然为了确别其他组织,每个组织都会有一个相应的"图形"标记,不过用普通编辑器无
法正常显示!
NFO文件中包含的信息十分丰富,以DVD RIP为例,其中有:
THEATRE DATE —— 首映日期
RELEASE DATE —— 该RIP发行日期
STORE DATE —— 该影片DVD的上市日期
DVD DATE —— 该影片DVD的发行日期
GENRE —— 该影片种类
RUNTIME —— 该影片放映时间长度
RATING —— 该影片在IMDB网站的投票率
SCREENINGS —— 该片观摩人数
VIDEO CODEC —— 视频编码
VIDEO QUALITY —— 视频质量,包括视频码率、有时候还包括其他技术参数
RESOLUTION —— 视频尺寸
ASPECT RATIO —— 画面比例
AUDIO CODEC —— 音频编码
AUDIO BITRATE —— 音频码率
FPS —— 帧频
LANGUAGE —— 影片语言
SUBTITLES —— 字幕语言
THEATRE/STV —— 该影片是在剧场上映还是在电视台放映
IMDB URL —— IMDB链接
CAST —— 演员列表
RIPPER NOTES —— 破解者的话 另外,文件夹的名称也是很有讲究的,其中包含了该RIP的基本信息。从文件名
"12.29.02.Lord.Of.The.Rings.The.Two.Towers.*SVCD*.*TS*.FTF"中可以知道什么信
息呢? 12.29.02表示发布的日期。
Lord.Of.The.Rings.The.Two.Towers是电影的名字。
*SVCD*表示发布的格式是SVCD
*TS*表示影片的来源是TELESYNC (TS)。

网上流传的d版软件包中,会有一些扩展名为nfo的文件,一般还有一个名叫file_id.diz的文件。那么这些文件有什么用?怎样打开?
在这些nfo文件中,有一个(通常是体积最大的那个)最重要,它记录了该软件的简单介绍、破解信息、安装说明、以及破解组织自己的一些信息。其余的nfo文件中所包含的信息要少得多,基本可以忽略。所有这些信息都是英文。“nfo”来自于单词“information”的第2到第4个字母。nfo文件的作用现在很清楚了,基本就是这些。
名叫file_id.diz的文件记录了该软件包的全名。这个文件在互联网发展的早期曾发挥过一定的作用,现在已经基本让位于nfo文件,保留它完全是出于一种习惯,或者说保持向前兼容吧。
nfo文件和file_id.diz的格式是一样的,都是纯文本文件。要查看他们的内容,用写字板之类的文本编辑器就可以了。不过,多数情况下大家用写字板打开nfo文件的时候,都会看到很多乱码,这是什么原因呢?
要回答这个问题,必须对扩展ASCII有所了解。扩展ASCII共有256个字符,其中0到7f包括了大部分我们常用的字符,如字母、符号等。而80及以上的字符并不常用到,其中的一部分被用作制表符。通常情况下,中文系统用2个ASCII字符合起来表示一个汉字。但为了不和常用字符冲突,中文系 统用的是80及以上的字符。但问题在于这些字符也包括了制表符等。所以 以前的汉字系统经常有汉字识别的问题。NFO里不仅用到了7f以下的字符, 还大量用到了制表符和非标准换行符。所以如果我们打开一个NFO,经常可以看到所谓的乱码,就是这个原因!这种现象在非英文的操作系统里尤其普遍。
那么为了正常查看nfo文件的内容,我们需要专用的nfo查看工具。其实现有的nfo查看工具和普通的文本编辑器并没有很多本质上的不同,只是它们使用标准英文字体来显示文件!借助于它们我们可以正确地看到NFO文件的内容,但是如果nfo文件中有汉字,我们看到的将是乱码。
如果只想看到nfo文件中的文字信息,用任何一种文本编辑器打开它都可以。 如果想看到nfo文件的真面目,最好用专门的工具。这样的工具现在有很多,网上随便搜一下都可以搜除很多种。这里我们推荐一种:
DAMN_NFO_Viewer_v2.10.0031_Setup.exe
在网上可以找到。如果你经常使用Total Commander这个工具,那么可以在网上搜索它的一个插件nfoviewer,这样用起来会更方便一些。 如果实在找不到或不愿意去寻找专门的工具,也还有一个办法。那就是使用dos或windows系统自带的文本编辑工具edit。在dos命令提示符下输入edit即可。

发表评论

HTML 标签:frameset,frame,iframe 的区别与应用

框架概念

所谓框架便是网页画面分成几个框窗,同时取得多个 URL。只需要 <FRAMESET> <FRAME> 即可,而所有框架标记需要放在一个总起的 html 档,这个档案只记录了该框架 如何划分,不会显示任何资料,所以不必放入 <BODY> 标记,浏览这框架必须读取这档案而不是其它框窗的档案。<FRAMESET> 是用以划分框窗,每一框窗由一个 <FRAME> 标 记所标示,<FRAME>必须在 <FRAMESET> 范围中使用。如下例:
<frameset cols="50%,*">
<frame name="hello" src="up2u.html">
<frame name="hi" src="me2.html">
</frameset>
此例中 <FRAMESET> 把画面分成左右两相等部分,左便是显示 up2u.html,右边则会显示 me2.html 这档案,<FRAME> 标记所标示的框窗永远是按由上而下、由左至右的次序。

■ <FRAMESET> <FRAME>

<FRAMESET> 称框架标记,用以宣告HTML文件为框架模式,并设定视窗如何分割。
<FRAME> 则只是设定某一个框窗内的参数属性。
<FRAMESET> 参数设定:
例子:<frameset rows="90,*" frameborder="0" border=0 framespacing="2" bordercolor="#008000">
COLS="90,*"
垂直切割画面(如分左右两个画面),接受整数值、百分数, * 则代表占用馀下空 间。数值的个数代表分成的视窗数目且以逗号分隔。例如COLS="30,*,50%" 可以 切成叁个视窗,第一个视窗是 30 pixels 的宽度,为一绝对分割,第二个视窗是当 分配完第一及第叁个视窗後剩下的空间,第叁个视窗则占整个画面的 50% 宽度 为 一相对分割。您可自己调整数字。
ROWS="120,*"
就是横向切割,将画面上下分开,数值设定同上。唯 COLS 与 ROWS 两参数尽量 不要同在一个 <FRAMESET> 标记中,因 Netacape 偶然不能显示这类形的框架,尽 采用多重分割。
frameborder="0"
设定框架的边框,其值只有 0 和 1 , 0 表示不要边框, 1 表示要显示边框。(避 免使用 yes 或 no )
border="0"
设定框架的边框厚度,以 pixels 为单位。
bordercolor="#008000"
设定框架的边框颜色。
framespacing="5"
表示框架与框架间的保留空白的距离。
<FRAME> 参数设定:
例子:<frame name="top" src="a.html" marginwidth="5" marginheight="5" scrolling="Auto" frameborder="0" noresize framespacing="6" bordercolor="#0000FF">
SRC="a.html"
设定此框窗中要显示的网页档案名称,每个框窗一定要对应着一个网页档案。你可 使用绝对路径或相对路径。
NAME="top"
设定这个框窗的名称,这样才能指定框架来作连结,必须但任意命名。
frameborder=0
设定框架的边框,其值只有 0 和 1 , 0 表示不要边框, 1 表示要显示边框。(避 免使用 yes 或 no )
framespacing="6"
表示框架与框架间的保留空白的距离。
bordercolor="#008000"
设定框架的边框颜色。
scrolling="Auto"
设定是否要显示卷轴,YES 表示要显示卷轴,NO 表示无论如何都不要显示, AUTO是视情况显示。
noresize
设定不让使用者可以改变这个框框的大小,亦没有设定此参数,使用者可以很随 意地拉动框架,改变其大小。
marginhight=5
表示框架高度部份边缘所保留的空间。
marginwidth=5
表示框架宽度部份边缘所保留的空间。
以下是一些例子:
例子 HTML Code
<frameset rows="80,*">
<frame name="top" src="a.html">
<frame name="bottom" src="b.html">
</frameset>
例子 HTML Code
<frameset rows="80,*,80">
<frame name="top" src="a.html">
<frame name="middle" src="b.html">
<frame name="bottom" src="c.html">
</frameset>
例子 HTML Code
<frameset cols="150,*">
<frameset rows="80,*">
<frame name="upper_left" src="a.html">
<frame name="lower_left" src="b.html">
</frameset>
<frame name="right" src="c.html">
</frameset>
例子 HTML Code
<frameset rows="80,*">
<frame name="top" src="a.html">
<frameset cols="150,*">
<frame name="lower_left" src="b.html">
<frame name="lower_right" src="c.html">
</frameset>
</frameset>

例子 HTML Code
<frameset cols="150,*">
<frame name="left" src="a.html">
<frameset rows="80,*">
<frame name="upper_right" src="b.html">
<frame name="lower_right" src="c.html">
</frameset>
</frameset>

■ <NOFRAMES>

当别人使用的浏览器太旧,不支援框架这个功能时,他看到的将会是一片空白。为了避免 这种情况,可使用 <NOFRAMES> 这个标记,当使用者的浏览器看不到框架时,他就会看到 <NOFRAMES> 与 </NOFRAMES> 之间的内容,而不是一片空白。这些内容可以是提醒浏览转用新的浏览器的字句,甚至是一个没有框架的网页或能自动切换至没有框架的版本 亦可。
应用方法:
在<frameset> 标记范围加入 </NOFRAMES> 标记,以下是一个例子:
<frameset rows="80,*">
<noframes>
<body>
很抱歉,阁下使用的浏览器不支援框架功能,请转用新的浏览器。
</body>
</noframes>
<frame name="top" src="a.html">
<frame name="bottom" src="b.html">
</frameset>
若浏览器支援框架,那麽它不会理会 <noframes> 中的东西,但若浏览器不支援框架,由於不认识所有框架标记,不明的标记会被略过,标记包围的东西便被解读出来,所以放在 <noframes>范围内的文字会被显示。

■ <IFRAME>

这标记只适用於 IE(comet:也使用于FireFox)。它的作用是在一页网页中间插入一个框窗以显示另一个文件。它是 一个围堵标记,但围着的字句只有在浏览器不支援 iframe 标记时才会显示,如<noframes> 一样,可以放些提醒字句之类。通常 iframe 配合一个辨认浏览器的 JavaScript 会较好,若 JavaScript 认出该浏览器并非 Internet Explorer 便会切换至另一版本。PS:一定要使用</iframe>关闭,否则后面的内容显示不出来。

<iframe> 的参数设定如下:
例子: <iframe src="iframe.html" name="test" align="MIDDLE" width="300" height="100" marginwidth="1" marginheight="1" frameborder="1" scrolling="Yes"> </iframe>
src="iframe.html"
欲显示於此框窗的文件来源除档案名称,必要加上相对或绝对路径。
name="test"
此框窗名称,这是连结标记的 target 参数所需要的,
align="MIDDLE"
可选值为 left, right, top, middle, bottom,作用不大
width="300" height="100"
框窗的宽及长,以 pixels 为单位。
marginwidth="1" marginheight="1"
该插入的文件与框边所保留的空间。
frameborder="1"
使用 1 表示显示边框, 0 则不显示。(可以是 yes 或 no)
scrolling="Yes"
使用 Yes 表示容许卷动(内定), No 则不容许卷动

发表评论

百度被黑红客反击快来参观迟就没了很搞的 :)

这里:

http://www.diabetes.ir/home/ 

不知是伊朗什么网站,被红客挂国旗奏国歌,好搞笑。

过了12日就不要访问了,到时应该已修复,访问反而是送它们访问量了 :)

发表评论

常用正则表达式[转]

匹配中文字符的正则表达式: [u4e00-u9fa5]
评注:匹配中文还真是个头疼的事,有了这个表达式就好办了
匹配双字节字符(包括汉字在内):[^x00-xff]
评注:可以用来计算字符串的长度(一个双字节字符长度计2,ASCII字符计1)
匹配空白行的正则表达式:ns*r
评注:可以用来删除空白行
匹配HTML标记的正则表达式:<(S*?)[^>]*>.*?|<.*? />
评注:网上流传的版本太糟糕,上面这个也仅仅能匹配部分,对于复杂的嵌套标记依旧无能为力
匹配首尾空白字符的正则表达式:^s*|s*$
评注:可以用来删除行首行尾的空白字符(包括空格、制表符、换页符等等),非常有用的表达式
匹配Email地址的正则表达式:w+([-+.]w+)*@w+([-.]w+)*.w+([-.]w+)*
评注:表单验证时很实用
匹配网址URL的正则表达式:[a-zA-z]+://[^s]*
评注:网上流传的版本功能很有限,上面这个基本可以满足需求
匹配帐号是否合法(字母开头,允许5-16字节,允许字母数字下划线):^[a-zA-Z][a-zA-Z0-9_]{4,15}$
评注:表单验证时很实用
匹配国内电话号码:d{3}-d{8}|d{4}-d{7}
评注:匹配形式如 0511-4405222 或 021-87888822
匹配腾讯QQ号:[1-9][0-9]{4,}
评注:腾讯QQ号从10000开始
匹配中国邮政编码:[1-9]d{5}(?!d)
评注:中国邮政编码为6位数字
匹配身份证:d{15}|d{18}
评注:中国的身份证为15位或18位
匹配ip地址:d+.d+.d+.d+
评注:提取ip地址时有用
匹配特定数字:
^[1-9]d*$ //匹配正整数
^-[1-9]d*$ //匹配负整数
^-?[1-9]d*$ //匹配整数
^[1-9]d*|0$ //匹配非负整数(正整数 + 0)
^-[1-9]d*|0$ //匹配非正整数(负整数 + 0)
^[1-9]d*.d*|0.d*[1-9]d*$ //匹配正浮点数
^-([1-9]d*.d*|0.d*[1-9]d*)$ //匹配负浮点数
^-?([1-9]d*.d*|0.d*[1-9]d*|0?.0+|0)$ //匹配浮点数
^[1-9]d*.d*|0.d*[1-9]d*|0?.0+|0$ //匹配非负浮点数(正浮点数 + 0)
^(-([1-9]d*.d*|0.d*[1-9]d*))|0?.0+|0$ //匹配非正浮点数(负浮点数 + 0)
评注:处理大量数据时有用,具体应用时注意修正
匹配特定字符串:
^[A-Za-z]+$ //匹配由26个英文字母组成的字符串
^[A-Z]+$ //匹配由26个英文字母的大写组成的字符串
^[a-z]+$ //匹配由26个英文字母的小写组成的字符串
^[A-Za-z0-9]+$ //匹配由数字和26个英文字母组成的字符串
^w+$ //匹配由数字、26个英文字母或者下划线组成的字符串
评注:最基本也是最常用的一些表达式

发表评论

正则表达式速查

3. 正则表达式定义

正则表达式(regular expression)描述了一种字符串匹配的模式,可以用来检查一个串是否含有某种子串、将匹配的子串做替换或者从某个串中取出符合某个条件的子串等。

l 列目录时, dir *.txt或ls *.txt中的*.txt就不是一个正则表达式,因为这里*与正则式的*的含义是不同的。

正则表达式是由普通字符(例如字符 a 到 z)以及特殊字符(称为元字符)组成的文字模式。正则表达式作为一个模板,将某个字符模式与所搜索的字符串进行匹配。

 

3.1 普通字符

由所有那些未显式指定为元字符的打印和非打印字符组成。这包括所有的大写和小写字母字符,所有数字,所有标点符号以及一些符号。

3.2 非打印字符


字符

含义

\cx

匹配由x指明的控制字符。例如, \cM 匹配一个 Control-M 或回车符。x 的值必须为 A-Z 或 a-z 之一。否则,将 c 视为一个原义的 ‘c’ 字符。

\f

匹配一个换页符。等价于 \x0c 和 \cL。

\n

匹配一个换行符。等价于 \x0a 和 \cJ。

\r

匹配一个回车符。等价于 \x0d 和 \cM。

\s

匹配任何空白字符,包括空格、制表符、换页符等等。等价于 [ \f\n\r\t\v]。

\S

匹配任何非空白字符。等价于 [^ \f\n\r\t\v]。

\t

匹配一个制表符。等价于 \x09 和 \cI。

\v

匹配一个垂直制表符。等价于 \x0b 和 \cK。

4. 各种操作符的运算优先级

相同优先级的从左到右进行运算,不同优先级的运算先高后低。各种操作符的优先级从高到低如下:

操作符

描述

\

转义符

(), (?:), (?=), []

圆括号和方括号

*, +, ?, {n}, {n,}, {n,m}

限定符

^, $, \anymetacharacter

位置和顺序

|

“或”操作

5. 全部符号解释


字符

描述

\

将下一个字符标记为一个特殊字符、或一个原义字符、或一个 向后引用、或一个八进制转义符。例如,’n’ 匹配字符 "n"。’\n’ 匹配一个换行符。序列 ‘\\’ 匹配 "\" 而 "\(" 则匹配 "("。

^

匹配输入字符串的开始位置。如果设置了 RegExp 对象的 Multiline 属性,^ 也匹配 ‘\n’ 或 ‘\r’ 之后的位置。

$

匹配输入字符串的结束位置。如果设置了RegExp 对象的 Multiline 属性,$ 也匹配 ‘\n’ 或 ‘\r’ 之前的位置。

*

匹配前面的子表达式零次或多次。例如,zo* 能匹配 "z" 以及 "zoo"。* 等价于{0,}。

+

匹配前面的子表达式一次或多次。例如,’zo+’ 能匹配 "zo" 以及 "zoo",但不能匹配 "z"。+ 等价于 {1,}。

?

匹配前面的子表达式零次或一次。例如,"do(es)?" 可以匹配 "do" 或 "does" 中的"do" 。? 等价于 {0,1}。

{n}

n 是一个非负整数。匹配确定的 n 次。例如,’o{2}’ 不能匹配 "Bob" 中的 ‘o’,但是能匹配 "food" 中的两个 o。

{n,}

n 是一个非负整数。至少匹配n 次。例如,’o{2,}’ 不能匹配 "Bob" 中的 ‘o’,但能匹配 "foooood" 中的所有 o。’o{1,}’ 等价于 ‘o+’。’o{0,}’ 则等价于 ‘o*’。

{n,m}

m 和 n 均为非负整数,其中n <= m。最少匹配 n 次且最多匹配 m 次。例如,"o{1,3}" 将匹配 "fooooood" 中的前三个 o。’o{0,1}’ 等价于 ‘o?’。请注意在逗号和两个数之间不能有空格。

?

当该字符紧跟在任何一个其他限制符 (*, +, ?, {n}, {n,}, {n,m}) 后面时,匹配模式是非贪婪的。非贪婪模式尽可能少的匹配所搜索的字符串,而默认的贪婪模式则尽可能多的匹配所搜索的字符串。例如,对于字符串 "oooo",’o+?’ 将匹配单个 "o",而 ‘o+’ 将匹配所有 ‘o’。

.

匹配除 "\n" 之外的任何单个字符。要匹配包括 ‘\n’ 在内的任何字符,请使用象 ‘[.\n]‘ 的模式。

(pattern)

匹配 pattern 并获取这一匹配。所获取的匹配可以从产生的 Matches 集合得到,在VBScript 中使用 SubMatches 集合,在JScript 中则使用 $0…$9 属性。要匹配圆括号字符,请使用 ‘\(’ 或 ‘\)’。

(?:pattern)

匹配 pattern 但不获取匹配结果,也就是说这是一个非获取匹配,不进行存储供以后使用。这在使用 "或" 字符 (|) 来组合一个模式的各个部分是很有用。例如, ‘industr(?:y|ies) 就是一个比 ‘industry|industries’ 更简略的表达式。

(?=pattern)

正向预查,在任何匹配 pattern 的字符串开始处匹配查找字符串。这是一个非获取匹配,也就是说,该匹配不需要获取供以后使用。例如,’Windows (?=95|98|NT|2000)’ 能匹配 "Windows 2000" 中的 "Windows" ,但不能匹配 "Windows 3.1" 中的 "Windows"。预查不消耗字符,也就是说,在一个匹配发生后,在最后一次匹配之后立即开始下一次匹配的搜索,而不是从包含预查的字符之后开始。

(?!pattern)

负向预查,在任何不匹配 pattern 的字符串开始处匹配查找字符串。这是一个非获取匹配,也就是说,该匹配不需要获取供以后使用。例如’Windows (?!95|98|NT|2000)’ 能匹配 "Windows 3.1" 中的 "Windows",但不能匹配 "Windows 2000" 中的 "Windows"。预查不消耗字符,也就是说,在一个匹配发生后,在最后一次匹配之后立即开始下一次匹配的搜索,而不是从包含预查的字符之后开始

x|y

匹配 x 或 y。例如,’z|food’ 能匹配 "z" 或 "food"。’(z|f)ood’ 则匹配 "zood" 或 "food"。

[xyz]

字符集合。匹配所包含的任意一个字符。例如, ‘[abc]‘ 可以匹配 "plain" 中的 ‘a’。

[^xyz]

负值字符集合。匹配未包含的任意字符。例如, ‘[^abc]‘ 可以匹配 "plain" 中的’p'。

[a-z]

字符范围。匹配指定范围内的任意字符。例如,’[a-z]‘ 可以匹配 ‘a’ 到 ‘z’ 范围内的任意小写字母字符。

[^a-z]

负值字符范围。匹配任何不在指定范围内的任意字符。例如,’[^a-z]‘ 可以匹配任何不在 ‘a’ 到 ‘z’ 范围内的任意字符。

\b

匹配一个单词边界,也就是指单词和空格间的位置。例如, ‘er\b’ 可以匹配"never" 中的 ‘er’,但不能匹配 "verb" 中的 ‘er’。

\B

匹配非单词边界。’er\B’ 能匹配 "verb" 中的 ‘er’,但不能匹配 "never" 中的 ‘er’。

\cx

匹配由 x 指明的控制字符。例如, \cM 匹配一个 Control-M 或回车符。x 的值必须为 A-Z 或 a-z 之一。否则,将 c 视为一个原义的 ‘c’ 字符。

\d

匹配一个数字字符。等价于 [0-9]。

\D

匹配一个非数字字符。等价于 [^0-9]。

\f

匹配一个换页符。等价于 \x0c 和 \cL。

\n

匹配一个换行符。等价于 \x0a 和 \cJ。

\r

匹配一个回车符。等价于 \x0d 和 \cM。

\s

匹配任何空白字符,包括空格、制表符、换页符等等。等价于 [ \f\n\r\t\v]。

\S

匹配任何非空白字符。等价于 [^ \f\n\r\t\v]。

\t

匹配一个制表符。等价于 \x09 和 \cI。

\v

匹配一个垂直制表符。等价于 \x0b 和 \cK。

\w

匹配包括下划线的任何单词字符。等价于’[A-Za-z0-9_]‘。

\W

匹配任何非单词字符。等价于 ‘[^A-Za-z0-9_]‘。

\xn

匹配 n,其中 n 为十六进制转义值。十六进制转义值必须为确定的两个数字长。例如,’\x41′ 匹配 "A"。’\x041′ 则等价于 ‘\x04′ & "1"。正则表达式中可以使用 ASCII 编码。.

\num

匹配 num,其中 num 是一个正整数。对所获取的匹配的引用。例如,’(.)\1′ 匹配两个连续的相同字符。

\n

标识一个八进制转义值或一个向后引用。如果 \n 之前至少 n 个获取的子表达式,则 n 为向后引用。否则,如果 n 为八进制数字 (0-7),则 n 为一个八进制转义值。

\nm

标识一个八进制转义值或一个向后引用。如果 \nm 之前至少有 nm 个获得子表达式,则 nm 为向后引用。如果 \nm 之前至少有 n 个获取,则 n 为一个后跟文字 m 的向后引用。如果前面的条件都不满足,若 n 和 m 均为八进制数字 (0-7),则 \nm 将匹配八进制转义值 nm。

\nml

如果 n 为八进制数字 (0-3),且 m 和 l 均为八进制数字 (0-7),则匹配八进制转义值 nml。

\un

匹配 n,其中 n 是一个用四个十六进制数字表示的 Unicode 字符。例如, \u00A9 匹配版权符号 (?)。

6. 部分例子


正则表达式

说明

/\b([a-z]+) \1\b/gi

一个单词连续出现的位置

/(\w+):\/\/([^/:]+)(:\d*)?([^# ]*)/

将一个URL解析为协议、域、端口及相对路径

/^(?:Chapter|Section) [1-9][0-9]{0,1}$/

定位章节的位置

/[-a-z]/

A至z共26个字母再加一个-号。

/ter\b/

可匹配chapter,而不能terminal

/\Bapt/

可匹配chapter,而不能aptitude

/Windows(?=95 |98 |NT )/

可匹配Windows95或Windows98或WindowsNT,当找到一个匹配后,从Windows后面开始进行下一次的检索匹配。

7. 正则表达式匹配规则

 

7.1 基本模式匹配


一切从最基本的开始。模式,是正规表达式最基本的元素,它们是一组描述字符串特征的字符。模式可以很简单,由普通的字符串组成,也可以非常复杂,往往用特殊的字符表示一个范围内的字符、重复出现,或表示上下文。例如:

^once

这个模式包含一个特殊的字符^,表示该模式只匹配那些以once开头的字符串。例如该模式与字符串"once upon a time"匹配,与"There once was a man from NewYork"不匹配。正如如^符号表示开头一样,$符号用来匹配那些以给定模式结尾的字符串。

bucket$

这个模式与"Who kept all of this cash in a bucket"匹配,与"buckets"不匹配。字符^和$同时使用时,表示精确匹配(字符串与模式一样)。例如:

^bucket$

只匹配字符串"bucket"。如果一个模式不包括^和$,那么它与任何包含该模式的字符串匹配。例如:模式

once

与字符串

There once was a man from NewYork
Who kept all of his cash in a bucket.

是匹配的。
在该模式中的字母(o-n-c-e)是字面的字符,也就是说,他们表示该字母本身,数字也是一样的。其他一些稍微复杂的字符,如标点符号和白字符(空格、制表符等),要用到转义序列。所有的转义序列都用反斜杠(\)打头。制表符的转义序列是:\t。所以如果我们要检测一个字符串是否以制表符开头,可以用这个模式:

^\t

类似的,用\n表示“新行”,\r表示回车。其他的特殊符号,可以用在前面加上反斜杠,如反斜杠本身用\\表示,句号.用\.表示,以此类推。


7.2 字符簇


在INTERNET的程序中,正规表达式通常用来验证用户的输入。当用户提交一个FORM以后,要判断输入的电话号码、地址、EMAIL地址、信用卡号码等是否有效,用普通的基于字面的字符是不够的。
所以要用一种更自由的描述我们要的模式的办法,它就是字符簇。要建立一个表示所有元音字符的字符簇,就把所有的元音字符放在一个方括号里:

[AaEeIiOoUu]

这个模式与任何元音字符匹配,但只能表示一个字符。用连字号可以表示一个字符的范围,如:

[a-z] //匹配所有的小写字母
[A-Z] //匹配所有的大写字母
[a-zA-Z] //匹配所有的字母
[0-9] //匹配所有的数字
[0-9\.\-] //匹配所有的数字,句号和减号
[ \f\r\t\n] //匹配所有的白字符

同样的,这些也只表示一个字符,这是一个非常重要的。如果要匹配一个由一个小写字母和一位数字组成的字符串,比如"z2"、"t6"或"g7",但不是"ab2"、"r2d3" 或"b52"的话,用这个模式:

^[a-z][0-9]$

尽管[a-z]代表26个字母的范围,但在这里它只能与第一个字符是小写字母的字符串匹配。
前面曾经提到^表示字符串的开头,但它还有另外一个含义。当在一组方括号里使用^是,它表示“非”或“排除”的意思,常常用来剔除某个字符。还用前面的例子,我们要求第一个字符不能是数字:

^[^0-9][0-9]$

这个模式与"&5"、"g7"及"-2"是匹配的,但与"12"、"66"是不匹配的。下面是几个排除特定字符的例子:

[^a-z] //除了小写字母以外的所有字符
[^\\\/\^] //除了(\)(/)(^)之外的所有字符
[^\"\'] //除了双引号(")和单引号(’)之外的所有字符

特殊字符"." (点,句号)在正规表达式中用来表示除了“新行”之外的所有字符。所以模式"^.5$"与任何两个字符的、以数字5结尾和以其他非“新行”字符开头的字符串匹配。模式"."可以匹配任何字符串,除了空串和只包括一个“新行”的字符串。
PHP的正规表达式有一些内置的通用字符簇,列表如下:

字符簇 含义
[[:alpha:]] 任何字母
[[:digit:]] 任何数字
[[:alnum:]] 任何字母和数字
[[:space:]] 任何白字符
[[:upper:]] 任何大写字母
[[:lower:]] 任何小写字母
[[:punct:]] 任何标点符号
[[:xdigit:]] 任何16进制的数字,相当于[0-9a-fA-F]

 

7.3 确定重复出现


到现在为止,你已经知道如何去匹配一个字母或数字,但更多的情况下,可能要匹配一个单词或一组数字。一个单词有若干个字母组成,一组数字有若干个单数组成。跟在字符或字符簇后面的花括号({})用来确定前面的内容的重复出现的次数。

字符簇 含义
^[a-zA-Z_]$ 所有的字母和下划线
^[[:alpha:]]{3}$ 所有的3个字母的单词
^a$ 字母a
^a{4}$ aaaa
^a{2,4}$ aa,aaa或aaaa
^a{1,3}$ a,aa或aaa
^a{2,}$ 包含多于两个a的字符串
^a{2,} 如:aardvark和aaab,但apple不行
a{2,} 如:baad和aaa,但Nantucket不行
\t{2} 两个制表符
.{2} 所有的两个字符

这些例子描述了花括号的三种不同的用法。一个数字,{x}的意思是“前面的字符或字符簇只出现x次”;一个数字加逗号,{x,}的意思是“前面的内容出现x或更多的次数”;两个用逗号分隔的数字,{x,y}表示“前面的内容至少出现x次,但不超过y次”。我们可以把模式扩展到更多的单词或数字:

^[a-zA-Z0-9_]{1,}$ //所有包含一个以上的字母、数字或下划线的字符串
^[0-9]{1,}$ //所有的正数
^\-{0,1}[0-9]{1,}$ //所有的整数
^\-{0,1}[0-9]{0,}\.{0,1}[0-9]{0,}$ //所有的小数

最后一个例子不太好理解,是吗?这么看吧:与所有以一个可选的负号(\-{0,1})开头(^)、跟着0个或更多的数字([0-9]{0,})、和一个可选的小数点(\.{0,1})再跟上0个或多个数字([0-9]{0,}),并且没有其他任何东西($)。下面你将知道能够使用的更为简单的方法。
特殊字符"?"与{0,1}是相等的,它们都代表着:“0个或1个前面的内容”或“前面的内容是可选的”。所以刚才的例子可以简化为:

^\-?[0-9]{0,}\.?[0-9]{0,}$

特殊字符"*"与{0,}是相等的,它们都代表着“0个或多个前面的内容”。最后,字符"+"与 {1,}是相等的,表示“1个或多个前面的内容”,所以上面的4个例子可以写成:

^[a-zA-Z0-9_]+$ //所有包含一个以上的字母、数字或下划线的字符串
^[0-9]+$ //所有的正数
^\-?[0-9]+$ //所有的整数
^\-?[0-9]*\.?[0-9]*$ //所有的小数

当然这并不能从技术上降低正规表达式的复杂性,但可以使它们更容易阅读。

 

8. 参考文献


JScript 和 VBScript 正则表达式

微软MSDN上的例子(英文):

Scanning for HREFS

Provides an example that searches an input string and prints out all the href="…" values and their locations in the string.

Changing Date Formats

Provides an example that replaces dates of the form mm/dd/yy with dates of the form dd-mm-yy.

Extracting URL Information

Provides an example that extracts a protocol and port number from a string containing a URL. For example, "http://www.contoso.com:8080/letters/readme.html" returns "http:8080".

Cleaning an Input String

provides an example that strips invalid non-alphanumeric characters from a string.

Confirming Valid E-Mail Format

Provides an example that you can use to verify that a string is in valid e-mail format.

发表评论

SVG指南中文版[辑]

来源:SVG中国(ChinaSVG.COM) 翻译:蔡发明
英文版:http://w3schools.com/svg/default.asp 最末部分还待翻译完成

推荐用 Opera 浏览器,可以直接看到示例的所有效果
Firefox 浏览器 可以看到示例的大部分效果
IE 浏览器 需要安装 SVG Viewer 才能看到效果

(阅读全文…)

发表评论

使用 PHPnow 搭建 PHP 环境[官方教程]

不错的 PHP 环境安装包,将官方教程拷贝来存档。
Vista 环境下安装时记得取消账户权限控制,否则报错。

(阅读全文…)

发表评论

“.中国”域名相关概念

1、什么是中国域名?

特指以中文国家代码顶级域“.中国”结尾的纯中文域名。根据工业和信息化部《中国互联网络域名体系公告》,“.中国”是在全球互联网上代表中国的中文顶级域名。.CN是在全球互联网上代表中国的英文顶级域名,两者都是我国域名体系的重要组成部分。

 

2、 中国域名启用的时间?

根据ICANN的时间表预计是2009年,具体时间还有待ICANN进一步确定请关注相关动态。

 

3、 中国域名如何使用?

待“.中国”正式写入全球根域名系统后,跟目前使用“.CN”域名一样,用户在浏览器中直接输入“中文.中国”可到达相关网站。比如,在浏览器中输入“联想.中国”即可直达联想网站。

且“.”与“。”等效,输入“联想.中国”、“联想。中国”,均可准确指向联想公司网站;繁简等效,输入“联想.中国”、“聯想。中國”,均可准确指向联想公司网站。

 

4、 中国域名最大的优势在哪里?

  • 记忆简单

调查显示,超过90%的公众认为中国域名更易于记忆和使用。例如,能准确记忆“Microsoft”9个英文字母的人并不多,但“微软”二字,略懂汉语即可准确记忆。

  • 使用方便

由于英文字符“.”和中文句号“。”等效、繁体与简体等效,使用中国域名无要切换输入法,网民可随时从聊天、搜索等中文输入状态,打开地址栏输入中国域名查看企业网站。

  • 承载品牌

几乎所有企业都有自己独立的中文品牌,中国域名不需要将品牌意译或音译成英文字符即可用作网络品牌,将消除英文域名意译或音译引起的混乱状况,更好在全球互联网上承载品牌。

  • 传承文化

中国域名将促进中国文化软实力的建设。公众知晓度高的成语、词语、单字、中华传统节日、传统民俗等,都可以借助中国域名,向全世界推广。

 

5、中国域名的价值

  • 使用价值

语言障碍是全民上网的瓶颈之一。中国域名以用户自己喜爱的语言接触互联网,将为13亿国人扫除障碍,降低上网门槛,使国人轻松享受互联网的便利,从而为企业事业单位带来更多的访问人群。

调查显示:79.4%的网民会注册中国域名。新浪调查显示,61.22%的网民认为中国域名“将便于对网址的记忆和查找,很快能推广”;55.1% 的网民认为中国域名“将加速扩大中国在国际互联网舞台上的影响力和话语权,对扩大民族品牌影响力有间接的作用”。

  • 品牌价值

当商家不得不舍弃耳熟能详的中文品牌而另创全然陌生的英文代号时,无疑会使品牌价值大打折扣,一个有意义和容易记忆的中国域名能为一个企业或组织建立良好的外在形象,在宣传、推广和开展他们的品牌方面有极高的广告价值。

  • 商业价值

中国域名是企业在中文互联网世界一块醒目的品牌广告,将帮助企业减少英文域名局限性带来的机会成本,使企业更容易被互联网用户准确识记、找到,从而使企业网站的推广及网络营销更高效、更精准。

 

6、 中国域名的未来应用前景?

中国域名的未来应用还是基于满足网民方便使用互联网的需求,这是根本。

中国域名的发展将延伸出一系列的全中文上网应用,例如中文邮件,他们是一个整体,都属于全中文上网事业的一部分。

 

7、 中国域名是否存在解析问题?浏览器的支持情况如何?正式投入使用后,是否需要客户端软件的支持?

不需要。目前,主流浏览器已经完全实现对中国域名的直接解析支持,“.中国”写入根域名系统后,可在浏览器直接输入如“联想.中国”访问对应网站。

其实,自RFC3743、RFC4713等一系列与中文CN域名相关的互联网国际标准发布以来, 中文域名先后获得全球互联网行业、软件行业、系统集成等行业的直接支持,已经成为全球通用的应用标准。

目前,IE7、IE8、VISTA、Firefox、Netscape、Safari、Opera等浏览器均已支持中文CN域名,早已经不需要安装任何客户端软件。同样,“中国域名”也将实现“无障碍”解析。

 

8、 09年开放后是否会影响之前注册的“.中国”域名?是否需要重新注册?

不影响,之前注册的“.中国”域名,无需重新注册。

 

9、 目前中国域名的注册规则是什么?

目前,广大互联网用户注册一个中文.CN域名,可以自动获得对应的一个中文.中国域名。

 

10、如何在明年中国域名正式启用前做好相关注册、保护工作?

2008年6月27日,ICANN通过决议,允许使用其它语言包括中文等作为互联网顶级域字符。“.中国”将于2009年写入全球根域名系统。这意味着,除了传统的.cn、.com等英文域名后缀外,将首次出现“.中国”这样的非英语域名后缀,中国域名将正式融入国际互联网。

为了积极应对“.中国”域名给中国企业带来的全新品牌规划机遇和挑战,2008年7月16日,中国互联网络信息中心(CNNIC)在京正式启动“由中国走向世界——中国域名全球升级行动”,协助用户顺利实现向“.中国”时代的升级。

“中国域名全球升级行动”主要内容:

至“.中国”域名写入全球根域名系统之日,所有“中文.CN”域名的注册用户,将自动获得对应的“中文.中国”域名,无需用户另行申请注册。

在“.中国”域名写入全球根域名系统后,所有自动获得的“中文.中国”域名,将全部同步升级至“中国域名”全球注册库,实现全球互联网的访问。

 

(责任编辑:赵雪争)

原文:http://net.chinabyte.com/317/8309817.shtml

发表评论

装备一下 TiddlyWiki 使之适于搭建 blog [辑]

原文:巴蛮子的新万花筒

前几日一直在琢磨把俺的Blog迁移到这个玩意儿上来,好处在于:

  • 所有文章都在一个网页内, 几百篇文章加起来也没有多大,而且要分多页也很简单
  • 这一个网页可以既是最终发布的地方,也是编撰系统
  • 随便找个能上传网页的地方就可以搭建blog了,万一都没有,在http://www.tiddlyspot.com上申请一个账户也行
  • 丰富的插件,自己想怎么玩就怎么玩

我试验了一下,基本上满意,诸位可以看看初步效果:

http://bamanzi.tiddlyspot.com/。只是目前没有时间将一篇篇贴过来觉得麻烦,懒得动了。

如果将TiddlyWiki改造成更适合blog的系统,我的一些心得如下:

  • RecentTiddlersPlugin或者WeblogPlugin自动在页面打开时显示最近的文章
  • 采用TagCloudPlugin插件,在MainMenu中添加一个"标签云"
  • TW原本的风格是双击帖子就进入编辑模式,如果你觉得这样不适合于blog系统,可以在选项中将页面设置为网上只读模式,或者采用ReplaceDoubleClick将双击功能改造一下
  • CommentScript能增加留言功能.

另外下面这几个插件虽跟blog关系不大,也是应该有的:

  • 这里取得最新的中文翻译,将其作为插件加入,保存后再打开就会变成中文界面了
  • 添加GotoPlugin或者SearchOptionsPlugin,替代原来的搜索功能(原来的搜索会自动打开匹配结果,即使你在只输入了两个字符之后就停顿了一下…)
  • 添加FullScreenPlugin或者ToggleLeftSideBar这类插件(后者其实不是插件,而是借助InlineJavascriptPlugin实现功能的脚本),使得用户可以将文章最大化;添加CollapseTiddlerPlugin或者[FoldHeadingPlugin|http://www.tiddlytools.com/#FoldHeadingsPlugin]] 使得用户可以将文章最小化(可以将帖子折叠起来,只显示标题)

前面说的是对最终页面呈现有用的插件,但还需要东西来帮助我们撰写文章:

  • WikiBarPlugin可以在编辑文章时显示一个工具(不过IE对CSS支持太差,工具的下拉菜单显示不出来),免得你记不住那么多wiki语法(不同的wiki语法还不一样:-()——当然,宏还是应该记熟悉的
  • tiddlytools提供的QuickEditPackage也可以提供WikiBar那样的工具,但我还没搞明白怎么挪用过来:-(
  • TiddlerTweakerPlugin会允许你自行修改每个tiddler的作者、创建时间、修改时间,如果你想迁移你的blog系统肯定用得上

但这几个插件体积都比较大,直接加到你的TW中会导致最后的HTML比较大,加载太慢,而放在网页上对阅读blog的朋友又没有什么作用,这就可以采用将这些插件用外部文件的方式来加载了,LoadExtPlugin就是干这个的(该网站还提供了一个不小的主题包)。

 

外一篇:个人觉得不错的一些TiddlyWiki插件(与上文同一作者)

 

几个插件仓库:

  • TiddlyValut: 插件分类列表
  • TiddlyTools: 带有95个插件,大都在该页面内有实际应用,效果很炫
  • TiddlyWikiPlugin: 插件开发社区大都在del.icio.us上登记插件

编辑器

  • TidIDE Editor: TidIDE包中一个集成的编辑器,可以直接选择帖子编辑
  • EasyEdit, a lite and fully integrated solution.
  • FCKEditor, a more powerful solution, but requires an external component (FCKeditor).
  • Externalize, to edit tiddlers in your favorite application like html editor, text or word processor, javascript IDE, css editor, … It requires Firefox and it’s All Text! extension.
  • DelciousTagging Allows easy ‘del.icio.us’-like tagging in the EditTemplate by showing all tags as a list of link-buttons.
  • TabEditPlugin Easier tab editing – double click to edit source tiddler

页面效果:

帖子内容

  • NestedSlidersPlugin
  • Syntaxify 如果你常在帖子中贴代码, 这个语法高亮插件应该用得着。不是“格式化”,而是加入此插件后帖子中的代码会直接高亮。缺省支持CSS,JavaScript和XML,其它可自己扩充;
  • FootnotesPlugin Create automated tiddler footnotes.
  • TiddlerNotesPlugin Add notes to tiddlers without modifying the original content

其它

发表评论

广播电台网站 研究一下3

网页制作如何实现点击一个链接播放一个电台节目

以下是播放器代码: <object classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/ nsmp2inf.cab#Version=6,4,5,715" type="application/x-oleobject" width="360" height="68" align="middle" standby="Loading Microsoft? Windows Media? Player components…" id="tvplay"> <param name="FileName" value="1.asx" /> <param name="_cx" value="8070" /> <param name="_cy" value="1693" /> <param name="autoStart" value="-1" /> <param name="volume" value="80" /> <param name="showcontrols" value="1" /> <param name="showdisplay" value="0" /> <param name="showstatusbar" value="1" /> </object> 我想实现在同一网页中点击一个链接:频道一,然后就播放频道一里面的相关地址,,然后再点击频道二,在不刷新的情况下又播放频道二的地址,,我知道JS能够实现,但我真不知道如何写,,因为我没学过。所以烦请高手帮个忙写出来,最好能连HTML也给写出啦~~谢谢,,感激不尽

——

把这个object 做成一个简单的播放器页面。套在你的主页面里。通过传参数的方式把地址传过来,刷新居部播放视频 。在这个页里接收到传来的参数,放到以下的这个value里面。 param name="FileName" value="1.asx" />

==

网页制作高手来回答:如何让鼠标移到某个链接时,播放声音

(不用加入swf文件的方法)

——

用DREAMWEAVER的行为就能做出来

发表评论

广播电台网站 研究一下2

Asp.net中没有直接提供视频或音频播放Web 服服务器控件

先找到播放视频的插件:如Windows Media Player的播放插件为:
<object  id="MediaPlayer1" name="MediaPlayer1"
classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" style="width: 700px; height: 500px" >
<param name="URL" value="mms://202.103.67.185/交通" />
<param name="rate" value="1" />
<param name="balance" value="0"/>
<param name="currentPosition" value="0"/>
<param name="defaultFrame" value=""/>
<param name="playCount" value="1"/>
<param name="autoStart" value="-1"/>
<param name="currentMarker" value="0"/>
<param name="invokeURLs" value="-1"/>
<param name="baseURL" value=""/>
<param name="volume" value="50"/>
<param name="mute" value="0"/>
<param name="uiMode" value="full"/>
<param name="stretchToFit" value="0"/>
<param name="windowlessVideo" value="0"/>
<param name="enabled" value="-1"/>
<param name="enableContextMenu" value="-1"/>
<param name="fullScreen" value="0"/>
<param name="SAMIStyle" value=""/>
<param name="SAMILang" value=""/>
<param name="SAMIFilename" value=""/>
<param name="captioningID" value=""/>
<param name="enableErrorDialogs" value="0"/>
<param name="_cx" value="10583"/>
<param name="_cy" value="7197"/>  
</object>

视频播放插件是ocx控件,它不能转换为服务器端控件,所以只能调用客户端的脚本语言JavaScript来播放文件。
如播放文件为:
form1.MediaPlayer1.controls.play();

暂停播放为:
form1.MediaPlayer1.controls.pause();

停止播放为:
form1.MediaPlayer1.controls.stop();

比较麻烦得一个问题:是如何选择不同的文件播放。如果从客户端来解决这个问题,可能比较麻烦,因为客户端JavaScript要获得某一个文件中的视频文件比较麻烦。下面是JavaScript的给播放器插件指定一个固定的文件。
form1.MediaPlayer1.URL="Video/冰雨.mp3“
从服务器端来解决,由于不能直接访问播放器插件(因为播放器插件不能转换为服务器端控件)!一时陷入了困境,怎么办呢?
我们又回过头来看看播放器插件,不经意间看到有这一行:
<param name="URL" value="Video/冰雨.mp3" />
这一行不就是给播放器指定文件吗?能不能想
办法用一个服务器端控件来代替这一行呢?我们试一试,其实我们在前面也这么用过,如我想在网页上面输出一根水平线,我们可以先在网页上面放一个服务器端Label控件:
<asp:Label ID="Label1" runat="server" />
然后给Label1.Text赋值为:”<hr />”
然后网页上就是一条水平线呀!
于是我想到了要运用类比法,把
<param name="URL" value="Video/冰雨.mp3" />
替换为
<asp:Label ID="Label1" runat="server" />
然后在服务器后端代码中为Label1.Text赋值为:
"<param name=""URL"" value=""Video/" & ListBox1.SelectedItem.Text & """ />“
相类似的代码。
然后可以去试一试!具体的代码可以参看PlayVideo.aspx。
2) 在Windows2000下面播放(参考PlayVideo2000.aspx):与WindowsXP类似。
a) 插件要改成:<object align="center" classid="clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95" class="object"
                        id="MediaPlayer1" name="MediaPlayer1" style="width: 700px; height: 500px">
                        <param name="showstatusbar" value="0" />
<param name="filename" value="video/lxf.rm"/>
                        <embed type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/con … n/nsmp2inf.cab#version=5,1,52,701">
            </embed>                 </object>
播放文件为:
form1.MediaPlayer1.play();
暂停播放为:
form1.MediaPlayer1.pause();
停止播放为:
form1.MediaPlayer1.stop();
c) 还有就是播放的文件名是filename了!其他的请参考课件。

Window Media Player插件还可以做网络收音机。
只要把插件的URL或filename指定为网络流媒体的网址就可以了。
常用的流媒体网络地址(以湖南省为例):
1) 湖南文广快乐975 :mms://202.103.67.185/文艺
2)湖南音乐之声超级893:mms://202.103.67.185/音乐
3)湖南交通广播 :mms://202.103.67.185/交通
4)湖南电台经济频道 :mms://202.103.67.185/经济
5)湖南金鹰955电台 :mms://real.rednet.cn/955
6) CITYFM城市之音 长沙 :mms://real.rednet.cn/1017

对于其他的播放器,可以自己去网上找相应的播放插件,然后进行类似的设计

 

外一篇:网站广播电台 你也能轻松搭建

有了PPStream后,一切将变的简单起来,你只需要制作一个简单的网页,就能够为自己的网站添加一个广播电台。

一、获取电台地址
要在网站中加入广播电台,必须首先获得要添加的电台网址。启动PPstream后,在左侧频道列表中浏览到自己要选择的频道,然后右击频道名称,在弹出的名称中选择“属性”命令,在打开的窗口中即可看到其网址,注意这里的网址并不是通常的http开头的,而是PPStream专用的协议,以ppstream开头,将其复制下来备用(图1)。

clip_image001[4]

图1

二、把播放器加入网页
现在我们就可以打开要插入电台的网页,也可以新建一个网页,将网页切换到代码查看模式,或者直接用记事本将网页文件打开,在源文件中找到两行,然后将下面的代码复制到这两段中的某个位置,如果是空白网页,只要放在之间任意位置即可,如果网页中有其它内容,则需要根据页面排版放置到适当位置(图2)。

clip_image002[4]

图2

<OBJECT CLASSID="clsid:5EC7C511-CD0F-42E6-830C-1BD9882F3458" CODEBASE=http://download.ppstream.com/bin/powerplayer.cab
standby="加载播放器中…" WIDTH=470 HEIGHT=460 ID="powerplayer">
<param name="ShowControl" value="1">
<param name="src" value="ppstream://ppstream.com:9004/X7Y3ZPQPM37HGOMNVE6AA3CTG3MWASFU">
<param name="autostart" value="0">
</OBJECT>

在实际的应用中,用户需要根据实际情况作出一些修改。其中WIDTH=470 HEIGHT=460表示播放窗口的宽度和高度;"ShowControl" value="1"中的1表示显示播放控制按钮,即显示播放、暂停、停止等按键,如果设为0则表示隐藏这些按钮;再把中的链接换成前面复制复到的地址;最后再修改的数值,其中1表示打开网页后自动播放,0表示需单击“播放”按钮才开始加载内容。

小提示:如果网页中有其它内容,大家可以在网页编辑模式下将鼠标定位在要插入的位置,然后再切换到代码编辑模式,此时光标就会自动定位代码中插入点,在当前位置插入代码即可。

将制作好的网页上传到服务器之后,这样就可以让网友轻松的收看我们添加的电台节目了,是不是挺有成就感的呢(图3)!

clip_image003[4]

三、更多精彩共分享
在前面我们介绍了将指定节目添加到网页中的方法,而在实际的需求中,各个网友的欣赏内容是不一样的,因此这就需要我们像PPStream播放器一样,能够显示频道地址。
在网页播放器中添加频道分为两个步骤,第一个步骤是将下面的代码添加在网页之间:
<OBJECT CLASSID="clsid:20C2C286-BDE8-441B-B73D-AFA22D914DA5" CODEBASE=http://download.ppstream.com/bin/powerplayer.cab
standby="加载频道列表中…" WIDTH=208 HEIGHT=460 ID="powerlist"> <!–大小可依网页需要调整–>
</OBJECT>

其中WIDTH=208 HEIGHT=460表示频道列表的宽度和高度,建议大家高度值要与播放器的高度相一致。另外该段代码,我们一般都是添加在播放器代码前。
第二步就是要将频道与播放器建立关联,让用户点击频道中的节目时能够自动在播放窗口中放映。在网页中找到,一般是在网页源码的最上方,将下面的代码放在其中即可:
再次将制作好的网页上传,你看到的播放窗口左侧就有了一个频道列表,用户就可以单击各个频道来点播自己喜欢的内容了(图4)。

clip_image004

图4

小提示:为了让播放器所在网页显示的更专业一些,用户可以将代码之间添加自己的网站名称。

可以说,有了PPStream之后,广站的站长朋友需要给网站添加广播电台,只需要几分钟的时间即可完成,即可为网友提供精彩的服务了。亲爱的站长,还犹豫什么呢?赶紧行动起来,加入PPStream吧!

发表评论

MS 的网页多浏览器模拟测试软件

[按]先撂这儿,回头再琢磨。

(阅读全文…)

发表评论

[转]国外媒体评出的十一个主流CMS系统

【CSDN 4月16日 系列报道】当今许多网站都在使用内容管理系统(Content Management System)。站主需要经常对网站进行维护以保证内容实时更新,而且需要网站风格紧跟潮流,出于这个需要,网站管理系统应运而生。

现在有许多CMS,我们有时候不知道哪个更适合自己的网站,以下是外媒评选出的的十一大CMS系统,读者可以通过提供的链接对它们进行深入了解。

一、WordPress

clip_image001
WordPress可能是当今最具人气的开源CMS了。它最初只是一个博客平台,现在WordPress可以让开发者和用户在其系统上建立任何类型的网站。WordPress的标准安装版提供了CMS的几乎所有必要功能,而且还有许多插件。
WordPress的资源:
网址:http://wordpress.org/
WordPress Codex提供了WordPress的所有文档,叙述十分详细
网址:http://codex.wordpress.org/Main_Page
WordPress ForumsWordPress用户的讨论社区,遇到问题时可以在这里提问
网址:http://wordpress.org/support/
WordPress Developers Toolbox开发WordPress主题所需的所有资源
网址:http://www.smashingmagazine.com/2008/09/15/wordpress-developers-toolbox/
How to Be a Rockstar WordPress Designer一本介绍WordPress的电子书
网址:http://rockablepress.com/books/rockstar-wordpress-designer/
Designing for WordPress SeriesWordPress设计开发的系列教程
网址:http://css-tricks.com/designing-for-wordpress-complete-series-downloads/

二、Drupal

clip_image002
Drupal是另一款业界领先的开源CMS工具。Drupal适用于那些需要建立多作者网站或博客,以及基于社区的网站的用户。Drupal的用户很多,它有许多可选模块和资源
Drupal的资源
网址:http://drupal.org/
Drupal手册适用于Drupal的初学者
网址:http://drupal.org/handbook/
Drupal Forums可以从这里得到帮助
网址:http://drupal.org/forum
Drupal Developers Toolbox和Drupal开发相关的资源
网址:http://www.smashingmagazine.com/2008/09/24/drupal-developers-toolbox/
Drupal White Papers, Cheatsheets and Free Books一些有用的资源
网址:http://mydrupal.com/drupal_white_papers_and_free_stuff
Drupal Sites一些Drupal建立的网站
网址:http://www.drupalsites.net/
Create a Killer Band Site with Drupal一个使用Drupal建设网站的教程
网址:http://www.gomediazine.com/tutorials/create-a-killer-band-site-with-drupal-introduction/

三、ExpressionEngine

clip_image003
ExpressionEngine是一个强大的CMS工具,被许多喜欢开源软件的开发者所推崇。但它不是免费的。EE的功能很多,可以用它来建立各种用途的网站。

ExpressionEngine的资源
网址:http://expressionengine.com/
ExpressEngine Developers ToolBoxExpressionEngine开发所需的资源
网址:http://www.smashingmagazine.com/2008/10/29/expressionengine-developers-toolbox/
ExpressEngine Users GuideExpressionEngine的官方文档
网址:http://expressionengine.com/docs/
ExpressionEngine Forums里面有许多关于EE的信息
网址:http://expressionengine.com/forums/
Building a Small Business Website手把手教你如何在EE上建立一个网站
网址:http://www.train-ee.com/courseware/free-tutorials/category/building-a-small-business-site/
ExpressionEngine ShowcaseEE的范例网站
网址:http://expressionengine.com/showcase/

四、Movable Type

Movalbe Type也是一个受欢迎的CMS工具,根据不同需要有不同的版本,它有一个为开发者准备的开源版,和一个为个人博主准备的免费版。Movable Type可以被用来建立博客、网站和社会网络。

Movable Type的资源

clip_image004
网址:http://movabletype.com/
Movable Type Open Source Project一个Six Apart公司领导的社区,致力于建立和维护Movable Type的开源版
网址:http://www.movabletype.org/opensource/
Movable Type DocumentationMovable Type使用方面的官方文档
网址:http://www.movabletype.org/documentation/
Movable Type Forums一个提问的好地方
网址:http://forums.movabletype.org/
Movable Type Developers Toolbox为开发者准备的资源
网址:http://www.smashingmagazine.com/2008/12/08/movable-type-developers-toolbox/
Movable Type Showcase一些Movable Type的范例,可以激发你的灵感
网址:http://www.movabletype.com/showcase/

五、Textpattern

Textpattern是一个免费的开源工具。像其它工具一样Textpattern也有一个强大的社区做支持,里面有丰富的资源和信息。

Textpattern的资源

clip_image005
网址:http://textpattern.com/
Textpattern Developers ToolboxTextpattern开发的相关资源
网址:http://www.smashingmagazine.com/2008/11/06/textpattern-developers-toolbox/
Textpattern Support Forums官方论坛
网址:http://forum.textpattern.com/
TextBookTextpattern开发相关的文档
网址:http://textpattern.net/wiki/index.php?title=Index
Your First Textpattern ThemeTextpattern的入门教程
网址:http://babblative.com/article/your-first-textpattern-theme
WeLoveTextpatternTextpattern建立的网站的范例
网址:http://welovetxp.com/

六、Joomla

clip_image006
Joomla是一个不错的开源CMS工具,其前身是Mambo。它的用户群很大,用户可以通过它建立所有类型的网站,包括公司网站、电子商务、在线杂志、intranet等等。
Joomla的资源
网址:http://www.joomla.org/
Joomla DocumentationJoomla的官方文档
网址:http://docs.joomla.org/
Joomla ForumsJoomla的官方论坛
网址:http://forum.joomla.org/
Joomla Developers ToolboxJoomla的资源集合
网址:http://www.smashingmagazine.com/2009/01/05/joomla-developers-toolbox/
Joomla BasedJoomla建立的网站的范例
网址:http://www.joomlabased.com/

七、LightCMS

clip_image007
LightCMS和上述那些CMS有一些不同,它为设计者提供了一个收入来源。客户在设计者的服务器上付费使用CMS,设计者可以为客户提供一个打上自己标签的CMS,并从中赚取一定比例的使用费。
LightCMS的资源
网址:http://www.speaklight.com/
ReSeller Information设计者可以通过用LightCMS建立客户网站而成为代理商,从而赚取一定比例的收入。
网址:http://www.speaklight.com/resellers
Video Demos在这里可以了解LightCMS运作的详细信息,以及如何用LightCMS建立网站
网址:http://www.speaklight.com/video
How to Use Any Template with LightCMSElement Fusion出版的教程
网址:http://www.elementfusion.com/tutorial-how-to-use-any-template-with-water-sky-and-lightcms
LightCMS Review一篇关于LightCMS的简介
网址:http://www2.freelanceswitch.com/product-reviews/product-review-and-1600-giveaway-light-cms/

八、GoodBarry

clip_image008
GoddBarry也可以让设计者成为代理商,设计者可以通过它向客户提供自己品牌的解决方案。GoodBarry侧重于在线商务,所以电子商务功能是其很重要的一部分。它同样也包含其它CMS所具有的功能。
GoodBarry的资源
网址:http://www.goodbarry.com/
GoodBarry ForumsGoodBarry的支持论坛
网址:http://forums.onlinebusinesswiki.com/gb-support15
ReSeller Information从这里可以学到如何在客户网站上使用GoodBarry,以及如何用它来盈利
网址:http://www.goodbarry.com/designer
GoodBarry Videos视频教程
网址:http://goodbarry.com/videos
GoddBarry ReviewGoodBarry的简介
网址:http://designshack.co.uk/articles/software/goodbarry-review

九、Traffix

clip_image009
Traffix与GoodBarry很相似,它们都把重点放在在线商务网站上。Traffix具有电子商务的功能,同时也具有其它CMS功能
Traffix的资源
网址:http://www.playintraffik.com/
Support Videos关于Traffix全部的教学视频
网址:http://www.playintraffik.com/support
WikiTraffix的应用文档
网址:http://www.onlinebusinesswiki.com/index.php?title=Main_Page

十、Pligg

clip_image010
Pligg是一个开源CMS工具,开发者可以用它来创建社会网络站点,具有投票功能。
Pligg的资源
网址:http://www.pligg.com/
Pligg Forums在这里可以提问题,寻找答案
网址:http://forums.pligg.com/
Pligg WikiWiki形式的文档
网址:http://forums.pligg.com/wiki-articles/
Understanding Pligg Template Files希望了解Pligg工作原理的人可以看这个
网址:http://www.upstartblogger.com/understanding-pligg-template-files
Setting Up a News-Voting Website with Pligg一个使用Pligg建网站的教程
网址:http://howtoforge.com/news_voting_with_pligg

十一、Radiant CMS

clip_image011
Radiant CMS是一个简单易用的开源工具,和其他开源工具不同的是,Radiant CMS是使用Ruby on Rails建立的。
Radiant CMS的资源
网址:http://radiantcms.org/
Radiant CMS Documentation为Radiant CMS用户和开发者准备的最好的资源
网址:http://wiki.radiantcms.org/Documentation
Radiant CMS TutorialRadiant CMS的入门教程
网址:http://www.artofmission.com/articles/2006/06/06/radiant-cms

更多的资源请看:http://designm.ag/resources/cms-toolbox/

——–

原文:http://news.csdn.net/a/20090415/210474.html

发表评论

pligg 集成 wysiwyg 编辑器 tinymce

FROM: http://www.yeeach.com/2007/10/13/pligg-%e9%9b%86%e6%88%90wysiwyg-%e7%bc%96%e8%be%91%e5%99%a8tinymce/

由于在自己的个人站点上用pligg来作为网摘工具,因此希望在摘录时候能够直接能够把内容及格式保留下来,而不是单纯的文字介绍,因此用tinymce(用空再试fckeditor)来替代pligg本身的textarea,记录一下集成过程:

(阅读全文…)

发表评论

TinyMCE editor for Pligg: 为Pligg加TinyMCE编辑器

Steps:
1] copy files tiny_mce to /3rdParty folder (if you chose to get files from the tinyMCE main site then please copy only the folder tiny_mce under /tinymce/jscripts/ to 3rdParty in Pligg base) or download this topic.
2] Enable HTML in submit from admin panel to include the following tags

Code:


<br><font><img><p><a><strong><ul><li><ol><u><em><span><pre><h1><h2><h3><hr><embed>

3] Edit Pligg.tpl to have the following lines after the

Code:


{checkForJs}

Code:


{if $pagename eq "submit" or "editlink"} <script language="javascript" type="text/javascript" src="{$my_pligg_base}/3rdparty/tiny_mce/tiny_mce.js"></script> {/if}

4] Edit submit_step_2.tpl to have the following lines after

Code:


{config_load file="/libs/lang.conf"}

add

Code:


{literal} <script language="javascript" type="text/javascript"> tinyMCE.init({ mode : "exact", elements : "bodytext,summarytext", theme : "advanced", plugins : "advimage,advlink,emotions,iespell,insertdatetime,preview,media,visualchars,xhtmlxtras", theme_advanced_buttons1 : "bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,insertdate,inserttime,|,forecolor,backcolor,|,hr,removeformat,formatselect", theme_advanced_buttons2 : "link,unlink,image,media,|,undo,redo,cleanup,|,code,preview", theme_advanced_buttons3 : "", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_path_location : "bottom", extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]", browsers : "msie,gecko,opera,safari" }); </script> {/literal}

5] Edit editlink_edit_center.tpl to have the following lines after

Code:


{config_load file="/libs/lang.conf"}

add

Code:


{literal} <script language="javascript" type="text/javascript"> tinyMCE.init({ mode : "exact", elements : "bodytext,summarytext", theme : "advanced", plugins : "advimage,advlink,emotions,iespell,insertdatetime,preview,media,visualchars,xhtmlxtras", theme_advanced_buttons1 : "bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,insertdate,inserttime,|,forecolor,backcolor,|,hr,removeformat,formatselect", theme_advanced_buttons2 : "link,unlink,image,media,|,undo,redo,cleanup,|,code,preview", theme_advanced_buttons3 : "", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_path_location : "bottom", extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]", browsers : "msie,gecko,opera,safari" }); </script> {/literal}

FROM: http://www.pliggtemplates.eu/index.php?Itemid=43&catid=5&func=view&id=25&option=com_fireboard

发表评论

修改 Pligg 模板以放置广告等

修改Pligg网站右边栏:

  • 进入控制面板Admin Panel —-> Template Editor —-> 修改/templates/yget/sidebar.tpl—-> 修改相应部分的代码
  • 比如:如果不显示评论,则可删除以下代码:{assign var=sidebar_module value="sidebar_comments"}{include file=$the_template_sidebar_modules."/wrapper.tpl"},其它代码与此相似,通常红色部分表示这一部分代码的类别,如:今日之最、最新发布的资讯、分类、评论、标签等。

(阅读全文…)

Comments (6)

que 的意思是队列,全拼是 queue

que 的意思是队列,全拼是 queue

you’re in que for captcha:您需要等待系统为您生成验证码。

发表评论

captcha 的意思是验证码,全拼是…

captcha 的意思是验证码,它的全拼是:Completely Automated Public Turing test to tell Computers and Humans Apart

完整的翻译是:完全自动化的公共图灵测试,以区分电脑和人类

Captcha verification failed :验证码验证失败

发表评论

Pligg有何不同?How is Pligg Different?

How is Pligg Different?

Pligg有何不同?

Pligg was created as a social publishing CMS. While most content management systems are designed for only a handful of authors, Pligg CMS was designed to manage a site with an unlimited number of authors. All of these registered users are in control of the website’s content. It is a user driven CMS that relies on independent authors content and participation to manage news articles.

Pligg作为一种社会化发布CMS被创建。大多数内容管理系统是设计为只有极少数的作者的,而Pligg CMS是为有无限量作者的网站管理设计的。所有注册用户都在管理网站内容。它是用户驱动的CMS,依赖于独立的作者提供内容和参与管理文章。

Pligg started as a simple CMS to let users submit and vote on news articles, and that’s still what we do best. Vote on stories that interest you and articles that receive enough votes will appear on the homepage of your Pligg site. Pligg offers a 5 star method for voting or the more traditional numbered voting as seen on sites like Digg, Mixx or Reddit.

Pligg开始作为一个简单的CMS,让用户提交和表决新闻文章,而这一直是我们最擅长的。投票给你有兴趣的文章,得到足够的票数的文章将出现在您的Pligg网站的首页。Pligg提供了五个星的投票方法或者较传统的编号投票方法,就像Digg,Mixx或Reddit网站一样。

(阅读全文…)

发表评论

php:用 fsockopen() 来跨站点请求

Php最让我感觉不错的地方是这个函数fsockopen,记得以前的B2C网站就是通过这个函数实现前台和订单处理系统的交互。还有一个以curl_开头的函数,可以实现很多功能。有时间要好好研究!下面是关于fscokopen的介绍

(阅读全文…)

发表评论

各类开源程序分类简介[搜集整理]

经典PHP开源程序简介:

今天为大家推荐一些经典的PHP开源程序,来满足你架设独立网站的需求。不管是博客、SNS社交、Digg,还是小型的门户网站,PHP都可以在相当程度上满足你。

  • 一、博客程序

网站示范:酷勤博客 http://blog.kuqin.com/kuqin/

1.wordpress WordPress 是一款基于 PHP + Mysql 的开源博客程序,包括单用户系统与 WordPress MU 多用户系统。WordPress 程序简洁,功能强大(可以打造成一个CMS),依托于各种各样的插件,你可以实现任何想要的功能。WordPress.com 为全球用户提供免费而专业的 BSP 服务,在中国,yo2.cn 也为用户提供可定制的个性化博客服务,适用于没有技术基础的 WordPress 爱好者。WordPress 在全球拥有大量 Fans(我也是其中之一 ),Fans 贡献了大量的主题与插件,良好循环让 WordPress 越来越强大。同时,在国内还有一些 Fans 维护的博客为网友提供 Wordpress 中文版以及WordPress 的最新资讯动态,WordPress 中文站就做得很不错。关于 WordPress ,写再多也无法介绍清楚,只有亲自使用才会明白,如果你没有PHP基础但又十分想加入 WordPress 怀抱,请不要犹豫,Google 是最好的老师。

2.SaBlog-X。由 Angel 独自开发的基于 PHP + Mysql 的单用户博客程序,作者也是 Discuz! Lite 版本的制作者。目前国内还是有很多 Blogger 使用的 SaBlog ,应该是国内最好的 PHP 博客程序了。SaBlog-X 支持静态化,利于 SEO ,对于 Spam 也有较好的防御机制。不过,SaBlog-X 主题、插件较少,可能需要 Blogger 有一定开发能力才能进行相应扩展。

3.Bo-Blog。由 Bob Shen 开发的一款基于 PHP + Mysql 的单用户博客程序,目前国内 PHP 博客中, Bo-Blog 与 SaBlog-X 不相上下。Bo-Blog 的主要优点是模板丰富、插件超多,但程序整体开发更新较为缓慢。

  • 二、Digg程序

网站示范:  Digg   http://www.digg.com

1.Pligg。目前最流行的仿Digg程序,基于PHP+MYSQL。换句话说,Pligg在类Digg程序中的地位可以相当于Wordpress在博客程序 中的地位。同样开源,支持多国语言,同样拥有很多的设计开发人员为其创建出许多优秀的模板和插件,安装简单,使用方便。首选的仿Digg程序,强烈推荐。

2.PBDIGG. PBDigg 是基于PHP + MYSQL的开源Digg社区资讯系统,经过完善设计并适用于各种服务器环境,如:UNIX、LINUX、WINDOWS等,是一个高效、全新、快速、优秀的网站解决方案。

  • 三、图片程序

1.Gallery。Gallery是一个开源基于Web的相簿管理器。用户可以使用Web浏览器上传图片(缩略图也同时被创建),评价图片,添加注释和发送电子贺卡。管理员可以批量添加已经上传到FTP服务器上的图片。

  • 四、CMS程序

1.DEDECMS。这是一款我十分喜欢的国内CMS系统,据我本人了解,它可以搭建你任何想要的网站,真可谓是强者。

2.PHPCMS。一个综合的网站管理系统,由PHP+MYSQL构架全站生成html,能够快速高效地应用于LINUX和WINDOWS服务器平台,是目前中国LINUX环境下最佳的网站管理应用解决方案之一。

3.MAMBO。Mambo是一个功能丰富、采用PHP+MySQL搭建、最优秀的动态门户引擎/内容管理系统(CMS),能够用于建设拥用几个页面到几千个页面的网站。

4.Joomla!。Joomla! 是一套获得过多个奖项的内容管理系统(Content Management System, CMS)。Joomla!采用PHP+MySQL数据库开发,可运行在Linux、Windows、MacOSX、Solaris等各种平台上。 Joomla!除了具有新闻/文章管理,文档/图片管理,网站布局设置,模板/主题管理等一些基本功能之外。还可通过其提供的上千个插件进行功能扩展包括:电子商务与购物车引擎,论坛与聊天软件,日历,博客软件,目录分类管理,广告管理系统,电子报,数据收集与报表工具,期刊订阅服务等。

  • 五、SNS社交程序

示范网站:校内网 http://www.xiaonei.com

1.UCenterHome.是一套采用PHP+MYSQL构建的社会化网络软件(SocialNetworkSoftware,简称SNS)。通过UCenterHome,建站者可以轻松构建一个以好友关系为核心的交流网络,让站点用户可以用迷你博客一句话记录生活中的点点滴滴;方便快捷地发布日志、上传图片;更可以十分方便的与其好友们一起分享信息、讨论感兴趣的话题;轻松快捷的了解好友最新动态。UCenterHome强调“家”的理念,充分认可每一个站点用户的个人隐私重要性。提供强大丰富的隐私设置功能。每一个人都有权限设置自己的个人主页、资料、日志、相册等是否公开、或只好友可看、或指定特别好友可看、或仅自己可看、或者需要输入密码才可看;并可完全控制将自己的哪些动作可以产生动态推送到好友面前。UCenterHome强调只提供用户愿意关注的信息,在信息噪音方面有着多级筛选控制。每一个人都可以将自己的好友进行分组,并选择屏蔽哪些用户组的动态;同时,可针对特定的好友、特定的动态进行单独屏蔽,确保因好友增多带来的信息噪音问题。UCenterHome以UCenter为多应用交换中心,既可以独立运作,又可以实现与多个应用挂接,包括Discuz!论坛、 SupeV视频、ECShop商店等,用户在这些各类产品中的动作,都可以以动态的方式发送到UCenterHome,让关注的好友们及时了解到自己的行为;同时,自己也可以在UCenterHome即可轻松理解好友在站内各种系统中的更新信息。UCenterHome1.2正式版全面开源发布,并提供免费下载。

2.ThinkSNS. 基于许多优秀的开源软件开发,提供全方位的社交网络(SNS)解决方案。ThinkSNS全部基于开源项目,同时也作为开源项目,免费提供给用户使用。项目框架都有完善的文档和实例,非常适合二次开发。国际化支持:多模版,多语言支持。基于ThinkPHP框架优秀的设计,ThinkSNS生来就具备优秀的国际化能力,支持多语言,多模版。 ThinkSNS不仅仅是个web端的程序,伴随着ThinkSNS成长,我们还会开发相关的IM和客户端支持。 ThinkPHP内置支持WordPress式插件开发,我们还会提供完善的API,和其他系统无缝集成。

六、BBS论坛程序

1.phpBB.具有友好的用户界面,简单易懂的管理面板和FAQ。你可采用PHP+MySQL,MS-SQL,PostgreSQL或Access/ODBC数据库来搭建自己的论坛系统。

2.phpwind。一套采用 php+mysql 数据库方式运行并可生成 html 页面的全新且完善的强大系统,除了具备多重子版块.和后台用户组权限可以自由组合外, 还具备分版块控制生成html页面、可选用的所见即所得编辑器、防止图片和附件防盗链、多附件上传下载、输入图片URL直接显示图片、版块主题分类、版块积分控制与版块内的用户组权限控制、主题与回复审核功能、自定义积分与自定义等级提升系统、论坛用户宣传接口、帖子加密隐藏出售、分论坛二级目录/域名等一些特色功能。

3.Discuz! 。目前比较流行的论坛系统程序。不用多说,大家都应该知道。

七、其他程序

1.geeklog。Geeklog是博客软件,专注于高性能,隐私和安全。它采用基于Web的管理,调查 ,用户可定制的盒子,一个友好的图形用户界面与管理的主题管理器,用于修改或删除博客和评论的选项,,搜索引擎,支持 Atom格式、日程安排,等等。

本文出自:http://www.waacoo.com/feature/open-php-source-code.html

WEB2.0的开源程序概览:

Diggclone-开源digg类程序
官方: http://www.talkingpixels.org/diggclone/index.php
演示:同digg.com类似,
Wodig-国内的开源digg类程序
官方: http://www.wodig.com/
Pligg-开源digg类程序
官方: http://www.pligg.com
中文演示: http://pligg.yesxp.net
Aroundme-开源社会化网络程序
官方: https://savannah.nongnu.org/projects/aroundme/
演示: http://www.barnraiser.org/demos/
(社会化网络程序通常都是收费的,相信这个是目前唯一免费的social netwokr项目啦)
Lilina–开源RSS聚合器
官方: http://lilina.sourceforge.net/
演示: http://www.chedong.com/
Gregarius–开源RSS聚合程序
演示: http://rss.gregarius.net/
官方: http://gregarius.net/
插件: http://plugins.gregarius.net/
风格: http://themes.gregarius.net/
论坛: http://forums.gregarius.net/
帮助: http://wiki.gregarius.net/
Sa.bros.us-开源网络书签(PHP)
官方: https://sourceforge.net/projects/sabrosus/
汉化演示: http://www.sluke.cn/demo/monousuario/
Freedmarks -开源网络书签(ASP)(国内)
官方: http://www.purewhite.cn/
演示: http://www.freedmarks.com/
Scuttle -开源网络书签(PHP)
官方: http://sourceforge.net/projects/scuttle
演示: http://scuttle.org/
Yogurt-开源社会化网络门户
官方: http://yogurt.sourceforge.net/
eyeos—开元的WEBOS,
官方: http://www.eyeos.org
演示: http://www.earn8.net
有中文版本的。
周博通个人门户-开源个人门户
官方: http://www.potu.com/index/potu_opensource.php
开源的维客系统
mediawiki
官方网站https://secure.wikimedia.org/wikipedia/zh/wiki/
下载https://secure.wikimedia.org/wikipedia/zh/wiki/
openwiki
官方网站 http://www.openwiki.com/
下载 http://www.openwiki.com/
DokuWiki
官方网站http://xoops.org.cn/modules/dokuwiki/doku.php
下载http://xoops.org.cn/modules/dokuwiki/doku.php
HoodongWIKI-国内开源的维客系统
官方: http://www.hoodong.com

另一网友整理的,和前面重复的都去掉了:

supergu——集合digg,书签一体(php)
官方:http://www.supergu.com/
演示:http://www.getgui.com/

OpenPNE -社会化交友平台
地址:http://www.openpne.com.cn/
下载:http://www.openpne.com.cn/corp/DownLoad.shtml(繁体中文版)

163ask——免费开源的问答程序(php)
官方:http://www.ngosoft.net/forum-11-1.html
演示:http://www.163ask.com/

elgg——免费开源的社会性网络sns系统(php)
官方:http://elgg.org/
演示:http://elgg.net/
以blog为中心,还不如国内的dz和pw做的好。

yogurt——开源的社会化网络门户(php)
官方:http://yogurt.sourceforge.net/

分类信息——飞思分类信息 v3.0 商业版(asp)
说明:http://duohai.ka163.com/article.asp?id=11
程序 http://duohai.ka163.com/attachments/month_0612/a2006121120411.rar

分类信息——必够分类信息(asp)
官方:http://www.adfans.org/bbs/
演示:http://www.qbaidu.com.cn/

分类信息——178518分类信息站(asp)
官方:http://www.178518.com/blog/
演示:http://www.178518.com/
设计很有特点,可以说是超前,不比什么58之类的差,可惜网友反映不是个完整版本。

raico——开源威客程序(php)
官方:http://www.raico.cn/forum/
演示:http://demo.raico.cn/wk/
其实就是个bbs改的。威客,在线工作平台,web2最为清晰的盈利模式之一。国内直k68以来,越来越火了,但是经不起价格战的,剩者为王。

mypotu——单域名多用户版在线阅读器(php)
官方:http://www.potu.com/index/potu_opensource.php
演示:http://my.potu.com/

lilina——开源rss聚合器(php)
官方:http://lilina.sourceforge.net/
演示:http://www.b9527.net/lilina/
http://lilina.jin.tw/
国内有个叫chengdong的吧,他改的比较好,但好像没放出来,就不用他的演示了。
顺便和drupal的个模块比较哈:http://www.b9527.net/?q=aggregator
xoops的也来下: http://xoops.org.cn/modules/planet/

gregarius–开源rss聚合器(php)
官方:http://gregarius.net/
演示:http://rss.gregarius.net/

sxna——国内开源rss聚合器(asp)
官方:http://www.dc9.cn/catalog.asp?cate=11
演示:http://fenju.com.cn/xwlb/

otagsnapr——开源网页截屏工具
演示:http://snap.otag.cn/
下载:http://snap.otag.cn/otagsnapr.rar

scuttle——开源网络书签(php)
官方:http://sourceforge.net/projects/scuttle
演示:http://scuttle.org/

podlook——国内的免费视频分享平台(.net)
官方:http://blog.podlook.com/archive/2006/11/14/111926.aspx
演示:http://psp.podlook.com/

华聚视频——免费版(jsp)
演示:http://cnboo.com/
下载:http://code.im286.com/s/1265/

中城在线——仿下班网(jso)
演示:http://life.cityol.com/
下载:http://code.im286.com/s/1266/

无忧贴吧——目前少有的开源php贴吧(php)
官方:http://5uie.com/
asp的贴吧不少,但php的却不多见,无忧贴吧自1.0就广受关注,加入了些很web2的功能,可惜始终跳不出baidu的思路。作者希望每个用户都尊重他的劳动果实,谁把下面的版权去掉了,谁就列入黑名单。据说还将开发商业版!

发表评论

[转]phpMyAdmin导出数据中文乱码问题

第一篇

phpMyAdmin版本是2.9.1.1

用phpMyAdmin备份数据库,导出来后,在本地用sqlyog还原的时候,出现如下错误:
Error occured at:2009-03-03 10:09:43
Line no.:11154
Error Code: 1062 – Duplicate entry ‘??????’ for key 2

(阅读全文…)

发表评论

[转]MySQL,phpmyadmin,php中文乱码产生原因及对策

近日发现很多人为MySQL中文乱码问题所困扰。于是就这个问题做一下浅析。不正确的地方希望大家指正

(阅读全文…)

发表评论

[转]MySQL和phpMyAdmin与UTF8中文乱码的终极研究

最近笔者勤于备份数据,而且试着把建立在MySQL数据库中的数据在各种平台转来转去,发现了许多的问题,而这些问题在网络上有许多网友问过,但看到很多人找不出答案,因而放弃重装系统或者放弃掉宝贵的旧有数据,那么我相信笔者这一篇文章可能会让您放弃掉坚持在所谓的”UTF-8中文乱码”的迷思。

(阅读全文…)

发表评论

TiddlyWiki as multi-user/collaborative/server

http://www.tiddlywiki.com/

 

Can I use TiddlyWiki as a multi-user/collaborative/server based wiki?

http://tiddlywikiguides.org/index.php?title=Can_I_use_TiddlyWiki_as_a_multi-user/collaborative/server_based_wiki%3F

 

server-side adaptations of TiddlyWiki
——————————————————

http://tiddlywiki.org/wiki/CcTiddlyInstallation

 

New Requirements


[edit] Mod-Rewrite

If you wish to use nice friendly URLs. (wiki.osmosoft.com/simonmcmanus instead of wiki.osmosoft.com/?workspace=simonmcmanus) You will need to have mod-rewrite enabled. If you dont/cant/wont enable it then ensure $tiddlyCfg['use_mod_rewrite'] is set to 0 in the config.php file.

If you want help turning on mod-rewrite read over this blog post

[edit] DOM/XML

This is only required for OpenID. If you don’t have DOM/XML try installing it with YUM.

[edit] Install Process

Note: A BETA (use at your own risk!!!) automated install script for LINUX/BSD users is available here.

$tiddlyCfg['db']['host'] = "127.0.0.1"; sql host
$tiddlyCfg['db']['login'] = "DATABASEUSERNAME"; database login name
$tiddlyCfg['db']['pass'] = "DATABASEPASSWORD"; database login password
$tiddlyCfg['db']['name'] = "DATABASENAME"; db name (from step 2 above)
  • 6. If there is not already a .htaccess file in your root directory then you will need to create the file manually and copy the text from the following URL :
http://svn.tiddlywiki.org/Trunk/association/serversides/cctiddly/Trunk/.htaccess
  • 7. Visit the root of your server.
  • 8. Login as admin/password and click "password" on the right to change it.
  • Hey presto, it should all be set up for you. Enjoy.

[edit] Installation Translations

German

[edit] Tested Configurations

XAMPP

—————————————————

http://tiddlyhome.bidix.info/

Comments (1)

取得自己的 OpenID

译自:http://openid.net/get/

 

意外的惊喜!您可能已经拥有一个。如果您使用下列任何服务,您就已经拥有自己的OpenID 。 (当你看到粗体字,您应该替换为您自己在该服务的用户名,显示名或会员名。)

AOL

openid.aol.com/screenname
Google
Look for the “Sign in with a Google Account” button
MySpace
Look for the “Login with MySpaceID” button or enter myspace.com/username
Yahoo!
Look for the “Sign in with Yahoo! ID” button
Blogger
blogname.blogspot.com
Flickr
Look for the “Sign in with Yahoo! ID” button or enter www.flickr.com/photos/username
LiveDoor
profile.livedoor.com/username
LiveJournal
username.livejournal.com
Orange (France Telecom)
http://openid.orange.fr/
SmugMug
username.smugmug.com
Technorati
technorati.com/people/technorati/username
Vox
member.vox.com
WordPress.com
username.wordpress.com

 

如果您还没有 OpenID,这里有一些社区成员推荐的。最终你应该选择一个你信任的供应商。我们意识到,这个清单并不完善,并计划发展成一个更加有用的工具。如果您想了解不同的供应商的技术背景,您可以看一下供应商比较的说明。

  • ClaimID
    claimID is the free, easy way to manage your online identity with OpenID.
  • myOpenID
    First standalone OpenID provider for both individuals and businesses including secure multi-factor authentication.
  • VeriSign’s Personal Identity Provider
    Free OpenID Provider with support for multi-factor authentication.
  • myID.net
    Free OpenID Provider with support for groups and Korean language.
  • myVidoop
    Free OpenID Provider that eliminates passwords with security features, customization, and browser integration.

 

更多的OpenID提供商,您可以查看 OpenID 目录。对此列表我们不作任何担保也不负责维护。

当然,您可以随时使用自己的网址,博客网址,网站,等作你的 OpenID 。委派是启动、运行 OpenID 最简单的方式,萨姆写了一个伟大指南。委派要求的只不过是一个 OpenID 提供商和一些基本的HTML 。如果你想举办自己的OpenID 提供商服务,您还需要一些编码的经验。 phpMyID 是一个简单的开源 PHP 脚本,让您充分掌控自己的供应商。如果你想做些更复杂的什么,请查阅我们的 OpenID 的开发网页。

发表评论