技术文章
网维维护中常用网的络命令
常用网络命令netshell命令行设置DNSnetsh interface ip set dns wlan static 223.6.6.6netsh interface ip set dns wlan dhcp命令行设置IP地址netsh interface ip set address wlan dhcpnetsh interface ip set address wlan static 19
windows ad 配置ntp服务器
Windows Server 2012 R2NTP是什么NTP服务器【Network Time Protocol(NTP)】是用来使计算机时间同步化的一种协议,它可以使计算机对其服务器或时钟源(如石英钟,GPS等等)做同步化,它可以提供高精准度的时间校正(LAN上与标准间差小于1毫秒,WAN上几十毫秒),且可介由加密确认的方式来防止恶毒的协议攻击。为什么要设置NTP如果多台AD之间的时间不同步,会
php接收命令行参数
通常PHP都做http方式请求了,可以使用GET or POST方式接收参数,有些时候需要在shell命令下把PHP当作脚本执行,比如定时任务。这就涉及到在shell命令下如何给php传参的问题,通常有三种方式传参。一、使用$argv or $argc参数接收<?php/** * 使用 $argc $argv 接受参数 */echo "接收到{$argc}个参数";print_r
判断 num 是不是 2 的指数倍
如何判断:如果 num 是 2^n (n是自然数) ,那么 num 可以不断的整除 2,直到 num = 1; 16;16/2=8;8/2=4;4/2=2;2/2=1; 24;24/2=12;12/2=6;6/2=3;3/2 不整除#include <stdio.h>#include <stdbool.h>bool is_power_two(int n)