V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  Sukizen  ›  全部回复第 66 页 / 共 68 页
回复总数  1354
1 ... 58  59  60  61  62  63  64  65  66  67 ... 68  
2012-12-26 14:18:28 +08:00
回复了 Sukizen 创建的主题 问与答 一台mac,两个显示器怎样编程?
@foru17 嗯,谢谢你。 可能我描述错误了。
我另外一台显示器新购买的,还没有接上,不知道有什么软件可以实现一个显示器显示一个窗口呢。
还是MAC系统已经有自带是APP可以实现。
2012-12-26 13:09:45 +08:00
回复了 Sukizen 创建的主题 问与答 一台mac,两个显示器怎样编程?
@foru17 这个是adobe的brackets吗?

@emohacker Adobe的brackets用过,据说支持zencoding, 但我下载试用并不支持,不知道是否需要另外安装插件,而且目前功能有点简单。

@keithl 这个方法给了我一点灵感,我调试网页的时候,先放一个js让页面每几秒刷新一次,这样也可行吧。


@AntiGameZ
@nikejaycn
两个显示器怎么配置呢?

感谢大家的回答~~
也不是不靠谱,主要是你这个人靠谱不靠谱。。。
2012-12-21 10:51:05 +08:00
回复了 gaolinjie 创建的主题 Android 用 android webview 显示 html 效果和浏览器不同
对TABLE不熟悉。


.fl { float:right; }

<ul>
<li>
<h3 class="author"><span class="avatar fl"><img /></span></h3>
<div class="reply_content"></div>
</li>
</ul>
2012-12-13 02:23:19 +08:00
回复了 perrydu 创建的主题 问与答 有哪些CentOS 6搭建VPN的方法推荐?
@isy mac或iOS上都是服务器没响应。好奇怪。
2012-12-10 12:17:52 +08:00
回复了 Sukizen 创建的主题 MySQL SELECT时候,如何处理某字段空值?
@fangzhzh 再次感谢。
新手学语言,还是测试一次最能吸收。
昨天测试过了,DESC LIMIT 10 我知道什么意思,我复制代码提问的时候,忘记去掉了,谢谢你的提醒。

我因为要或者不同类型的数据,导致一个页面查询很多次,不知道有什么好的方法让查询次数少一点呢。
以下是我在对discuz作修改的时候加入的代码,请赐教。
我的想法:
1、获取新主题,但是过滤上级论坛分类 ( fup not in (6) ),过滤匿名发表的主题(author !='')。
2、获取最近回复的主题,同样论坛分类 6 ( fup not in (6) ),过滤匿名发表的主题(author !='')。
3、由于上级论坛分类6是一个原创专区,所以我单独获取这个分区的最新帖子。

//newthread start
$colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
$hack_cut_str = 50;
$hack_cut_strauthor = 9;
$new_post_threadlist = array();
$nthread = array();
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE f.fup not in (6) AND t.fid<>'$fid' AND f.fid=t.fid AND f.fid not in (0) AND t.displayorder not in (-1,-2) AND author !='' ORDER BY t.dateline DESC LIMIT 0, 20");
while($nthread = $db->fetch_array($query)) {
$nthread['forumname'] = strip_tags($nthread['name']);
$nthread['view_subject'] = cutstr($nthread['subject'],$hack_cut_str);
$nthread['view_author'] = cutstr($nthread['author'],$hack_cut_strauthor);
$nthread['date'] = dgmdate("$dateformat $timeformat", $nthread['dateline'] + $timeoffset * 3600);
$nthread['lastreplytime']= dgmdate("$dateformat $timeformat", $nthread[lastpost] + ($timeoffset * 3600));
if($nthread['highlight']) {
$string = sprintf('%02d', $nthread['highlight']);
$stylestr = sprintf('%03b', $string[0]);
$nthread['highlight'] = 'style="';
$nthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
$nthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
$nthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
$nthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
$nthread['highlight'] .= '"';
} else {
$nthread['highlight'] = '';
}
$new_post_threadlist[] = $nthread;
}
//newthread end

