0xff & ~(1<<0),0xff & ~(1<<1)这两个值是多少?

图片说明
就是这个

2个回答

0xff & ~(1<<1)的计算过程:
1 的二进制是
    0000 0000 0000 0001
<<1  左移1位变成
    0000 0000 0000 0010
~  按位取反变成
    1111 1111 1111 1101

0xff 的二进制是 0000 0000 1111 1111

按位“与”运算
    0000 0000 1111 1111
&
    1111 1111 1111 1101
=
    0000 0000 1111 1101

0000 0000 1111 1101 的十进制是 253

Panmarlboro
00朗姆 多谢了
大约一年之前 回复

254 253
可以在这里在线验证:
https://c.runoob.com/compile/11

printf("%d",0xff & ~(1<<1));
caozhy
每个人都有一个梦才不会孤单的说话就有天堂 回复00朗姆: 如果问题解决,请点我回答左上角的采纳,谢谢
大约一年之前 回复
Panmarlboro
00朗姆 多谢多谢
大约一年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
int类型的数据&0xff会变成什么类型?
char buf[512]; int i; if (buf[i] != (i & 0xff)) 问题:i & 0xff结果会变成什么类型? 结果显示buf[i] = 0x80和 i = 0x80居然不相等,是不是符号的问题?
通过二进制发送图片,在接收时为什么有的地方用0xff来判断最后一个字符
在很多地方见到这种用法 unsigned char ui8End1,ui8End2; ui8End1,ui8End2; ui8End1表示最后一个字符,为什么会通过下面这种判断来表示 if (ui8End1 != 0xff || ui8End2 != 0xd9)
C语言编译执行返回255(0xFF)且时间为2秒多是怎么回事?
线性表顺序存储结构实现,内含int数组成员的结构体声明为指针类型,调用初始化函数x给其中的数组成员赋值时,编译执行非常慢,且printf无法输出内容。 返回结果: Process returned 255 (0xFF) execution time 2.144s 代码片段如下: ``` #include <stdio.h> #define OK 1 #define ERROR 0 #define ERROR_EXIT -1 #define MAXSIZE 30 typedef int Status; typedef int ElemType; typedef struct { ElemType data[MAXSIZE]; int len; }*SQLIST; Status listInit(SQLIST L) { int len = 10; int i = 0; for(;i<len;i++) { L->data[i] = i; // 这行导致程序问题,请指教 } L->len = 10; return OK; } Status listShow(SQLIST L) { return OK; } int main() { SQLIST L; listInit(L); printf("%d\n",L->len); return OK; } ```
ESP8266 串口接收数据,当接收的数据中包含0xFF的时候,这个字节后的数据会被分成两次接收,如何解决?
ESP8266 串口接收随机数据,当接收的数据中包含0xFF的时候,这个字节后的数据有时候被分开,由于我发现了其实是触发两次 uart_recvTask(os_event_t *events) _这个函数来处理数据,由此实际上是触发了两次接收中断 例如我往ESP8266的串口发送 01 02 03 FF FF 00 37 12 53 75 12 73 57 12 FF FF 52 73 57 12 53 71 25 73 01 0F 这样子一组26个byte数据 然后ESP8266可能只接收到 01 02 03 FF 然后再次触发uart_recvTask(os_event_t *events) _来接收剩下的数据 这种情况不是每次都会发生,有时候会分成两次接收数据,有时候能一次性的接收完成的数据 这种问题该如何解决?
51单片机模拟spi控制电力载波芯片MI200E,发送0xaa,接收有显示,但不是0xaa。
想测试发送0xaa,但接收不对,而且接收更像是乱码,改了很多地方都不对,不知道问题出在哪里,希望各位大神帮忙看看代码错在哪。我用的keil3编译环境,51单片机,电力线载波芯片是MI200E,测试接收0xaa是通过8个led灯(也用串口显示过,和led灯显示相匹配)第一次提问题,不知道怎么把MI200E的数据手册和应用手册贴出来,在代码后贴出了文档在百度文库上的网址,麻烦各位大神了,小弟这次是碰到棘手困难了,在这先谢了。代码如下: /********发送程序*********************/ #include <reg52.h> #include <intrins.h> #define uchar unsigned char #define uint unsigned int //sbit MOSI=P1^0; //主设备发送从设备接收线,master output subordinate input //sbit MISO=P1^1; //从设备发送主设备接收线 master input subordinate output sbit SDO=P1^2; //p1.3口模拟主机输出 主设备发送从设备接收 sbit SDI=P1^1; //p3.2口模拟主机输入,接到外部中断0 主设备接收从设备发送 sbit sck=P1^3; //SPI时钟 sbit cs=P1^4; //片选 p1.3 sbit MI200E_RST=P1^5; //复位 sbit ceshi1=P0^6; sbit ceshi2=P0^7; uchar num; uchar RDSR_command; //用来读0x82 uchar CRC_H,CRC_L; uchar step,i; void delay(uint z);//延时 void cudelay_50us(); void init_MI200E();//初始化 void Write_CommandReg(uchar add,uchar com);//写控制指令 uchar Read_CommandReg(uchar add);//读控制指令 void Write_DataReg(uchar add,uchar dat);//写数据,dat应是16位的 void Write_DataReg2(uchar add,uchar dat_H,uchar dat_L);//改进,将高低8位分开发送 uchar Read_DataReg(uchar add);//读数据 void send(); void delay(uint z) { uint x,y; for(x=z;x>0;x--) for(y=110;y>0;y--); } void cudelay_50us() { uchar i; for(i=0;i<5;i++); } void init_MI200E() //初始化 { MI200E_RST=0; delay(600); //要求延时超过500ms MI200E_RST=1; delay(60); //要求延时超过50ms Write_CommandReg(0x01,0xFF); Write_CommandReg(0x0C,0x58); Write_CommandReg(0x0D,0x01); //应用笔记这样写 // Write_CommandReg(0x0D,0x0A); //数据手册这样写 Write_CommandReg(0x10,0x66); Write_CommandReg(0x12,0x66); Write_CommandReg(0x14,0x66); Write_CommandReg(0x11,0x88); Write_CommandReg(0x13,0x88); Write_CommandReg(0x15,0x88); Write_CommandReg(0x07,0xFF); Write_CommandReg(0x0A,0x00); Write_CommandReg(0x0B,0x00); } void init() { TMOD=0x01;//设置定时器0工作方式1 TH0=(65536-2293)/256;//定时5ms TL0=(65536-2293)%256; EA=1; ET0=1;//开定时器0 TR0=1;//启动定时器0 } //写入控制寄存器 void Write_CommandReg(uchar add,uchar com) { uchar i; uchar mark; cs=0; mark=0x80; _nop_(); //_nop_();延时1us _nop_(); for(i=0;i<8;i++) { sck=0; _nop_(); if(add&mark) { SDO=1; } else { SDO=0; } sck=1; _nop_(); mark>>=1; } mark=0x80; for(i=0;i<8;i++) { sck=0; _nop_(); if(com&mark) { SDO=1; } else { SDO=0; } sck=1; _nop_(); mark>>=1; } _nop_(); sck=0; cs=1; } //读取控制寄存器 uchar Read_CommandReg(uchar add) //时序有问题,返回的readdata有三个高,目测是TI、carr和 { //Frame,但P2口值检测出Frame为高 uchar i; uchar mark; uchar readdata; cs=0; mark=0x80; _nop_(); _nop_(); for(i=0;i<8;i++) { sck=0; // _nop_(); if(add&mark) { SDO=1; } else { SDO=0; } sck=1; _nop_(); mark>>=1; } _nop_(); _nop_(); for(i=0;i<8;i++) { //此处不能加延时 sck=0; _nop_(); readdata<<=1; if(SDI) { readdata|=1; } else { readdata&=0xFE; } sck=1; _nop_(); } _nop_(); sck=0; _nop_(); cs=1; return(readdata); } //写入数据寄存器 void Write_DataReg(uchar add,uchar dat) { uchar i; uchar mark; uchar marklong; cs=0; mark=0x80; marklong=0x8000; _nop_(); _nop_(); for(i=0;i<8;i++) { sck=0; _nop_(); if(add&mark) { SDO=1; } else { SDO=0; } sck=1; _nop_(); mark>>=1; } for(i=0;i<16;i++) { sck=0; _nop_(); if(dat&marklong) { SDO=1; } else { SDO=0; } sck=1; _nop_(); marklong>>=1; } _nop_(); sck=0; cs=1; } void Write_DataReg2(uchar add,uchar dat_H,uchar dat_L) { uchar i; uchar mark; uint marklong; cs=0; mark=0x80; marklong=0x8000; _nop_(); _nop_(); for(i=0;i<8;i++) { sck=0; _nop_(); if(add&mark) { SDO=1; } else { SDO=0; } sck=1; _nop_(); mark>>=1; } for(i=0;i<8;i++) { sck=0; _nop_(); if(dat_H&mark) { SDO=1; } else { SDO=0; } sck=1; _nop_(); mark>>=1; } for(i=0;i<8;i++) { sck=0; _nop_(); if(dat_L&mark) { SDO=1; } else { SDO=0; } sck=1; _nop_(); mark>>=1; } _nop_(); sck=0; cs=1; } //读取数据寄存器 uchar Read_DataReg(uchar add) { uchar i; uchar mark; uint readdata; cs=0; mark=0x80; readdata=0; _nop_(); _nop_(); for(i=0;i<8;i++) { sck=0; _nop_(); if(add&mark) { SDO=1; } else { SDO=0; } sck=1; _nop_(); mark>>=1; } _nop_(); _nop_(); for(i=0;i<16;i++) { sck=0; _nop_(); readdata<<=1; if(SDI) { readdata|=1; } else { readdata&=0xFE; } sck=1; _nop_(); } _nop_(); sck=0; cs=1; return(readdata); } void send() { // Write_CommandReg(0x01,0x01); //bit6~4扩频码字,bit3~2波特率选择,bit1~0载波频率 //配置进入发送状态 switch(step) { case 0: { Write_CommandReg(0x01,0x0d);//将0x01的bit2、3至高,其余不变,以最低速率发送bit2、3 // Write_CommandReg(0x02,0x00);//将TI复位 Write_DataReg2(0x04,0xff,0xff); //发送0xff,0xff引导码 step=1; } break; case 1: { Write_CommandReg(0x02,0xfd);//将0x02的CRC清零 // Write_CommandReg(0x02,0x00);//将TI复位 Write_DataReg2(0x04,0x1a,0x0c);//发送bit3 0x1a和bit4 波特率和长度 step=2; } break; case 2: { Write_CommandReg(0x01,0x01);//将bit2、3恢复原设波特率1600和76.8kHZ // Write_CommandReg(0x02,0x00);//将TI复位 Write_DataReg(0x04,0xaa);//发送bit5,即使改成0xaaaa也不对 for(i=0;i<10;i++) //延时50us { _nop_(); _nop_(); _nop_(); _nop_(); _nop_(); } CRC_H=Read_CommandReg(0xa8); //读CRC CRC_L=Read_CommandReg(0xa9); step=3; } break; case 3: { // Write_CommandReg(0x02,0x00);//将TI复位 Write_DataReg2(0x04,CRC_H,CRC_L);//发送CRC step=0; } break; default: {delay(10);} break; } } void main() { init(); init_MI200E(); Write_CommandReg(0x02,0x80); Write_DataReg2(0x04,0xff,0xff); Write_CommandReg(0x01,0x01); //bit6~4扩频码字,bit3~2波特率选择,bit1~0载波频率 step=0; sck=0; SDI=1; while(1); } void timer0() interrupt 1//2.5ms { // P1|=1; TH0=(65536-2293)/256;// TL0=(65536-2293)%256;//重装初值 // Write_CommandReg(0x02,0x80); RDSR_command=Read_CommandReg(0x82); P2=RDSR_command; if((RDSR_command & 0x80)==0x80) //每隔2.5ms查询0x82,判断bit7 TI是否为1 { ceshi2=0; // P1&=0xFE; Write_CommandReg(0x02,0x00);//将TI复位 // delay(5); send(); //TI为1执行发送,TI为1往发送寄存器写入数据,之后TI需复位 // Write_CommandReg(0x01,0x0d);//将0x01的bit2、3至高,其余不变,以最低速率发送bit2、3 // Write_DataReg2(0x04,0xff,0xff); //发送0xff,0xff引导码 // P1|=1; // P0=0xaa; } // P1&=0xFE; } /*************接收程序************************/ #include <reg52.h> #include <intrins.h> #define uchar unsigned char #define uint unsigned int //sbit MOSI=P1^0; //主设备发送从设备接收线,master output subordinate input //sbit MISO=P1^1; //从设备发送主设备接收线 master input subordinate output sbit SDO=P1^2; //p1.3口模拟主机输出 主设备发送从设备接收 sbit SDI=P1^1; //p3.2口模拟主机输入,接到外部中断0 主设备接收从设备发送 sbit sck=P1^3; //SPI时钟 sbit cs=P1^4; //片选 p1.3 sbit MI200E_RST=P1^5; //复位 sbit ceshi1=P0^6; sbit ceshi2=P0^7; uchar num; uchar RDSR_command; //用来读0x82 uchar RDRR_command; //用来读0x83 uchar RDRB0_DataReg; //用来读取数据寄存器0x84 uchar CRC_H,CRC_L,CRC_flag; uchar step,i; void delay(uint z); void cudelay_50us(); void init_MI200E(); void Write_CommandReg(uchar add,uchar com); uchar Read_CommandReg(uchar add); void Write_DataReg(uchar add,uchar dat); void Write_DataReg2(uchar add,uchar dat_H,uchar dat_L); uchar Read_DataReg(uchar add); void send(); void delay(uint z) { uint x,y; for(x=z;x>0;x--) for(y=110;y>0;y--); } void cudelay_50us() { uchar i; for(i=0;i<5;i++); } void init_MI200E() //初始化 { MI200E_RST=0; delay(600); //要求延时超过500ms MI200E_RST=1; delay(60); //要求延时超过50ms Write_CommandReg(0x01,0xFF); Write_CommandReg(0x0C,0x58); Write_CommandReg(0x0D,0x01); //应用笔记这样写 // Write_CommandReg(0x0D,0x0A); //数据手册这样写 Write_CommandReg(0x10,0x66); Write_CommandReg(0x12,0x66); Write_CommandReg(0x14,0x66); Write_CommandReg(0x11,0x88); Write_CommandReg(0x13,0x88); Write_CommandReg(0x15,0x88); Write_CommandReg(0x07,0xFF); Write_CommandReg(0x0A,0x00); Write_CommandReg(0x0B,0x00); } void init() { TMOD=0x01;//设置定时器0工作方式1 TH0=(65536-2293)/256;//定时5ms TL0=(65536-2293)%256; EA=1; ET0=1;//开定时器0 TR0=1;//启动定时器0 } //写入控制寄存器 void Write_CommandReg(uchar add,uchar com) { uchar i; uchar mark; cs=0; mark=0x80; _nop_(); //_nop_();延时1us _nop_(); for(i=0;i<8;i++) { sck=0; _nop_(); if(add&mark) { SDO=1; } else { SDO=0; } sck=1; _nop_(); mark>>=1; } mark=0x80; for(i=0;i<8;i++) { sck=0; _nop_(); if(com&mark) { SDO=1; } else { SDO=0; } sck=1; _nop_(); mark>>=1; } _nop_(); sck=0; cs=1; } //读取控制寄存器 uchar Read_CommandReg(uchar add) { uchar i; uchar mark; uchar readdata; cs=0; mark=0x80; _nop_(); _nop_(); for(i=0;i<8;i++) { sck=0; // _nop_(); if(add&mark) { SDO=1; } else { SDO=0; } sck=1; _nop_(); mark>>=1; } _nop_(); for(i=0;i<8;i++) { //此处不能加延时 sck=0; _nop_(); readdata<<=1; if(SDI) { readdata|=1; } else { readdata&=0xFE; } sck=1; // _nop_(); } _nop_(); sck=0; _nop_(); cs=1; return(readdata); } //写入数据寄存器 void Write_DataReg(uchar add,uchar dat) { uchar i; uchar mark; uchar marklong; cs=0; mark=0x80; marklong=0x8000; _nop_(); _nop_(); for(i=0;i<8;i++) { sck=0; _nop_(); if(add&mark) { SDO=1; } else { SDO=0; } sck=1; _nop_(); mark>>=1; } for(i=0;i<16;i++) { sck=0; _nop_(); if(dat&marklong) { SDO=1; } else { SDO=0; } sck=1; _nop_(); marklong>>=1; } _nop_(); sck=0; cs=1; } void Write_DataReg2(uchar add,uchar dat_H,uchar dat_L) { uchar i; uchar mark; uint marklong; cs=0; mark=0x80; marklong=0x8000; _nop_(); _nop_(); for(i=0;i<8;i++) { sck=0; _nop_(); if(add&mark) { SDO=1; } else { SDO=0; } sck=1; _nop_(); mark>>=1; } for(i=0;i<8;i++) { sck=0; _nop_(); if(dat_H&mark) { SDO=1; } else { SDO=0; } sck=1; _nop_(); mark>>=1; } for(i=0;i<8;i++) { sck=0; _nop_(); if(dat_L&mark) { SDO=1; } else { SDO=0; } sck=1; _nop_(); mark>>=1; } _nop_(); sck=0; cs=1; } //读取数据寄存器 uchar Read_DataReg(uchar add) { uchar i; uchar mark; uint readdata; cs=0; mark=0x80; readdata=0; _nop_(); _nop_(); for(i=0;i<8;i++) { sck=0; _nop_(); if(add&mark) { SDO=1; } else { SDO=0; } sck=1; _nop_(); mark>>=1; } _nop_(); _nop_(); for(i=0;i<16;i++) { sck=0; _nop_(); readdata<<=1; if(SDI) { readdata|=1; } else { readdata&=0xFE; } sck=1; _nop_(); } _nop_(); sck=0; cs=1; return(readdata); } void send() { // Write_CommandReg(0x01,0x01); //bit6~4扩频码字,bit3~2波特率选择,bit1~0载波频率 //配置进入发送状态 switch(step) { case 0: { Write_CommandReg(0x01,0x0d);//将0x01的bit2、3至高,其余不变,以最低速率发送bit2、3 Write_DataReg2(0x04,0xff,0xff); //发送0xff,0xff引导码 step=1; } break; case 1: { Write_CommandReg(0x02,0xfd);//将0x02的CRC清零 Write_DataReg2(0x04,0x1a,0x0c);//发送bit3 0x1a和bit4 波特率和长度 step=2; } break; case 2: { Write_CommandReg(0x01,0x01);//将bit2、3恢复原设波特率1600和76.8kHZ Write_DataReg(0x04,0xaa);//发送bit5 for(i=0;i<10;i++) //延时50us { _nop_(); _nop_(); _nop_(); _nop_(); _nop_(); } CRC_H=Read_CommandReg(0xa8); //读CRC CRC_L=Read_CommandReg(0xa9); step=3; } break; case 3: { Write_DataReg2(0x04,CRC_H,CRC_L);//发送CRC ceshi1=1; ceshi2=0; Write_CommandReg(0x02,0x00);//将TI复位 step=0; } break; default: {} break; } } void receive() { switch(step) { case 0: { RDRR_command=Read_CommandReg(0x83); if(RDRR_command!=0x00) { Write_CommandReg(0x01,0x81); step=1; } } break; case 1: { if((RDSR_command & 0x40)==0x40) { step=2; } else { step=1; } } break; case 2: { Write_CommandReg(0x02,0x7a);//将CRC标志位置1 RDRB0_DataReg=Read_DataReg(0x84);//读取0x84 Write_CommandReg(0x02,0x30);//将RI清零 P0=RDRB0_DataReg; step=3; } break; case 3: { CRC_flag=Read_DataReg(0x84);//读取CRC校验标志位 // P0=CRC_flag; if(CRC_flag==1) { Write_CommandReg(0x02,0x00);//将EPF和CRC标志位清零 } } break; default: {} break; } } void main() { init(); init_MI200E(); // Write_CommandReg(0x02,0x80); Write_CommandReg(0x02,0x00); Write_CommandReg(0x01,0x81);//bit6~4扩频码字,bit3~2波特率选择,bit1~0载波频率 Write_CommandReg(0x01,0x8d);//配置接收状态 step=0; sck=0; SDI=1; while(1); } void timer0() interrupt 1//2.5ms { // P1|=1; TH0=(65536-2293)/256;// TL0=(65536-2293)%256;//重装初值 RDSR_command=Read_CommandReg(0x82); P2=RDSR_command; if(((RDSR_command & 0x20)==0x20)&&((RDSR_command & 0x10)==0x10)) //每隔2.5ms查询0x82,判断carr和frame是否为1 { // P1&=0xFE; // Write_CommandReg(0x02,0x00);//将TI复位 // delay(2.5); receive(); //carr和frame为1执行接收 // cudelay_50us(); // ceshi2=0; // Write_CommandReg(0x02,0x30);//将RI清零 //Write_DataReg2(0x04,0xff,0xff); // P1|=1; // P0=0xaa; } // P1&=0xFE; } MI200E数据手册网址:[CSDN移动问答][1] MI200E应用笔记网址:[CSDN移动问答][2] [1]: http://wenku.baidu.com/link?url=stE_-LF4OcojG9xuouzs9Qbi54F6CmP96yoTdgtQ7VInQRp03tBh-A_P4TSIgvJ-vRZ7TaSg0UUNZNbUz36vnhU1QpT91omCDljRUAw8qY3 [2]: http://wenku.baidu.com/link?url=A-0hTe_YiFslr94yLvoqhliuPPIoGZaa98bp-va-Hvi1oO63lC3XW3kAIt4JuWfsAo7BUENnnvGjCWP4hmKFyxecv82QOixL-5ere1IAEYe
求大佬帮忙看下如何解密,或者帮忙给下解密思路!
/* *Description: Theme Javascript *Author: 0000 *Website: 0000 *Mail: 0000 *Weibo: 0000 *Version: 1.2(2019-07-29) */ "use strict"; !(function () { try { if (parent != self && (parent.document.domain != document.domain || (document.referrer && !/^http(s)?:\/\/[.\w-]+\.raogui\.com\//i.test(document.referrer)))) { throw new Error("can't be iframed"); } } catch (e) { debugger; window.open(location.href, "_top"); } })(); (function (e) { Date.now = Date.now || function () { return +(new Date) }, e.ias = function (t) { function u() { var t; i.onChangePage(function (e, t, r) { s && s.setPage(e, r), n.onPageChange.call(this, e, r, t) }); if (n.triggerPageThreshold > 0) a(); else if (e(n.next).attr("href")) { var u = r.getCurrentScrollOffset(n.scrollContainer); E(function () { p(u) }) } return s && s.havePage() && (l(), t = s.getPage(), r.forceScrollTop(function () { var n; t > 1 ? (v(t), n = h(!0), e("html, body").scrollTop(n)) : a() })), o } function a() { c(), n.scrollContainer.scroll(f) } function f() { var e, t; e = r.getCurrentScrollOffset(n.scrollContainer), t = h(), e >= t && (m() >= n.triggerPageThreshold ? (l(), E(function () { p(e) })) : p(e)) } function l() { n.scrollContainer.unbind("scroll", f) } function c() { e(n.pagination).hide() } function h(t) { var r, i; return r = e(n.container).find(n.item).last(), r.size() === 0 ? 0 : (i = r.offset().top + r.height(), t || (i += n.thresholdMargin), i) } function p(t, r) { var s; s = e(n.next).attr("href"); if (!s) return n.noneleft && e(n.container).find(n.item).last().after(n.noneleft), l(); if (n.beforePageChange && e.isFunction(n.beforePageChange) && n.beforePageChange(t, s) === !1) return; i.pushPages(t, s), l(), y(), d(s, function (t, i) { var o = n.onLoadItems.call(this, i), u; o !== !1 && (e(i).hide(), u = e(n.container).find(n.item).last(), u.after(i), e(i).fadeIn()), s = e(n.next, t).attr("href"), e(n.pagination).replaceWith(e(n.pagination, t)), b(), c(), s ? a() : l(), n.onRenderComplete.call(this, i), r && r.call(this) }) } function d(t, r, i) { var s = [], o, u = Date.now(), a, f; i = i || n.loaderDelay, e.get(t, null, function (t) { o = e(n.container, t).eq(0), 0 === o.length && (o = e(t).filter(n.container).eq(0)), o && o.find(n.item).each(function () { s.push(this) }), r && (f = this, a = Date.now() - u, a < i ? setTimeout(function () { r.call(f, t, s) }, i - a) : r.call(f, t, s)) }, "html") } function v(t) { var n = h(!0); n > 0 && p(n, function () { l(), i.getCurPageNum(n) + 1 < t ? (v(t), e("html,body").animate({ scrollTop: n }, 400, "swing")) : (e("html,body").animate({ scrollTop: n }, 1e3, "swing"), a()) }) } function m() { var e = r.getCurrentScrollOffset(n.scrollContainer); return i.getCurPageNum(e) } function g() { var t = e(".ias_loader"); return t.size() === 0 && (t = e('<div class="ias_loader">' + n.loader + "</div>"), t.hide()), t } function y() { var t = g(), r; n.customLoaderProc !== !1 ? n.customLoaderProc(t) : (r = e(n.container).find(n.item).parent().last(), r.after(t), t.fadeIn()) } function b() { var e = g(); e.remove() } function w(t) { var r = e(".ias_trigger"); return r.size() === 0 && (r = e('<div class="ias_trigger"><a href="#">' + n.trigger + "</a></div>"), r.hide()), e("a", r).unbind("click").bind("click", function () { return S(), t.call(), !1 }), r } function E(t) { var r = w(t), i; n.customTriggerProc !== !1 ? n.customTriggerProc(r) : (i = e(n.container).find(n.item).parent().last(), i.after(r), r.fadeIn()) } function S() { var e = w(); e.remove() } var n = e.extend({}, e.ias.defaults, t), r = new e.ias.util, i = new e.ias.paging(n.scrollContainer), s = n.history ? new e.ias.history : !1, o = this; u() }, e.ias.defaults = { container: "#container", scrollContainer: e(window), item: ".item", pagination: "#pagination", next: ".next", noneleft: !1, loader: '<img src="images/loader.gif"/>', loaderDelay: 600, triggerPageThreshold: 3, trigger: "Load more items", thresholdMargin: 0, history: !0, onPageChange: function () {}, beforePageChange: function () {}, onLoadItems: function () {}, onRenderComplete: function () {}, customLoaderProc: !1, customTriggerProc: !1 }, e.ias.util = function () { function i() { e(window).load(function () { t = !0 }) } var t = !1, n = !1, r = this; i(), this.forceScrollTop = function (i) { e("html,body").scrollTop(0), n || (t ? (i.call(), n = !0) : setTimeout(function () { r.forceScrollTop(i) }, 1)) }, this.getCurrentScrollOffset = function (e) { var t, n; return e.get(0) === window ? t = e.scrollTop() : t = e.offset().top, n = e.height(), t + n } }, e.ias.paging = function () { function s() { e(window).scroll(o) } function o() { var t, s, o, f, l; t = i.getCurrentScrollOffset(e(window)), s = u(t), o = a(t), r !== s && (f = o[0], l = o[1], n.call({}, s, f, l)), r = s } function u(e) { for (var n = t.length - 1; n > 0; n--) if (e > t[n][0]) return n + 1; return 1 } function a(e) { for (var n = t.length - 1; n >= 0; n--) if (e > t[n][0]) return t[n]; return null } var t = [ [0, document.location.toString()] ], n = function () {}, r = 1, i = new e.ias.util; s(), this.getCurPageNum = function (t) { return t = t || i.getCurrentScrollOffset(e(window)), u(t) }, this.onChangePage = function (e) { n = e }, this.pushPages = function (e, n) { t.push([e, n]) } }, e.ias.history = function () { function n() { t = !!(window.history && history.pushState && history.replaceState), t = !1 } var e = !1, t = !1; n(), this.setPage = function (e, t) { this.updateState({ page: e }, "", t) }, this.havePage = function () { return this.getState() !== !1 }, this.getPage = function () { var e; return this.havePage() ? (e = this.getState(), e.page) : 1 }, this.getState = function () { var e, n, r; if (t) { n = history.state; if (n && n.ias) return n.ias } else { e = window.location.hash.substring(0, 7) === "#/page/"; if (e) return r = parseInt(window.location.hash.replace("#/page/", ""), 10), { page: r } } return !1 }, this.updateState = function (t, n, r) { e ? this.replaceState(t, n, r) : this.pushState(t, n, r) }, this.pushState = function (n, r, i) { var s; t ? history.pushState({ ias: n }, r, i) : (s = n.page > 0 ? "#/page/" + n.page : "", window.location.hash = s), e = !0 }, this.replaceState = function (e, n, r) { t ? history.replaceState({ ias: e }, n, r) : this.pushState(e, n, r) } } })(jQuery); (function () { var a, b, c, d, e, f = function (a, b) { return function () { return a.apply(b, arguments) } }, g = [].indexOf || function (a) { for (var b = 0, c = this.length; c > b; b++) if (b in this && this[b] === a) return b; return -1 }; b = function () { function a() {} return a.prototype.extend = function (a, b) { var c, d; for (c in b) d = b[c], null == a[c] && (a[c] = d); return a }, a.prototype.isMobile = function (a) { return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a) }, a.prototype.addEvent = function (a, b, c) { return null != a.addEventListener ? a.addEventListener(b, c, !1) : null != a.attachEvent ? a.attachEvent("on" + b, c) : a[b] = c }, a.prototype.removeEvent = function (a, b, c) { return null != a.removeEventListener ? a.removeEventListener(b, c, !1) : null != a.detachEvent ? a.detachEvent("on" + b, c) : delete a[b] }, a.prototype.innerHeight = function () { return "innerHeight" in window ? window.innerHeight : document.documentElement.clientHeight }, a }(), c = this.WeakMap || this.MozWeakMap || (c = function () { function a() { this.keys = [], this.values = [] } return a.prototype.get = function (a) { var b, c, d, e, f; for (f = this.keys, b = d = 0, e = f.length; e > d; b = ++d) if (c = f[b], c === a) return this.values[b] }, a.prototype.set = function (a, b) { var c, d, e, f, g; for (g = this.keys, c = e = 0, f = g.length; f > e; c = ++e) if (d = g[c], d === a) return void(this.values[c] = b); return this.keys.push(a), this.values.push(b) }, a }()), a = this.MutationObserver || this.WebkitMutationObserver || this.MozMutationObserver || (a = function () { function a() { "undefined" != typeof console && null !== console && console.warn("MutationObserver is not supported by your browser."), "undefined" != typeof console && null !== console && console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.") } return a.notSupported = !0, a.prototype.observe = function () {}, a }()), d = this.getComputedStyle || function (a) { return this.getPropertyValue = function (b) { var c; return "float" === b && (b = "styleFloat"), e.test(b) && b.replace(e, function (a, b) { return b.toUpperCase() }), (null != (c = a.currentStyle) ? c[b] : void 0) || null }, this }, e = /(\-([a-z]){1})/g, this.WOW = function () { function e(a) { null == a && (a = {}), this.scrollCallback = f(this.scrollCallback, this), this.scrollHandler = f(this.scrollHandler, this), this.start = f(this.start, this), this.scrolled = !0, this.config = this.util().extend(a, this.defaults), this.animationNameCache = new c } return e.prototype.defaults = { boxClass: "wow", animateClass: "animated", offset: 0, mobile: !0, live: !0 }, e.prototype.init = function () { var a; return this.element = window.document.documentElement, "interactive" === (a = document.readyState) || "complete" === a ? this.start() : this.util().addEvent(document, "DOMContentLoaded", this.start), this.finished = [] }, e.prototype.start = function () { var b, c, d, e; if (this.stopped = !1, this.boxes = function () { var a, c, d, e; for (d = this.element.querySelectorAll("." + this.config.boxClass), e = [], a = 0, c = d.length; c > a; a++) b = d[a], e.push(b); return e }.call(this), this.all = function () { var a, c, d, e; for (d = this.boxes, e = [], a = 0, c = d.length; c > a; a++) b = d[a], e.push(b); return e }.call(this), this.boxes.length) if (this.disabled()) this.resetStyle(); else { for (e = this.boxes, c = 0, d = e.length; d > c; c++) b = e[c], this.applyStyle(b, !0); this.util().addEvent(window, "scroll", this.scrollHandler), this.util().addEvent(window, "resize", this.scrollHandler), this.interval = setInterval(this.scrollCallback, 50) } return this.config.live ? new a(function (a) { return function (b) { var c, d, e, f, g; for (g = [], e = 0, f = b.length; f > e; e++) d = b[e], g.push(function () { var a, b, e, f; for (e = d.addedNodes || [], f = [], a = 0, b = e.length; b > a; a++) c = e[a], f.push(this.doSync(c)); return f }.call(a)); return g } }(this)).observe(document.body, { childList: !0, subtree: !0 }) : void 0 }, e.prototype.stop = function () { return this.stopped = !0, this.util().removeEvent(window, "scroll", this.scrollHandler), this.util().removeEvent(window, "resize", this.scrollHandler), null != this.interval ? clearInterval(this.interval) : void 0 }, e.prototype.sync = function () { return a.notSupported ? this.doSync(this.element) : void 0 }, e.prototype.doSync = function (a) { var b, c, d, e, f; if (!this.stopped) { if (null == a && (a = this.element), 1 !== a.nodeType) return; for (a = a.parentNode || a, e = a.querySelectorAll("." + this.config.boxClass), f = [], c = 0, d = e.length; d > c; c++) b = e[c], g.call(this.all, b) < 0 ? (this.applyStyle(b, !0), this.boxes.push(b), this.all.push(b), f.push(this.scrolled = !0)) : f.push(void 0); return f } }, e.prototype.show = function (a) { return this.applyStyle(a), a.className = "" + a.className + " " + this.config.animateClass }, e.prototype.applyStyle = function (a, b) { var c, d, e; return d = a.getAttribute("data-wow-duration"), c = a.getAttribute("data-wow-delay"), e = a.getAttribute("data-wow-iteration"), this.animate(function (f) { return function () { return f.customStyle(a, b, d, c, e) } }(this)) }, e.prototype.animate = function () { return "requestAnimationFrame" in window ? function (a) { return window.requestAnimationFrame(a) } : function (a) { return a() } }(), e.prototype.resetStyle = function () { var a, b, c, d, e; for (d = this.boxes, e = [], b = 0, c = d.length; c > b; b++) a = d[b], e.push(a.setAttribute("style", "visibility: visible;")); return e }, e.prototype.customStyle = function (a, b, c, d, e) { return b && this.cacheAnimationName(a), a.style.visibility = b ? "hidden" : "visible", c && this.vendorSet(a.style, { animationDuration: c }), d && this.vendorSet(a.style, { animationDelay: d }), e && this.vendorSet(a.style, { animationIterationCount: e }), this.vendorSet(a.style, { animationName: b ? "none" : this.cachedAnimationName(a) }), a }, e.prototype.vendors = ["moz", "webkit"], e.prototype.vendorSet = function (a, b) { var c, d, e, f; f = []; for (c in b) d = b[c], a["" + c] = d, f.push(function () { var b, f, g, h; for (g = this.vendors, h = [], b = 0, f = g.length; f > b; b++) e = g[b], h.push(a["" + e + c.charAt(0).toUpperCase() + c.substr(1)] = d); return h }.call(this)); return f }, e.prototype.vendorCSS = function (a, b) { var c, e, f, g, h, i; for (e = d(a), c = e.getPropertyCSSValue(b), i = this.vendors, g = 0, h = i.length; h > g; g++) f = i[g], c = c || e.getPropertyCSSValue("-" + f + "-" + b); return c }, e.prototype.animationName = function (a) { var b; try { b = this.vendorCSS(a, "animation-name").cssText } catch (c) { b = d(a).getPropertyValue("animation-name") } return "none" === b ? "" : b }, e.prototype.cacheAnimationName = function (a) { return this.animationNameCache.set(a, this.animationName(a)) }, e.prototype.cachedAnimationName = function (a) { return this.animationNameCache.get(a) }, e.prototype.scrollHandler = function () { return this.scrolled = !0 }, e.prototype.scrollCallback = function () { var a; return !this.scrolled || (this.scrolled = !1, this.boxes = function () { var b, c, d, e; for (d = this.boxes, e = [], b = 0, c = d.length; c > b; b++) a = d[b], a && (this.isVisible(a) ? this.show(a) : e.push(a)); return e }.call(this), this.boxes.length || this.config.live) ? void 0 : this.stop() }, e.prototype.offsetTop = function (a) { for (var b; void 0 === a.offsetTop;) a = a.parentNode; for (b = a.offsetTop; a = a.offsetParent;) b += a.offsetTop; return b }, e.prototype.isVisible = function (a) { var b, c, d, e, f; return c = a.getAttribute("data-wow-offset") || this.config.offset, f = window.pageYOffset, e = f + Math.min(this.element.clientHeight, this.util().innerHeight()) - c, d = this.offsetTop(a), b = d + a.clientHeight, e >= d && b >= f }, e.prototype.util = function () { return null != this._util ? this._util : this._util = new b }, e.prototype.disabled = function () { return !this.config.mobile && this.util().isMobile(navigator.userAgent) }, e }() }).call(this); eval(function (p, a, c, k, e, d) { e = function (c) { return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) { d[e(c)] = k[c] || e(c) } k = [function (e) { return d[e] }]; e = function () { return '\\w+' }; c = 1 }; while (c--) { if (k[c]) { p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]) } } return p }('(5($){$.J.L=5(r){8 1={d:0,A:0,b:"h",v:"N",3:4};6(r){$.D(1,r)}8 m=9;6("h"==1.b){$(1.3).p("h",5(b){8 C=0;m.t(5(){6(!$.k(9,1)&&!$.l(9,1)){$(9).z("o")}j{6(C++>1.A){g B}}});8 w=$.M(m,5(f){g!f.e});m=$(w)})}g 9.t(5(){8 2=9;$(2).c("s",$(2).c("i"));6("h"!=1.b||$.k(2,1)||$.l(2,1)){6(1.u){$(2).c("i",1.u)}j{$(2).K("i")}2.e=B}j{2.e=x}$(2).T("o",5(){6(!9.e){$("<V />").p("X",5(){$(2).Y().c("i",$(2).c("s"))[1.v](1.Z);2.e=x}).c("i",$(2).c("s"))}});6("h"!=1.b){$(2).p(1.b,5(b){6(!2.e){$(2).z("o")}})}})};$.k=5(f,1){6(1.3===E||1.3===4){8 7=$(4).F()+$(4).O()}j{8 7=$(1.3).n().G+$(1.3).F()}g 7<=$(f).n().G-1.d};$.l=5(f,1){6(1.3===E||1.3===4){8 7=$(4).I()+$(4).U()}j{8 7=$(1.3).n().q+$(1.3).I()}g 7<=$(f).n().q-1.d};$.D($.P[\':\'],{"Q-H-7":"$.k(a, {d : 0, 3: 4})","R-H-7":"!$.k(a, {d : 0, 3: 4})","S-y-7":"$.l(a, {d : 0, 3: 4})","q-y-7":"!$.l(a, {d : 0, 3: 4})"})})(W);', 62, 62, '|settings|self|container|window|function|if|fold|var|this||event|attr|threshold|loaded|element|return|scroll|src|else|belowthefold|rightoffold|elements|offset|appear|bind|left|options|original|each|placeholder|effect|temp|true|of|trigger|failurelimit|false|counter|extend|undefined|height|top|the|width|fn|removeAttr|lazyload|grep|show|scrollTop|expr|below|above|right|one|scrollLeft|img|jQuery|load|hide|effectspeed'.split('|'), 0, {})); function copyright() { document.oncontextmenu = function () { return false }; document.onselectstart = function () { return false }; function closepage() { window.close() }; if ((window.console && (console.firebug || console.table && /firebug/i.test(console.table()))) || (typeof opera == 'object' && typeof opera.postError == 'function' && console.profile.length > 0)) { closepage() }; if (typeof console.profiles == "object" && console.profiles.length > 0) { closepage() }; window.onresize = function () { if ((window.outerHeight - window.innerHeight) > 200) { closepage() } } } $(function () {; var encode_version = 'sojson.v5', nwtpi = '__0x4e8f9', __0x4e8f9 = ['BMOlb8K1Rw==', 'Nn0DMw==', 'VlLDnMKlcg==', 'PcO0wrQTwr8RGw==', 'YcK2w5TDjX3Dl8KpJQPDvsKpw5kR', 'wpjCm8KUMhw9wq8bw6bDrMKsaw==', 'dDLDuinDgcKwclM=', 'GnrDtMOhwrfCmzJn', 'X3HCqMK0w5Y=', 'eFZSw7XDvMOwwqI1w77DoSlzw4UMDjfCpxXDj8K0wqU7w4s=', 'wrPDusKDdMKoBFQzPUluw4NRF8Kmwrwn', 'w441w63CkhfCiXwU', 'dcKww5XDgw==', 'w4bDhBvDu8OxFVI=', 'w6JdZMObL8KLw4UI', 'MsKYMUfDssOsw6vDhA==', 'KsKLw7LDuBEb', 'NArDvCfCknHCo8KfDcK0w4vDucKkJml7w6DDlMKiwqHCmgbpmKjorarliLzkvbbnmZw=', 'wo5VwpXDngZ8bnBawos=', 'LcKvw5QxbA0Gw54=', 'dMKzw5jDmXc=', 'w55Dw7rCusO/HmDCrg==', 'w5xsw7fCgxnChHVG', 'SsKHJA==', 'ZwQ0', 'UgjDlhjDmQ==', 'BcK2wpJZwpLCkQ==', 'aRvDoT4=', 'w7XDlcKjw47CsA==', 'SsKFwq9oCg==', 'XARHdMO5', 'w7/DhcKnVxdG', 'f8K6w5jDnXTDjw==', 'bBIp', 'w7nDhcKyTExQwq/CqR/DncO5E1vDucK9w6HCocOzw70/GWkodsKawoJawqjDmTJPecKMPwfCs3XDiwkvw6TCj8OawpnDsipJwojDjMK1wod8PEZRAiTDpDJxJcO+w43DicKqO8KIERhvwrPCiMOsaXrDrcOMRHBFw5vCocKzw7zDrEglL8KIw7IC', 'wod0w7rCgwjCjHdPwrI=', 'ZMKww5vDiXPDlcOrO1M=', '5LmG6IGg5Yux6ZiAwq0SHUkvGMKhPcOZ', 'fAzDunvDijfDkMKM', 'WcONDsK1wohUw7c=', 'O8OfYE4=', 'w7ckw6A=', 'w5zCryldw4QwTA==', 'eBHDvHw=', 'Zh1ld8O3', 'c3fDv8KVbQ==', 'KsKfw6bDnhMeFzo=', 'wrxKf8ObNsKe', 'IcOPw79EVD0XXA==', 'wr3DoMOHwpxH', 'wrbDncKzw7HCjQ==', 'T8KyKMOpBQ==', 'YMKMwp9IFQ5Kwrk=', 'w4PDhRvDucOVHFPCvsK0', 'wqFKecOdMA==', 'w44Mw4VMREDCpxdlfQ==', 'KBlpWMKu', 'U8K9w5Y=', 'wrPCnhs=', 'WcOTCMKzwpsdw643wqg=', 'wrLDusKpw4zCmUnDtcO8Gw==', 'wqLDmsKDw4DCqQ==', 'wptJKMKnRA==', 'LERV', 'IHUfMB/Dqg==', 'JxBuXMKxwr8=', 'dwoLwqvCug==', 'JWtkB8Omw7jCoTvChmXCpg==', 'RcK6w7fDtk4=', 'fAHDsjbDnnfCjMKSH8K0woU=', 'ZSjDvTLDgw==', 'OMKSw6DDsRYRAzo=', 'BcOFBsK0wosRw5U+wq1oIA==', 'GXjDssOmwrXClg==', 'w5xyw7vChwo=', 'woF5w6zCiQLCiU1FwqY=', 'worDoMKsw6nCoQ==', 'Rk/DrMKSw7QywojDuQ==', 'ecOCD2wi', 'Pg7DvHTDiw==', 'w7nDj8KtXw1GwoTCpBrDgcO9', 'wrfDssO7wopj', 'w4LDpsK/w5BO', 'YQJuecOvwolLwqfDosOdwrs=', 'bwoMwrnClg==', 'w5AdwpXCuV0=', 'wpPCvRdLw54=', 'YcK+w5QNfA==', 'wr5OYMORLsKPw6oIw7wvwp4=', 'woFxwqBOTg==', 'wqtOacOdFA==', 'w5fDkhrDiMO4GkXCow==', 'S8Krw7MuXA==', 'w4DCgcKSLR49wqwbw7fCucOufWbDnXPCtQ==', 'YxEnH0E=', 'wplTE8KEWw==', 'fgo1wqjCjFEk', 'Q2zDj8KRUA==', 'PsKOwolPFA5GwrjDqMKawrnDjnLCpg==', 'woDDucKLw5dbw4IjfHg=', 'wqrCkDA=', 'VgpQbcO5', 'HsKjwpdXwo4=', 'w5fDqMK6w5lK', 'wpjDhR3Do8O9FUbCpcK0', 'S8KRPcOVBg==', 'L251w67Dlg==', 'w6DDhMK4w4DCksO6dB5BH8KA', 'WQVib0Q=', 'VG/DgcKVV07CqMOtcsORw44=', 'H2jDpcO7wpjCnTpswqs=', 'McOIEsKNwpQ=', 'TgbDrAfDmw==', 'wogLw51CCwHCsR0/ZQ==', 'aQDDvDzDk2bCqg==', 'w57Dq8Kaw5pTw58=', 'ZAzDvn3DkjvDvMKOLcKCw4Q=', 'w4XDnxzDp8O9FVHCow==', 'C8KvcMKREA==', 'w4UBw6fDlcO/', 'w44Mw5NGQUjCqxc/', 'PcOaMMKhw6M=', 'P8O8wqMDwrsJ', 'FsK3SsKzFg==', 'T0rDuw==', 'w4Ybwo7Ch18n', 'w5rDkxDDrMOgEw==', 'XArDtzLDtw==', 'alZFw6TDtsO8w7okw6M=', 'w55Aw6DCusO6Fm/CrQ==', 'VxFCZHc=', 'w5x3w7vCiBvDiTdHwrMww5nDjA4W', 'bAQjwrTDjk0jOzI=', 'w4FmwqzCml/CmS1Ww6Y=', 'w53DusKEw5ZJ', 'DRpTS8Kh', 'w7LDmzbDk8OE', 'chgjE1zDh8OMDsK4Ml8=', 'LBpqYsK8', 'w55dw7bCvsOsUyLCr8K8Dgp0wooHw43ClsK1KcKj', 'LiHCvsKiEcKB', 'wpQQw5dJS0TCkB46bzM=', 'woFiw4HCtcOc', 'VnzDmsK7w4w=', 'wpfCsMKCMTo=', 'WcKowrVJGw==', 'wrDDvcKTw6c=', 'w5oVworChUg=', 'LcOEw650XTkKW3vCiA==', 'cxbDqw==', 'worDl1HCtQ==', 'Qj/DswfDtg==', 'NMOSw6ti', 'w63Ds8Kvw5tN', 'H3I4NC4=', 'ZDnDng==', 'KMOSVXN9w7BuQ0I=', 'M8Obw7duTA==', 'w7/DhcKnVxdGwoTCpBrDgcO9', 'TgLDghrDvw==', 'w4QCw6rDj8K4wobCl3ES', 'U0TDr8K2w7Q2wrjDpsOSwohc', 'S8OeFmkb', 'OcKuw4TDk3/DkA==', 'wprCncKWIhE0woAEw7PDpsKz', 'AmnCocK8w4YPfsKZU8OWO8O8wooHwrQtB8O8wqM=', 'w5XDgww=', 'DMK3wp99wpbChMKYSg==', 'LMOZwqsdwrA=', 'A8OYwrM=', 'fQvDgw==', 'XzfCqsK6', 'axpKdg==', 'B8OVGMKz', 'KMKZXsKXHA==', 'dj8dwqfCjg==', 'bx8zwr8=', 'GsOfa1DClw==', 'VU7DpcK+w642wrjDpsOSwohc', 'eMOjJ8Kkw6DDj0tWdXoORcOfw5k=', 'aRrDoSM=', 'w5Ufw60=', 'A8KNP8OMEEQKO23DuBsvwoMVGnE0w7zDuXtiwpITWw==', 'Ixp2XsK3', 'wotwwq4=', 'b8KcOw==', 'wqPDk8KrVARXwq/CvRbDkMKuQAbCvg==', 'w5QIw6PDmcOiwovCoHAfVsKa', 'MsOUwpItwpM=', 'N8OkMsK6', 'ZMKtw5I=', 'woELw4Rc', 'U3LDhQ==', 'LiPCqsKnF8KewrtqwqhHwq/CqMO4cg==', 'w7zDuMKeYw==', 'OcK7w5TDjn3DksKpIwfDocOuw50M', 'TsKSN8ODHg==', 'GMK9w78Dwqc=', 'fANte8O7', 'aTbDkm7Dpg==', 'wr5BB8KGXCrDrMOj', 'ZcK7E1bDnQ==', 'wrPDqMKPZcK+DFQ8KQcmw5NUUMKiwqE=', 'KsO5wrUnwrIcBEk=', 'OMO0wrMIwrcTEEk=', 'H8K2wpZRwozCgMKoVWHDvgo=', 'MsKdNEvDocOo', 'AmLCq8Kow4xXJcKEEsOKOQ==', 'AnLCqMK0w4ZGfMOUHMOcOsKlw4oVwq4y', 'w4IEw73DhsO4wo/Cmg==', 'wq1PacO9NMKLw5oX', 'IGLDhsOLwpQ=', 'w6nDucKtSMKq', 'w4IVwo/CiU46ZXc=', 'YMKbw4U=', 'w77Dg8K4Vw1PwpPCpws=', 'OMKXw6vDuRobDTrDisOywpAb', 'wogew4NtS0DCoAE=', 'TCIIwoPCgQ==', 'KMOuwqI=', 'wqDDucOmwrJS', 'NMOZw7ppSzAFW3vCo8Oi', 'woJaw6bCscOs', 'KcOfdkjCgQ==', 'P8KFw5gXwqs=', 'w7HDjsKgw4HCkMOqRxZJH8KDw5DDucKD', 'b8OdA30Iw6s6UQY=', 'ax3Dpg==', 'ZkfDkcK8bw==', 'wplSw5LCncOF', 'wpBzw7DCgg==', 'Zg57ccOvwoA=', 'axA6NHo=', 'w7FNBsKkVA==', 'w4xwwqhESw==', 'w7LDp8KGw6rCiMOTwrlLXw==', 'dMKaNU7CqcKtw6XDh2k/', 'BsOtYcK7bA==', 'wrx2DsKtUQ==', 'wpFRw7fCnMOkHn/CsQ==', 'WcONCsKywpM=', 'KhFkeMKpwrbCnMK1', 'w6DDiMKjw7bCsw==', 'wpxMw4M=', 'aMOLC2A/w6kcUxNWw6E=', 'Fn8iETw=', 'wpzCl8KcKgs0woAEw7PDpsKz', 'OMKLw67DtAs=', 'BH7DuMO9wpjCljM=', 'fTLDjyrDkw==', 'BsKYw5wSwoNuam1Hw5wY', 'TWHDksKRUw==', 'w6gwwq7Cp3g=', 'wo3DssO6wrdB', 'LcOywrIRwq0=', 'wpUMw5VcZkbCthwv', 'MFHDksOOwps=', 'NMODA2E8w6U8UF4Lw7/DsyLDlQ==', 'wqRKfsO9NMKLw5oX', 'VCEVworCoA==', 'Zwh6d8O5wok=', 'QmnDiMKW', 'cx48E0bDjg==', 'dWbClsKfw4Q=', 'SMK9aMKbHBbDpsO6woZbwqE=', 'wrdACsKiWD8=', 'OcKsw53Dk3jDnsKxJBLDu8Kr', 'c8KQwp8=', 'AMKywolZwpPCi8OGTW/DvQ==', 'S8KfOsOFOlgT', 'N0lJw7s=', 'eW1kHMO2w7LCkDo=', 'J8O4wr8DwqoV', 'wqdKF8KzZw==', 'N8O+L8Klw6TDj0Y=', 'IsKVw6vDqQ==', 'Jh3DojjDgnfCvcOTHcKowpjCr8KxKmt7w6HDlsKyw67ChFFdw7QnAsKrw78Rcgk=', 'NMOiX8Kz', 'cxEnGE/Dh8OpBMK8Ilg=', 'eX1+AcOgw7jCkHrChHnCuzUhd1MqwpE=', 'PsKQwptIEQJXw7rCtMOVwrPDgnLCssKDw5LCoWo=', 'emcaPgrDu8K2w4dswpBaVMOdeEsfw4BQEA==', 'w5xpw6nCjx7CgGsHwrUxw4LDkQwQVsKhBw==', 'woDDucKfw5ZNw44pNGzDpTp9w4MQZMKZw5hW', 'wrPDv8KdeMKvAEpyJBxyw5JXHsOjwqZ4wqhg', 'w5wPwpDCjA==', 'w5jDgxLDpw==', 'w4DDv8KEw5M=', 'asK4w44=', 'w7LDusKAw7XCncOZwq5AF0BJw7vDncKJRiwV', 'ZQVhXMKgwrXCjsK0', 'Mg8uwrvDgkY7Ny3CqMKkbMKVJsO2wp8ZIysyOBbDjW5xwr4xwofDocOEw7If5pWv5o+76Lys5YWW5LiwewrCr8Oowrwlw63CuX0=', '5Lib5Lmj6aOs', 'w43DlcKnw47Ch8O0ZxNHCcKFw5XDvcKN', 'w7rDk8Kww4k=', 'woPDs8KEw7M=', 'cAg9FA==', 'wr/ChixGw5A=', 'wrrCkMKlLAQ=', 'w5MOwojCkg==', 'LsOfd07Cmxs/w6c=', 'Zwh5csOiwo9t', 'YwbDtX/DnSrDjMKWLcKDw4M=', 'BMK+wpw=', 'CsKvfsKLFBzDs8O3', 'wqXDt8K0w4nDhkTDt8OqEsOXQ0ZnwoXCvMOewqvDhcO+Ux3Cg8OraRbCmFslYWjCs8Kjw4MMF8Onw47CsMK6w4bDpcKdXVHDsMO/w5PDkmXCpcKPAUQ+w5Eewq/Dj8KvUhDDgArCpMKUwpbDq3rCmcOgF8OHEsKe', 'esKPPEfDjMOj', 'wpjDmhfDuMOgVxjCvsKlDzE=', 'RHnDrMOgwrfCnQ==', 'woNdw7zCqA==', 'N3sDIx/DpsKw', 'fw3Dq3/DnzrDhsKROMKQw4PDmcKbw7ZPUsOCbw==', 'eMO8L8K7w7E=', 'wrxKDsK1XC7Dq8O1', 'bXLDgcK7w5A=', 'WikkwrXCig==', 'c8KMwoJVBB9R', 'aMOLB2sww58rXgZA', 'LUVTOMO/', 'LcK7w5E9dQs=', 'wp7CqsK4', 'I3Y9', 'J8KAw7A9woA=', 'SMKtacKGHhzDoMO+', 'w4XDmhfDr8OxP1nCp8Ku', 'w7Maw4XDvsO7', 'ajjDtCfDg8K8', 'LcOWbFE=', 'dcK+w5LDkWjDlMKxIhY=', 'Zh8qwqHDjgU1OTrCog==', '6L+M5ZqD6aOv6YKg', 'UcKyw5tdwpbChMKYSj3CrxvCmxHCuGNgwoJIw6hiw5fCszPDtkd/woo3w4VYwrTDmQ==', 'M8OIw6loVDA=', 'wqFtwoF6SA==', 'SMKOwpRlAg==', 'dgPCnsKoEA==', 'QXDDlsKXVU/Cv8Ou', 'FsKPw4o4wrk=', 'w6fDvA7Dn8OM', 'CXfDqcOqwrI=', 'wrbCn8KJAR4=', 'P1haOMOq', 'KsKVw6vDsB4LAQ==', 'w6rDncKM', 'DnLDs8O5wrXCmyY=', 'w7zDkMK6', 'YQJ5', 'dcK6wr1zJw==', 'G8O1wpstwpg=', 'NcOqw7Rhdg==', 'wq/Dt8KXw63CgsOWwpVBSw==', 'P8OsYcKFaw==', 'DsKrbcKVEAc=', 'w5PDmxPDjsOT', 'b8KGN1U=', 'TSBFVsO3wph4wpnDpsOfwr3DnMObw5U=', 'amjCo8K3w7I=', 'Vg9kScOJ', 'a8K3GMOBFg==', 'eBoKL0E=', 'JAVzacKg', 'FMKracKdDhbDkcO/wpNEwrc=', 'CWjDsw==']; (function (_0x2b1eb9, _0x402612) { var _0x4b57ac = function (_0x2c1edb) { while (--_0x2c1edb) { _0x2b1eb9['push'](_0x2b1eb9['shift']()); } }; _0x4b57ac(++_0x402612); }(__0x4e8f9, 0x191)); var _0x18b1 = function (_0x169e03, _0xe16e03) { _0x169e03 = _0x169e03 - 0x0; var _0x476a1a = __0x4e8f9[_0x169e03]; if (_0x18b1['initialized'] === undefined) { (function () { var _0x46fa4d = typeof window !== 'undefined' ? window : typeof process === 'object' && typeof require === 'function' && typeof global === 'object' ? global : this; var _0x34c270 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; _0x46fa4d['atob'] || (_0x46fa4d['atob'] = function (_0x3ababe) { var _0x5c4cc8 = String(_0x3ababe)['replace'](/=+$/, ''); for (var _0x44aa32 = 0x0, _0x60bd64, _0x41f24a, _0x11b221 = 0x0, _0x5cbacf = ''; _0x41f24a = _0x5c4cc8['charAt'](_0x11b221++); ~_0x41f24a && (_0x60bd64 = _0x44aa32 % 0x4 ? _0x60bd64 * 0x40 + _0x41f24a : _0x41f24a, _0x44aa32++ % 0x4) ? _0x5cbacf += String['fromCharCode'](0xff & _0x60bd64 >> (-0x2 * _0x44aa32 & 0x6)) : 0x0) { _0x41f24a = _0x34c270['indexOf'](_0x41f24a); } return _0x5cbacf; }); }()); var _0x24ff89 = function (_0x46ff43, _0x1bd592) { var _0x456e7a = [], _0x2b56f5 = 0x0, _0x18c727, _0x158dfa = '', _0x75e5b = ''; _0x46ff43 = atob(_0x46ff43); for (var _0x156520 = 0x0, _0x2e93c1 = _0x46ff43['length']; _0x156520 < _0x2e93c1; _0x156520++) { _0x75e5b += '%' + ('00' + _0x46ff43['charCodeAt'](_0x156520)['toString'](0x10))['slice'](-0x2); } _0x46ff43 = decodeURIComponent(_0x75e5b); for (var _0x53d822 = 0x0; _0x53d822 < 0x100; _0x53d822++) { _0x456e7a[_0x53d822] = _0x53d822; } for (_0x53d822 = 0x0; _0x53d822 < 0x100; _0x53d822++) { _0x2b56f5 = (_0x2b56f5 + _0x456e7a[_0x53d822] + _0x1bd592['charCodeAt'](_0x53d822 % _0x1bd592['length'])) % 0x100; _0x18c727 = _0x456e7a[_0x53d822]; _0x456e7a[_0x53d822] = _0x456e7a[_0x2b56f5]; _0x456e7a[_0x2b56f5] = _0x18c727; } _0x53d822 = 0x0; _0x2b56f5 = 0x0; for (var _0x3bb312 = 0x0; _0x3bb312 < _0x46ff43['length']; _0x3bb312++) { _0x53d822 = (_0x53d822 + 0x1) % 0x100; _0x2b56f5 = (_0x2b56f5 + _0x456e7a[_0x53d822]) % 0x100; _0x18c727 = _0x456e7a[_0x53d822]; _0x456e7a[_0x53d822] = _0x456e7a[_0x2b56f5]; _0x456e7a[_0x2b56f5] = _0x18c727; _0x158dfa += String['fromCharCode'](_0x46ff43['charCodeAt'](_0x3bb312) ^ _0x456e7a[(_0x456e7a[_0x53d822] + _0x456e7a[_0x2b56f5]) % 0x100]); } return _0x158dfa; }; _0x18b1['rc4'] = _0x24ff89; _0x18b1['data'] = {}; _0x18b1['initialized'] = !![]; } var _0x499959 = _0x18b1['data'][_0x169e03]; if (_0x499959 === undefined) { if (_0x18b1['once'] === undefined) { _0x18b1['once'] = !![]; } _0x476a1a = _0x18b1['rc4'](_0x476a1a, _0xe16e03); _0x18b1['data'][_0x169e03] = _0x476a1a; } else { _0x476a1a = _0x499959; } return _0x476a1a; }; var s = document[_0x18b1('0x0', 'poVV')]; $(_0x18b1('0x1', 'HOk%'))[_0x18b1('0x2', 'peu@')](function () { var _0x2ca160 = { 'MZHoP': function _0x3decd3(_0x16a3c8, _0x486851) { return _0x16a3c8 === _0x486851; }, 'pTlMm': _0x18b1('0x3', 'c5s&'), 'SwYgV': function _0xf5556(_0x3be0d9, _0x53afb8) { return _0x3be0d9(_0x53afb8); }, 'JSlAp': _0x18b1('0x4', 'iPrm'), 'HwSat': function _0x26c655(_0x2b2eaf, _0x18393c) { return _0x2b2eaf + _0x18393c; }, 'jIVsc': function _0x5419b5(_0x1b84b6, _0x2e4ae2) { return _0x1b84b6 + _0x2e4ae2; }, 'bLvIp': function _0x5caf49(_0x9316e1, _0x258ecd) { return _0x9316e1 / _0x258ecd; }, 'MwNzA': function _0x112e0f(_0x49b5ea, _0x3843eb) { return _0x49b5ea - _0x3843eb; } }; if (this[_0x18b1('0x5', 'poVV')] == s['toString']()[_0x18b1('0x6', 'xGoY')]('#')[0x0]) { if (_0x2ca160['MZHoP']('QIn', _0x2ca160['pTlMm'])) { _0x2ca160[_0x18b1('0x7', 'jxGf')]($, this)['parents']('li')[_0x18b1('0x8', '$JJ@')]('on')[_0x18b1('0x9', '!9sF')](_0x2ca160['JSlAp'])['prev']()[_0x18b1('0xa', 'xx2s')]('on'); return ![]; } else { return _0x2ca160[_0x18b1('0xb', '#ps7')](_0x2ca160[_0x18b1('0xc', 'lh@T')](x + '%\x20', _0x2ca160[_0x18b1('0xd', 'e8lZ')](_0x2ca160['MwNzA'](selectortop[_0x18b1('0xe', 'Jf])')]()['top'], pos), 0x2)), 'px'); } } }); var useragent = navigator[_0x18b1('0xf', 'Hhu3')]; var ismobile = useragent[_0x18b1('0x10', '!9sF')]('Mobile'); $(_0x18b1('0x11', '^ow7'))[_0x18b1('0x12', 'punP')](function () { var _0x27a016 = { 'hDGwV': function _0x323626(_0x2717de, _0x2e3943) { return _0x2717de === _0x2e3943; }, 'cLChU': _0x18b1('0x13', '#tg('), 'xOTcJ': _0x18b1('0x14', 'iPrm'), 'DlKbt': function _0x2740a4(_0x3111a9, _0xcfb20e) { return _0x3111a9 === _0xcfb20e; }, 'ReFLR': function _0x32ef9b(_0x8af3ff, _0x148ee8) { return _0x8af3ff(_0x148ee8); }, 'yaLfX': _0x18b1('0x15', 'HOk%'), 'mFhcq': _0x18b1('0x16', 'B88Y') }; if (ismobile == null) { if (_0x27a016['hDGwV'](_0x27a016[_0x18b1('0x17', 'B88Y')], _0x27a016['xOTcJ'])) { var _0x57540d = $('.schfixed'); if (!_0x57540d['is'](e['target']) && _0x27a016[_0x18b1('0x18', 'c2IJ')](_0x57540d[_0x18b1('0x19', 'UICF')](e[_0x18b1('0x1a', ']T$c')])[_0x18b1('0x1b', 'punP')], 0x0)) { _0x27a016['ReFLR']($, _0x27a016[_0x18b1('0x1c', 'BP!&')])[_0x18b1('0x1d', '@Ajj')]('on'); } } else { window['location']['href'] = _0x27a016[_0x18b1('0x1e', 'o1e&')]($, this)['attr']('href'); } } else { $(this)['parent']()[_0x18b1('0x1f', 'zHa*')](_0x27a016[_0x18b1('0x20', 'zHa*')])[_0x18b1('0x21', '$JJ@')]()[_0x18b1('0x22', 'HOk%')](_0x27a016['mFhcq']); return ![]; } }); $(window)[_0x18b1('0x23', '8XdI')](function () { var _0x19ffc3 = { 'kQtNI': function _0x417bf0(_0x5c82b0, _0x30152b) { return _0x5c82b0(_0x30152b); }, 'czGRT': function _0x2f0a0d(_0x177056, _0x369008) { return _0x177056 <= _0x369008; }, 'VtIkO': function _0x59387e(_0x3fce41, _0x27cfe0) { return _0x3fce41(_0x27cfe0); }, 'PHmYV': function _0x256022(_0x517f64, _0xd93489) { return _0x517f64 > _0xd93489; }, 'zlyus': _0x18b1('0x24', 'ML%E') }; var _0x225a7c = _0x19ffc3['kQtNI']($, window)[_0x18b1('0x25', 'ML%E')](); var _0x5d0e6c = 0x0; if (_0x19ffc3['czGRT'](_0x225a7c, _0x5d0e6c)) { _0x19ffc3[_0x18b1('0x26', 'lh@T')]($, '.head')[_0x18b1('0x1d', '@Ajj')]('on'); } if (_0x19ffc3['PHmYV'](_0x225a7c, _0x5d0e6c)) { $(_0x19ffc3['zlyus'])[_0x18b1('0x27', '^5U)')]('on'); } }); $('.menuico')[_0x18b1('0x28', '6@cm')](function () { var _0x349a53 = { 'meuvf': function _0x1d6bac(_0x22835b, _0x302dd2) { return _0x22835b(_0x302dd2); }, 'BeowP': function _0x46af55(_0xa193d7, _0x17ea46) { return _0xa193d7(_0x17ea46); }, 'llWos': _0x18b1('0x29', 'poVV'), 'aaKtt': function _0x1ba980(_0x37e669, _0x55d162) { return _0x37e669(_0x55d162); }, 'bgiYg': '.schfixed,.schbox,.userico' }; _0x349a53['meuvf']($, this)[_0x18b1('0x2a', '1hv#')]('on'); _0x349a53[_0x18b1('0x2b', '#ps7')]($, _0x349a53[_0x18b1('0x2c', '!NH(')])[_0x18b1('0x2d', 'xGoY')]('on'); if (_0x349a53[_0x18b1('0x2e', 'BP!&')]($, _0x349a53[_0x18b1('0x2f', 'eq&O')])['hasClass']('on')) { _0x349a53[_0x18b1('0x30', 'iPrm')]($, _0x349a53[_0x18b1('0x31', '#tg(')])[_0x18b1('0x32', '!9sF')]('on'); } }); $('.schico.statepop')[_0x18b1('0x33', 'v0nK')](function () { var _0x2aeb3a = { 'gedcL': '.schbox', 'HrNzG': function _0x4b294c(_0x3c4870, _0x12400b) { return _0x3c4870(_0x12400b); } }; $(this)['nextAll'](_0x2aeb3a[_0x18b1('0x34', '!9sF')])[_0x18b1('0x35', 'Hhu3')]('on'); _0x2aeb3a[_0x18b1('0x36', '#tg(')]($, '.schinput')['focus'](); }); $(_0x18b1('0x37', 'x2hZ'))[_0x18b1('0x38', '6150')](function () { var _0x994af5 = { 'FvpAk': function _0x6620e4(_0xd3fa99, _0x44696e) { return _0xd3fa99(_0x44696e); }, 'HxChY': '.schbox' }; _0x994af5[_0x18b1('0x39', 'c2IJ')]($, this)[_0x18b1('0x3a', 'BP!&')](_0x994af5['HxChY'])['removeClass']('on'); }); $('.schico.statefixed\x20a')[_0x18b1('0x3b', 'jxGf')](function (_0x50c8aa) { var _0x490362 = { 'CgYsz': '6|1|3|5|4|2|0', 'ybRfw': function _0x4ce529(_0xc0c72, _0x2b28b4) { return _0xc0c72(_0x2b28b4); }, 'kKSbF': _0x18b1('0x3c', 'Jf])'), 'mxIhX': _0x18b1('0x3d', '!NH('), 'FhyVi': _0x18b1('0x3e', 'iPrm'), 'IgrPb': function _0x543f85(_0x4fa587, _0x1838fe) { return _0x4fa587(_0x1838fe); }, 'wDOcP': function _0x3c7754(_0x51d135, _0x3b260f) { return _0x51d135(_0x3b260f); }, 'WIFgx': 'slidedown' }; var _0x477d76 = _0x490362[_0x18b1('0x3f', 'xGoY')][_0x18b1('0x40', '$GBD')]('|'), _0x45e962 = 0x0; while (!![]) { switch (_0x477d76[_0x45e962++]) { case '0': _0x490362[_0x18b1('0x41', '!NH(')]($, _0x18b1('0x42', 'Hhu3'))[_0x18b1('0x43', 'e8lZ')](); continue; case '1': if (_0x490362['ybRfw']($, '.menuico,.menu')['hasClass']('on')) { _0x490362['ybRfw']($, _0x490362[_0x18b1('0x44', 'UICF')])[_0x18b1('0x45', 's8iX')]('on'); } continue; case '2': $(this)['nextAll'](_0x490362[_0x18b1('0x46', 'gXCZ')])[_0x18b1('0x47', 'jxGf')]('on'); continue; case '3': var _0x2ac533 = navigator[_0x18b1('0x48', '8XdI')]; continue; case '4': if (_0x49efe0) { if (_0x490362[_0x18b1('0x49', 'HOk%')] === _0x490362[_0x18b1('0x4a', 'zHa*')]) { _0x490362['IgrPb']($, _0x18b1('0x4b', '^ow7'))[_0x18b1('0x4c', 'zHa*')]({ 'scrollTop': 0x0 }, 0x0); } else { _0x490362['wDOcP']($, this)[_0x18b1('0x4d', '!NH(')]()[_0x18b1('0x4e', 'poVV')](_0x490362['WIFgx'])[_0x18b1('0x4f', 'Hhu3')]()['removeClass'](_0x490362['WIFgx']); return ![]; } } continue; case '5': var _0x49efe0 = !!_0x2ac533[_0x18b1('0x50', '*Lv0')](/\(i[^;]+;( U;)? CPU.+Mac OS X/); continue; case '6': event['stopPropagation'](); continue; } break; } }); $(document)[_0x18b1('0x51', 'c5s&')](function (_0x39ba7d) { var _0x37d201 = { 'kJvif': function _0x1c0598(_0x5bf9e4, _0x19269d) { return _0x5bf9e4(_0x19269d); }, 'oqNVn': _0x18b1('0x52', '^ow7'), 'pyNAn': function _0x34b7c8(_0xecd6f3, _0x83621b) { return _0xecd6f3 === _0x83621b; }, 'TdbcE': function _0x16f7a8(_0x3f461c, _0x4eeaed) { return _0x3f461c(_0x4eeaed); } }; var _0x4e9556 = _0x37d201[_0x18b1('0x53', 'ZBbP')]($, _0x37d201['oqNVn']); if (!_0x4e9556['is'](_0x39ba7d[_0x18b1('0x54', '9Zo#')]) && _0x37d201[_0x18b1('0x55', '*Lv0')](_0x4e9556[_0x18b1('0x56', '^5U)')](_0x39ba7d[_0x18b1('0x57', 'eq&O')])[_0x18b1('0x58', 'Hhu3')], 0x0)) { _0x37d201[_0x18b1('0x59', 'zHa*')]($, _0x18b1('0x5a', 'UICF'))['removeClass']('on'); } }); $(_0x18b1('0x5b', 'VvA8'))['on'](_0x18b1('0x5c', 'gXCZ'), function () { var _0x205b0f = { 'FoSpd': function _0x4b77e0(_0x3f23d1, _0x4c57ca) { return _0x3f23d1(_0x4c57ca); }, 'DmHXP': _0x18b1('0x5d', 'ML%E'), 'gojYy': function _0x4d1a74(_0x26d029, _0x1ffea7) { return _0x26d029(_0x1ffea7); }, 'IKYhz': 'cur', 'qWRjT': function _0x5284bf(_0x4ee918, _0x37b27b) { return _0x4ee918(_0x37b27b); }, 'yBstG': _0x18b1('0x5e', 'BP!&') }; var _0x11c306 = _0x18b1('0x5f', 'ML%E')[_0x18b1('0x60', '!NH(')]('|'), _0x3dd087 = 0x0; while (!![]) { switch (_0x11c306[_0x3dd087++]) { case '0': _0x205b0f[_0x18b1('0x61', 'punP')]($, _0x205b0f[_0x18b1('0x62', 'Hhu3')])[_0x18b1('0x63', '6150')]('on'); continue; case '1': _0x205b0f[_0x18b1('0x64', 'punP')]($, _0x18b1('0x65', 'VvA8'))['toggleClass'](_0x205b0f['IKYhz']); continue; case '2': $(_0x18b1('0x66', '!c$M'))[_0x18b1('0x67', '^ow7')]('on'); continue; case '3': _0x205b0f[_0x18b1('0x68', 'VvA8')]($, this)['toggleClass']('on'); continue; case '4': _0x205b0f[_0x18b1('0x69', '^5U)')]($, _0x205b0f[_0x18b1('0x6a', 'x2hZ')])['toggleClass'](_0x205b0f[_0x18b1('0x6b', 'Jf])')]); continue; } break; } }); $('')[_0x18b1('0x6c', 'lh@T')](_0x18b1('0x6d', 'eq&O'), function (_0x473bd4) { var _0xc7f29 = { 'JQfVD': function _0x42f7ab(_0x5a8c43, _0xfde413) { return _0x5a8c43 == _0xfde413; }, 'CyGdp': _0x18b1('0x6e', 'xx2s'), 'dgOHA': function _0x61ee20(_0x424977, _0x47a7a4) { return _0x424977 !== _0x47a7a4; }, 'KfUcT': 'lWK', 'kRoZC': function _0x144189(_0x5c06c4, _0x5cebfd) { return _0x5c06c4(_0x5cebfd); }, 'FlWKM': function _0x2e9626(_0x41be39, _0x3b3348) { return _0x41be39(_0x3b3348); }, 'QppfR': _0x18b1('0x6f', 'poVV'), 'gDzyn': function _0x176c8a(_0x4c296e, _0x42a54c) { return _0x4c296e === _0x42a54c; }, 'NWZed': '_trackPageview', 'xTZjl': _0x18b1('0x70', 'Hhu3'), 'Dahvb': 'href' }; if (_0xc7f29[_0x18b1('0x71', 'zHa*')](_0x473bd4[_0x18b1('0x72', 'xx2s')], _0xc7f29[_0x18b1('0x73', '!NH(')])) { if (_0xc7f29['dgOHA'](_0xc7f29[_0x18b1('0x74', ']T$c')], _0x18b1('0x75', 'zHa*'))) { var _0x2d3ede = _0x18b1('0x76', '6@cm')[_0x18b1('0x77', 'xx2s')]('|'), _0x257aa5 = 0x0; while (!![]) { switch (_0x2d3ede[_0x257aa5++]) { case '0': _0xc7f29['kRoZC']($, '.menu,.menuico')[_0x18b1('0x78', '1hv#')]('on'); continue; case '1': _0xc7f29[_0x18b1('0x79', 'zHa*')]($, _0x18b1('0x7a', 'c5s&'))[_0x18b1('0x7b', '^5U)')](_0xc7f29[_0x18b1('0x7c', '6@cm')]); continue; case '2': $(this)['toggleClass']('on'); continue; case '3': $(_0x18b1('0x7d', 'o1e&'))[_0x18b1('0x7e', 'x2hZ')]('on'); continue; case '4': $(_0x18b1('0x7f', 'VqsX'))['toggleClass'](_0x18b1('0x80', 'Hhu3')); continue; } break; } } else { _0xc7f29['FlWKM']($, this)[_0x18b1('0x81', '$GBD')]('on'); } } else { if (_0xc7f29[_0x18b1('0x82', '9Zo#')](_0x18b1('0x83', '9Zo#'), _0x18b1('0x84', '8Y#s'))) { window[_0x18b1('0x85', '!c$M')] && window[_0x18b1('0x86', 'gXCZ')][_0x18b1('0x87', 'HOk%')]([_0xc7f29[_0x18b1('0x88', '*Lv0')], _0xc7f29['FlWKM'](jQuery, _0xc7f29[_0x18b1('0x89', 'BP!&')])[_0x18b1('0x8a', 'BP!&')](_0xc7f29[_0x18b1('0x8b', 'peu@')], pageUrl)[0x0]['pathname']['replace'](/^[^\/]/, '/')]); } else { $(this)[_0x18b1('0x8c', '^5U)')]('on'); } } }); var $thisSrc = $(_0x18b1('0x8d', 'ZBbP'))[_0x18b1('0x8e', 'zHa*')](_0x18b1('0x8f', 'c5s&')); var $thisImg = $('.saleimglist\x20ul\x20li'); $(_0x18b1('0x90', 'e8lZ'))['addClass']('on'); $thisImg[_0x18b1('0x91', 'punP')](function () { var _0x377a2f = { 'tOiYq': function _0x2bd617(_0x72f78b, _0x1ccd47) { return _0x72f78b(_0x1ccd47); }, 'voRlD': _0x18b1('0x92', 'v0nK'), 'eVnRL': _0x18b1('0x93', '0456'), 'yICIM': _0x18b1('0x94', '1hv#') }; $(this)['addClass']('on')['siblings']()[_0x18b1('0x95', 'c5s&')]('on'); var _0x31b3b6 = _0x377a2f['tOiYq']($, this)['find'](_0x377a2f['voRlD'])['attr'](_0x377a2f['eVnRL']); $(_0x377a2f[_0x18b1('0x96', '9Zo#')])[_0x18b1('0x97', 'ZBbP')](_0x18b1('0x98', 'o1e&'), _0x31b3b6); }); var $firstImg = $('.saleimglist\x20ul\x20li.on\x20img')[_0x18b1('0x99', '^ow7')](_0x18b1('0x9a', 'jxGf')); $(_0x18b1('0x9b', '!c$M'))[_0x18b1('0x9c', '(p0(')]('src', $firstImg); $(_0x18b1('0x9d', 'o1e&'))[_0x18b1('0x9e', 'e8lZ')](function () { var _0x4cacd7 = { 'jJDvH': function _0x3fe346(_0x3d8e49, _0x1bb737) { return _0x3d8e49(_0x1bb737); }, 'yUKtX': function _0x385c95(_0x48d36b, _0x452dc1) { return _0x48d36b(_0x452dc1); } }; var _0xfa594c = _0x4cacd7[_0x18b1('0x9f', 'jyyG')]($, this)[_0x18b1('0xa0', 'xGoY')](); _0x4cacd7[_0x18b1('0xa1', 'poVV')]($, this)[_0x18b1('0xa2', 'c2IJ')]('on')['siblings']()['removeClass']('on'); _0x4cacd7[_0x18b1('0xa3', '0456')]($, _0x18b1('0xa4', '(p0('))['eq'](_0xfa594c)[_0x18b1('0xa5', '9Zo#')]('on')[_0x18b1('0xa6', '9Zo#')]()[_0x18b1('0xa7', '$GBD')]('on'); }); var $window = $(window); var $slide = $(_0x18b1('0xa8', '0456')); var $countup = $(_0x18b1('0xa9', 'VqsX')); var windowHeight = $window['height'](); $(_0x18b1('0xaa', 'VqsX'))['bind'](_0x18b1('0xab', 'c5s&'), function (_0x1055a8, _0x58fec7) { var _0x139372 = { 'WYAEq': function _0x4183cc(_0xd1cd67, _0x5df99e) { return _0xd1cd67(_0x5df99e); }, 'JyFBM': 'display' }; if (_0x58fec7 == !![]) { _0x139372['WYAEq']($, this)[_0x18b1('0xac', '!9sF')](_0x139372[_0x18b1('0xad', '8XdI')]); } else { _0x139372['WYAEq']($, this)['removeClass'](_0x18b1('0xab', 'c5s&')); } }); function newPos(_0x28a49c, _0x34e2c7, _0xec6741, _0x199bd8) { var _0x33c222 = { 'xVlHK': function _0x395348(_0x16796c, _0x15e30f) { return _0x16796c + _0x15e30f; }, 'tuGYu': function _0x50b6d0(_0x361c17, _0x39da41) { return _0x361c17 / _0x39da41; } }; return _0x33c222['xVlHK'](_0x28a49c + '%\x20', _0x33c222[_0x18b1('0xae', '(p0(')](_0x34e2c7[_0x18b1('0xaf', 'eq&O')]()['top'] - _0xec6741, 0x2)) + 'px'; } function Move() { var _0xeb13f2 = { 'BIONc': 'display', 'UnrOa': function _0x505c77(_0x9d062c, _0x382c38) { return _0x9d062c + _0x382c38; }, 'waunt': function _0x1dd262(_0x1bf7ce, _0x121c30) { return _0x1bf7ce / _0x121c30; }, 'MrcbD': _0x18b1('0xb0', 'Jf])'), 'FGwNT': function _0xe8d9d(_0x10f015, _0x3518fc, _0xb123b9, _0x4c2bf6, _0x5d69b7) { return _0x10f015(_0x3518fc, _0xb123b9, _0x4c2bf6, _0x5d69b7); } }; var _0x26c114 = $window[_0x18b1('0xb1', '1hv#')](); if (tpower[_0x18b1('0xb2', '$JJ@')]) { if ($slide[_0x18b1('0xb3', '^ow7')](_0xeb13f2[_0x18b1('0xb4', 'BP!&')])) { $slide[_0x18b1('0xb5', '9Zo#')]({ 'transform': _0xeb13f2[_0x18b1('0xb6', '#ps7')](_0x18b1('0xb7', 'xx2s'), Math[_0x18b1('0xb8', 'VvA8')](_0xeb13f2[_0x18b1('0xb9', 'peu@')](_0x26c114, 0x2))) + _0xeb13f2[_0x18b1('0xba', 'jyyG')] }); } } if (tpower[_0x18b1('0xbb', 's8iX')]) { if ($countup['hasClass'](_0xeb13f2['BIONc'])) { if (navigator[_0x18b1('0xbc', '6@cm')]['match'](/mobile/i)) { $countup[_0x18b1('0xbd', 'zHa*')]({ 'backgroundPosition': 0x32 % 0x0 }); } else { $countup['css']({ 'backgroundPosition': _0xeb13f2[_0x18b1('0xbe', 'jxGf')](newPos, 0x32, $countup, _0x26c114, 0x2) }); } } } } Move(); $window['resize'](function () { var _0x5808a5 = { 'igABM': function _0x530460(_0x3498c4) { return _0x3498c4(); } }; _0x5808a5[_0x18b1('0xbf', 'VvA8')](Move); }); $window[_0x18b1('0xc0', 'ML%E')](_0x18b1('0xc1', 'xGoY'), function () { var _0x39d79c = { 'kmtHP': function _0x1b8125(_0x198104) { return _0x198104(); } }; _0x39d79c[_0x18b1('0xc2', '6150')](Move); }); function headresponse() { var _0x4cf4b8 = { 'AfDml': function _0x542005(_0x1e71f5, _0x41c85c) { return _0x1e71f5(_0x41c85c); }, 'cSmha': _0x18b1('0xc3', 'c2IJ'), 'rivYW': function _0x4747dc(_0x46828b, _0x5b69b9) { return _0x46828b === _0x5b69b9; }, 'BkOFF': _0x18b1('0xc4', 'v0nK'), 'CLQTI': '5|4|3|1|6|0|2', 'mFZDh': function _0x221732(_0x3bd48e, _0x254bbe) { return _0x3bd48e(_0x254bbe); }, 'eoVbf': _0x18b1('0xc5', 'lh@T'), 'ZJRGB': function _0x33dd82(_0x18ff1d, _0x5bbca6) { return _0x18ff1d(_0x5bbca6); }, 'xenJr': '.schinput', 'oZeIP': '.menuico,.menu', 'zYJBL': _0x18b1('0xc6', '0456') }; var _0x17e84 = _0x4cf4b8[_0x18b1('0xc7', '6S![')]($, window)['width'](); if (_0x17e84 <= 0x320) { $(_0x4cf4b8[_0x18b1('0xc8', 'c2IJ')])[_0x18b1('0xc9', 'VvA8')]('m'); $(_0x18b1('0xca', 'HOk%'))[_0x18b1('0xcb', 'punP')]('m'); } else { if (_0x4cf4b8[_0x18b1('0xcc', 's8iX')](_0x18b1('0xcd', 'VvA8'), 'lyP')) { $('.head')[_0x18b1('0xce', '6@cm')]('m'); _0x4cf4b8['AfDml']($, _0x4cf4b8[_0x18b1('0xcf', ']T$c')])[_0x18b1('0xd0', 'x2hZ')]('m'); } else { var _0x19b96a = _0x4cf4b8['CLQTI'][_0x18b1('0xd1', '$JJ@')]('|'), _0x120d2f = 0x0; while (!![]) { switch (_0x19b96a[_0x120d2f++]) { case '0': _0x4cf4b8['mFZDh']($, this)[_0x18b1('0xd2', '8XdI')](_0x4cf4b8[_0x18b1('0xd3', '8Y#s')])[_0x18b1('0xd4', 'jyyG')]('on'); continue; case '1': var _0x3bc5a8 = !!_0x14f10f[_0x18b1('0xd5', 'jxGf')](/\(i[^;]+;( U;)? CPU.+Mac OS X/); continue; case '2': _0x4cf4b8[_0x18b1('0xd6', 'eq&O')]($, _0x4cf4b8[_0x18b1('0xd7', '#ps7')])[_0x18b1('0xd8', '9Zo#')](); continue; case '3': var _0x14f10f = navigator[_0x18b1('0xd9', '^ow7')]; continue; case '4': if (_0x4cf4b8[_0x18b1('0xda', '8XdI')]($, _0x18b1('0xdb', '6@cm'))[_0x18b1('0xdc', '!9sF')]('on')) { $(_0x4cf4b8['oZeIP'])['removeClass']('on'); } continue; case '5': event['stopPropagation'](); continue; case '6': if (_0x3bc5a8) { _0x4cf4b8[_0x18b1('0xdd', 'BP!&')]($, _0x4cf4b8['zYJBL'])['animate']({ 'scrollTop': 0x0 }, 0x0); } continue; } break; } } } } $window[_0x18b1('0xde', 'xGoY')](function () { headresponse(); }); $window[_0x18b1('0xdf', 'jxGf')](_0x18b1('0xe0', '6150'), function () { var _0x3c8793 = { 'YgRBf': function _0x756def(_0x12681d) { return _0x12681d(); } }; _0x3c8793[_0x18b1('0xe1', 'VqsX')](headresponse); }); headresponse(); var $slidetitle = $(_0x18b1('0xe2', '*Lv0'))[_0x18b1('0xe3', 'c2IJ')](); $(_0x18b1('0xe4', 'o1e&'))[_0x18b1('0xe5', 'Jf])')](_0x18b1('0xe6', '$GBD'), -$slidetitle / 0x2); $('.loader')[_0x18b1('0xe7', 'e8lZ')](_0x18b1('0xe8', 'UICF')); $('#txaArticle')['focus'](function () { var _0x4ce858 = { 'xotvW': function _0xc52591(_0x5c47ae, _0x54077b) { return _0x5c47ae > _0x54077b; }, 'jZJAN': function _0x26c9d2(_0x3e9fd7, _0x234585) { return _0x3e9fd7(_0x234585); }, 'lGgdi': _0x18b1('0xe9', '@Ajj') }; var _0x1327de = $('.cmtform\x20.text')[_0x18b1('0xea', '9Zo#')]; if (_0x4ce858[_0x18b1('0xeb', 'c2IJ')](_0x1327de, 0x0)) { _0x4ce858['jZJAN']($, _0x4ce858['lGgdi'])['slideDown'](); } }); if (tpower[_0x18b1('0xec', 'ZBbP')]) { new WOW()[_0x18b1('0xed', '$JJ@')](); } if ($(_0x18b1('0xee', 'zHa*'))[_0x18b1('0xef', '6S![')]() != 0x1) { if (tpower[_0x18b1('0xf0', '6150')]) { var swiper = new Swiper(_0x18b1('0xf1', '@Ajj'), { 'pagination': _0x18b1('0xf2', 'Jf])'), 'paginationClickable': !![], 'slidesPerView': 0x1, 'spaceBetween': 0x0, 'autoplay': 0x9c4, 'loop': !![], 'prevButton': _0x18b1('0xf3', ']T$c'), 'nextButton': '.swiper-button-next', 'effect': 'fade' }); } else { var swiper = new Swiper(_0x18b1('0xf4', 'ML%E'), { 'pagination': _0x18b1('0xf5', '!NH('), 'paginationClickable': !![], 'slidesPerView': 0x1, 'spaceBetween': 0x0, 'autoplay': 0x9c4, 'loop': !![], 'prevButton': '.swiper-button-prev', 'nextButton': _0x18b1('0xf6', '(p0(') }); } } else { var swiper = new Swiper('.swiper-container', { 'pagination': _0x18b1('0xf7', 'eq&O'), 'noSwiping': !![], 'prevButton': _0x18b1('0xf8', 'Hhu3'), 'nextButton': _0x18b1('0xf9', '!NH('), 'simulateTouch': ![] }); } if (tpower['ajaxpager']) { var $loadpagenum = tpower['loadpagenum']; $[_0x18b1('0xfa', '#tg(')]({ 'thresholdMargin': -0x64, 'triggerPageThreshold': $loadpagenum, 'history': ![], 'container': _0x18b1('0xfb', 'lh@T'), 'item': '.post', 'pagination': _0x18b1('0xfc', 'punP'), 'next': '.next-page\x20a', 'loader': _0x18b1('0xfd', 'BP!&'), 'trigger': _0x18b1('0xfe', 'poVV'), 'onPageChange': function (_0x574181, _0x134285, _0x16aaa4) { var _0x4ac26c = { 'MZpyz': _0x18b1('0xff', 's8iX'), 'TbTiy': function _0x26fff7(_0x289c9e, _0x3a170b) { return _0x289c9e(_0x3a170b); }, 'nlndf': _0x18b1('0x100', 's8iX') }; window['_gaq'] && window[_0x18b1('0x101', 'lh@T')][_0x18b1('0x102', '6150')]([_0x4ac26c[_0x18b1('0x103', 'iPrm')], _0x4ac26c[_0x18b1('0x104', 'x2hZ')](jQuery, '<a/>')[_0x18b1('0x105', 'eq&O')](_0x4ac26c['nlndf'], _0x134285)[0x0][_0x18b1('0x106', 'peu@')][_0x18b1('0x107', 'xGoY')](/^[^\/]/, '/')]); } }); } if (tpower[_0x18b1('0x108', 'poVV')]) { copyright(); } if (tpower['lazyload']) { $(_0x18b1('0x109', '$GBD'))[_0x18b1('0x10a', '*Lv0')]({ 'placeholder': _0x18b1('0x10b', 'B88Y'), 'effect': _0x18b1('0x10c', '0456'), 'threshold': 0xc8 }); } if (tpower['bling']) { $(_0x18b1('0x10d', 'Hhu3'))['hide'](); $(_0x18b1('0x10e', '8XdI'))[_0x18b1('0x10f', 'VvA8')](); $('.list')[_0x18b1('0x110', ']T$c')][_0x18b1('0x111', 'poVV')] = loadingChange; function loadingChange() { var _0x27249b = { 'rULxL': function _0x4d53f9(_0x31ac5c, _0x567dc5) { return _0x31ac5c == _0x567dc5; }, 'JYIjH': function _0x192bc8(_0x3cee9, _0x944774) { return _0x3cee9(_0x944774); }, 'TBcxh': _0x18b1('0x112', 'ZBbP'), 'zKZPo': _0x18b1('0x113', 'c2IJ') }; if (_0x27249b['rULxL'](_0x27249b[_0x18b1('0x114', '^5U)')]($, _0x27249b[_0x18b1('0x115', 'BP!&')])[_0x18b1('0x116', 'Jf])')][_0x18b1('0x117', '6@cm')], _0x27249b[_0x18b1('0x118', '@Ajj')])) { setTimeout(function () { var _0x1239ce = { 'UwKHo': function _0x12c80a(_0x41e3c1, _0x2d864a) { return _0x41e3c1(_0x2d864a); }, 'KhMzx': _0x18b1('0x119', '#tg('), 'BWdxe': '.list,.news' }; if (_0x18b1('0x11a', 'x2hZ') === _0x18b1('0x11b', ']T$c')) { _0x1239ce[_0x18b1('0x11c', 'jyyG')]($, _0x18b1('0x11d', '*Lv0'))[_0x18b1('0x11e', 'Hhu3')](); } else { _0x1239ce[_0x18b1('0x11f', 'c5s&')]($, _0x1239ce['KhMzx'])[_0x18b1('0x120', '8Y#s')](); _0x1239ce['UwKHo']($, _0x1239ce['BWdxe'])[_0x18b1('0x121', 'peu@')](); } }, 0x3e8); } } loadingChange(); } if (tpower[_0x18b1('0x122', 'o1e&')]) { (function () { var _0x50d060 = { 'XmxDc': function _0x496d1b(_0x2e7eda, _0x44068a) { return _0x2e7eda(_0x44068a); }, 'hVSPz': _0x18b1('0x123', 'BP!&'), 'CpHWm': _0x18b1('0x124', '8Y#s'), 'vSUcb': _0x18b1('0x125', '$GBD'), 'dxqMV': 'body', 'QJpTX': 'title', 'vRzWI': _0x18b1('0x126', 'xx2s'), 'memss': function _0xf3f310(_0xb09c21) { return _0xb09c21(); } }; var _0x55609b = _0x50d060[_0x18b1('0x127', 'v0nK')], _0x16c4e9 = _0x50d060[_0x18b1('0x128', 'Jf])')]($, _0x50d060[_0x18b1('0x129', '!c$M')])[_0x18b1('0x12a', 'jxGf')]($(_0x50d060[_0x18b1('0x12b', 'jyyG')]))['attr'](_0x50d060[_0x18b1('0x12c', 'Hhu3')], _0x55609b)[_0x18b1('0x12d', '8XdI')](function () { _0x50d060[_0x18b1('0x12e', 'x2hZ')]($, _0x50d060[_0x18b1('0x12f', '@Ajj')])[_0x18b1('0x130', '$JJ@')]({ 'scrollTop': 0x0 }, 0x0); }), _0x47a6f5 = function () { var _0x5f1d8e = { 'FigjP': function _0x679887(_0x5ccf9b, _0x21fb2e) { return _0x5ccf9b === _0x21fb2e; }, 'eYQRF': 'fLr', 'XGywT': _0x18b1('0x131', '!NH('), 'mEauO': function _0x4e0534(_0x4612c0, _0x225baa) { return _0x4612c0(_0x225baa); }, 'PhJIF': _0x18b1('0x132', '8XdI'), 'uAofN': function _0x338b41(_0x24c23a, _0x3cc668) { return _0x24c23a(_0x3cc668); }, 'xgDSk': function _0x5e37c1(_0x2f8a27, _0x4a5fba) { return _0x2f8a27(_0x4a5fba); }, 'emmEG': function _0x184cef(_0x4be100, _0x2b604c) { return _0x4be100 > _0x2b604c; }, 'CbmWJ': 'LYL', 'FIFac': _0x18b1('0x133', '1hv#'), 'opsRe': '.head', 'CnJcG': _0x18b1('0x134', 'xGoY'), 'yiONg': function _0x40e4d0(_0x33c4cd, _0x2509f6) { return _0x33c4cd + _0x2509f6; } }; if (_0x5f1d8e['FigjP'](_0x5f1d8e[_0x18b1('0x135', 'Jf])')], _0x5f1d8e['XGywT'])) { _0x5f1d8e['mEauO']($, this)[_0x18b1('0xa', 'xx2s')](_0x5f1d8e[_0x18b1('0x136', '9Zo#')]); } else { var _0xb049bc = _0x5f1d8e[_0x18b1('0x137', 'xx2s')]($, document)[_0x18b1('0x138', 'lh@T')](), _0x21f608 = _0x5f1d8e[_0x18b1('0x139', '6S![')]($, window)[_0x18b1('0x13a', '*Lv0')](); _0x5f1d8e[_0x18b1('0x13b', 'Hhu3')](_0xb049bc, 0x1f4) ? _0x16c4e9[_0x18b1('0x13c', '0456')]() : _0x16c4e9['hide'](); if (!window[_0x18b1('0x13d', 'xGoY')]) { if (_0x5f1d8e[_0x18b1('0x13e', 'VqsX')](_0x5f1d8e[_0x18b1('0x13f', 'xGoY')], _0x5f1d8e[_0x18b1('0x140', 'e8lZ')])) { _0x5f1d8e[_0x18b1('0x141', '6150')]($, _0x5f1d8e[_0x18b1('0x142', 'punP')])[_0x18b1('0x143', '*Lv0')]('on'); } else { _0x16c4e9[_0x18b1('0x144', '8XdI')](_0x5f1d8e[_0x18b1('0x145', '6S![')], _0x5f1d8e['yiONg'](_0xb049bc, _0x21f608) - 0xa6); } } } }; $(window)[_0x18b1('0x146', ']T$c')](_0x50d060[_0x18b1('0x147', 'jxGf')], _0x47a6f5); _0x50d060['memss'](_0x47a6f5); }()); } if (tpower[_0x18b1('0x148', '9Zo#')]) { var $viewallheight = tpower[_0x18b1('0x149', 'o1e&')]; var $viewallstyle = tpower[_0x18b1('0x14a', 'x2hZ')]; var a = $('.viewall')['outerHeight'](); var arr = document[_0x18b1('0x14b', '8Y#s')][_0x18b1('0x14c', '8XdI')][_0x18b1('0x14d', 'VqsX')]('/'); var arrLen = arr['length']; var styleEle = _0x18b1('0x14e', 'UICF') + _0x18b1('0x14f', '(p0(') + $viewallheight + 'px;}' + _0x18b1('0x150', 'ML%E'); $(_0x18b1('0x151', 'o1e&'))[_0x18b1('0x152', 'Hhu3')](styleEle); var b = $(_0x18b1('0x153', '!9sF'))['outerHeight'](); var sheight = 0x64 - Math['ceil'](b / a * 0x64); if (sheight > 0x0 && arr[arrLen - 0x1]['indexOf']('_') < 0x0) { if ($viewallstyle == '1') { $(_0x18b1('0x154', '0456'))[_0x18b1('0x155', '$JJ@')](_0x18b1('0x156', 'zHa*') + sheight + '%' + _0x18b1('0x157', 'eq&O')); } else { $(_0x18b1('0x158', '#tg('))['append']('<div\x20class=\x22telesmore\x22><i>阅读更多</i></div>'); } $('.teles,.telesmore')['on'](_0x18b1('0x159', 'o1e&'), function () { var _0x4d72bb = { 'WPmmB': function _0xa13714(_0x5f1ca8, _0x342338) { return _0x5f1ca8(_0x342338); }, 'XEqOt': function _0x49b21f(_0x51cc56, _0x2a1e64) { return _0x51cc56(_0x2a1e64); } }; _0x4d72bb['WPmmB']($, _0x18b1('0x15a', 'VvA8'))['animate']({ 'height': a }, function () { var _0xf0ff80 = { 'IKpju': function _0x1713dc(_0x1fd3fd, _0xc0a0ac) { return _0x1fd3fd === _0xc0a0ac; }, 'ZfCIk': _0x18b1('0x15b', 'ML%E'), 'gtvaT': function _0x4824b5(_0x4104e7, _0x36d6d3) { return _0x4104e7(_0x36d6d3); }, 'IiNjz': 'auto' }; if (_0xf0ff80['IKpju'](_0x18b1('0x15c', 'e8lZ'), _0x18b1('0x15d', '6150'))) { $(_0xf0ff80[_0x18b1('0x15e', 'zHa*')])[_0x18b1('0x15f', '$GBD')](_0x18b1('0x160', 'zHa*')); } else { _0xf0ff80[_0x18b1('0x161', 's8iX')]($, _0xf0ff80[_0x18b1('0x162', 'Jf])')])[_0x18b1('0xbd', 'zHa*')]('height', _0xf0ff80[_0x18b1('0x163', 'xGoY')]); } }); _0x4d72bb['XEqOt']($, this)[_0x18b1('0x164', '1hv#')](); return ![]; }); } else { $('.viewall')['css'](_0x18b1('0x165', 'o1e&'), 'auto'); } } console[_0x18b1('0x166', '6150')]('%c' + '1234567890!', _0x18b1('0x167', '1hv#'));; if (!(typeof encode_version !== _0x18b1('0x168', 'ML%E') && encode_version === _0x18b1('0x169', 'o1e&'))) { window['alert'](_0x18b1('0x16a', '9Zo#')); }; encode_version = 'sojson.v5'; }); $(document).keyup(function (event) { switch (event.keyCode) { case 27: $(".schbox,.schfixed").removeClass("on"); case 96: $(".schbox,.schfixed").removeClass("on"); } });
0xff & ~(1<<0),0xff & ~(1<<1)这两个值是多少?
![图片说明](https://img-ask.csdn.net/upload/201901/30/1548840900_299584.png) 就是这个
新手求教,DS1302读出来的都是0XFF?
/************************* 写一个字节 **************************/ void DS1302_Write(uchar add,uchar dat) { uchar i; DS1302_CE=0; Delay10us(); DS1302_SCLK=0; Delay10us(); DS1302_CE=1; Delay10us(); for(i=0;i<8;i++)//最低位开始送 { DS1302_IO=add&0X01; add=add>>1; Delay10us(); DS1302_SCLK=1; Delay10us(); DS1302_SCLK=0; Delay10us(); } for(i=0;i<8;i++) { DS1302_IO=dat&0X01; dat=dat>>1; Delay10us(); DS1302_SCLK=1; Delay10us(); DS1302_SCLK=0; Delay10us(); } DS1302_CE=0; Delay10us(); } /************************* 读一个字节 **************************/ uchar DS1302_Read(uchar add) { uchar i,abit,dat; DS1302_CE=0; Delay10us(); DS1302_SCLK=0; Delay10us(); DS1302_CE=1; Delay10us(); for(i=0;i<8;i++)//先写地址 { DS1302_IO=add&0X01; add=add>>1; Delay10us(); DS1302_SCLK=1; Delay10us(); if(i==7)break; DS1302_SCLK=0; Delay10us(); } for(i=0;i<8;i++)//再读数据 { DS1302_SCLK=0; Delay10us(); abit=DS1302_IO; abit=abit<<i; dat=dat|abit; if(i==7)break; DS1302_SCLK=1; Delay10us(); } DS1302_CE=0; Delay10us(); ///////////// DS1302_SCLK=1; Delay10us(); DS1302_IO=0; Delay10us(); DS1302_IO=1; Delay10us(); ///////////// return dat; } 先说明几点,让大家方向弄对来。 1硬件都是好的,是我代码写错了(我用别人写的试过了,是能读出来的)。 2写保护已经关闭了。 问题一:为什么IO读出来的都是1?貌似根本没读到。 问题二:为什么要加最后面那几句(////里面的)?那几句时序图上并没有出现。 菜鸟求助,好人一生平安!
处有未经处理的异常: 0xC0000005: 读取位置 0xff
调试出错: rtt = mysql_real_query(con, tmp, strlen(tmp)); #include "MySQLBool.h" MySQLBool::MySQLBool() { } MySQLBool::~MySQLBool() { } bool MySQLBool::operate(char tmp[]) { int rt = mysql_real_query(con, tmp, strlen(tmp)); if (rt) { printf("Error making query: %s !!!\n", mysql_error(con)); return false; } else { return true; } } bool MySQLBool::checkExist(char tmp[]) { MYSQL_RES * res1; MYSQL_ROW row; int rtt; rtt = mysql_real_query(con, tmp, strlen(tmp)); if (rtt) { printf("Error making query: %s !!!\n", mysql_error(con)); } res1 = mysql_store_result(con); // 将结果保存在res结构体中 bool isExist = false; while (row = mysql_fetch_row(res1)) { isExist = true; } mysql_free_result(res1); return isExist; }
标题:proteus数码管动态显示不了,而且图中的P0^6 I/O口也没有给出值
![图片说明](https://img-ask.csdn.net/upload/202002/09/1581239910_2307.png) 它没有六个数码管一起显示,是轮流显示,而且有残影,P0^6也没有值 是代码问题吗,还是proteus仿真软件本身的问题,还是我连线连错,就算我连错了,P0^0口也不会没有输出啊 ``` #include<reg52.h> sbit ADDR0=P1^4; sbit ADDR1=P1^3; sbit ADDR2=P1^2; sbit ADDR3=P1^1; sbit ENLED=P1^0; unsigned char code LedChar[]={ 0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8, 0x80,0x90,0x88,0x83,0xC6,0xA1,0x86,0x8E }; unsigned char LedBuff[6]={ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF }; void main() { unsigned char i =0; unsigned int cnt =0; unsigned long sec =0; ENLED=0; ADDR3=1; TMOD=0x01; TH0=0xFC; TL0=0x67; TR0=1; while(1) { if(TF0==1) { TF0=0; TH0=0xFC; TL0=0x67; cnt++; if(cnt>=1000) { cnt=0; sec++; LedBuff[0]=LedChar[sec%10]; LedBuff[1]=LedChar[sec/10%10]; LedBuff[2]=LedChar[sec/100%10]; LedBuff[3]=LedChar[sec/1000%10]; LedBuff[4]=LedChar[sec/10000%10]; LedBuff[5]=LedChar[sec/100000%10]; } P0=0xFF; switch(i) { case 0:ADDR2=0;ADDR1=0;ADDR0=0;i++;P0=LedBuff[0];break; case 1:ADDR2=0;ADDR1=0;ADDR0=1;i++;P0=LedBuff[1];break; case 2:ADDR2=0;ADDR1=1;ADDR0=0;i++;P0=LedBuff[2];break; case 3:ADDR2=0;ADDR1=1;ADDR0=1;i++;P0=LedBuff[3];break; case 4:ADDR2=1;ADDR1=0;ADDR0=0;i++;P0=LedBuff[4];break; case 5:ADDR2=1;ADDR1=0;ADDR0=1;i=0;P0=LedBuff[5];break; default:break; } } } } ```
如何将jpeg图片组写入m-jpeg编码的avi
我把avi的封装写好了,并在movi的chunk处插入了多帧jpeg图片组,但是出来的avi文件为什么只有1秒,而且黑屏没有图像,郁闷 下面是我写入avi的字节数据,我在#后面插入的jpeg图片组, 0x52 0x49 0x46 0x46 0xff 0xff 0xff 0xff 0x41 0x56 0x49 0x20 0x4c 0x49 0x53 0x54 0xff 0xff 0xff 0xff 0x68 0x64 0x72 0x6c 0x61 0x76 0x69 0x68 0x38 0x0 0x0 0x0 0x40 0x42 0xf 0x0 #1fps用于测试# 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x10 0x09 0x0 0x0 0xff 0xff 0xff 0xff 0x0 0x0 0x0 0x0 0x1 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x5 0x0 0x0 0xd0 0x2 0x0 0x0 #(1280*720)# 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x4c 0x49 0x53 0x54 0xff 0xff 0xff 0xff 0x73 0x74 0x72 0x6c 0x73 0x74 0x72 0x68 0x38 0x0 0x0 0x0 0x76 0x69 0x64 0x73 0x4d 0x4a 0x50 0x47 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x1 0x0 0x0 0x0 0x1 0x0 0x0 0x0 #1fps# 0x0 0x0 0x0 0x0 0xff 0xff 0xff 0xff 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x73 0x74 0x72 0x66 0x28 0x0 0x0 0x0 0x28 0x0 0x0 0x0 0x60 0x1 0x0 0x0 0x20 0x1 0x0 0x0 0x1 0x0 0x8 0x1 0x4d 0x4a 0x50 0x47 0x2c 0x1 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x4c 0x49 0x53 0x54 0xff 0xff 0xff 0xff 0x6d 0x6f 0x76 0x69 0x30 0x30 0x64 0x63 0xff 0xff 0xff 0xff #####jpeg img ####
求两块74hc595驱动4个8乘以8的led点阵的程序详解及原理
#include <REG51.H> //--重定义函数变量--// #define uchar unsigned char #define uint unsigned int #define ulong unsigned long //--定义SPI要使用的 IO--// sbit MOSIO = P3^4; sbit R_CLK = P3^5; sbit S_CLK = P3^6; //---全局变量声明--// ulong column; //点阵列 ulong row; //点阵行 ulong dt; //--点阵显示数组--// uchar code tab0[] = {0x00, 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x08, 0x00, 0x10, 0x00, 0x20, 0x00, 0x40, 0x00, 0x80, 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x08, 0x00, 0x10, 0x00, 0x20, 0x00, 0x40, 0x00, 0x80, 0x00}; //--10字模--// uchar code tab1[] = {0, 0, 0, 0, 0, 0, 8, 24, 14, 36, 8, 66, 8, 66, 8, 66, 8, 66, 8, 66, 8, 66, 8, 36, 62, 24, 0, 0, 0, 0, 0, 0}; //--09字模--// uchar code tab2[] = {0, 0, 0, 0, 0, 0, 24, 24, 36, 36, 66, 66, 66, 66, 66, 66, 66, 100, 66, 88, 66, 64, 66, 64, 36, 36, 24, 28, 0, 0, 0, 0} ; //--08字模--// uchar code tab3[] = {0, 0, 0, 0, 0, 0, 24, 60, 36, 66, 66, 66, 66, 66, 66, 36, 66, 24, 66, 36, 66, 66, 66, 66, 36, 66, 24, 60, 0, 0, 0, 0}; //--07字模--// uchar code tab4[] = {0, 0, 0, 0, 0, 0, 24, 126, 36, 34, 66, 34, 66, 16, 66, 16, 66, 8, 66, 8, 66, 8, 66, 8, 36, 8, 24, 8, 0, 0, 0, 0}; //--06字模--// uchar code tab5[] = {0, 0, 0, 0, 0, 0, 24, 56, 36, 36, 66, 2, 66, 2, 66, 26, 66, 38, 66, 66, 66, 66, 66, 66, 36, 36, 24, 24, 0, 0, 0, 0}; //--05字模--// uchar code tab6[] = {0, 0, 0, 0, 0, 0, 24, 126, 36, 2, 66, 2, 66, 2, 66, 26, 66, 38, 66, 64, 66, 64, 66, 66, 36, 34, 24, 28, 0, 0, 0, 0}; //--04字模--// uchar code tab7[] = {0, 0, 0, 0, 0, 0, 24, 32, 36, 48, 66, 40, 66, 36, 66, 36, 66, 34, 66, 34, 66, 126, 66, 32, 36, 32, 24, 120, 0, 0, 0, 0}; //--03字模--// uchar code tab8[] = {0, 0, 0, 0, 0, 0, 24, 60, 36, 66, 66, 66, 66, 32, 66, 24, 66, 32, 66, 64, 66, 64, 66, 66, 36, 34, 24, 28, 0, 0, 0, 0}; //--02字模--// uchar code tab9[] = {0, 0, 0, 0, 0, 0, 24, 60, 36, 66, 66, 66, 66, 66, 66, 32, 66, 32, 66, 16, 66, 8, 66, 4, 36, 66, 24, 126, 0, 0, 0, 0}; //--01字模--// uchar code tab10[] = {0, 0, 0, 0, 0, 0, 24, 8, 36, 14, 66, 8, 66, 8, 66, 8, 66, 8, 66, 8, 66, 8, 66, 8, 36, 8, 24, 62, 0, 0, 0, 0}; //--00字模--// uchar code tab11[] = {0, 0, 0, 0, 0, 0, 24, 24, 36, 36, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 36, 36, 24, 24, 0, 0, 0, 0}; //--GO--// uchar code tab12[] = {0, 0, 0, 0, 0, 0, 60, 28, 34, 34, 34, 65, 1, 65, 1, 65, 1, 65, 113, 65, 33, 65, 34, 65, 34, 34, 28, 28, 0, 0, 0, 0}; //--全局函数声明--// void HC595SendData( uchar BT3, uchar BT2,uchar BT1,uchar BT0); /******************************************************************************* * 函 数 名 : main * 函数功能 : 主函数 * 输 入 : 无 * 输 出 : 无 *******************************************************************************/ void main(void) { int k, i, ms; i = 60; //显示时间 while(1) { //--显示10--// for(ms = i; ms > 0; ms--) { for(k = 0; k < 16; k++) { HC595SendData(~tab1[2*k +1],~tab1[2*k],tab0[2*k],tab0[2*k + 1]); } } //--清屏--// HC595SendData(0xff,0xff,0,0); //--显示09--// for(ms = i; ms > 0; ms--) { for(k = 0; k < 16; k++) { HC595SendData(~tab2[2*k +1],~tab2[2*k],tab0[2*k],tab0[2*k + 1]); } } //--清屏--// HC595SendData(0xff,0xff,0,0); //--显示08--// for(ms = i; ms > 0; ms--) { for(k = 0; k < 16; k++) { HC595SendData(~tab3[2*k +1],~tab3[2*k],tab0[2*k],tab0[2*k + 1]); } } //--清屏--// HC595SendData(0xff,0xff,0,0); //--显示07--// for(ms = i; ms > 0; ms--) { for(k = 0; k < 16; k++) { HC595SendData(~tab4[2*k +1],~tab4[2*k],tab0[2*k],tab0[2*k + 1]); } } //--清屏--// HC595SendData(0xff,0xff,0,0); //--显示06--// for(ms = i; ms > 0; ms--) { for(k = 0; k < 16; k++) { HC595SendData(~tab5[2*k +1],~tab5[2*k],tab0[2*k],tab0[2*k + 1]); } } //--清屏--// HC595SendData(0xff,0xff,0,0); //--显示05--// for(ms = i; ms > 0; ms--) { for(k = 0; k < 16; k++) //欢 { HC595SendData(~tab6[2*k +1],~tab6[2*k],tab0[2*k],tab0[2*k + 1]); } } //--清屏--// HC595SendData(0xff,0xff,0,0); //--显示04--// for(ms = i; ms > 0; ms--) { for(k = 0; k < 16; k++) { HC595SendData(~tab7[2*k +1],~tab7[2*k],tab0[2*k],tab0[2*k + 1]); } } //--清屏--// HC595SendData(0xff,0xff,0,0); //--显示03--// for(ms = i; ms > 0; ms--) { for(k = 0; k < 16; k++) { HC595SendData(~tab8[2*k +1],~tab8[2*k],tab0[2*k],tab0[2*k + 1]); } } //--清屏--// HC595SendData(0xff,0xff,0,0); //--显示02--// for(ms = i; ms > 0; ms--) { for(k = 0; k < 16; k++) { HC595SendData(~tab9[2*k +1],~tab9[2*k],tab0[2*k],tab0[2*k + 1]); } } //--清屏--// HC595SendData(0xff,0xff,0,0); //--显示01--// for(ms = i; ms > 0; ms--) { for(k = 0; k < 16; k++) { HC595SendData(~tab10[2*k +1],~tab10[2*k],tab0[2*k],tab0[2*k + 1]); } } //--清屏--// HC595SendData(0xff,0xff,0,0); //--显示00--// for(ms = i; ms > 0; ms--) { for(k = 0; k < 16; k++) { HC595SendData(~tab11[2*k +1],~tab11[2*k],tab0[2*k],tab0[2*k + 1]); } } //--清屏--// HC595SendData(0xff,0xff,0,0); //清屏 //--一直显示G0--// while(1) { for(k = 0; k < 16; k++) //中 { HC595SendData(~tab12[2*k +1],~tab12[2*k],tab0[2*k],tab0[2*k + 1]); } } } } /******************************************************************************* * 函 数 名 : HC595SendData * 函数功能 : 通过595发送四个字节的数据 * 输 入 : BT3:第四个595输出数值 * * BT2: 第三个595输出数值 * * BT1:第二个595输出数值 * * BT0:第一个595输出数值 * 输 出 : 无 *******************************************************************************/ void HC595SendData( uchar BT3, uchar BT2,uchar BT1,uchar BT0) { uchar i; //--发送第一个字节--// for(i=0;i<8;i++) { MOSIO = BT3 >> 7 ; //从高位到低位 BT3 <<= 1; S_CLK = 0; S_CLK = 1; } //--发送第一个字节--// for(i=0;i<8;i++) { MOSIO = BT2 >>7; //从高位到低位 BT2 <<= 1; S_CLK = 0; S_CLK = 1; } //--发送第一个字节--// for(i=0;i<8;i++) { MOSIO = BT1 >> 7; //从高位到低位 BT1 <<= 1; S_CLK = 0; S_CLK = 1; } //--发送第一个字节--// for(i=0;i<8;i++) { MOSIO = BT0 >> 7; //从高位到低位 BT0 <<= 1; S_CLK = 0; S_CLK = 1; } //--输出--// R_CLK = 0; //set dataline low R_CLK = 1; //片选 R_CLK = 0; //set dataline low } 顺便帮忙解释一下这个程序
求帮忙把这段校验代码翻译成JAVA
const u8 CRCHi[] = { 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0,0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0,0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1,0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1,0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0,0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1,0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0,0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0,0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0,0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0,0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0,0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1,0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0,0x80, 0x41, 0x00, 0xC1, 0x81, 0x40} ; const u8 CRCLo[] = { 0x00, 0xC0, 0xC1, 0x01, 0xC3, 0x03, 0x02, 0xC2, 0xC6, 0x06,0x07, 0xC7, 0x05, 0xC5, 0xC4, 0x04, 0xCC, 0x0C, 0x0D, 0xCD, 0x0F, 0xCF, 0xCE, 0x0E, 0x0A, 0xCA, 0xCB, 0x0B, 0xC9, 0x09,0x08, 0xC8, 0xD8, 0x18, 0x19, 0xD9, 0x1B, 0xDB, 0xDA, 0x1A, 0x1E, 0xDE, 0xDF, 0x1F, 0xDD, 0x1D, 0x1C, 0xDC, 0x14, 0xD4,0xD5, 0x15, 0xD7, 0x17, 0x16, 0xD6, 0xD2, 0x12, 0x13, 0xD3, 0x11, 0xD1, 0xD0, 0x10, 0xF0, 0x30, 0x31, 0xF1, 0x33, 0xF3,0xF2, 0x32, 0x36, 0xF6, 0xF7, 0x37, 0xF5, 0x35, 0x34, 0xF4, 0x3C, 0xFC, 0xFD, 0x3D, 0xFF, 0x3F, 0x3E, 0xFE, 0xFA, 0x3A,0x3B, 0xFB, 0x39, 0xF9, 0xF8, 0x38, 0x28, 0xE8, 0xE9, 0x29, 0xEB, 0x2B, 0x2A, 0xEA, 0xEE, 0x2E, 0x2F, 0xEF, 0x2D, 0xED,0xEC, 0x2C, 0xE4, 0x24, 0x25, 0xE5, 0x27, 0xE7, 0xE6, 0x26, 0x22, 0xE2, 0xE3, 0x23, 0xE1, 0x21, 0x20, 0xE0, 0xA0, 0x60,0x61, 0xA1, 0x63, 0xA3, 0xA2, 0x62, 0x66, 0xA6, 0xA7, 0x67, 0xA5, 0x65, 0x64, 0xA4, 0x6C, 0xAC, 0xAD, 0x6D, 0xAF, 0x6F,0x6E, 0xAE, 0xAA, 0x6A, 0x6B, 0xAB, 0x69, 0xA9, 0xA8, 0x68, 0x78, 0xB8, 0xB9, 0x79, 0xBB, 0x7B, 0x7A, 0xBA, 0xBE, 0x7E,0x7F, 0xBF, 0x7D, 0xBD, 0xBC, 0x7C, 0xB4, 0x74, 0x75, 0xB5, 0x77, 0xB7, 0xB6, 0x76, 0x72, 0xB2, 0xB3, 0x73, 0xB1, 0x71,0x70, 0xB0, 0x50, 0x90, 0x91, 0x51, 0x93, 0x53, 0x52, 0x92, 0x96, 0x56, 0x57, 0x97, 0x55, 0x95, 0x94, 0x54, 0x9C, 0x5C,0x5D, 0x9D, 0x5F, 0x9F, 0x9E, 0x5E, 0x5A, 0x9A, 0x9B, 0x5B, 0x99, 0x59, 0x58, 0x98, 0x88, 0x48, 0x49, 0x89, 0x4B, 0x8B,0x8A, 0x4A, 0x4E, 0x8E, 0x8F, 0x4F, 0x8D, 0x4D, 0x4C, 0x8C, 0x44, 0x84, 0x85, 0x45, 0x87, 0x47, 0x46, 0x86, 0x82, 0x42,0x43, 0x83, 0x41, 0x81, 0x80, 0x40} ; u16 CRC_calc(u8 *pStr, u8 Len) { u8 RsltHi = 0xFF ; u8 RsltLo = 0xFF ; u8 Index ; while (Len--) { Index = RsltHi ^ *(pStr++); RsltHi = RsltLo ^ CRCHi[Index]; RsltLo = CRCLo[Index] ; } return (RsltLo<<8)|RsltHi; }
某公司出的题目,要做出来给面试
直接贴代码,看注释部分,大家懂的,我研究了三天无果,觉得是恨变态的智力游戏。。。 (把 input 数组改了,让程序main 函数 正常退出) ``` #include <string.h> typedef unsigned char u8; typedef unsigned int u32; u8 confusion[512]={ 0xac,0xd1,0x25,0x94,0x1f,0xb3,0x33,0x28,0x7c,0x2b,0x17,0xbc,0xf6,0xb0,0x55,0x5d, 0x8f,0xd2,0x48,0xd4,0xd3,0x78,0x62,0x1a,0x02,0xf2,0x01,0xc9,0xaa,0xf0,0x83,0x71, 0x72,0x4b,0x6a,0xe8,0xe9,0x42,0xc0,0x53,0x63,0x66,0x13,0x4a,0xc1,0x85,0xcf,0x0c, 0x24,0x76,0xa5,0x6e,0xd7,0xa1,0xec,0xc6,0x04,0xc2,0xa2,0x5c,0x81,0x92,0x6c,0xda, 0xc6,0x86,0xba,0x4d,0x39,0xa0,0x0e,0x8c,0x8a,0xd0,0xfe,0x59,0x96,0x49,0xe6,0xea, 0x69,0x30,0x52,0x1c,0xe0,0xb2,0x05,0x9b,0x10,0x03,0xa8,0x64,0x51,0x97,0x02,0x09, 0x8e,0xad,0xf7,0x36,0x47,0xab,0xce,0x7f,0x56,0xca,0x00,0xe3,0xed,0xf1,0x38,0xd8, 0x26,0x1c,0xdc,0x35,0x91,0x43,0x2c,0x74,0xb4,0x61,0x9d,0x5e,0xe9,0x4c,0xbf,0x77, 0x16,0x1e,0x21,0x1d,0x2d,0xa9,0x95,0xb8,0xc3,0x8d,0xf8,0xdb,0x34,0xe1,0x84,0xd6, 0x0b,0x23,0x4e,0xff,0x3c,0x54,0xa7,0x78,0xa4,0x89,0x33,0x6d,0xfb,0x79,0x27,0xc4, 0xf9,0x40,0x41,0xdf,0xc5,0x82,0x93,0xdd,0xa6,0xef,0xcd,0x8d,0xa3,0xae,0x7a,0xb6, 0x2f,0xfd,0xbd,0xe5,0x98,0x66,0xf3,0x4f,0x57,0x88,0x90,0x9c,0x0a,0x50,0xe7,0x15, 0x7b,0x58,0xbc,0x07,0x68,0x3a,0x5f,0xee,0x32,0x9f,0xeb,0xcc,0x18,0x8b,0xe2,0x57, 0xb7,0x49,0x37,0xde,0xf5,0x99,0x67,0x5b,0x3b,0xbb,0x3d,0xb5,0x2d,0x19,0x2e,0x0d, 0x93,0xfc,0x7e,0x06,0x08,0xbe,0x3f,0xd9,0x2a,0x70,0x9a,0xc8,0x7d,0xd8,0x46,0x65, 0x22,0xf4,0xb9,0xa2,0x6f,0x12,0x1b,0x14,0x45,0xc7,0x87,0x31,0x60,0x29,0xf7,0x73, 0x2c,0x97,0x72,0xcd,0x89,0xa6,0x88,0x4c,0xe8,0x83,0xeb,0x59,0xca,0x50,0x3f,0x27, 0x4e,0xae,0x43,0xd5,0x6e,0xd0,0x99,0x7b,0x7c,0x40,0x0c,0x52,0x86,0xc1,0x46,0x12, 0x5a,0x28,0xa8,0xbb,0xcb,0xf0,0x11,0x95,0x26,0x0d,0x34,0x66,0x22,0x18,0x6f,0x51, 0x9b,0x3b,0xda,0xec,0x5e,0x00,0x2a,0xf5,0x8f,0x61,0xba,0x96,0xb3,0xd1,0x30,0xdc, 0x33,0x75,0xe9,0x6d,0xc8,0xa1,0x3a,0x3e,0x5f,0x9d,0xfd,0xa9,0x31,0x9f,0xaa,0x85, 0x2f,0x92,0xaf,0x67,0x78,0xa5,0xab,0x03,0x21,0x4f,0xb9,0xad,0xfe,0xf3,0x42,0xfc, 0x17,0xd7,0xee,0xa3,0xd8,0x80,0x14,0x2e,0xa0,0x47,0x55,0xc4,0xff,0xe5,0x13,0x3f, 0x81,0xb6,0x7a,0x94,0xd0,0xb5,0x54,0xbf,0x91,0xa7,0x37,0xf1,0x6b,0xc9,0x1b,0xb1, 0x3c,0xb6,0xd9,0x32,0x24,0x8d,0xf2,0x82,0xb4,0xf9,0xdb,0x7d,0x44,0xfb,0x1e,0xd4, 0xea,0x5d,0x35,0x69,0x23,0x71,0x57,0x01,0x06,0xe4,0x55,0x9a,0xa4,0x58,0x56,0xc7, 0x4a,0x8c,0x8a,0xd6,0x6a,0x49,0x70,0xc5,0x8e,0x0a,0x62,0xdc,0x29,0x4b,0x42,0x41, 0xcb,0x2b,0xb7,0xce,0x08,0xa1,0x76,0x1d,0x1a,0xb8,0xe3,0xcc,0x7e,0x48,0x20,0xe6, 0xf8,0x45,0x93,0xde,0xc3,0x63,0x0f,0xb0,0xac,0x5c,0xba,0xdf,0x07,0x77,0xe7,0x4e, 0x1f,0x28,0x10,0x6c,0x59,0xd3,0xdd,0x2d,0x65,0x39,0xb2,0x74,0x84,0x3d,0xf4,0xbd, 0xc7,0x79,0x60,0x0b,0x4d,0x33,0x36,0x25,0xbc,0xe0,0x09,0xcf,0x5b,0xe2,0x38,0x9e, 0xc0,0xef,0xd2,0x16,0x05,0xbe,0x53,0xf7,0xc2,0xc6,0xa2,0x24,0x98,0x1c,0xad,0x04}; u32 diffusion[32]={ 0xf26cb481,0x16a5dc92,0x3c5ba924,0x79b65248,0x2fc64b18,0x615acd29,0xc3b59a42,0x976b2584, 0x6cf281b4,0xa51692dc,0x5b3c24a9,0xb6794852,0xc62f184b,0x5a6129cd,0xb5c3429a,0x6b978425, 0xb481f26c,0xdc9216a5,0xa9243c5b,0x524879b6,0x4b182fc6,0xcd29615a,0x9a42c3b5,0x2584976b, 0x81b46cf2,0x92dca516,0x24a95b3c,0x4852b679,0x184bc62f,0x29cd5a61,0x429ab5c3,0x84256b97}; u8 input[32]={ //change only this : 0x66,0xd5,0x4e,0x28,0x5f,0xff,0x6b,0x53,0xac,0x3b,0x34,0x14,0xb5,0x3c,0xb2,0xc6, 0xa4,0x85,0x1e,0x0d,0x86,0xc7,0x4f,0xba,0x75,0x5e,0xcb,0xc3,0x6e,0x48,0x79,0x8f // }; void Forward(u8 c[32],u8 d[32],u8 s[512],u32 p[32]) { for(u32 i=0;i<256;i++) { for(u8 j=0;j<32;j++) { d[j]=s[c[j]]; c[j]=0; } for(u8 j=0;j<32;j++) for(u8 k=0;k<32;k++) c[j]^=d[k]*((p[j]>>k)&1); } for(u8 i=0;i<16;i++) d[i]=s[c[i*2]]^s[c[i*2+1]+256]; } int main(int argc, char* argv[]) { u8 target[]="Hire me!!!!!!!!"; u8 output[32]; Forward(input,output,confusion,diffusion); return memcmp(output,target,16); } ```
ESP8266-SDK 串口中断 当串口接收到连续两个0xFF的时候,会触发多次中断,如何避免?
* 我们知道当串口接收到数据的时候,会触发串口中断,触发串口中断后会在 ``` LOCAL void uart0_rx_intr_handler(void *para) ``` 这个函数中处理数据,我们在这个函数中首先计算FIFO中接收到的数据长度,然后打印出FIFO的长度 ``` uint8 fifo_len = (READ_PERI_REG(UART_STATUS(UART0))>>UART_RXFIFO_CNT_S)&UART_RXFIFO_CNT; os_printf("fifo_len: %d !!!!!!!!!\r\n",fifo_len); ``` 此时例如发送如下数据 (26byte 16进制) 01 02 03 00 FF FF 37 12 53 75 12 FA AA 12 AA AA 52 73 57 12 53 AA AA 73 01 0F 可能接收数据的时候会分成两次接收,即触发了两次串口中断,一次中断接收01 02 03 FF FF ,然后再一次中断接收37 12 53 75 12 FA AA 12 AA AA 52 73 57 12 53 AA AA 73 01 0F ,因为从打印结果如下! ![图片说明](https://img-ask.csdn.net/upload/201811/05/1541386155_139747.jpg) 可以看到有时候fifo_len为完整的26个byte;而有时候则打印则连续两次,这说明 ``` LOCAL void uart0_rx_intr_handler(void *para) ``` 被执行了两次,即串口中断被触发了两次 此时我们将数据中的两个连续的 FF FF改成其他数据,例如改成12 23,即改接收如下数据 01 02 03 00 12 23 37 12 53 75 12 FA AA 12 AA AA 52 73 57 12 53 AA AA 73 01 0F 此时,就不会再出现中断被触发两次的情况,但是发送数据连续两个 FF FF也是不可避免的,要怎么解决这个问题,即使发送两个 FF FF也只触发一次中断??
请问有使用过ethtool -s eth* advertise 0xff这样格式的命令的么?
如题如题如题如题如题如题如题如题如题如题如题如题如题如题如题如题如题如题!
CRC校验代码看不懂,请求高手支招。目前我看不懂的一篇CRC校验文章和一套逆序CRC校验。
#各位大神,我看不懂这篇文章还有一段逆序CRC代码。请各位大神帮帮忙: ## 1、文章(链接地址:https://wenku.baidu.com/view/9f7b55876f1aff00bed51ec0.html) 下面为不完全版 CRC(Cyclic Redundancy Check)校验应用较为广泛,以前为了处理简单,在程序中大多数采用LRC(Longitudinal Redundancy Check)校验,LRC校验很好理解,编程实现简单。用了一天时间研究了CRC的C语言实现,理解和掌握了基本原理和C语言编程。结合自己的理解简单写下来。 1、CRC简介 CRC检验的基本思想是利用线性编码理论,在发送端根据要传送的k位二进制码序列,以一定的规则产生一个检验码r位(就是CRC码),附在信息后面,构成一个新的二进制码序列数共(k+r)位,最后发送出去。接收端根据同样的规则校验,以确定传送中是否出错。接收端有两种处理方式:1、计算k位序列的CRC码,与接收到的CRC比较,一致则接收正确。2、计算整个k+r位的CRC码,若为0,则接收正确。 CRC码有多种检验位数,8位、16位、32位等,原理相同。16位的CRC码产生的规则是先将要发送的二进制序列数左移16位(即乘以2的16次方后),除以一个多项式,最后所得到的余数就是CRC码。 求CRC码所采用的是模2运算法则,即多项式除法中采用不带借位的减法运算,运算等同于异或运算。这一点要仔细理解,是编程的基础。 CRC-16: (美国二进制同步系统中采用) G(X) = X16 + X15 + X2 + 1 CRC-CCITT: (由欧洲CCITT推荐) G(X) = X16 + X12 + X5 + 1 CRC-32: G(X) = X32 + X26 + X23 + X22 + X16 +X12 + X11 + X10 + X8 + X7 + X5 + X4 + X2 + X1 + 1 2、按位计算CRC 采用CRC-CCITT多项式,多项式为0x11021,C语言编程时,参与计算为0x1021,这个地方得深入思考才能体会其中的奥妙,分享一下我的思路:当按位计算CRC时,例如计算二进制序列为1001 1010 1010 1111时,将二进制序列数左移16位,即为1001 1010 1010 1111 (0000 0000 0000 0000),实际上该二进制序列可拆分为1000 0000 0000 0000 (0000 0000 0000 0000) + 000 0000 0000 0000 (0000 0000 0000 0000) + 00 0000 0000 0000 (0000 0000 0000 0000) + 1 0000 0000 0000 (0000 0000 0000 0000) + …… 现在开始分析运算: <1>对第一个二进制分序列求余数,竖式除法即为0x10000 ^ 0x11021运算,后面的0位保留; <2>接着对第二个二进制分序列求余数,将第一步运算的余数*2后再和第二个二进制分序列一起对0x11021求余,这一步理解应该没什么问题。如果该分序列为0,无需计算。 <3>对其余的二进制序列求余与上面两步相同。 <4>计算到最后一位时即为整个二进制序列的余数,即为CRC校验码。 该计算方法相当于对每一位计算,运算过程很容易理解,所占内存少,缺点是一位一位计算比较耗时。 下面给出C语言实现方法: 复制代码 代码如下: ## 第一段代码 unsigned char test[16] = {0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88,0x99,0xaa,0xbb,0xcc,0xdd,0xee,0xff}; unsigned char len = 16; void main( void ) { unsigned long temp = 0; unsigned int crc; unsigned char i; unsigned char *ptr = test; while( len-- ) { for(i = 0x80; i != 0; i = i >> 1) { temp = temp * 2; if((temp & 0x10000) != 0) temp = temp ^ 0x11021; if((*ptr & i) != 0) temp = temp ^ (0x10000 ^ 0x11021); } ptr++; } crc = temp; printf("0x%x ",crc); } 上面的程序根据运算分析而来,很容易理解。为了节约内存空间,我们对程序作进一步的简化。分析可知,当二进制序列中上一位计算的余数第15bit位为1时,即( 上一位计算的余数 & 0x8000) != 0,计算本位时,上一位余数 * 2后可对0x11021作求余运算,然后再加上本位计算所得余数。这个很好理解,也就是说,打个比方,把它看作简单的除法,计算上一位时的余数乘以2后,如果比较大可以当被除数,就再去除除数求余。有一点和普通除法不同的是,因为多项式除法中采用不带借位的减法运算,所以0x10000也可以被0x11021除,余数并非为0x10000,而是0x1021。这个自己动手算一下就知道了。余数之和也是不带进位的加法运算,即异或。最后还强调一点,因为二进制序列是左移16位后参与运算的,所以,一直算到序列的最后一位也是可以被除的,这点大家要明白。下面给出简化后的C语言实现。 复制代码 代码如下: ## 第二段代码 unsigned char test[16] ={0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88,0x99,0xaa,0xbb,0xcc,0xdd,0xee,0xff}; unsigned char len = 16; void main( void ) { unsigned int crc = 0; unsigned char i; unsigned char *ptr = test; while( len-- ) { for(i = 0x80; i != 0; i = i >> 1) { if((crc & 0x8000) != 0) { crc = crc << 1; crc = crc ^ 0x1021; } else { crc = crc << 1; } if((*ptr & i) != 0) { crc = crc ^ 0x1021; } } ptr++; } printf("0x%x ",crc); } 上面这段程序网上较为常见,但冇得详细的解释。通过我上面的详细分析,如果对此段程序理解还有困难,可以对比一下没简化之前的程序,细细品味一哈,还是比较容易理解的。要是还理解不了,还是从头再看下,我码这么多字容易吗。。。。。 按位计算CRC代码比较简单,所占内存少,但要一位一位去计算,下面再介绍一种按字节查表快速计算CRC的方法。 3、按字节计算CRC 有了上面按位计算的知识,理解这个就是小case了。还是举前面的例子:当字节计算CRC时,例如计算二进制序列为1001 1010 1010 1111时,即0x9a9f时,将二进制序列数左移16位,即为0x9a9f(0 0 0 0),实际上该二进制序列可拆分为0x9a00(0 0 0 0) + 0x009f(0 0 0 0),分析计算时和上面的步骤一样,唯一不同的是计算中上一步的余数CRC要乘以2的八次方参与下一步的运算,这个应该好理解撒。为了简化编程,将计算中的CRC拆成高八位和低八位的形式,高八位的值直接与本位值相加求余,低八位的值乘以2的八次方后作为余数和计算得的余数相加。为了提高计算速度,我们把8位二进制序列数的CRC全部计算出来,放在一个表中,采用查表法可大大提高计算速度。 表是怎么得到的呢?当然是计算出来的,下面的程序给出了多项式是0x11021的计算程序。 复制代码 代码如下: ## 第三段代码 void main( void ) { unsigned int crc = 0; unsigned char i; unsigned int j; for(j = 0; j < 256; j++) { crc = 0; for(i = 0x80; i != 0; i = i >> 1) { if((crc & 0x8000) != 0) { crc = crc << 1; crc = crc ^ 0x1021; } else { crc = crc << 1; } if((j & i) != 0) { crc = crc ^ 0x1021; } } printf("0x"); if(crc < 0x10) { printf("000"); } else if(crc < 0x100) { printf("00"); } else if(crc < 0x1000) { printf("0"); } printf("%x, ",crc); } } 如果你不是使用的0x11021多项式,只需把程序中0x1021换成其他的就可以了。后面的几个printf语句为了控制使生成的表比较整齐,如果无所谓,可直接用printf("0x%x, ",crc);代替。生成的表如下: 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7, 0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef, 0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6, 0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, 0xf3ff, 0xe3de, 0x2462, 0x3443, 0x0420, 0x1401, 0x64e6, 0x74c7, 0x44a4, 0x5485, 0xa56a, 0xb54b, 0x8528, 0x9509, 0xe5ee, 0xf5cf, 0xc5ac, 0xd58d, 0x3653, 0x2672, 0x1611, 0x0630, 0x76d7, 0x66f6, 0x5695, 0x46b4, 0xb75b, 0xa77a, 0x9719, 0x8738, 0xf7df, 0xe7fe, 0xd79d, 0xc7bc, 0x48c4, 0x58e5, 0x6886, 0x78a7, 0x0840, 0x1861, 0x2802, 0x3823, 0xc9cc, 0xd9ed, 0xe98e, 0xf9af, 0x8948, 0x9969, 0xa90a, 0xb92b, 0x5af5, 0x4ad4, 0x7ab7, 0x6a96, 0x1a71, 0x0a50, 0x3a33, 0x2a12, 0xdbfd, 0xcbdc, 0xfbbf, 0xeb9e, 0x9b79, 0x8b58, 0xbb3b, 0xab1a, 0x6ca6, 0x7c87, 0x4ce4, 0x5cc5, 0x2c22, 0x3c03, 0x0c60, 0x1c41, 0xedae, 0xfd8f, 0xcdec, 0xddcd, 0xad2a, 0xbd0b, 0x8d68, 0x9d49, 0x7e97, 0x6eb6, 0x5ed5, 0x4ef4, 0x3e13, 0x2e32, 0x1e51, 0x0e70, 0xff9f, 0xefbe, 0xdfdd, 0xcffc, 0xbf1b, 0xaf3a, 0x9f59, 0x8f78, 0x9188, 0x81a9, 0xb1ca, 0xa1eb, 0xd10c, 0xc12d, 0xf14e, 0xe16f, 0x1080, 0x00a1, 0x30c2, 0x20e3, 0x5004, 0x4025, 0x7046, 0x6067, 0x83b9, 0x9398, 0xa3fb, 0xb3da, 0xc33d, 0xd31c, 0xe37f, 0xf35e, 0x02b1, 0x1290, 0x22f3, 0x32d2, 0x4235, 0x5214, 0x6277, 0x7256, 0xb5ea, 0xa5cb, 0x95a8, 0x8589, 0xf56e, 0xe54f, 0xd52c, 0xc50d, 0x34e2, 0x24c3, 0x14a0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405, 0xa7db, 0xb7fa, 0x8799, 0x97b8, 0xe75f, 0xf77e, 0xc71d, 0xd73c, 0x26d3, 0x36f2, 0x0691, 0x16b0, 0x6657, 0x7676, 0x4615, 0x5634, 0xd94c, 0xc96d, 0xf90e, 0xe92f, 0x99c8, 0x89e9, 0xb98a, 0xa9ab, 0x5844, 0x4865, 0x7806, 0x6827, 0x18c0, 0x08e1, 0x3882, 0x28a3, 0xcb7d, 0xdb5c, 0xeb3f, 0xfb1e, 0x8bf9, 0x9bd8, 0xabbb, 0xbb9a, 0x4a75, 0x5a54, 0x6a37, 0x7a16, 0x0af1, 0x1ad0, 0x2ab3, 0x3a92, 0xfd2e, 0xed0f, 0xdd6c, 0xcd4d, 0xbdaa, 0xad8b, 0x9de8, 0x8dc9, 0x7c26, 0x6c07, 0x5c64, 0x4c45, 0x3ca2, 0x2c83, 0x1ce0, 0x0cc1, 0xef1f, 0xff3e, 0xcf5d, 0xdf7c, 0xaf9b, 0xbfba, 0x8fd9, 0x9ff8, 0x6e17, 0x7e36, 0x4e55, 0x5e74, 0x2e93, 0x3eb2, 0x0ed1, 0x1ef0, 好了,我们来写按字节计算的源程序: ## 第六段代码(CRC逆序校验代码) uint8 xCal_crc(uint8 *ptr,uint32 len) { uint8 crc; uint8 i; uint32 lenBak = len; uint8 *ptrBak = ptr; uint32 Debuglen = lenBak; uint8 *Debugptr = ptrBak; char CrcSendBuf[100] = {0}; crc = 0; while(len--) { crc ^= *ptr++; memset(CrcSendBuf, 0, 100); sprintf(CrcSendBuf, "head->crc = %02x \r\n", crc); UartSendString(CrcSendBuf, strlen(CrcSendBuf)); for(i = 0;i < 8;i++) { if(crc & 0x01) { crc = (crc >> 1) ^ 0x8C; } else { crc >>= 1; } } } return crc; }
java int 获取高四位和低四位,反过来根据高四位和低四位的byte 计算int的值;
int code = 500; int high = ((code & 0xff00) >> 8); int low = code & 0x00ff; System.out.print("high-low: " + high + " " + low); 打印结果:high-low: 1 244 16进制: 0x01 ,0xF4 我要发送的数据就是 byte [] = {0x01,0xF4}; 现在接收到 byte[] = {0x12,0xFA};分别是code的高四位和低四位, 我要怎样才能计算出code的值? 求大神给代码,谢谢!
C#和三菱PLC socket网络通信
以下代码是用C++和PLC通信,但是我看不懂C++,能帮我把这段代码用C#的形式写出来吗? 或者有能直接和PLC网络通信的C#源码,感谢各位高手,谢谢,非常感谢~~~ ------------------------------------------------------------------------ #include "stdafx.h" #include "SensorMounter.h" #include "SocketThread.h" IMPLEMENT_DYNCREATE(CSocketThread, CWinThread) CSocketThread::CSocketThread() : m_sIPAddress(_T("")) { m_nSocketPort = 0; m_bConnected = FALSE; m_nWtmE1 = 0; } CSocketThread::~CSocketThread() { } BOOL CSocketThread::InitInstance() return TRUE; } int CSocketThread::ExitInstance() { return CWinThread::ExitInstance(); } BEGIN_MESSAGE_MAP(CSocketThread, CWinThread) ON_THREAD_MESSAGE(WMU_SOCKET_CONNECT, OnSConnect) ON_THREAD_MESSAGE(WMU_SOCKET_SEND, OnSSend) ON_THREAD_MESSAGE(WMU_SOCKET_RECV, OnSRecv) ON_THREAD_MESSAGE(WMU_SOCKET_CLOSE, OnSClose) ON_THREAD_MESSAGE(WMU_SOCKET_QUIT, OnSQuit) END_MESSAGE_MAP() void CSocketThread::OnSConnect(UINT wParam, LONG lParam) { TRACE("CSocketThread::OnSConnect: start\n"); BOOL bRC = SocketConnect(); _ST_SEND *pSend = (_ST_SEND *)wParam; if (!pSend) return; pSend->nDoneSize = (bRC ? 0 : -1); if (pSend->hwndDone) ::SendMessage(pSend->hwndDone, WMU_SOCKET_DONE, (WPARAM)pSend, (LPARAM)pSend->nDoneSize); if (pSend->hEvDone) SetEvent(pSend->hEvDone); } void CSocketThread::OnSSend(UINT wParam, LONG lParam) { TRACE("CSocketThread::OnSSend: start\n"); _ST_SEND *pSend = (_ST_SEND *)wParam; if (!pSend) return; if (!m_bConnected) { pSend->nDoneSize = -1; if (pSend->hwndDone) ::SendMessage(pSend->hwndDone, WMU_SOCKET_DONE, (WPARAM)pSend, (LPARAM)(-1)); if (pSend->hEvDone) SetEvent(pSend->hEvDone); return; } pSend->nDoneSize = 0; switch (pSend->nDataType) { case _ST_DATA: pSend->nDoneSize = SocketSendData(pSend->nAddr, *((WORD *)pSend->pData), pSend->bDebugDisp); break; case _ST_MULTIBYTE: pSend->nDoneSize = SocketSendMultiByte(pSend->nSize, pSend->nAddr, pSend->pData, pSend->bDebugDisp); break; case _ST_MULTIWORD: pSend->nDoneSize = SocketSendMultiWord(pSend->nSize, pSend->nAddr, (WORD *)pSend->pData, pSend->bDebugDisp); break; case _ST_MULTIBYTE_BIN: pSend->nDoneSize = SocketBinSendMultiByte(pSend->nSize, pSend->nAddr, pSend->pData, pSend->bDebugDisp); break; case _ST_MULTIWORD_BIN: pSend->nDoneSize = SocketBinSendMultiWord(pSend->nSize, pSend->nAddr, (WORD *)pSend->pData, pSend->bDebugDisp); break; default: break; } if (pSend->hwndDone) ::SendMessage(pSend->hwndDone, WMU_SOCKET_DONE, (WPARAM)pSend, (LPARAM)(pSend->nDoneSize)); if (pSend->hEvDone) SetEvent(pSend->hEvDone); } void CSocketThread::OnSRecv(UINT wParam, LONG lParam) { _ST_SEND *pSend = (_ST_SEND *)wParam; if (!pSend) return; if (!m_bConnected) { pSend->nDoneSize = -1; if (pSend->hwndDone) ::SendMessage(pSend->hwndDone, WMU_SOCKET_DONE, (WPARAM)pSend, (LPARAM)(-1)); if (pSend->hEvDone) SetEvent(pSend->hEvDone); return; } BOOL bRC; switch (pSend->nDataType) { case _ST_DATA: bRC = SocketReceiveData(pSend->nAddr, (WORD *)pSend->pData, pSend->bDebugDisp); pSend->nDoneSize = (bRC ? sizeof(WORD) : 0); break; case _ST_MULTIBYTE: break; case _ST_MULTIWORD: bRC = SocketReceiveMultiWord(pSend->nSize, pSend->nAddr, (WORD *)pSend->pData, pSend->bDebugDisp); pSend->nDoneSize = (bRC ? pSend->nSize : 0); break; case _ST_MULTIWORD_BIN: bRC = SocketBinReceiveMultiWord(pSend->nSize, pSend->nAddr, (WORD *)pSend->pData, pSend->bDebugDisp); pSend->nDoneSize = (bRC ? pSend->nSize : 0); break; default: break; } if (pSend->hwndDone) ::SendMessage(pSend->hwndDone, WMU_SOCKET_DONE, (WPARAM)pSend, (LPARAM)(pSend->nDoneSize)); if (pSend->hEvDone) SetEvent(pSend->hEvDone); } void CSocketThread::OnSClose(UINT wParam, LONG lParam) { TRACE("CSocketThread::OnSClose: start\n"); SocketDisconnect(); } void CSocketThread::OnSQuit(UINT wParam, LONG lParam) { TRACE("CSocketThread::OnSQuit: start"); // AfxEndThread(0); ::PostQuitMessage(0); } BOOL CSocketThread::SocketConnect() { BOOL bRet; bRet = m_SW.Socket(m_nSocketPort); if (!bRet) { CString msg; msg.Format("[NG] port:%d code = %d:%d", m_nSocketPort, m_SW.m_nErrorCode, m_SW.m_nLastError); MessageBox(NULL, (LPCTSTR)msg, _T("CSocketThread::SocketConnect: Connect"), MB_ICONERROR); return (m_bConnected = FALSE); } bRet = m_SW.Connect((LPCTSTR)m_sIPAddress); if (!bRet) { CString msg; msg.Format("[NG] Host Connect Error \n HostName:%s code = %d:%d", (LPCTSTR)m_sIPAddress, m_SW.m_nErrorCode, m_SW.m_nLastError); MessageBox(NULL, (LPCTSTR)msg, _T("CSocketThread::SocketConnect: Connect"), MB_ICONERROR); return (m_bConnected = FALSE); } return (m_bConnected = TRUE); } BOOL CSocketThread::SocketBinSendMultiByte(int nDataNum, UINT nAddress, BYTE ucData[], BOOL bDebugDisp) { BYTE pSendBuf[37] = { 0x50, 0x00, 0x00, 0xFF, 0xFF, 0x03, 0x00, 0xCC, 0xCC, 0x10, 0x00, 0x01, 0x14, 0x01, 0x00, 0xCC, 0xCC, 0xCC, 0x90, 0xCC, 0xCC, 0xD1, 0xD1, 0xD1, 0xD1, 0xD2, 0xD2, 0xD2, 0xD2, 0xD3, 0xD3, 0xD3, 0xD3, 0xD4, 0xD4, 0xD4, 0xD4 }; WORD wDataLength = 12 + nDataNum*4; DWORD dwDeviceAddr = nAddress + (0x90<<24); WORD wDeviceNum = nDataNum*8; memcpy( &pSendBuf[7], &wDataLength, 2); memcpy( &pSendBuf[15], &dwDeviceAddr, 4); memcpy( &pSendBuf[19], &wDeviceNum, 2); BYTE pBuf[4]; for (int i=0; i<nDataNum; i++) { for (int j=0; j<4; j++) { pBuf[j] = 0x00; if( (ucData[i]&(0x01<<j*2)) ) pBuf[j] |= 0x10; if( (ucData[i]&(0x01<<(j*2+1))) ) pBuf[j] |= 0x01; } memcpy( &pSendBuf[21+i*4], &pBuf, 4); } int nSend = m_SW.SendBin( pSendBuf, 21+nDataNum*4 ); if (nSend < 0) { SocketDispErrorCode(_T("SendMultiByte(send)")); return FALSE; } if(m_nWtmE1 > 0) Sleep(m_nWtmE1); BYTE pReceiveBuf[11]; long nReceive = m_SW.ReadBin( pReceiveBuf, 11); if ( nReceive < 1 ) { SocketDispErrorCode(_T("SendMultiByte(receive)")); return FALSE; } if ( pReceiveBuf[0]==0xD0 && pReceiveBuf[1]==0x00 && pReceiveBuf[2]==0x00 && pReceiveBuf[3]==0xFF && pReceiveBuf[4]==0xFF && pReceiveBuf[5]==0x03 && pReceiveBuf[9]==0x00 && pReceiveBuf[10]==0x00 ) { if(pReceiveBuf[7]==2) return TRUE; else if(pReceiveBuf[7]==0) return FALSE; } nReceive = m_SW.ReadBin( pReceiveBuf, pReceiveBuf[7]-2); if ( nReceive < 1 ) { SocketDispErrorCode(_T("SendMultiByte(receive)")); return FALSE; } return TRUE; } BOOL CSocketThread::SocketBinSendMultiWord(int nDataNum, UINT nAddress, WORD wData[], BOOL bDebugDisp) { BYTE pSendBuf[33] = { 0x50, 0x00, 0x00, 0xFF, 0xFF, 0x03, 0x00, 0xCC, 0xCC, 0x10, 0x00, 0x01, 0x14, 0x00, 0x00, 0xCC, 0xCC, 0xCC, 0xA8, 0xCC, 0xCC, 0xD1, 0xD1, 0xD2, 0xD2, 0xD3, 0xD3, 0xD4, 0xD4, 0xD5, 0xD5, 0xD6, 0xD6 }; WORD wDataLength = 12+nDataNum*2; DWORD dwDeviceAddr = nAddress + (0xA8<<24); WORD wDeviceNum = nDataNum; memcpy( &pSendBuf[7], &wDataLength, 2); memcpy( &pSendBuf[15], &dwDeviceAddr, 4); memcpy( &pSendBuf[19], &wDeviceNum, 2); memcpy( &pSendBuf[21], &wData, nDataNum); for (int i=0; i<nDataNum; i++){ pSendBuf[22+i*2] = (wData[i]&0xFF00)>>8; pSendBuf[21+i*2] = wData[i]&0x00FF; } int nSend = m_SW.SendBin( pSendBuf, 21+nDataNum*2 ); if (nSend < 0) { SocketDispErrorCode(_T("SendMultiWord(send)")); return FALSE; } if(m_nWtmE1 > 0) Sleep(m_nWtmE1); BYTE pReceiveBuf[11]; long nReceive = m_SW.ReadBin( pReceiveBuf, 11); if ( nReceive < 1 ) { SocketDispErrorCode(_T("SendMultiWord(receive)")); return FALSE; } if ( pReceiveBuf[0]==0xD0 && pReceiveBuf[1]==0x00 && pReceiveBuf[2]==0x00 && pReceiveBuf[3]==0xFF && pReceiveBuf[4]==0xFF && pReceiveBuf[5]==0x03 && pReceiveBuf[9]==0x00 && pReceiveBuf[10]==0x00 ) { if (pReceiveBuf[7]==2) return TRUE; else if (pReceiveBuf[7]==0) return FALSE; } nReceive = m_SW.ReadBin( pReceiveBuf, pReceiveBuf[7]-2); if ( nReceive < 1 ) { SocketDispErrorCode(_T("SendMultiByte(receive)")); return FALSE; } return TRUE; } BOOL CSocketThread::SocketBinReceiveMultiWord(int nDataNum, UINT nAddress, WORD wData[], BOOL bDeviceCode) { BYTE pSendBuf[21] = { 0x50, 0x00, 0x00, 0xFF, 0xFF, 0x03, 0x00, 0xCC, 0xCC, 0x10, 0x00, 0x01, 0x04, 0x00, 0x00, 0xCC, 0xCC, 0xCC, 0x90, 0xCC, 0xCC }; WORD wDataLength = 12; DWORD dwDeviceAddr; if (bDeviceCode==FALSE) dwDeviceAddr = nAddress+(0x90<<24); else dwDeviceAddr = nAddress+(0xA8<<24); WORD wDeviceNum = nDataNum; memcpy( &pSendBuf[7], &wDataLength, 2); memcpy( &pSendBuf[15], &dwDeviceAddr, 4); memcpy( &pSendBuf[19], &wDeviceNum, 2); int nSend = m_SW.SendBin( pSendBuf, 21 ); if (nSend < 0) { SocketDispErrorCode(_T("SendMultiWord(send)")); return FALSE; } if(m_nWtmE1 > 0) Sleep(m_nWtmE1); BYTE pReceiveBuf[21]; int nReadLength; for (int i=0; i<21; i++) pReceiveBuf[i] = 0; long nReceive = m_SW.ReadBin( pReceiveBuf, 11); if ( nReceive < 1 ) { SocketDispErrorCode(_T("SendMultiWord(receive)")); return FALSE; } if ( pReceiveBuf[0]==0xD0 && pReceiveBuf[1]==0x00 && pReceiveBuf[2]==0x00 && pReceiveBuf[3]==0xFF && pReceiveBuf[4]==0xFF && pReceiveBuf[5]==0x03 && pReceiveBuf[9]==0x00 && pReceiveBuf[10]==0x00 ) { if(pReceiveBuf[7]==0 || pReceiveBuf[7]==2 ) return FALSE; else nReadLength = pReceiveBuf[7]-2; } else { return FALSE; } for (int i=0; i<21; i++) pReceiveBuf[i] = 0; nReceive = m_SW.ReadBin( pReceiveBuf, nReadLength); if ( nReceive < 1 ) { SocketDispErrorCode(_T("SendMultiByte(receive)")); return FALSE; } else { for(int i=0; i<nDataNum; i++) wData[i] = pReceiveBuf[2*i] + (pReceiveBuf[2*i+1]<<8); return TRUE; } } BOOL CSocketThread::SocketDisconnect(void) { return m_SW.Shutdown(); } void CSocketThread::SocketDispErrorCode(LPCTSTR strFunc) { CString strCode, strMsg; switch (m_SW.m_nErrorCode) { case 101: strCode="IDP_SOCKETS_INIT_FAILED"; break; case 1201: strCode="SW_ERR_NOERROR"; break; case 1202: strCode="SW_ERR_WSASTARTUP"; break; case 1203: strCode="SW_ERR_GETSERV"; break; case 1204: strCode="SW_ERR_GETHOSTNAME"; break; case 1205: strCode="SW_ERR_GETHOSTENT"; break; case 1206: strCode="SW_ERR_SOCK_STREAM"; break; case 1207: strCode="SW_ERR_BIND"; break; case 1208: strCode="SW_ERR_LISTEN"; break; case 1209: strCode="SW_ERR_ACCEPTTHREAD"; break; case 1210: strCode="SW_ERR_BUFFER_OVER"; break; case 1211: strCode="SW_ERR_READ"; break; case 1212: strCode="SW_ERR_SEND"; break; case 1213: strCode="SW_ERR_CONNECT"; break; case 1214: strCode="SW_ERR_ACCEPT"; break; case 1215: strCode="SW_ERR_RESUME_FAIL"; break; case 1216: strCode="SW_CONNECT_CLOSED"; break; } strMsg.Format(" Function : %s \n ErrorCode : %s \n LastError : %d", strFunc, strCode, m_SW.m_nLastError); MessageBox(NULL, (LPCTSTR)strMsg, _T("CSocketThread::SocketDispErrorCode"), MB_ICONERROR); }
下图问题怎么解决啊?C语言程序
![图片说明](https://img-ask.csdn.net/upload/201605/08/1462680286_691207.png) #include<iom16v.h> #include<macros.h> #define uchar unsinged char #define uint unsinged char #include"LM016LCD_drive.h" #include"MAX6675_drive.h" #include"DS1302_drive.h" #include"PWM.h" #define beep_0 (PORTD=PORTD&0X7F) #define beep_1 (PORTD=PORTD|0X81) #define fosc 11059200 #define baud 9600 uchar count_10ms; uchar K1_FLAG=1; uchar tempt; uchar SEED; uchar K1=0; uchar P=0; //uchar K=0; uchar line1_data[]={"week"}; //uchar line3_data[]={"Time"}; //uchar line2_data[]={" "}; uchar disp_buf[15]={0x00}; uchar time_buf[7]={0,0,0x12,0,0,0,0,}; uchar temp[2]={0}; //uchar TEMP1[]={0}; /*蜂鸣器响一声函数*/ void beep(uchar L) { beep_0; Delay_ms(L); beep_1; Delay_ms(L); } /*端口设置函数*/ void port_init(void) { PORTA=0xff; DDRA=0XFF; DDRB=(1<<PB0)|(1<<PB2)|(1<<PB3)|(1<<PB4)|(1<<PB6)|(1<<PB7); PORTC=0XFF; DDRC=0XFF; DDRD=(0<<PD2)|(0<<PD3)|(0<<PD4)|(0<<PD5)|(0<<PD6)|(1<<PD7); PORTD=0Xff; } /*转换函数,负责将走时数据转换为适合lcd显示的数据*/ void LCD_conv(uchar inl,uchar in2,uchar in3,uchar in4,uchar in5,uchar in6,uchar in7) { disp_buf[0]=inl/10+0x30; disp_buf[1]=inl%10+0x30; disp_buf[2]=in2/10+0x30; disp_buf[3]=in2%10+0x30; disp_buf[4]=in3/10+0x30; disp_buf[5]=in3%10+0x30; disp_buf[6]=in4/10+0x30; disp_buf[7]=in4%10+0x30; disp_buf[8]=in5/10+0x30; disp_buf[9]=in5%10+0x30; disp_buf[10]=in6+0x30;// disp_buf[11]=2+0x30; disp_buf[12]=0x30; disp_buf[13]=in7%100/10+0x30; disp_buf[14]=in7%10+0x30; } /*温度显示函数*/ void temp_disp(void) { uint i; LocateXY(11,1); for(i=1;i<4;i++) { lcd_wdat(show_data[i]); delay(1); } LocateXY(14,1); lcd_wdat(0xdf); lcd_wdat(0x43); } /*日期时间lcd显示函数*/ void LCD_disp() { uchar i; //LocateXY(10,0); //lcd_wdat(0x3a); LocateXY(0,0); lcd_wdat(disp_buf[11]); lcd_wdat(disp_buf[12]); lcd_wdat(disp_buf[13]); lcd_wdat(disp_buf[14]); lcd_wdat(0x2f); lcd_wdat(disp_buf[8]); lcd_wdat(disp_buf[9]); lcd_wdat(0x2f); lcd_wdat(disp_buf[6]); lcd_wdat(disp_buf[7]); LocateXY(15,0); lcd_wdat(disp_buf[10]); LocateXY(0,1); lcd_wdat(disp_buf[4]); lcd_wdat(disp_buf[5]); lcd_wdat(0x3a); lcd_wdat(disp_buf[2]); lcd_wdat(disp_buf[3]); lcd_wdat(0x3a); lcd_wdat(disp_buf[0]); lcd_wdat(disp_buf[1]); } /*定时器1初始化*/ /*void timer1_init() { SREG=0X80; //MCUCR=(1<<ISC01)|(1<<ISC00); TIMSK|=(1<<TOIE1); TCNT1H=0XFb; TCNT1L=0X1e; TCCR1A|=0X00; TCCR1B|=(1<<CS11)|(1<<CS10); } */ /*#pragma interrupt_handler timer0_ovf:10 void timer0_ovf(void) { } */ /*定时器1终端服务函数*/ /*#pragma interrupt_handler timer1_ovf:9 void timer1_ovf(void) { }*/ //} /*if(count_10ms>=100) { count_10ms=0; time_buf[0]++; if(time_buf[0]==60) { time_buf[0]=0; time_buf[1]++; if(time_buf[1]==60) { time_buf[1]=0; time_buf[2]++; if(time_buf[2]==24) { time_buf[0]=0;time_buf[1]=0;time_buf[2]=0; } } } } } */ /*按键处理函数*/ void KeyProcess() { uint i; uchar K; uchar L; uchar sec16,min16,hour16,day16,mon16,year16,week16; write_ds1302(0x8e,0x00); write_ds1302(0x80,0x80); Delay_ms(10); if((PIND&0X08)==0) { while(!(PIND&0X08)); beep(100); K=K1_FLAG; switch(K) { /*case 1: { time_buf[0]=time_buf[0]+1; if(time_buf[0]==60) time_buf[0]=0; sec16=time_buf[0]/10*16+time_buf[0]%10; write_ds1302(0x80,sec16); }*/ //break; case 1: { time_buf[1]=time_buf[1]+1; if(time_buf[1]==60) time_buf[1]=0; min16=time_buf[1]/10*16+time_buf[1]%10; write_ds1302(0x82,min16); } break; case 2: { time_buf[2]=time_buf[2]+1; if(time_buf[2]==24) time_buf[2]=0; hour16=time_buf[2]/10*16+time_buf[2]%10; write_ds1302(0x84,hour16); } break; case 3: { time_buf[5]=time_buf[5]+1; if(time_buf[5]==8) time_buf[5]=1; week16=time_buf[5]/10*16+time_buf[5]%10; write_ds1302(0x8a,week16); } break; case 4: { time_buf[3]=time_buf[3]+1; if(time_buf[3]==31) time_buf[3]=1; day16=time_buf[3]/10*16+time_buf[3]%10; write_ds1302(0x86,day16); } break; case 5: { time_buf[4]=time_buf[4]+1; if(time_buf[4]==12) time_buf[4]=0; mon16=time_buf[4]/10*16+time_buf[4]%10; write_ds1302(0x88,mon16); } break; case 6: { time_buf[6]=time_buf[6]+1; if(time_buf[6]==99) time_buf[6]=0; year16=time_buf[6]/10*16+time_buf[6]%10; write_ds1302(0x8c,year16); } break; default:break; } } if((PIND&0X10)==0) { while(!(PIND&0X10)); beep(100); L=K1_FLAG; switch(L) { /*case 1: { time_buf[0]=time_buf[0]-1; if(time_buf[0]==0) time_buf[0]=59; sec16=time_buf[0]/10*16+time_buf[0]%10; write_ds1302(0x80,sec16); }*/ //break; case 1: { time_buf[1]=time_buf[1]-1; if(time_buf[1]==0) time_buf[1]=59; min16=time_buf[1]/10*16+time_buf[1]%10; //Delay_ms(150); write_ds1302(0x82,min16); } break; case 2: { time_buf[2]=time_buf[2]-1; if(time_buf[2]==0) time_buf[2]=23; hour16=time_buf[2]/10*16+time_buf[2]%10; //Delay_ms(150); write_ds1302(0x84,hour16); } break; case 3: { time_buf[5]=time_buf[5]-1; if(time_buf[5]==0) time_buf[5]=7; week16=time_buf[5]/10*16+time_buf[5]%10; write_ds1302(0x8a,week16); } break; case 4: { time_buf[3]=time_buf[3]-1; if(time_buf[3]==0) time_buf[3]=31; day16=time_buf[3]/10*16+time_buf[3]%10; //Delay_ms(150); write_ds1302(0x86,day16); } break; case 5: { time_buf[4]=time_buf[4]-1; if(time_buf[4]==0) time_buf[4]=12; mon16=time_buf[4]/10*16+time_buf[4]%10; //Delay_ms(150); write_ds1302(0x88,mon16); } break; case 6: { time_buf[6]=time_buf[6]-1; if(time_buf[6]==0) time_buf[6]=99; year16=time_buf[6]/10*16+time_buf[6]%10; //Delay_ms(150); write_ds1302(0x8c,year16); } break; default:break; } } } /*if((PIND&0X08)==0) { while(!(PIND&0X08)); beep(); time_buf[2]=time_buf[2]+1; if(time_buf[2]==24) time_buf[2]=0; hour16=time_buf[2]/10*16+time_buf[2]%10; write_ds1302(0x84,hour16); } if((PIND&0X10)==0) { while(!(PIND&0X10)); beep(); time_buf[1]=time_buf[1]+1; if(time_buf[1]==60) time_buf[1]=0; min16=time_buf[1]/10*16+time_buf[1]%10; write_ds1302(0x82,min16); }*/ /*读取时间函数,并转化为十进制*/ void get_data() { uchar sec,min,hour,day,mon,week,year; write_ds1302(0x8e,0x00); write_ds1302(0x90,0xab); sec=read_ds1302(0x81); min=read_ds1302(0x83); hour=read_ds1302(0x85); day=read_ds1302(0x87); mon=read_ds1302(0x89); week=read_ds1302(0x8b); year=read_ds1302(0x8d); time_buf[0]=sec/16*10+sec%16; time_buf[1]=min/16*10+min%16; time_buf[2]=hour/16*10+hour%16; time_buf[3]=day/16*10+day%16; time_buf[4]=mon/16*10+mon%16; time_buf[5]=week/16*10+week%16; time_buf[6]=year/16*10+year%16; } /************温度-PWM转换函数******/ void Temp_PWM() { uint i; if(TEMP<=0) { tempt=-1; } if(TEMP>0&&TEMP<300) { tempt=-1; } if(TEMP>=300&&TEMP<500) { tempt=256*(500-TEMP)/500; } if(TEMP>=500) { tempt=1; beep(i); } } /*******串口初始化********/ void uart0_Init(void) { UCSRB=0x00; UCSRA=0X00;//发射器使能 /*设置帧格式*/ UCSRC|= (1<<URSEL)|(1<<UCSZ1)|(1<<UCSZ0);//工作模式 ,8位字符,1位停止位 // UCSRC=0x86; /*设置波特率*/ UBRRL=(fosc/16/(baud+1))%256; UBRRH=(fosc/16/(baud+1))/256; /*接收器与发送器使能*/ UCSRB|=(1<<RXCIE)|(1<<RXEN)|(1<<TXEN);//UCSRB=0x98; SREG|=BIT(7); } /*******发送数据函数********/ void UART0_send(uchar i) { uchar j; while(!(UCSRA&(1<<UDRE))); for(j=0;j<3;j++) {UDR=i;} } /*主函数*/ void main(void) { uint i; uint JISHU; port_init(); init_ds1302(); lcd_init(); lcd_clr(); //SREG=0X80; uart0_Init(); //INT0_init(); //max6675_init(); //PWM_Init_IO(); TIMER0_Init(); //timer1_init(); LCD_write_str(11,0,line1_data); while(1) { if((PIND&0X40)==0) { Delay_ms(10); if((PIND&0X04)==0) { while(!(PIND&0X04)); beep(100); K1_FLAG++; if(K1_FLAG>6)K1_FLAG=1; } KeyProcess(); } if((PIND&0X40)==0X40) { MAX6675_conv(); temp_disp(); } if((PIND&0X20)==0) { while(!(PIND&0X20)); beep(100); write_ds1302(0x80,0x00); write_ds1302(0x8e,0x80); K1_FLAG=0; Delay_ms(15); } get_data(); LCD_conv(time_buf[0],time_buf[1],time_buf[2],time_buf[3],time_buf[4],time_buf[5],time_buf[6]); LCD_disp(); Temp_PWM(); PWM_control(tempt); //SEED=TEMP/10%16+TEMP%10; for(i=1;i<4;i++) {UART0_send(show_data[i]);} UART0_send(0x0d); UART0_send(0x0a); //Usart_PutString("温度"); } } /*********发送结束中断函数*******/ /*#pragma interrupt_handler UART0_TXD_vect:12 void UART0_TXD_vect(void) { SEED=TEMP; UART0_send(SEED); Usart_PutString("温度"); }*/ 这是主程序,下面是有关PWM的程序 #include<iom16v.h> #include<macros.h> #define uint unsigned int #define uchar unsigned char uchar Rece[5]={0xD1,0xD1,0xD1,0xD1,0xD1}; uchar Spec[5]={0x82,0x82,0x82,0x82,0x82}; uchar Point[5]={0xfe,0xfd,0xfb,0xf7,0xef}; int cntA=0; /********定时器0中断服务函数**********/ # pragma interrupt_handler timer0_ovf:10 void timer0_ovf(void) { uchar temp; temp=SREG; TCNT0=0X00;//重装计数初值 cntA++; switch(cntA) { case 1: TCNT0=Rece[0]; PORTA&=~BIT(0); break; case 2: TCNT0=0xff-Rece[0]+Spec[0]; PORTA|=BIT(0); break; case 3: TCNT0=Rece[1]; PORTA&=Point[1]; break; case 4: TCNT0=0xff-Rece[1]+Spec[1]; PORTA|=0xff-Point[1]; break; case 5: TCNT0=Rece[2]; PORTA&=Point[2]; break; case 6: TCNT0=0xff-Rece[2]+Spec[3]; PORTA|=0xff-Point[2]; break; case 7: TCNT0=Rece[3]; PORTA&=Point[3]; break; case 8: TCNT0=0xff-Rece[3]+Spec[3]; PORTA|=0xff-Point[3]; break; case 9: TCNT0=Rece[4]; PORTA&=Point[4]; break; case 10: TCNT0=0xff-Rece[4]+Spec[4]; PORTA|=0xff-Point[4]; cntA=0; } SREG=temp; }
爬虫福利二 之 妹子图网MM批量下载
爬虫福利一:27报网MM批量下载 点击 看了本文,相信大家对爬虫一定会产生强烈的兴趣,激励自己去学习爬虫,在这里提前祝:大家学有所成! 目标网站:妹子图网 环境:Python3.x 相关第三方模块:requests、beautifulsoup4 Re:各位在测试时只需要将代码里的变量path 指定为你当前系统要保存的路径,使用 python xxx.py 或IDE运行即可。 ...
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它是一个过程,是一个不断累积、不断沉淀、不断总结、善于传达自己的个人见解以及乐于分享的过程。
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过...
Python——画一棵漂亮的樱花树(不同种樱花+玫瑰+圣诞树喔)
最近翻到一篇知乎,上面有不少用Python(大多是turtle库)绘制的树图,感觉很漂亮,我整理了一下,挑了一些我觉得不错的代码分享给大家(这些我都测试过,确实可以生成) one 樱花树 动态生成樱花 效果图(这个是动态的): 实现代码 import turtle as T import random import time # 画樱花的躯干(60,t) def Tree(branch, ...
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
计算机专业的书普遍都这么贵,你们都是怎么获取资源的?
介绍几个可以下载编程电子书籍的网站。 1.Github Github上编程书资源很多,你可以根据类型和语言去搜索。推荐几个热门的: free-programming-books-zh_CN:58K 星的GitHub,编程语言、WEB、函数、大数据、操作系统、在线课程、数据库相关书籍应有尽有,共有几百本。 Go语言高级编程:涵盖CGO,Go汇编语言,RPC实现,Protobuf插件实现,Web框架实...
小白学 Python 爬虫(25):爬取股票信息
人生苦短,我用 Python 前文传送门: 小白学 Python 爬虫(1):开篇 小白学 Python 爬虫(2):前置准备(一)基本类库的安装 小白学 Python 爬虫(3):前置准备(二)Linux基础入门 小白学 Python 爬虫(4):前置准备(三)Docker基础入门 小白学 Python 爬虫(5):前置准备(四)数据库基础 小白学 Python 爬虫(6):前置准备(...
卸载 x 雷某度!GitHub 标星 1.5w+,从此我只用这款全能高速下载工具!
作者 | Rocky0429 来源 | Python空间 大家好,我是 Rocky0429,一个喜欢在网上收集各种资源的蒟蒻… 网上资源眼花缭乱,下载的方式也同样千奇百怪,比如 BT 下载,磁力链接,网盘资源等等等等,下个资源可真不容易,不一样的方式要用不同的下载软件,因此某比较有名的 x 雷和某度网盘成了我经常使用的工具。 作为一个没有钱的穷鬼,某度网盘几十 kb 的下载速度让我...
《面试宝典》2019年springmvc面试高频题(java)
前言 2019即将过去,伴随我们即将迎来的又是新的一年,过完春节,马上又要迎来新的金三银四面试季。那么,作为程序猿的你,是否真的有所准备的呢,亦或是安于本职工作,继续做好手头上的事情。 当然,不论选择如何,假如你真的准备在之后的金三银四跳槽的话,那么作为一个Java工程师,就不可不看了。如何在几个月的时间里,快速的为即将到来的面试进行充分的准备呢? 1、什么是Spring MVC ?简单...
一名大专同学的四个问题
【前言】   收到一封来信,赶上各种事情拖了几日,利用今天要放下工作的时机,做个回复。   2020年到了,就以这一封信,作为开年标志吧。 【正文】   您好,我是一名现在有很多困惑的大二学生。有一些问题想要向您请教。   先说一下我的基本情况,高考失利,不想复读,来到广州一所大专读计算机应用技术专业。学校是偏艺术类的,计算机专业没有实验室更不用说工作室了。而且学校的学风也不好。但我很想在计算机领...
复习一周,京东+百度一面,不小心都拿了Offer
京东和百度一面都问了啥,面试官百般刁难,可惜我全会。
轻松搭建基于 SpringBoot + Vue 的 Web 商城应用
首先介绍下在本文出现的几个比较重要的概念: 函数计算(Function Compute): 函数计算是一个事件驱动的服务,通过函数计算,用户无需管理服务器等运行情况,只需编写代码并上传。函数计算准备计算资源,并以弹性伸缩的方式运行用户代码,而用户只需根据实际代码运行所消耗的资源进行付费。Fun: Fun 是一个用于支持 Serverless 应用部署的工具,能帮助您便捷地管理函数计算、API ...
Python+OpenCV实时图像处理
目录 1、导入库文件 2、设计GUI 3、调用摄像头 4、实时图像处理 4.1、阈值二值化 4.2、边缘检测 4.3、轮廓检测 4.4、高斯滤波 4.5、色彩转换 4.6、调节对比度 5、退出系统 初学OpenCV图像处理的小伙伴肯定对什么高斯函数、滤波处理、阈值二值化等特性非常头疼,这里给各位分享一个小项目,可通过摄像头实时动态查看各类图像处理的特点,也可对各位调参、测试...
2020年一线城市程序员工资大调查
人才需求 一线城市共发布岗位38115个,招聘120827人。 其中 beijing 22805 guangzhou 25081 shanghai 39614 shenzhen 33327 工资分布 2020年中国一线城市程序员的平均工资为16285元,工资中位数为14583元,其中95%的人的工资位于5000到20000元之间。 和往年数据比较: yea...
为什么猝死的都是程序员,基本上不见产品经理猝死呢?
相信大家时不时听到程序员猝死的消息,但是基本上听不到产品经理猝死的消息,这是为什么呢? 我们先百度搜一下:程序员猝死,出现将近700多万条搜索结果: 搜索一下:产品经理猝死,只有400万条的搜索结果,从搜索结果数量上来看,程序员猝死的搜索结果就比产品经理猝死的搜索结果高了一倍,而且从下图可以看到,首页里面的五条搜索结果,其实只有两条才是符合条件。 所以程序员猝死的概率真的比产品经理大,并不是错...
害怕面试被问HashMap?这一篇就搞定了!
声明:本文以jdk1.8为主! 搞定HashMap 作为一个Java从业者,面试的时候肯定会被问到过HashMap,因为对于HashMap来说,可以说是Java集合中的精髓了,如果你觉得自己对它掌握的还不够好,我想今天这篇文章会非常适合你,至少,看了今天这篇文章,以后不怕面试被问HashMap了 其实在我学习HashMap的过程中,我个人觉得HashMap还是挺复杂的,如果真的想把它搞得明明白...
毕业5年,我问遍了身边的大佬,总结了他们的学习方法
我问了身边10个大佬,总结了他们的学习方法,原来成功都是有迹可循的。
推荐10个堪称神器的学习网站
每天都会收到很多读者的私信,问我:“二哥,有什么推荐的学习网站吗?最近很浮躁,手头的一些网站都看烦了,想看看二哥这里有什么新鲜货。” 今天一早做了个恶梦,梦到被老板辞退了。虽然说在我们公司,只有我辞退老板的份,没有老板辞退我这一说,但是还是被吓得 4 点多都起来了。(主要是因为我掌握着公司所有的核心源码,哈哈哈) 既然 4 点多起来,就得好好利用起来。于是我就挑选了 10 个堪称神器的学习网站,推...
这些软件太强了,Windows必装!尤其程序员!
Windows可谓是大多数人的生产力工具,集娱乐办公于一体,虽然在程序员这个群体中都说苹果是信仰,但是大部分不都是从Windows过来的,而且现在依然有很多的程序员用Windows。 所以,今天我就把我私藏的Windows必装的软件分享给大家,如果有一个你没有用过甚至没有听过,那你就赚了????,这可都是提升你幸福感的高效率生产力工具哦! 走起!???? NO、1 ScreenToGif 屏幕,摄像头和白板...
(总结)阿里面试问了ArrayList,都问了啥?
我是真的没想到,面试官会这样问我ArrayList。
曾经优秀的人,怎么就突然不优秀了。
职场上有很多辛酸事,很多合伙人出局的故事,很多技术骨干被裁员的故事。说来模板都类似,曾经是名校毕业,曾经是优秀员工,曾经被领导表扬,曾经业绩突出,然而突然有一天,因为种种原因,被裁员了,...
大学四年因为知道了这32个网站,我成了别人眼中的大神!
依稀记得,毕业那天,我们导员发给我毕业证的时候对我说“你可是咱们系的风云人物啊”,哎呀,别提当时多开心啦????,嗯,我们导员是所有导员中最帅的一个,真的???? 不过,导员说的是实话,很多人都叫我大神的,为啥,因为我知道这32个网站啊,你说强不强????,这次是绝对的干货,看好啦,走起来! PS:每个网站都是学计算机混互联网必须知道的,真的牛杯,我就不过多介绍了,大家自行探索,觉得没用的,尽管留言吐槽吧???? 社...
2020年1月中国编程语言排行榜,python是2019增长最快编程语言
编程语言比例 排名 编程语言 最低工资 工资中位数 最低工资 最高工资 人头 人头百分比 1 rust 20713 17500 5042 46250 480 0.14% 2 typescript 18503 22500 6000 30000 1821 0.52% 3 lua 18150 17500 5250 35000 2956 0.84% 4 go 17989 16...
看完这篇HTTP,跟面试官扯皮就没问题了
我是一名程序员,我的主要编程语言是 Java,我更是一名 Web 开发人员,所以我必须要了解 HTTP,所以本篇文章就来带你从 HTTP 入门到进阶,看完让你有一种恍然大悟、醍醐灌顶的感觉。 最初在有网络之前,我们的电脑都是单机的,单机系统是孤立的,我还记得 05 年前那会儿家里有个电脑,想打电脑游戏还得两个人在一个电脑上玩儿,及其不方便。我就想为什么家里人不让上网,我的同学 xxx 家里有网,每...
史上最全的IDEA快捷键总结
现在Idea成了主流开发工具,这篇博客对其使用的快捷键做了总结,希望对大家的开发工作有所帮助。
阿里程序员写了一个新手都写不出的低级bug,被骂惨了。
这种新手都不会范的错,居然被一个工作好几年的小伙子写出来,差点被当场开除了。
谁是华为扫地僧?
是的,华为也有扫地僧!2020年2月11-12日,“养在深闺人不知”的华为2012实验室扫地僧们,将在华为开发者大会2020(Cloud)上,和大家见面。到时,你可以和扫地僧们,吃一个洋...
AI 没让人类失业,搞 AI 的人先失业了
最近和几个 AI 领域的大佬闲聊 根据他们讲的消息和段子 改编出下面这个故事 如有雷同 都是巧合 1. 老王创业失败,被限制高消费 “这里写我跑路的消息实在太夸张了。” 王葱葱哼笑一下,把消息分享给群里。 阿杰也看了消息,笑了笑。在座几位也都笑了。 王葱葱是个有名的人物,21岁那年以全额奖学金进入 KMU 攻读人工智能博士,累计发表论文 40 余篇,个人技术博客更是成为深度学习领域内风向标。 ...
2020年,冯唐49岁:我给20、30岁IT职场年轻人的建议
点击“技术领导力”关注∆每天早上8:30推送 作者|Mr.K 编辑| Emma 来源|技术领导力(ID:jishulingdaoli) 前天的推文《冯唐:职场人35岁以后,方法论比经验重要》,收到了不少读者的反馈,觉得挺受启发。其实,冯唐写了不少关于职场方面的文章,都挺不错的。可惜大家只记住了“春风十里不如你”、“如何避免成为油腻腻的中年人”等不那么正经的文章。 本文整理了冯...
工作十年的数据分析师被炒,没有方向,你根本躲不过中年危机
2020年刚刚开始,就意味着离职潮高峰的到来,我身边就有不少人拿着年终奖离职了,而最让我感到意外的,是一位工作十年的数据分析师也离职了,不同于别人的主动辞职,他是被公司炒掉的。 很多人都说数据分析是个好饭碗,工作不累薪资高、入门简单又好学。然而今年34的他,却真正尝到了中年危机的滋味,平时也有不少人都会私信问我: 数据分析师也有中年危机吗?跟程序员一样是吃青春饭的吗?该怎么保证自己不被公司淘汰...
立即提问