V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  huijiewei  ›  全部回复第 55 页 / 共 58 页
回复总数  1147
1 ... 47  48  49  50  51  52  53  54  55  56 ... 58  
2015-05-28 11:20:27 +08:00
回复了 DreamCMS 创建的主题 分享发现 MI 小米官网购物银联 6.2 折优惠(卡号 62 开头)
@DearTanker
@belin520

哈哈,这分行也是醉了啊。。
2015-05-28 11:01:10 +08:00
回复了 fghfjujiber 创建的主题 问与答 如何在不停服务器的情况下更新网站后端?
做个反向代理啊。要更新的时候先把旧系统放另外一个服务器,然后改下指向。

不要乱改DNS,DNS缓存会要你命
2015-05-28 10:57:47 +08:00
回复了 DreamCMS 创建的主题 分享发现 MI 小米官网购物银联 6.2 折优惠(卡号 62 开头)
10元封顶是什么鬼?
2015-05-26 15:45:05 +08:00
回复了 justlikemaki 创建的主题 数据库 千万级数据的表应该怎么设计分表规则?
噗。还没开始你就想着千万级的优化? 想太多了啊
2015-05-26 08:23:43 +08:00
回复了 Livid 创建的主题 NGINX Nginx 1.9.0: Stream
@geeklian 规则写起来简单一些吧
2015-05-21 10:23:34 +08:00
回复了 ChoateYao 创建的主题 程序员 公司项目越写越烂,想重构得不到支持,该走还是该留?
private function dMyQA($request, $response, $app)
{
$pageno = $request['pageNo'] ? $request['pageNo'] : 1;
//$request['uid']='18000000000';$request['date']=0;
if (!isset($request['uid']) || empty($request['uid'])) {
return (array('code' => '-1', 'message' => '缺少uid'));
}
$jxs = $this->quanxian($request['uid'], '0');
if ($jxs['jxs_brand']) {
$jxs['jxs_brand'] = str_replace('[', '', $jxs['jxs_brand']);
$jxs['jxs_brand'] = str_replace(']', '', $jxs['jxs_brand']);
$jxs['jxs_brand'] = str_replace('"', '', $jxs['jxs_brand']);
$brand = $this->db->create_mapper('product_lib_brand')->select('id')->where('pid in (' . $jxs['jxs_brand'] . ')')->find_all_by();
$brandlist = '';
foreach ($brand as $brand1) {
if ($brandlist) {
$brandlist .= ',' . $brand1['id'];
} else {
$brandlist = $brand1['id'];
}
}
$where = " and (car_name in (" . $brandlist . ") or car_name is null or car_name='')";
} else {
$where = '';
}

//print_r($brandlist);exit;
//$obj=$this->db->create_mapper('qa')
//->where(array('ans_user_id'=>$request['uid']));
if ($request['type'] == '1') {
$sqlcount = 'SELECT count(*) as count from qa as a left join qa as b on b.id=a.ask_id where a.ask_id<>0 and b.is_active=1 and a.ans_user_id=' . $request['uid']. ' and a.ans_from_id='.$request['jxs_id'].' GROUP BY a.ask_id';
$count = $this->db->getOne($sqlcount);
$page = $this->page($count, $pageno);
$sql = $sql = 'SELECT b.id as qid,b.title,b.cat,a.ans_user_name as qname,a.content as acontent,a.create_time,a.reply_num,c.name as class FROM qa as a left join qa as b on b.id=a.ask_id left join qa_cat as c on c.id=b.cat where a.ask_id<>0 and b.is_active=1 and a.ans_user_id=' . $request['uid'] . ' and a.ans_from_id='. $request['jxs_id'] .' GROUP BY a.ask_id order by a.create_time desc limit ' . $page['start'] . ',' . $page['pagesize'] ;

$row = $this->db->get_all($sql);
//print_r($sql);exit;
//$obj->where('ask_id<>0 and is_active=1');
} else {
$sqlcount = 'SELECT count(*) as count from qa left join qa_cat on qa_cat.id=qa.cat where qa.ask_id=0 and qa.is_active=1 and qa.id not in (select distinct ask_id from qa where ans_user_id=' . $request['uid'] . ') and dep_role=' . $jxs['depart_id'] . $where;////qa as b ON b.id=a.ask_id'; //where a.id=145 or a.id=139';
//$count=$this->db->getOne($sqlcount);
//echo $sqlcount;exit;
$page = $this->page($count, $pageno);
$sql = 'SELECT a.id as qid,a.car_name,a.title,a.cat,a.ans_user_name as qname,a.content as acontent,a.create_time,a.reply_num,c.name as class FROM qa as a left join qa_cat as c on c.id=a.cat where ask_id=0 and is_active=1 and a.id not in (select distinct ask_id from qa where ans_user_id=' . $request['uid'] . ') and c.dep_role=' . $jxs['depart_id'] . $where . ' order by a.create_time desc limit ' . $page['start'] . ',' . $page['pagesize'];
$row = $this->db->get_all($sql);
//print_r($sql);exit;
//$row=$this->db->query($sql);
//$obj->where('ask_id=0 and is_active=1');
}
//$count=$obj->count_by();


//$row=$obj->limit($page['pagesize'],$page['start'])->select('a.id as qid,a.title,a.cat,a.ans_user_name as qname,a.content as acontent,a.create_time,a.reply_num')
//->left_join('qa_cat as c','c.id=a.cat','c.name as class')
//->find_all_by();
foreach ($row as $key => $val) {
$row[$key]['qname'] = $this->hidtel($val['qname']);
$row[$key]['date'] = date('Y-m-d H:i:s', $val['create_time']);
//$row[$key]['url']=$this->h5url.'ywbd/do_index&id='.$val['qid'];
if ($request['type'] == '1') {
unset($row[$key]['reply_num']);
}
}
$row = $this->clearNull($row);
return (array('code' => '1', 'pageNo' => $page['pageno'], 'pageTotal' => $page['pagetotal'], 'pageSize' => $page['pagesize'], 'message' => 'success ', data => $row));

}

