($width) AND $width .= 'px';
$style = " style=\"width: $width\"";
}
$value = $value ? $value : date('H:i');
$s = " ";
return $s;
}
// form_date('start', '2018-07-05') 为空则当前日期
function form_date($name, $value = 0, $width = FALSE)
{
$style = '';
if (FALSE !== $width) {
is_numeric($width) AND $width .= 'px';
$style = " style=\"width: $width\"";
}
$value = $value ? $value : date('Y-m-d');
$s = " ";
return $s;
}
/**用法
*
* echo form_radio_yes_no('radio1', 0);
* echo form_checkbox('aaa', array('无', '有'), 0);
*
* echo form_radio_yes_no('aaa', 0);
* echo form_radio('aaa', array('无', '有'), 0);
* echo form_radio('aaa', array('a'=>'aaa', 'b'=>'bbb', 'c'=>'ccc', ), 'b');
*
* echo form_select('aaa', array('a'=>'aaa', 'b'=>'bbb', 'c'=>'ccc', ), 'a');
*/
?>组保留的标签 余下为需要删除的标签
unset($oldtag[$key]);
}
}
}
if (!empty($oldtag)) {
$tagids = array();
foreach ($oldtag as $tagid => $tagname) {
$tagids[] = $tagid;
}
well_oldtag_delete($tagids, $tid);
}
$r = well_tag_process($tid, $fid, $create_tag, $tagarr);
return $r;
}
// 删除标签和绑定的主题
function well_oldtag_delete($tagids, $tid)
{
$pagesize = count($tagids);
$arrlist = well_tag_find_by_tagids($tagids, 1, $pagesize);
$delete_tagids = array(); // 删除
$tagids = array();
$n = 0;
foreach ($arrlist as $val) {
++$n;
if (1 == $val['count']) {
// 只有一个主题
$delete_tagids[] = $val['tagid'];
} else {
$tagids[] = $val['tagid'];
}
}
!empty($delete_tagids) and well_tag_delete($delete_tagids);
$arlist = well_tag_thread_find_by_tid($tid, 1, $n);
if ($arlist) {
$ids = array();
foreach ($arlist as $val) $ids[] = $val['id'];
well_tag_thread_delete($ids);
}
!empty($tagids) and well_tag_update($tagids, array('count-' => 1));
}
// 标签数据处理 $arr=新提交的数组 $tagarr=保留的旧标签
function well_tag_process($tid, $fid, $new_tags = array(), $tagarr = array())
{
if (empty($tid)) return '';
// 新标签处理入库
if ($new_tags) {
$threadarr = array();
$tagids = array();
$i = 0;
$size = 5;
$n = count($tagarr);
$n = $n > $size ? $size : $size - $n;
foreach ($new_tags as $name) {
++$i;
$name = trim($name);
$name = stripslashes($name);
$name = strip_tags($name);
$name = str_replace(array(' ', '#', "@", "$", "%", "^", '&', '·', '<', '>', ';', '`', '~', '!', '¥', '……', ';', '?', '?', '-', '—', '_', '=', '+', '.', '{', '}', '|', ':', ':', '、', '/', '。', '[', ']', '【', '】', '‘', ' ', ' ', ' ', ' ', ' '), '', $name);
$name = htmlspecialchars($name, ENT_QUOTES);
if ($name && $i <= $n) {
// 查询标签
$read = well_tag_read_name($name);
if ($read) {
// 存在 count+1
$tagids[] = $read['tagid'];
} else {
// 入库
$arr = array('name' => $name, 'count' => 1);
$tagid = well_tag_create($arr);
FALSE === $tagid and message(-1, lang('create_failed'));
$read = array('tagid' => $tagid, 'name' => $name);
}
$tag_thread = array('tagid' => $read['tagid'], 'tid' => $tid);
$threadarr[] = $tag_thread;
$tagarr[$read['tagid']] = $read['name'];
}
}
!empty($threadarr) and tag_thread_big_insert($threadarr);
!empty($tagids) and well_tag_update($tagids, array('count+' => 1));
}
$json = empty($tagarr) ? '' : xn_json_encode($tagarr);
return $json;
}
?>return $r;
}
/**
* @param int $page 页数
* @param int $pagesize 每页显示数量
* @return mixed
*/
function link_find($page = 1, $pagesize = 100)
{
$arr = link__find($cond = array(), array('rank' => -1), $page, $pagesize);
return $arr;
}
/**
* @param $id
* @return bool 返回FALSE失败 TRUE成功
*/
function link_delete($id)
{
if (empty($id)) return FALSE;
$r = link__delete(array('id' => $id));
link_delete_cache();
return $r;
}
//--------------------------kv + cache--------------------------
/**
* @return mixed 返回全部友情链接
*/
function link_get($page = 1, $pagesize = 100)
{
$g_link = website_get('friends_link');
if (empty($g_link)) {
$g_link = link_find($page, $pagesize);
$g_link AND website_set('friends_link', $g_link);
}
return $g_link;
}
// delete kv and cache
function link_delete_cache()
{
website_set('friends_link', '');
return TRUE;
}
?> $v = implode(",", $v);
$temp[] = $v;
}
// 去掉重复的字符串,也就是重复的一维数组
$temp = array_unique($temp);
// 再将拆开的数组重新组装
$output = array();
foreach ($temp as $k => $v) {
if ($stkeep) $k = $starr[$k];
if ($ndformat) {
$temparr = explode(",", $v);
foreach ($temparr as $ndkey => $ndval) $output[$k][$ndarr[$ndkey]] = $ndval;
} else $output[$k] = explode(",", $v);
}
return $output;
}
// 合并二维数组 如重复 值以第一个数组值为准
function array2_merge($array1, $array2, $key = '')
{
if (empty($array1) || empty($array2)) return NULL;
$arr = array();
foreach ($array1 as $k => $v) {
isset($v[$key]) ? $arr[$v[$key]] = array_merge($v, $array2[$k]) : $arr[] = array_merge($v, $array2[$k]);
}
return $arr;
}
/*
* 对二维数组排序 两个数组必须有一个相同的键值
* $array1 需要排序数组
* $array2 按照该数组key排序
* */
function array2_sort_key($array1, $array2, $key = '')
{
if (empty($array1) || empty($array2)) return NULL;
$arr = array();
foreach ($array2 as $k => $v) {
if (isset($v[$key]) && $v[$key] == $array1[$v[$key]][$key]) {
$arr[$v[$key]] = $array1[$v[$key]];
} else {
$arr[] = $v;
}
}
return $arr;
}
?>
Web based editor for html, javascript, jquery and css with intellisense? - Stack Overflow-软件玩家 - 软件改变生活!
Is there any Web based editor for html, javascript, jquery and css with intellisense? Sites like jsFiddle are great, but the lack of intellisense makes the whole exercise of editing a rather tedious task.
Is there any Web based editor for html, javascript, jquery and css with intellisense? Sites like jsFiddle are great, but the lack of intellisense makes the whole exercise of editing a rather tedious task.
javascript jquery html css cloud9-ide
Share
Improve this question
Follow
edited
Sep 29, 2011 at 1:18
Dan
6,416 7 7 gold badges 41 41 silver badges 42 42 bronze badges
asked
Jun 14, 2011 at 15:17
Deepanjan Nag
Deepanjan Nag
931 3 3 gold badges 14 14 silver badges 27 27 bronze badges
2
8
Accept some answers 20% is bad. :)
– epascarello
Commented
Jun 14, 2011 at 15:21
1
IntelliSense is a Microsoft implementation of autoplete.
– John Strickler
Commented
Jun 14, 2011 at 15:22
Add a ment
|
3 Answers
3
Sorted by:
Reset to default
6
I think the Cloud9 IDE will do what you want.
Webstorm or IntelliJ are both great for JavaScript development.
User "Busticated" is prophetically correct. From the Cloud9 Google group:
Q: Are there any plans to add an intellisense/codepletion feature to
Cloud9?
If so, what is the goal date-wise?
A: Yes, we're working on autoplete for Cloud9. I have it scheduled for the autumn right now, but I have good hopes we'll be able to do a poor-mans implementation by this summer.
Ruben
Source
本文标签:
Web based editor for html javascript jquery and css with intellisenseStack Overflow
更多相关文章 Javascript,calling child window function from opener doesn't work - Stack Overflow I'm developing a web application that opens a popup using windows.open(..). I need to call a funct
Javascript, viewing "object nodelist" - Stack Overflow Doing an alert() on one of my variables gives me this result[object NodeList]How can I see all the valu
Javascript, Getting Length of String Held in Array - Stack Overflow k = [['a'], ['ab'], ['abc']];alert(k[2].length);The above code fragment
javascript, compare arrays of different sizes - Stack Overflow with two arrays of potentially different sizes, what is best way to see if they are the same as far as
Javascript,Setting up onclick method syntax - Stack Overflow I am looking at a javascript code that manipulates an HTML A tag , and I'm having trouble understa
javascript, parseInt behavior when passing in a float number - Stack Overflow I have the following two parseInt() and I am not quite sure why they gave me different results:alert(pa
Javascript, base 10 to base 8 - Stack Overflow How do I convert base 10 to base 8 in javascript? I tried with parseInt(text, 8) but the problem with t
Javascript, Rails views, content_for and DRYness - Stack Overflow In Rails, the mon idiom for page-specific Javascript is:(layout)<head><% yield :javascript %&g
javascript, firefox addon, open new tab - Stack Overflow I have an addon that open a html page when you click a button on the browser bar (so far so good)in th
Javascript, jQuery multiple AJAX requests at same time - Stack Overflow function makeCall(file, handlerFile, sendMethod, formData) {console.log(instance.files);$.ajax({url:
Javascript 开启浏览器全屏模式 通常在某些情况下,我们需要让浏览器开启全屏模式,以便获得更好的视觉体验,先看下全屏模式简单的几个API。 浏览器默认绑定 非全屏模式下, document的F11按键绑定开启全屏模式 全屏模式下, document的esc和
JSP, JavaScript, and Java Objects - Stack Overflow I have a JSP where I'm using a javascript framework to build a chart using the Google Visualizatio
Javascript, DOM: appendChild and textContent - Stack Overflow I submitted a Firefox addon to the mozilla directory and it was rejected because of this:item.innerHTML
Javascript, HTML and onClick - Function is not defined - Stack Overflow I'm trying to make an "Insert link" button to a Rich Text Editor in Javascript. Basicall
html - Invert colors on underlying elements with CSS, Javascript, or SVG - Stack Overflow Basically, I want to make an empty div that I can put anywhere on the page, and it will invert the colo
JavaScript, Jasmine, hide disabled jasmine specs - Stack Overflow I'd like to hide the disabled jasmine specs when I run chosen tests. I'll have lot's of
JQuery, Javascript, AJAX POST json to rest api - Stack Overflow I have a problem with posting data to a REST API, it should be done like this:curl -X POST -H "Acc
Javascript, delete the last item in history (firefox addon) - Stack Overflow I have a Firefox addon that first displays a warninginfo page telling the user they are being redirect
Javascript, Websockets and XMPP client. How to make them work together? - Stack Overflow I need a "Hello world!" example, that demonstrates how to use websockets and ejabberd in bina
JavaScript, array.sort() two arrays based on only one of them - Stack Overflow I just discovered array.sort() and saw that I can specify how to sort like this: (example taken from .a
发表评论