Time of Update: 2015-03-15
用Html寫一個簡單的登陸介面,html登陸介面<!DOCTYPE html><html><title>登陸頁面</title><head><meta charset="UTF-8"><title>Insert title here</title></head><body><form name = logon method = post><
Time of Update: 2015-03-15
擷取HTML5視頻的時間長度,擷取html5長度 HTML5視頻的Bigger體驗是非常令人振奮的,很簡單的道理,不用載入和依賴煩人的Flash或其他第三方外掛程式來播放視頻,也是大功一件。我們可以通過自訂控制項對視頻進行顯示和操控,其中一個常見的需求是顯示視頻的時間長度(duration)。下面我們一起來看看如何獲得並顯示視頻的期間!JavaScript 代碼video 元素有一個屬性(property)叫做
Time of Update: 2015-03-15
django中如何產生非HTML格式的內容。,django某些時候可能有這樣的需求,在網頁中點擊一個連結或者一個按鈕希望返回一張圖片、一個pdf文檔、一個csv文檔等而非HTML。在diango中很容易做到這些。django中的view用來接收http request並返回web
Time of Update: 2015-03-15
struts2 easyui實現datagrid的crud,struts2crud最近兩天因為項目需要,接觸了easyui,要用它的datagrid實現crud。第一次做,花了一天時間才完成所有功能,昨天做另外一個模組,同樣的功能只用了兩個小時。 現在把第一次做datagrid時遇到的問題記錄下來,協助自己記憶。同時也協助其他第一次接觸easyui的朋友。問題json到底有多少種?當時項目裡json的jar包是我直接從別的項目裡拷過來的。結果在下面的語句裡報錯resultObj =
Time of Update: 2015-03-15
-webkit-transform:translate3d(0,0,0)觸發GPU加速,讓網頁動畫更流暢,前段時間,按照美拍的視頻效果寫了一個效果類似的網頁版的動畫。電腦上安裝了三種瀏覽器:IE、Chrome、Firefox。分別作了測試,結果顯示Chrome在這方面的渲染效果最差,經常出現卡頓現象,ff表現最好。一直百思不得其解,尤其是之前使用canvas標籤做圖片濾鏡效果,chrome瀏覽器居然顯示不了濾鏡效果,然而其他瀏覽器均能正常顯示,大Google你腫麼了...對渲染多張
Time of Update: 2015-03-15
php Recess framework入門,recessframework Recess安裝Recess架構介紹架構配置項Controllers和Views路由route及路由註解Model模型應用管理工具參考Recess安裝:#install:unzip recess-v0.20.zip to apache DocumentRoot (/var/www/html)#install PHP 5.3.3yum install php53-pdoyum install php53-
Time of Update: 2015-03-15
onethink和phpwind共用,onethinkphpwind將onethink和phpwind資料庫安裝在一起,使用通用的表首碼。將onethink的member表指向phpwind有user表以下為onethink安裝在根目錄下,phpwind安裝在bbs目錄下的情況修改onethink中的is_login函數function is_login(){$site=include('./bbs/data/cache/config.php');C('BBS_SITE_
Time of Update: 2015-03-15
Bag標籤之一行代碼實行中文分詞執行個體1,bag中文例1:分詞(返回以逗號隔開的片語,gap=",")<bagid=pPage act=2words name=words gap=",">我喜歡黃色高領T恤衫</bag>輸出分詞結果<p><b>結果片語:
Time of Update: 2015-03-15
Linux 安裝php環境,linuxphp環境 一、使用screen(可選) 由於編譯安裝Nginx Apache PHP MySQL等軟體會花費比較長的時間,難免會出現由於網路意外中斷而導致安裝也中斷了,所以為了避免此問題,可以用screen來安裝。 screen的使用方法如下: 1、安裝screen ubuntu/debian系統:apt-get install -y screenCentos/redhat系統:yum install -y
Time of Update: 2015-03-15
關於margin top百分比值的問題,margintop百分比值不想說今天心情有多差!9點多開始發現一個"bug",需求是根據螢幕高度動態調整某個div的位置,代碼大概是這樣的。 <div style="margin-top: 25%; margin-left:25%; width:50px; height:50p;
Time of Update: 2015-03-15
[LeetCode]Maximum Product Subarray,leetcodesubarray Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,-2,4], the contiguous subarray [2,3
Time of Update: 2015-03-15
LeetCode,leetcodeojGiven a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were initially sorted according to their start times.Example 1:Given intervals [1,3],[6,9],
Time of Update: 2015-03-15
基本排序(五):基本排序演算法的總結,排序演算法總結 基本排序的基礎如果一個基本的排序演算法不比資料處理,如資料讀入和讀出慢,就沒有必要尋找一個更快的演算法。如果被排序的檔案適合放在記憶體中,則排序方法稱為“內部排序”;從磁碟上對檔案排序稱為“外部排序”。區別是內部排序可以很容易的訪問任何元素,但是外部排序必須順序訪問元素,至少在大的資料區塊是如此。排序程式訪問元素的方式:通過關鍵字進行比較、直接存取整個元素移動;排序函數都包過3個參數:數組、帶排序字數組的左邊界和右邊界
Time of Update: 2015-03-15
LeetCode Merge Intervals,leetcodemergeGiven a collection of intervals, merge all overlapping intervals.For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],[8,10],[15,18].題意:去掉重複的區間。思路:排序後,再比較end的情況。/** * Definition for an interval. *
Time of Update: 2015-03-15
FFmpeg原始碼結構圖,ffmpeg原始碼結構=====================================================FFmpeg的庫函數原始碼分析文章列表:【通用】FFmpeg 原始碼簡單分析:av_register_all()FFmpeg 原始碼簡單分析:avcodec_register_all()FFmpeg 原始碼簡單分析:記憶體的分配和釋放(av_malloc()、av_free()等)FFmpeg
Time of Update: 2015-03-15
DigitSum(n) 輸入一個非負整數,返回組成它的數字之和, 調用DigitSum(1729),返回1+7+2+9,和19,digitsum1729/*寫一個遞迴函式DigitSum(n),輸入一個非負整數,返回組成它的數字之和,例如,調用DigitSum(1729),則應該返回1+7+2+9,它的和是19*/#include<stdio.h>#include<math.h>int DigitSum(int n){int static sum = 0;if (n !=
Time of Update: 2015-03-15
LeetCode 190 Reverse Bits,leetcodereverseReverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represented in binary as 001110010111
Time of Update: 2015-03-15
深入研究java.lang.Object類,java.lang.object前言:Java的類庫日益龐大,所包含的類和介面也不計其數。但其中有一些非常重要的類和介面,是Java類庫中的核心部分。常見的有String、Object、Class、Collection、ClassLoader、System、Runtime...,掌握類是靈活Java這門語言的基礎。而這些類一般都很好理解和運用,需要做深入的研究和實踐才能掌握。 一、概述: &nbs
Time of Update: 2015-03-15
Python3.4 郵件發送(含帶中文附件),import smtplibimport osfrom email.mime.text import MIMETextfrom email.mime.multipart import MIMEMultipartfrom email import encodersuser = '*******@qq.com'pwd = '*******'to = ['******@139.com', '*****
Time of Update: 2015-03-15
Java IO之File,javaiofile FILE類是用來實現擷取檔案、檔案夾的類庫工具,File並非像類名所表示的那樣只是用來表示檔案,它還可以用來表示檔案夾。所以可以用File來擷取一個目錄下的所有檔案,甚至是檔案夾中的檔案。 一個簡單的擷取當前檔案目錄下所有檔案及檔案夾的方法public static void dir() { File dir = new File(".");// "."表示當前檔案所在目錄 String[] files =