摘要: 写一个php的猜数字的小程序,提高自己对php的熟悉程度。 总结: 1.第2行代码:$number = (isset($_POST['number'])) ? $_POST['number']:$count; 这样写可以保证每次刷新页面时答案不会变化; 2.第18行代码:header("Locati 阅读全文
posted @ 2017-03-04 15:45 godlei 阅读(2065) 评论(0) 推荐(0)
摘要: 关于phpstorm配置php开发环境,大多数资料都是直接推荐安装wapmserver。而对于如何配置自定义的PHP环境和Apache则很少提到。本文就是说明如何在phpstorm中配置已经安装好的PHP与apache。一、配置PHP解释器File>Settings>Languages&Framew 阅读全文
posted @ 2017-03-01 20:52 godlei 阅读(37620) 评论(0) 推荐(0)
摘要: 第一次搭建Apache+PHP+MySQL的开发环境,发现Apache与PHP的整合非常麻烦,先整理记录如下: 一、安装Apache 1.登录http://httpd.apache.org/download.cgi 2.如图所示,选择某个版本的 “Files for Microsoft Window 阅读全文
posted @ 2017-02-26 18:42 godlei 阅读(62240) 评论(1) 推荐(2)
摘要: MySQL的安装比较常用,为方便以后查找,所以记录在此。 1.登录官网 https://dev.mysql.com/downloads/,下载社区版本; 2.双击程序安装,选择接受许可条款“I accept the license terms”; 3.选择想MySQL类型,一般选择“Server o 阅读全文
posted @ 2017-02-26 17:36 godlei 阅读(440) 评论(0) 推荐(0)
摘要: 题目描述: Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra sp 阅读全文
posted @ 2016-07-05 00:40 godlei 阅读(152) 评论(0) 推荐(0)
摘要: 题目描述: Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. If the number of nodes is not a multiple of k  阅读全文
posted @ 2016-07-05 00:39 godlei 阅读(461) 评论(0) 推荐(0)
摘要: 题目描述: Given a linked list, swap every two adjacent nodes and return its head. 解题分析: 解题思路很简单,就是先两两扫描,然后调换顺序即可。这道题的难点在于每个节点的next域指向问题,所以解这样的题最好可以在纸上写一下交 阅读全文
posted @ 2016-07-05 00:37 godlei 阅读(251) 评论(0) 推荐(0)
摘要: 题目描述: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 解题分析: 解题思路很简单,就是先两两排序,不断减小链表数量,最后将所有数组织成一个有序链 阅读全文
posted @ 2016-07-05 00:34 godlei 阅读(200) 评论(0) 推荐(0)
摘要: 题目描述: Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. 解题分析: 这类题一般都要用递归的方法来解决。需要设两个集合类分别存储待匹配的( 阅读全文
posted @ 2016-07-05 00:31 godlei 阅读(173) 评论(0) 推荐(0)
摘要: 题目描述: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 解题 阅读全文
posted @ 2016-07-05 00:29 godlei 阅读(147) 评论(0) 推荐(0)