对于已经存在桌面Web版,难以重构或者非常复杂的网站,我们考虑采用纯移动端的设计开发,尽量走轻量级路线。类似于本次 http://m.sdo.com 的页面开发需求。
对于新建站点,并且站点内容并不非常复杂,同时有移动端需求的网站,我们考虑采用全站响应式设计开发。
<?php | |
define('WE_VERSION', '1.0.0'); | |
$conf = array( | |
'common', | |
'component', | |
'business', | |
'page', | |
); |
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width,maximum-scale=1.0,minimum-scale=1.0"> | |
<script src="http://we.sdoprofile.com/common/js/release/loader.min.js"></script> | |
<script type="text/javascript"> | |
var prizeInfoUrl = "xxxx"; | |
var drawUrl = 'xxx'; | |
</script> |
对于已经存在桌面Web版,难以重构或者非常复杂的网站,我们考虑采用纯移动端的设计开发,尽量走轻量级路线。类似于本次 http://m.sdo.com 的页面开发需求。
对于新建站点,并且站点内容并不非常复杂,同时有移动端需求的网站,我们考虑采用全站响应式设计开发。
<?php | |
$dir = ''; | |
if (isset($argv[1])) $dir = $argv[1]; | |
if ($_REQUEST['path']) $dir = $_REQUEST['path']; | |
if (!$dir) { | |
echo "Path not specified! Please use `localhost/resizeimage.php?path=.` or `php resizeimage.php {path}`\n";exit; | |
} |
// Build msdo.js to the dist directory. Embed date@version. | |
grunt.registerMultiTask( | |
"build", | |
"Concatenate source and build msdo.js to the dist directory. Embed date@version.", | |
function() { | |
// Concat specified files. | |
var compiled = "", | |
name = this.data.dest, | |
src = this.data.src, |
# -*- coding: utf-8 -*- | |
import sys | |
import json | |
import nltk | |
import numpy | |
N = 100 # Number of words to consider | |
CLUSTER_THRESHOLD = 5 # Distance between words to consider | |
TOP_SENTENCES = 5 # Number of sentences to return for a "top n" summary |
<?php | |
ini_set('display_errors', 'On'); | |
$theme_id = $_SERVER['HTTP_HOST'] ? $_REQUEST['theme_id'] : $argv[1]; | |
if (!$theme_id) die("No Theme ID specified!"); | |
$target_url = $_SERVER['HTTP_HOST'] ? $_REQUEST['target'] : $argv[2]; | |
$target_url = $target_url ?: "http://wbpreview.com/previews/"; | |
$index_page = $_SERVER['HTTP_HOST'] ? $_REQUEST['index_page'] : $argv[3]; |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width"/>
/** | |
* An example to try to call API multiple times | |
*/ | |
'use strict'; | |
const maxTryTimes = 3; | |
const tryTimeInterval = 500; | |
/** | |
* try multiple times to access server API |
/** | |
* unregister | |
* | |
* unregister old directives or filters | |
* | |
* @param {Object.<{name: string, type: string}>[]} declares | |
* @param string module | |
* @returns {undefined} | |
* @example | |
* {name: 'foo', type: 'directive') |