这种代码怎么维护,求老司机带

系统里面全是这种代码
2015-05-20 10:04:29 +08:00
回复了 yakczh 创建的主题 问与答 有哪个发行版的字体比 windows 下的字体好看?
Windows 的字体不统一就逼死强迫症了。

还是 rMBP 好。
2015-05-18 13:06:02 +08:00
回复了 cyl19910101 创建的主题 HTTP REST 中身份验证方式选用 Token 的理由?
虽然 Session 也是通过 Cookie(通过 Http Header 传输)或者 Url 传输,但是各种 Web 语言和框架为了会给 Session 加锁,这样的话,同样的 Session 请求只能按顺序执行,会引起并发问题。

ASP.NET 肯定是这样的,PHP 的没测试过,谁有空测试下就知道了。
2015-05-06 17:22:58 +08:00
回复了 assembler 创建的主题 问与答 请分享一下你的戒烟经验 OR 给些意见
不见外面的天不抽烟。

烟瘾最大的时候就是坐在那里无聊的时候。
2015-05-02 15:08:45 +08:00
回复了 facat 创建的主题 问与答 ngrok 用的是什么原理?
但是客户端可以连服务器

WEB 用户 <-------> ngrok 服务器 <-----------> ngrok 客户端
2015-05-02 13:30:33 +08:00
回复了 facat 创建的主题 问与答 ngrok 用的是什么原理?
所有人访问都是经过 ngrok 服务器中转
2015-05-01 15:19:27 +08:00
回复了 ivmm 创建的主题 问与答 unix:///var/run/supervisor.sock no such file
supervisor 运行成功了没有?看 supervisor 的配置文件和日志
2015-05-01 11:29:34 +08:00
回复了 yangzh 创建的主题 问与答 请问如何升级 Visual Studio 2013 到 2015?
Visual Studio 系列一直都是可以共存,直接安装 2015 使用就是了。2013 还可以继续用,不想要了就卸载
2015-04-30 14:31:33 +08:00
回复了 Heracles 创建的主题 MacBook Pro 月经话题:买 13 还是 15 寸
我肯定选13寸的。起码带着方便
2015-04-30 13:41:08 +08:00
回复了 bazingaterry 创建的主题 程序员 VS 支持 Mac + Linux 了
@clino 你用过 VS 吗?
2015-04-27 19:57:31 +08:00
回复了 csensix 创建的主题 问与答 求 Slim PHP 资源推荐
Laravel 也出了微框架, Lumen,鉴于 Laravel 社区的活跃,对于 Lumen 还是很看好的。
2015-04-26 18:40:19 +08:00
回复了 EchoChan 创建的主题 macOS 为什么 os X 上得视频播放软件比 windows 平台的差那么多?
@ynyounuo 你这个想法太极端了啊,

OSX 现在的软件整体比 Windows 差是不争的事实,

不过我越来越喜欢这种简单。哈哈
@caoyue 高速分布式缓存可以这样用,基础数据库结构这样设计可以算严重事故类型了
2015-04-21 13:27:12 +08:00
回复了 Jack 创建的主题 问与答 小公司内部文件共享系统用啥方案合适?
NAS
这种一般都是 NoSQL 数据库
1 ... 47  48  49  50  51  52  53  54  55  56 ... 58  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3762 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 37ms · UTC 04:36 · PVG 12:36 · LAX 21:36 · JFK 00:36
Developed with CodeLauncher
♥ Do have faith in what you're doing.