#!/usr/bin/envpython#coding=utf-8importMySQLdbimportredisimportosimportsocket,fcntl,struct#printredis._file_defget_ip_address(ifname):s=socket.socket(socket.AF_INET,socket.SOCK_DGRAM)returnsocket.inet_ntoa(fcntl.ioctl(s.fileno(),0x8915,#SIOCGIFADDRstruct.pa..
分类:
编程语言 时间:
2014-12-04 15:50:08
阅读次数:
194
第一步:vim /etc/mysql/my.cnf找到bind-address = 127.0.0.1注释掉这行,如:#bind-address = 127.0.0.1或者改为:bind-address = 0.0.0.0允许任意IP访问;或者自己指定一个IP地址。重启 MySQL:sudo /et...
分类:
数据库 时间:
2014-12-04 15:34:54
阅读次数:
206
Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given"25525511135",return["255.2...
分类:
其他好文 时间:
2014-12-03 22:50:26
阅读次数:
136
Qt获取本机IP地址:Qt版本:4.8.6#include QString ipAddr; QList list = QNetworkInterface::allAddresses(); foreach (QHostAddress address, list) { ...
分类:
其他好文 时间:
2014-12-03 21:03:05
阅读次数:
214
39bits地址线,4K页时3级页表,64K页时2级页表。 In terms of MMU, it currently supports 39-bit address space for user and kernel (each) with 3-level page table and 4KB pages or 2-level page table and...
分类:
其他好文 时间:
2014-12-03 17:19:47
阅读次数:
190
#include #include #pragma comment(lib,"ws2_32.lib")void print_ip(int ip){ unsigned char bytes[4]; bytes[0] = ip & 0xFF; bytes[1] = (ip >> 8) & 0xFF; b...
分类:
其他好文 时间:
2014-12-03 11:52:27
阅读次数:
207
Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given"25525511135",return["255.2...
分类:
其他好文 时间:
2014-12-02 22:12:13
阅读次数:
163
/**
* 百度地图 根据地址反查经纬度
*/
public function search_xy(“北京市朝阳区”,"首都图书馆"){
$address = str_replace(' ','',$address);
$rows = file_get_contents("http://api.map.baidu.com...
当我们使用公开属性以及公开字段时,都可以顺利的被序列化,view sourceprint?01.[Serializable]02.public class MyClass03.{04. public int ID;05.06. public string Address;07.08. private...
sed要定位,用ADDRESS行号(也可是范围“起始位置,终止位置‘),或者/PATTERN/匹配,而后是编辑命令a(append),i(insert),s(replace)sed‘/exportPATH=/a\abc‘.bashrc(addwholeLine)sed‘s/exportPATH=/exportPATH=abc:/‘.bashrcinsertsomethingafterpattern
分类:
其他好文 时间:
2014-12-02 00:18:15
阅读次数:
157