//newreply start
$new_reply_threadlist = array();
$rthread = array();
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE f.fup not in (6) AND t.fid<>'$fid' AND f.fid=t.fid AND t.closed NOT LIKE 'moved|%' AND t.replies !=0 AND f.fid not in (0) AND t.displayorder not in (-1,-2) AND author !='' ORDER BY t.lastpost DESC LIMIT 0, 20");
while($rthread = $db->fetch_array($query)) {
$rthread['forumname'] = ereg_replace('<[^>]*>','',$rthread['name']);
$rthread['view_subject'] = cutstr($rthread['subject'],$hack_cut_str);
$rthread['view_lastposter'] = cutstr($rthread['lastposter'],$hack_cut_strauthor);
$rthread['date']= dgmdate("$dateformat $timeformat", $rthread['dateline'] + $timeoffset * 3600);
$rthread['lastreplytime']= dgmdate("$dateformat $timeformat", $rthread[lastpost] + ($timeoffset * 3600));
if($rthread['highlight']) {
$string = sprintf('%02d', $rthread['highlight']);
$stylestr = sprintf('%03b', $string[0]);
$rthread['highlight'] = 'style="';
$rthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
$rthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
$rthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
$rthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
$rthread['highlight'] .= '"';
} else {
$rthread['highlight'] = '';
}
$new_reply_threadlist[] = $rthread;
}
//newreply end

//myspace start
$my_post_threadlist = array();
$mythread = array();
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE f.fup in (6) AND t.fid<>'$fid' AND f.fid=t.fid AND f.fid not in (0) AND t.displayorder not in (-1,-2) AND author !='' ORDER BY t.dateline DESC LIMIT 0, 20");
while($mythread = $db->fetch_array($query)) {
$mythread['forumname'] = strip_tags($mythread['name']);
$mythread['view_subject'] = cutstr($mythread['subject'],$hack_cut_str);
$mythread['view_author'] = cutstr($mythread['author'],$hack_cut_strauthor);
$mythread['date'] = dgmdate("$dateformat $timeformat", $mythread['dateline'] + $timeoffset * 3600);
$mythread['lastreplytime']= dgmdate("$dateformat $timeformat", $mythread[lastpost] + ($timeoffset * 3600));
$my_post_threadlist[] = $mythread;
}
//myspace end
2012-12-10 01:28:06 +08:00
回复了 soulhacker 创建的主题 分享发现 美味爱读 ReadWise.net
@Sunng digwhy@gmail thx!
2012-12-09 14:57:29 +08:00
回复了 Sukizen 创建的主题 MySQL SELECT时候,如何处理某字段空值?
@fangzhzh 请教一下:
如果我只想得出 authorid 是 1 的数据,并且按照时间排序。下面语句是否正确:
$sql = "SELECT author,tags,subject,tid,authorid,dateline,fid FROM threads WHERE authorid ='1' ORDER BY dateline DESC LIMIT 10"
推荐 HEAD FIRST PYTHON.
2012-12-07 10:59:18 +08:00
回复了 Sukizen 创建的主题 MySQL SELECT时候,如何处理某字段空值?
@regmach 感谢!
因为我的空值是 ''
所以我根据你的找出了

$sql = "SELECT author,tags,subject,tid,authorid,dateline,fid FROM threads WHERE tags !='' ORDER BY dateline DESC LIMIT 10"

并且是有效的。
不要等到期才转,转入新的注册商一般会收取转入费并且延期一年(等于续费)
GD的优惠还是挺多的,而且价格也算不错的。
如果怕被墙,建议用DNSPOD。
1 ... 58  59  60  61  62  63  64  65  66  67 ... 68  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3066 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 39ms · UTC 10:45 · PVG 18:45 · LAX 03:45 · JFK 06:45
Developed with CodeLauncher
♥ Do have faith in what you're doing.