Golang 【basic_leaming】切片
实例: <!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> &l
原创 2天前
29阅读
MySQL 设计数据表时,时间类型 datetime、bigint、timestamp MySQL日期函数
 Google is a wonderful ! While most of us use it for searching the web for infor
原创 2天前
10阅读
Golang 【basic_leaming】流程控制
原创 2天前
29阅读
1. 合并数组array_merge()函数将数组合并到一起,返回一个联合的数组。所得到的数组以第一个输入数组参数开始,按后面数组参数出现的顺序依次迫加。其形式为:array array_merge (array array1 array2…,arrayN) 这个函数将一个或多个数组的单元合并起来,一个数组中的值附加在前一个数组的后面。返回作为结果的数组。如果输入的数组中有相...
Golang 【basic_leaming】数组
一、权限分类图: 二、默认的权限设置权限不需要设置,如何实现: 在hasPr
原创 2天前
16阅读
SSH 常见权限设计五:权限分类
Golang 【basic_leaming】基本数据类型
1.  网址的格式: function checkUrl($weburl) { return !ereg("^http(s)*://[_a-zA-Z0-9-]+(.[_a-zA-Z0-9-]+)*$", $weburl); } 2 . 判断http 地址是否有效 function url_exists($url){ $ch = curl_init();...
php
原创 2天前
24阅读
提交页面 shorten.php:  <form method="post" action="show.php"> <input type="text" name="url" value="" style="width:800px;padding:3px 7px;" /> <input type
原创 2天前
29阅读
Golang【Web 入门】 08 集成 Gorilla Mux
Golang【Web 入门】 07 路由 - http.ServeMux
原创 2天前
26阅读
Golang【Web 入门】 07 路由 - http.ServeMux
基本类型,或者叫做内置类型,是JAVA中不同于类的特殊类型。它们是我们编程中使用最频繁的类型,因此面试题中
Windows 安装 curl、touch、tree
出于安全的考虑,常常会关闭fopen, file_get_contents, 也就是会把 allow_url_fopen设置为OFF,如果想要继续使用这些函数,就可以用到这个类。  <?php/* used for the transmission RPC connection * and the SABnzbd+ file submit */...
原创 2天前
13阅读
  <?php /** * File: Browser.php * Author: Chris Schuld (http://chrisschuld.com/) * http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/ * Last Modified:...
对于class定义,格式如下:[public|protected|private] [abstract|final] class 类名{ //类的内容 ....} 前面是modifier。需要特别说明的是,对于一个JAVA文件,要求里面一定只能有一个和该文件同名的public类。但是倒不是说一个JAVA文件只能有一个类://file name: ClassDeinfeDemo.ja...
(一)相关类  class A { public String show(D obj){ return ("A and D"); } public String show(A obj){ return ("A and A"); } }...
原创 2天前
33阅读
 1. 一维数组的声明方式:type var[]; 或type[] var; 声明数组时不能指定其长度(数组中元素的个数), Java中使用关键字new创建数组对象,格式为:数组名 = new 数组元素的类型 [数组元素的个数] 实例:TestNew.java:  public class TestNew { public ...
原创 2天前
23阅读
abstract class和interface是Java语言中对于抽象类定义进行支持的两种机制,正是由于这两种机制的存在class和interface的选择显得比较随意。其实,两者之间还是有很...
原创 2天前
36阅读
 final定义的变量可以看做一个常量,不能被改变; final定义的方法不能被覆盖; final定义的类不能被继承。 final static 就是再加上static的特性就可以了  static 和final是没有直接关系的  static 是在内存中分配一块区域,供整个类通用,所有的类的对象都享有它的共同的值  static 和final的区别  ...
原创 2天前
43阅读
 /** * 将一个字串中含有全角的数字字符、字母、空格或'%+-()'字符转换为相应半角字符 * @access public * @param string $str 待转换字串 * @return string $str 处理后字串 */function make_semiangle($str){ $arr = array('0' =...
JavaScript实现暂停功能  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script language="javascript">  /*Javascript中暂停功能的实现  Javascript本身没有暂停功能(sleep不能使用)同时 ...
原创 2天前
27阅读
1)简要说明 with 语句可以方便地用来引用某个特定对象中已有来
IE的调试工具 - Companion.JSCompanion.JS是一个免费的基于IE的js调试工具,它提供IE如下的功能:详细错误报告(包括call stack和出错的的
This is really useful if you don’t have an email server.Using your Gmail account for sending emails is great ;)Steps: Dowload the latest version of PHPmailer class Include it in your script Test wi...
原创 2天前
24阅读
问题产生如下: 因为单位使用了过滤,访问Internet时,超过10M的内容就
原创 2天前
39阅读
除了利用cookies、IP限制等技术外,我们可以利用PHP自身带的similar_text函数来判断用户发帖内容的相似度。     similar_text() 函数计算两个字符串的匹配字符的数目,也可以计算两个字符串的相似度(以百分比计)。     语法similar_text(string1,string2,percent)参数 描述 st...
原创 2天前
29阅读
1. 直接采用file函数来操作 注:由于 file函数是一次性将所有内容读入内存,而php为了防止一些写的比较糟糕的程序占用太多的内存而导致系统内存不足,使服务器出现宕机,所以默认情况下限制只能最大使用内存16M,这是通过php.ini里的 memory_limit = 16M来进行设置,这个值如果设置-1,则内存使用量不受限制. 下面是一段用file来取出这具...
原创 2天前
42阅读