通过批处理控制网卡接口

将内网网卡名改为"lan",将外网网卡名改为"wlan"

REM copyright dftg.net

@echo off
set /p input=a:内网/b:外网/c:禁用/d:开启

if "%input%"=="a" goto MA
if "%input%"=="b" goto MB
if "%input%"=="c" goto MC
if "%input%"=="d" goto MD
if not "%input%"== "a" (if not "%input%"=="b"(if not "%input%"=="c" (if not "%input%"=="d" goto ME)))

:MA
echo 单开内网
netsh interface set interface "lan" enabled
netsh interface set interface "wlan" disabled
ping 133.64.8.1 -n 10
echo 设置完成!
pause>nul
exit

:MB
echo 单开外网
netsh interface set interface "lan" disabled
netsh interface set interface "wlan" enabled
ping baidu.com -n 10
echo 设置完成!
pause>nul
exit

:MC
echo 禁用网络
netsh interface set interface "lan" disabled
netsh interface set interface "wlan" disabled
echo 设置完成!
pause>nul
exit

:MD 
echo 开启网络
netsh interface set interface "lan" enabled
netsh interface set interface "wlan" enabled
echo 设置完成!
pause>nul
exit

:ME
echo 啥都没干,退下!
pause>nul
exit

文本加密和猴子分桃

两道编程小题:

  1. 某个公司采用公用电话传递数据,数据是四位的整数,在传递过程中是加密的,加密规则如下:每位数字都加上5,然后用和除以10的余数代替该数字,再将第一位和第四位交换,第二位和第三位交换。
#include <iostream>
using namespace std;

int main ()
{
   int n[ 4 ]= {3,5,7,9}; 
   int p[4]={0,0,0,0 };
   int jh =0 ;
   
for (int c=0;c<4;c++)  
{
	p[c]=(n[c]+5)%10;
}

jh=p[0];p[0]=p[3];p[3]=jh;
jh=p[1];p[1]=p[2];p[2]=jh;

cout<<endl<<"Encrypted Code: ";   

 for ( int j = 0; j < 4; j++ ) 
   {
       cout <<  p[ j ] ;
   }
   return 0;
}
  1. 海滩上有一堆桃子,五只猴子来分。第一只猴子把这堆桃子平均分为五份,多了一个,这只猴子把多的一个扔入海中,拿走了一份。第二只猴子把剩下的桃子又平均分成五份,又多了一个,它同样把多的一个扔入海中,拿走了一份,第三、第四、第五只猴子都是这样做的,问海滩上原来最少有多少个桃子?
#include <iostream>
using namespace std;

int main()
{
    int s, l, t,i;
    l = 1;
        for (i=1; i<5; i++)
            l *= 5;
        s = 1+5*(l-1);
        t = s;
        for (i=1; i<=4; i++)
            t = (t-1)/5*4;
       cout<<s<<endl;
    return 0;
}

JingOS试用体验

JingOS-全球首个基于ARM架构,专为平板打造的Linux。

此次为虚拟机安装试用体验,虚拟机配置如下:

虚拟机配置

LiveCD系统体验

磁盘检查&引导加载

jingos-2021-03-17-17-13-17.png

jingos-2021-03-17-17-13-32.png

欢迎界面

jingos-2021-03-17-17-15-13.png

jingos-2021-03-17-17-15-19.png

默认的PIN为123456

jingos-2021-03-17-17-15-05.png

锁屏界面,上划解锁

jingos-2021-03-17-17-14-46.png

home页,底部为dash区域