求大神给一份PCF8591的基于FPGA的verilog的IIc控制程序

求大神给一份PCF8591的基于FPGA的verilog的IIc控制程序

1个回答

module DAC_I2C
(
input clk_in, // system clock
input rst_n_in, // system reset, active low

input           [7:0]   dac_data,   // dac data input
output  reg             dac_done,   // dac transfer done

output                  scl_out,    // I2C CLK
inout                   sda_out     // I2C SDA

);

parameter   CNT_NUM =   30;

localparam  IDLE    =   3'd0;
localparam  MAIN    =   3'd1;
localparam  START   =   3'd2;
localparam  WRITE   =   3'd3;
localparam  ACK     =   3'd4;
localparam  STOP    =   3'd5;

//generate clk_200khz clock
reg                 clk_200khz;
reg     [5:0]       cnt_200khz;
always@(posedge clk_in or negedge rst_n_in) begin
    if(!rst_n_in) begin
        cnt_200khz <= 5'd0;
        clk_200khz <= 1'b0;
    end else if(cnt_200khz >= CNT_NUM-1) begin
        cnt_200khz <= 5'd0;
        clk_200khz <= ~clk_200khz;
    end else begin
        cnt_200khz <= cnt_200khz + 1'b1;
    end
end

//reg       [7:0]       cnt_wave;

reg                 scl_out_r;
reg                 sda_out_r;
reg     [3:0]       cnt_main;
reg     [7:0]       data_wr;
reg     [1:0]       cnt_start;
reg     [4:0]       cnt_write;
reg     [1:0]       cnt_ack;
reg     [1:0]       cnt_stop;
reg     [2:0]       state = IDLE;
reg     [2:0]       state_back = IDLE;
always@(posedge clk_200khz or negedge rst_n_in) begin
    if(!rst_n_in) begin
        //cnt_wave <= 8'd0;
        scl_out_r <= 1'd1;
        sda_out_r <= 1'd1;
        cnt_main <= 4'd0;
        cnt_start <= 2'd0;
        cnt_write <= 5'd0;
        cnt_ack <= 2'd0;
        cnt_stop <= 2'd0;
        state <= IDLE;
        state_back <= IDLE;
    end else begin
        case(state)
            IDLE:begin
                    scl_out_r <= 1'd1;
                    sda_out_r <= 1'd1;
                    cnt_main <= 4'd0;
                    cnt_start <= 2'd0;
                    cnt_write <= 5'd0;
                    cnt_ack <= 2'd0;
                    cnt_stop <= 2'd0;
                    state <= MAIN;
                    state_back <= MAIN;
                end
            MAIN:begin
                    //if(cnt_main >= 4'd8) cnt_main <= 4'd0;        //write in byte mode
                    if(cnt_main >= 4'd6) cnt_main <= 4'd5;      //write in chain mode
                    else cnt_main <= cnt_main + 1'b1;
                    case(cnt_main)
                        4'd0: begin state <= START; end
                        4'd1: begin data_wr <= 8'h90; state <= WRITE; end
                        4'd2: begin state <= ACK; end
                        4'd3: begin data_wr <= 8'h40; state <= WRITE; end
                        4'd4: begin state <= ACK; end
                        //4'd5: begin data_wr <= cnt_wave; cnt_wave <= cnt_wave+8'd8; state <= WRITE; end
                        4'd5: begin data_wr <= dac_data; state <= WRITE; dac_done <= 1'b0;end
                        4'd6: begin state <= ACK; dac_done <= 1'b1; end
                        4'd7: begin state <= STOP; end
                        4'd8: begin state <= IDLE; end
                        default: state <= IDLE;
                    endcase
                end
            START:begin
                    if(cnt_start >= 2'd2) cnt_start <= 1'b0;
                    else cnt_start <= cnt_start + 1'b1;
                    case(cnt_start)
                        2'd0:   begin sda_out_r <= 1'b1; scl_out_r <= 1'b1; end
                        2'd1:   begin sda_out_r <= 1'b0; end
                        2'd2:   begin scl_out_r <= 1'b0; state <= MAIN; end
                        default: state <= IDLE;
                    endcase
                end
            WRITE:begin
                    if(cnt_write >= 5'd16) cnt_write <= 1'b0;
                    else cnt_write <= cnt_write + 1'b1;
                    case(cnt_write)
                        //transfer data with i2c
                        5'd0:   begin sda_out_r <= data_wr[7]; scl_out_r <= 1'b0; end
                        5'd1:   begin scl_out_r <= 1'b1; end
                        5'd2:   begin sda_out_r <= data_wr[6]; scl_out_r <= 1'b0; end
                        5'd3:   begin scl_out_r <= 1'b1; end
                        5'd4:   begin sda_out_r <= data_wr[5]; scl_out_r <= 1'b0; end
                        5'd5:   begin scl_out_r <= 1'b1; end
                        5'd6:   begin sda_out_r <= data_wr[4]; scl_out_r <= 1'b0; end
                        5'd7:   begin scl_out_r <= 1'b1; end
                        5'd8:   begin sda_out_r <= data_wr[3]; scl_out_r <= 1'b0; end
                        5'd9:   begin scl_out_r <= 1'b1; end
                        5'd10:  begin sda_out_r <= data_wr[2]; scl_out_r <= 1'b0; end
                        5'd11:  begin scl_out_r <= 1'b1; end
                        5'd12:  begin sda_out_r <= data_wr[1]; scl_out_r <= 1'b0; end
                        5'd13:  begin scl_out_r <= 1'b1; end
                        5'd14:  begin sda_out_r <= data_wr[0]; scl_out_r <= 1'b0; end
                        5'd15:  begin scl_out_r <= 1'b1; end
                        5'd16:  begin scl_out_r <= 1'b0; state <= MAIN; end
                        default: state <= IDLE;
                    endcase
                end
            ACK:begin
                    if(cnt_ack >= 2'd3) cnt_ack <= 1'b0;
                    else cnt_ack <= cnt_ack + 1'b1;
                    case(cnt_ack)
                        //read bit 0
                        2'd0:   begin sda_out_r <= 1'bz; end
                        2'd1:   begin scl_out_r <= 1'b1; end
                        2'd2:   begin if(sda_out) state <= IDLE; else state <= state; end
                        2'd3:   begin scl_out_r <= 1'b0; state <= MAIN; end
                        default: state <= IDLE;
                    endcase
                end
            STOP:begin
                    if(cnt_stop >= 2'd2) cnt_stop <= 1'b0;
                    else cnt_stop <= cnt_stop + 1'b1;
                    case(cnt_stop)
                        2'd0:   begin sda_out_r <= 1'b0; end
                        2'd1:   begin scl_out_r <= 1'b1; end
                        2'd2:   begin sda_out_r <= 1'b1; state <= MAIN; end
                        default: state <= IDLE;
                    endcase
                end
        endcase
    end
end

assign  scl_out = scl_out_r;
assign  sda_out = sda_out_r;

endmodule

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
STC89C52利用PCF8591如何采集pulse sensor模拟信号

本人是单片机初学者 买了个pulse sensor,不过买家配套的单片机例程是STC12的(这个单片机有自带AD的),而我的STC89C52好像是没有自带AD的!而且我的学习板上的AD模块使用PCF8591驱动的,我不知道要利用PCF8591来采集模拟信号![图片说明](https://img-ask.csdn.net/upload/201604/27/1461725000_880078.png) ![图片说明](https://img-ask.csdn.net/upload/201604/27/1461725048_861594.png) 我有在网上查找了PCF8591AD转换代码,不过看不懂他里面哪里是从外部采集模拟信号的程序代码 下面的程序是我找的PCF8591的AD转换程序,还望大神帮我解释解释! #include<reg51.h> #include<intrins.h> #define uchar unsigned char #define uint unsigned int #define Write_PCF8591 0x90 #define Read_PCF8591 0x91 #define Control_Byte 0x40 #define LED P3 sbit SCL=P2^0; sbit SDA=P2^1; uchar num,temp; void delayms(uint z) { uint x,y; for(x=0;x<z;x++) for(y=0;y<110;y++); } void delay() { _nop_();_nop_(); _nop_();_nop_(); _nop_();_nop_(); _nop_();_nop_(); } void init_IIC() { SDA=1; delay(); SCL=1; delay(); } void start() { SDA=1; delay(); SCL=1; delay(); SDA=0; delay(); } void stop() { SDA=0; delay(); SCL=1; delay(); SDA=1; delay(); } void ack() { uchar i=0; SCL=1; delay(); while((SDA==1)&&(i<250)) i++; SCL=0; delay(); } void noack() { SDA=1; delay(); SCL=1; delay(); SCL=0; delay(); } void Write_Byte(uchar dat) { uchar i; for(i=0;i<8;i++) { SCL=0; delay(); if(dat&0x80) { SDA=1; } else { SDA=0; } dat=dat<<1; SCL=1; delay(); } SCL=0; delay(); SDA=1; delay(); } uchar Read_Byte() { uchar i,dat; SCL=0; delay(); SDA=1; delay(); for(i=0;i<8;i++) { SCL=1; delay(); dat=dat<<1; if(SDA) { dat++; } SCL=0; delay(); } return dat; } void DAC_PCF8591(uchar add,uchar dat) { start(); Write_Byte(add); ack(); Write_Byte(Control_Byte); ack(); Write_Byte(dat); ack(); stop(); } uchar ADC_Read(uchar add0,uchar add1,uchar chl) { uchar dat; start(); Write_Byte(add0); ack(); Write_Byte(Control_Byte|chl); ack(); start(); Write_Byte(add1); ack(); dat=Read_Byte(); noack(); stop(); return dat; } void main() { init_IIC(); while(1) { DAC_PCF8591(Write_PCF8591,num); num++; delayms(30); temp=ADC_Read(Write_PCF8591,Read_PCF8591,0); LED=temp; } } 希望能告诉我以上程序哪里是接收模拟信号,我才能让Pulse sensor的信号传到STC89C52里! 小弟在这里感激不尽!

PCF视频文件破解和转码

请问如何破解PCF视频文件,或者PCF的转码器也可以,PCF的文件用暴风转码、格式工厂、XR转码器都不行,请问如何破解

PCF8563实时时钟程序 串口输出 怎么没人回答呢 大佬们帮帮忙啊

PCF8563实时时钟程序,需要输出时间,但现在在串口输出的时候文本模式没有输出,HEX模式下不断输出00,我需要输出时间 下边代码 懂的大佬帮帮忙看看哪出问题了 怎么解决? main.c #include <reg52.h> #include <absacc.h> #include <intrins.h> /*------------------ 内振11.0592M sbit SDA=P4^6; sbit SCL=P4^1; 串口输出时间,波特率9600 串口不移位 ------------------*/ extern void uart_init(void); extern void P8563_init(); extern void P8563_gettime(); extern void uart_test(unsigned char length); unsigned char TX_buf[10]; unsigned char jj,Rx_Byte,Length; bit CmdValid; unsigned char RX_buf[10]; extern void Delay(); void P8563_Read(); void main(void) { unsigned int delayl; uart_init(); P8563_init(); // WDT_CONTR = 0x30; while(1) { //WDT_CONTR = 0x3c; // WDT_CONTR = 0x30; for(delayl=0;delayl<60000;delayl++){ Delay(); } P8563_gettime(); P8563_Read(); /* TX_buf[0] = 0x01; TX_buf[1] = 0x02; TX_buf[2] = 0x02; TX_buf[3] = 0x03; uart_test(4); */ } } /*void ser() interrupt 4 { if(RI) { RI=0; RX_buf[Rx_Byte]=SBUF; if(RX_buf[0]=='\n') Rx_Byte=0; if(RX_buf[0]==' ') Rx_Byte=0; if( RX_buf[0] == 0xff) Rx_Byte = 0; else { Length = RX_buf[0]; if(Rx_Byte ==Length) { jj=0; CmdValid = 1; } Rx_Byte++; } } else if(!RI && TI) { TI=0; if(jj<4) SBUF=TX_buf[jj++];//将接受的数据发出去 else { Rx_Byte=0; jj = 0; } } }*/ ``` PCF8563.c #include <reg52.h> #include <absacc.h> #include <intrins.h> #define uchar unsigned char extern uchar TX_buf[10]; extern void uart_test(unsigned char length); sfr P4 = 0xe8; sbit P40 = 0xe8; sbit P41 = 0xe9; sbit P42 = 0xea; sbit P43 = 0xeb; sbit P44 = 0xec; sbit P45 = 0xed; sbit P46 = 0xee; sbit SDA=P4^6; sbit SCL=P4^1; uchar g8563_Store[6]; /*时间交换区,全局变量声明*/ uchar code c8563_Store[6]={0x17,0x08,0x09,0x18,0x00,0x00}; /*写入时间初值:星期一 07:59:00*/ /******************************************** 内部函数,延时1 ********************************************/ void Delay() { _nop_();_nop_(); _nop_();_nop_();_nop_();_nop_();/*根据晶振频率制定延时时间*/ } /******************************************** 内部函数,I2C开始 ********************************************/ void Start() { SDA=1; SCL=1; Delay(); SDA=0; Delay(); SCL=0; } /******************************************** 内部函数,I2C结束 ********************************************/ void Stop() { SDA=0; SCL=0; Delay(); SCL=1; Delay(); SDA=1; Delay(); } /******************************************** 内部函数,输出ACK ,每个字节传输完成,输出ack=0,结束读书据,ack=1; ********************************************/ void WriteACK(uchar ack) { SDA=ack; Delay(); SCL=1; Delay(); SCL=0; } /******************************************** 内部函数,等待ACK ********************************************/ void WaitACK() { uchar errtime=20; SDA=1; Delay(); /*读ACK*/ SCL=1; Delay(); while(SDA) { errtime--; if(!errtime) Stop(); } SCL=0; Delay(); } /******************************************** 内部函数.输出数据字节 入口:B=数据 ********************************************/ void writebyte(uchar wdata) { uchar i; for(i=0;i<8;i++) { if(wdata&0x80) SDA=1; else SDA=0; wdata<<=1; SCL=1; Delay(); SCL=0; } WaitACK(); //I2C器件或通讯出错,将会退出I2C通讯 } /******************************************** 内部函数.输入数据 出口:B ********************************************/ uchar Readbyte() { uchar i,bytedata; SDA=1; for(i=0;i<8;i++) { SCL=1; bytedata<<=1; bytedata|=SDA; SCL=0; Delay(); } return(bytedata); } /******************************************** 输出数据->pcf8563 ********************************************/ void writeData(uchar address,uchar mdata) { Start(); writebyte(0xa2); /*写命令*/ writebyte(address); /*写地址*/ writebyte(mdata); /*写数据*/ Stop(); } /******************************************** 输入数据<-pcf8563 ********************************************/ /*uchar ReadData(uchar address) //单字节 { uchar rdata; Start(); writebyte(0xa2); //写命令 writebyte(address); //写地址 Start(); writebyte(0xa3); //读命令 rdata=Readbyte(); WriteACK(1); Stop(); return(rdata); }*/ void ReadData1(uchar address,uchar count,uchar * buff) /*多字节*/ { uchar i; Start(); writebyte(0xa2); /*写命令*/ writebyte(address); /*写地址*/ Start(); writebyte(0xa3); /*读命令*/ for(i=0;i<count;i++) { buff[i]=Readbyte(); if(i<count-1) WriteACK(0); } WriteACK(1); Stop(); } /******************************************** 内部函数,读入时间到内部缓冲区 ********************************************/ void P8563_Read() { uchar time[7]; ReadData1(0x02,0x07,time); g8563_Store[0]=time[0]&0x7f; /*秒 */ g8563_Store[1]=time[1]&0x7f; /*分 */ g8563_Store[2]=time[2]&0x3f; /*小时 */ g8563_Store[3]=time[3]&0x3f; /*日 */ g8563_Store[4]=time[5]&0x1f; /*月 */ g8563_Store[5]=time[6]; /*年 */ TX_buf[0] = g8563_Store[5]; TX_buf[1] = g8563_Store[4]; TX_buf[2] = g8563_Store[3]; TX_buf[3] = g8563_Store[2]; TX_buf[4] = g8563_Store[1]; TX_buf[5] = g8563_Store[0]; uart_test(6); } /******************************************** 读入时间到内部缓冲区----外部调用 ********************************************/ void P8563_gettime() { P8563_Read(); if(g8563_Store[0]==0) P8563_Read(); /*如果为秒=0,为防止时间变化,再读一次*/ } /******************************************** 写时间修改值 ********************************************/ void P8563_settime() { //uchar i; writeData(8,g8563_Store[0]); //年 writeData(7,g8563_Store[1]); //月 writeData(5,g8563_Store[2]); //日 writeData(4,g8563_Store[3]); //时 writeData(3,g8563_Store[4]); //分 writeData(2,g8563_Store[5]); //秒 } /******************************************** P8563的初始化-----外部调用 ********************************************/ void P8563_init() { uchar i; // P8563_settime(); for(i=0;i<=5;i++) g8563_Store[i]=c8563_Store[i]; /*初始化时间*/ P8563_settime(); // if((ReadData(0x0a)&0x3f)!=0x08) /*检查是否第一次启动,是则初始化时间*/ // { // P3_4 = 0; // for(i=0;i<=3;i++) g8563_Store[i]=c8563_Store[i]; /*初始化时间*/ // P8563_settime(); // writeData(0x0,0x00); // writeData(0xa,0x8); /*8:00报警*/ // writeData(0x1,0x12); /*报警有效*/ // writeData(0xd,0xf0); //编程输出32.768K的频率 // } } ``` uart.c #include <reg52.h> //sfr AUXR = 0x8e; //Auxiliary register extern unsigned char TX_buf[10]; void uart_init(void) { SCON = 0x50; //8???,????? // AUXR |= 0x40; //???1???Fosc,?1T // AUXR &= 0xFE; //??1?????1??????? TMOD &= 0x02; //?????1?16??????? TL1 = 0xfd; //?????? TH1 = 0xfd; //?????? ET1 = 0; //?????1?? TR1 = 1; //?????1 // TMOD=0x20;//设置定时器1为工作方式2 // TH1=0xfd;//装初值 // TL1=0xfd; // TR1=1; //启动定时器 // TI=1; // //REN=1; //允许接收 // SM0=0; //设置工作方式 1 // SM1=1; // EA=1; //开串口中断 // ES=1; //IP = 0x10; //设置串口为高优先级 } void uart_test(unsigned char length) { unsigned char i; for(i=0;i<length;i++) { ES=0; SBUF = TX_buf[i];//将接受的数据发出去 while(!TI); TI=0; } ES=1; }

NS2.35 中实现MAC/802.11 的PCF接入方式

本人NS2萌新一枚写了一个DCF100节点有AP的仿真例子代码后面附上。 请问NS2.35上是否已经实现了802.11的PCF接入方式,若已经实现了请大佬们给个简单的例子。 若没有请大佬们告诉我该怎么做,已自闭。。。。。。。。。。。。 # DCF接入方式存在AP节点 set val(chan) Channel/WirelessChannel ;# 信道类型:无线 set val(prop) Propagation/TwoRayGround ;# 传输模型(两径模型:1.点到点间的直线。2.地面的反射) set val(netif) Phy/WirelessPhy ;# 物理接口类型:无线 set val(mac) Mac/802_11 ;# MAC层类型802.11 set val(ifq) Queue/DropTail/PriQueue ;# 网卡队列丢失类型:尾部丢弃(远距离衰落) set val(ll) LL ;# 逻辑链路层类型 set val(ant) Antenna/OmniAntenna ;# 天线类型:全向 set val(ifqlen) 50 ;# 网卡队列容量 set val(nn) 100 ;# 节点数量 set val(rp) AODV ;# 路由协议 set val(x) 500 set val(y) 500 # PCF设置参数: Mac/802_11 set Beacon 40 Mac/802_11 set CF-Poll 60 Mac/802_11 set CF-end 20 Mac/802_11 set CF-Null 34 #=========================545米通信范围其余均为默认======================================== # 通信(侦听)范围过大容易产生碰撞,使得丢包率大大增加,甚至无法传输到目的节点 #Phy/WirelessPhy set CPThresh_ 10.0 ;# 碰撞后功率强于另一个10倍的包被接收 Phy/WirelessPhy set CSThresh_ 1.55924e-11 ;# 550m侦听范围 Phy/WirelessPhy set RXThresh_ 1.61726e-11 ;# 545米通信范围值 #Phy/WirelessPhy set bandwidth_ 2e6 ;# 带宽2Mb #Phy/WirelessPhy set Pt_ 0.28183815 ;# 传输功率 #Phy/WirelessPhy set freq_ 914e+6 ;# 射频频率 #Phy/WirelessPhy set L_ 1.0 ;# 系统损耗系数 #================================end===================================================== #=============================NS2默认的802.11参数设定(802.11b)===================================== # 修改以下参数可以实现802.11a、802.11b、802.11g等MAC层协议 # DIFS = SIFS + (2 * Slot time) DCF采用DIFS # PIFS = SIFS + Slot time PCF的AP采用PIFS # DIFS > PIFS > SIFS,因此AP总比普通节点具有更高的访问信道的优先级(间隔越小优先级越高) # # 802.11 DCF使用CSMA/CA的方法来避免碰撞,在发送包之前,发送端会等待一个DIFS时间, # 如果在这段期间內侦测到其它在使用信道的话,发送端会把这次的发送任务延迟到信道空闲后再经过DIFS时间后再开始发送 # 此时,传送端会会使用随机数的方法选一个时间槽去重新发送这个包 # (随机数的范围由Contention Window,CW控制;初始只为CWmin,最大值为CWmax)。 # 随机退避时间:Backoff Time = Random()xSlotTime Random()取自[0,CW]中的一个随机数 # CW的初始值 = CWmin ,每次退避时CW=CWx2,当增大到CWmax时不再增大,发送成功后重置(reset) # 退避计数器值减至0时,一但信道空闲立即发送数据 # #Mac/802_11 set CWMin_ 31 ;# 退避随机数最小值 #Mac/802_11 set CWMax_ 1023 ;# 退避随机数最大值 #Mac/802_11 set SlotTime_ 0.000020 ;# SlotTime=20us #Mac/802_11 set SIFS_ 0.000010 ;# 最小帧间间隔 :10us; SIFS = 10us #Mac/802_11 set PreambleLength_ 144 ;# 144 bit #Mac/802_11 set PLCPHeaderLength_ 48 ;# 48 bits #Mac/802_11 set PLCPDataRate_ 1.0e6 ;# 1Mbps #Mac/802_11 set RTSThreshold_ 0 ;# 启用RTS/CTS机制的包大小0 bytes #Mac/802_11 set ShortRetryLimit_ 7 ;# 短帧最大重传尝试次数,包大小<RTS/CTS阈值 = 短帧 #Mac/802_11 set LongRetryLimit_ 4 ;# 长帧最大重传尝试次数,包大小>RTS/CTS阈值 = 长帧 #====================================end========================================================== # Mac/802_11 set dataRate_ 11Mb ;# 数据速率,DATA发送速率 # Mac/802_11 set basicRate_ 1Mb ;# 控制信息发送速率 # 创建仿真器和相应trace数据存储文件 set ns_ [new Simulator] set f [open PCF_100.tr w] $ns_ trace-all $f $ns_ eventtrace-all set nf [open PCF_100.nam w] $ns_ namtrace-all-wireless $nf val(x) val(y) ;# nam动画跟踪范围: 500 x 500 # 创建拓扑平面: val(x) x val(y) (500 x 500) set topo [new Topography] $topo load_flatgrid $val(x) $val(y) # 创建val(nn) 100 个GOD数据结构,以记录路由信息 create-god $val(nn) set chan [new $val(chan)] ;# 创建无线信道 $ns_ node-config -adhocRouting $val(rp) \ -llType $val(ll) \ -macType $val(mac) \ -ifqType $val(ifq) \ -ifqLen $val(ifqlen) \ -antType $val(ant) \ -propType $val(prop) \ -phyType $val(netif) \ -channel $chan \ -topoInstance $topo \ -agentTrace ON \ -routerTrace OFF \ -macTrace ON \ -movementTrace OFF #===========================信标帧间隔和接入点模式说明========================================== # $mac_([expr $val(nn) - 1]) set BeaconInterval_ 0.2 ;#信标间隔时间 # Beacon Interval间隔调高,有助于发挥无线网络效能 ,client 端省电 # Beacon Interval间隔调低 ,可以加快wireless client 连结速度 . # # ACTIVE模式:这种模式下,STA在每个Channel(信道)上都会发出Probe Request帧用来搜索某个网络。 # PASSIVE模式:这种模式下,STA不发送任何信号,只是在ChannelList中各个信道间不断切换并等待Beacon帧。 #=====================================end====================================================== # “for” 循环创建 node 0~99 并设定节点坐标 10 x 10的矩阵拓扑 for {set i 0} {$i < 10} {incr i} { for {set j 0} {$j < 10} {incr j} { set k [expr $i*10+$j] set node_($k) [$ns_ node] $node_($k) random-motion 0 ;#不移动 $node_($k) set X_ [expr $j*50] $node_($k) set Y_ [expr $i*50] $node_($k) set Z_ 0.0 set mac_($k) [$node_($k) getMac 0] if {$k != 44} { ;# 其余节点为ACTIVE模式下的STA $ns_ at 0.1 "$mac_($k) ScanType ACTIVE" } else { ;# 设置node44为AP(PC) set AP_ADDR1 [$mac_($k) id] $mac_($k) ap $AP_ADDR1 $ns_ at 0.01 "$node_($k) color \"red\"" } } } $mac_(44) set BeaconInterval_ 0.5 # 建立node0与done99的tcp连接(node0发,node99收),传输数据类型CBR set tcp [new Agent/TCP] $ns_ attach-agent $node_(0) $tcp set null [new Agent/TCPSink] $ns_ attach-agent $node_(99) $null $ns_ connect $tcp $null set cbr [new Application/Traffic/CBR] $cbr attach-agent $tcp # node0的恒定速率源的设定 $cbr set type_ CBR ;# 数据源类型恒定速率 $cbr set packet_size_ 1000 ;# 包大小 1000Byte $cbr set rate_ 1Mb ;# 速率: 1 Mbit/s $cbr set random_ false ;# 速率不变 $ns_ at 0.5 "$cbr start" ;# 0.5秒时产生数据 $ns_ at 26.0 "$cbr stop" ;# 26秒时结束数据的产生 # 结束时 “for” 循环重置node0~99 for {set i 0} {$i < 100} {incr i} { $ns_ initial_node_pos $node_($i) 30 $ns_ at 28.0 "$node_($i) reset" ;# 28sec时将节点设置恢复为默认 } # 30sec 调用finish函数,20.1 结束仿真 $ns_ at 30.0 "finish" $ns_ at 30.1 "puts \"NS EXITING...\"; $ns_ halt" # finish函数,关闭trace文件并调用nam动画演示仿真 proc finish {} { global ns_ f nf val $ns_ flush-trace close $f close $nf exec nam PCF_100.nam & exit 0 } $ns_ run ;#执行仿真

DA14580与PCF2123TS通讯例程

我是新手,请问谁有RTC PCF2123TS的例程?CPU最好是DA14580,越详细的注释越好,谢谢大家。

要实现stc12c5a60s2的D/A转换功能可以用哪种外部芯片

STC 内部的不想用,有没有外部D/A芯片能直接通讯的,有的话是哪种呢,谢谢

C51程序设计,初学不太懂,书上没有实例

设计一个发光二极管LED接在P1.0,一个打开按键接在P3.2,一个关闭按键接在P3.3,利用外部中断编程序实现点击打开按键时点亮LED,点击关闭按键时熄灭LED。

刚买的pca9685写的代码一直驱动不了舵机,小白求解

新手小白求问 刚买了pca9685模块,看数据手册没有中文的只好找了些别人stm32的代码改过来用在51上面,但是一直都驱动不了舵机,不是知道代码出了什么问题,求解 以下就是我用的所有源码。 ``` #ifndef __IIC_H #define __IIC_H sbit IIC_SDA = P3^6; sbit IIC_SCL = P3^7; #define u8 unsigned char #define u16 char //IIC所有操作函数 void delay_us(u8 i); void IIC_Start(void); //发送IIC开始信号 void IIC_Stop(void); //发送IIC停止信号 void IIC_Send_Byte(u8 txd); //IIC发送一个字节 u8 IIC_Read_Byte(unsigned char ack);//IIC读取一个字节 u8 IIC_Wait_Ack(void); //IIC等待ACK信号 void IIC_Ack(void); //IIC发送ACK信号 void IIC_NAck(void); //IIC不发送ACK信号 //void IIC_Write_One_Byte(u8 daddr,u8 addr,u8 dat); //u8 IIC_Read_One_Byte(u8 daddr,u8 addr); #endif ``` ``` #include <stc12c5a60s2.h> #include <IIC.h> #include <intrins.h> void delay_us(u8 i) { u8 j; for(j=i;j>0;j--) {_nop_();} } //产生IIC起始信号 void IIC_Start(void) { // SDA_OUT(); //sda线输出 IIC_SDA=1; IIC_SCL=1; delay_us(4); IIC_SDA=0;//START:when CLK is high,DATA change form high to low delay_us(4); IIC_SCL=0;//钳住I2C总线,准备发送或接收数据 } //产生IIC停止信号 void IIC_Stop(void) { // SDA_OUT();//sda线输出 IIC_SCL=0; IIC_SDA=0;//STOP:when CLK is high DATA change form low to high delay_us(4); IIC_SCL=1; IIC_SDA=1;//发送I2C总线结束信号 delay_us(4); } //等待应答信号到来 //返回值:1,接收应答失败 // 0,接收应答成功 u8 IIC_Wait_Ack(void) { u8 ucErrTime=0; // SDA_IN(); //SDA设置为输入 IIC_SDA=1;delay_us(1); IIC_SCL=1;delay_us(1); while(IIC_SDA) { ucErrTime++; if(ucErrTime>250) { IIC_Stop(); return 1; } } IIC_SCL=0;//时钟输出0 return 0; } //产生ACK应答 void IIC_Ack(void) { IIC_SCL=0; // SDA_OUT(); IIC_SDA=0; delay_us(2); IIC_SCL=1; delay_us(2); IIC_SCL=0; } //不产生ACK应答 void IIC_NAck(void) { IIC_SCL=0; // SDA_OUT(); IIC_SDA=1; delay_us(2); IIC_SCL=1; delay_us(2); IIC_SCL=0; } //IIC发送一个字节 //返回从机有无应答 //1,有应答 //0,无应答 void IIC_Send_Byte(u8 txd) { u8 t; // SDA_OUT(); IIC_SCL=0;//拉低时钟开始数据传输 for(t=0;t<8;t++) { IIC_SDA=(txd&0x80)>>7; txd<<=1; delay_us(2); //对TEA5767这三个延时都是必须的 IIC_SCL=1; delay_us(2); IIC_SCL=0; delay_us(2); } } //读1个字节,ack=1时,发送ACK,ack=0,发送nACK u8 IIC_Read_Byte(unsigned char ack) { unsigned char i,receive=0; // SDA_IN();//SDA设置为输入 for(i=0;i<8;i++ ) { IIC_SCL=0; delay_us(2); IIC_SCL=1; receive<<=1; if(IIC_SDA)receive++; delay_us(1); } if (!ack) IIC_NAck();//发送nACK else IIC_Ack(); //发送ACK return receive; } ``` ``` #include <stc12c5a60s2.h> #include <IIC.h> #include <intrins.h> #include <pca8574.h> #define uchar unsigned char #define uint unsigned int sbit scl=P3^6; //时钟输入线 sbit sda=P3^7; //数据输入/输出端 void PCA9685_write(unsigned char reg,unsigned char dat); u8 PCA9685_read(unsigned char reg); void setPWMFreq(u8 freq); void setPWM(u8 num, u16 on, u16 off); void down(); void up(); void delay_ms(u8 xms) { u8 i,j; for(i=xms;i>0;i--) for (j=200;j>0;j--); } void PCA9685_write(unsigned char reg,unsigned char dat) { IIC_Start(); IIC_Send_Byte(PCA9685_adrr); IIC_Wait_Ack(); IIC_Send_Byte(reg); IIC_Wait_Ack(); IIC_Send_Byte(dat); IIC_Wait_Ack(); IIC_Stop(); } u8 PCA9685_read(unsigned char reg) { u8 res; IIC_Start(); IIC_Send_Byte(PCA9685_adrr); IIC_Wait_Ack(); IIC_Send_Byte(reg); IIC_Wait_Ack(); IIC_Start(); IIC_Send_Byte(PCA9685_adrr|0X01); IIC_Wait_Ack(); res=IIC_Read_Byte(0); IIC_Stop(); return res; } void setPWMFreq(u8 freq) { u8 prescale,oldmode,newmode; double prescaleval; prescaleval = 25000000.0/(4096*freq*0.915); prescale = (u8)(prescaleval+0.5)-1; oldmode = PCA9685_read(PCA9685_MODE1); newmode = (oldmode&0x7F) | 0x10; // sleep PCA9685_write(PCA9685_MODE1, newmode); // go to sleep PCA9685_write(PCA9685_PRESCALE, prescale); // set the prescaler PCA9685_write(PCA9685_MODE1, oldmode); delay_ms(5); PCA9685_write(PCA9685_MODE1, oldmode | 0xa1); } void setPWM(u8 num, u16 on, u16 off) { PCA9685_write(LED0_ON_L+4*num,on); PCA9685_write(LED0_ON_H+4*num,on>>8); PCA9685_write(LED0_OFF_L+4*num,off); PCA9685_write(LED0_OFF_H+4*num,off>>8); } u16 calculate_PWM(u8 angle) { return (int)(204.8*(0.5+angle*1.0/90)); } void down() { u16 pwm = calculate_PWM(0); setPWM(0x0,0,pwm); delay_ms(1); setPWM(0x1,0,pwm); delay_ms(1); setPWM(0x2,0,pwm); delay_ms(1); setPWM(0x3,0,pwm); delay_ms(1); setPWM(0x4,0,pwm); delay_ms(1); setPWM(0x5,0,pwm); delay_ms(1); setPWM(0x6,0,pwm); delay_ms(1); setPWM(0x7,0,pwm); } void up() { u16 pwm = calculate_PWM(90); setPWM(0x0,0,pwm); delay_ms(1); setPWM(0x1,0,pwm); delay_ms(1); setPWM(0x2,0,pwm); delay_ms(1); setPWM(0x3,0,pwm); delay_ms(1); setPWM(0x4,0,pwm); delay_ms(1); setPWM(0x5,0,pwm); delay_ms(1); setPWM(0x6,0,pwm); delay_ms(1); setPWM(0x7,0,pwm); } void main() { PCA9685_write(PCA9685_MODE1,0x0);//PCA9685复位 setPWMFreq(50); while(1) { down(); up(); } } ``` ``` #ifndef __PCF8574_H #define __PCF8574_H #include <stc12c5a60s2.h> #define PCA9685_adrr 0x40 #define PCA9685_SUBADR1 0x2 #define PCA9685_SUBADR2 0x3 #define PCA9685_SUBADR3 0x4 #define PCA9685_MODE1 0x0 #define PCA9685_PRESCALE 0xFE #define LED0_ON_L 0x6 #define LED0_ON_H 0x7 #define LED0_OFF_L 0x8 #define LED0_OFF_H 0x9 #define ALLLED_ON_L 0xFA #define ALLLED_ON_H 0xFB #define ALLLED_OFF_L 0xFC #define ALLLED_OFF_H 0xFD #define u8 unsigned char #define u16 char ```

Godep将Go项目推到PCF-dev时找不到杜松子酒

<div class="post-text" itemprop="text"> <p>Yesterday my app was pushing fine. When I came back today to push I am having issues where godeps can't find certain dependencies. Im able to godep go install just fine on my local machine, which leads me to believe this is a PCF issue of some type.</p> <p><code>go push</code> output: </p> <pre><code>Starting app business-service in org pcfdev-org / space pcfdev-space as user... Downloading dotnet_core_buildpack_beta... Downloading go_buildpack... Downloading nodejs_buildpack... Downloading ruby_buildpack... Downloading staticfile_buildpack... Downloaded ruby_buildpack Downloading python_buildpack... Downloaded go_buildpack Downloading php_buildpack... Downloaded nodejs_buildpack Downloading binary_buildpack... Downloaded dotnet_core_buildpack_beta Downloading java_buildpack... Downloaded binary_buildpack Downloaded php_buildpack Downloaded python_buildpack Downloaded staticfile_buildpack Downloaded java_buildpack Creating container Successfully created container Downloading app package... Downloaded app package (9.1K) Staging... -------&gt; Buildpack version 1.7.10 file:///tmp/buildpacks/d17226e3d1bc5f728403b1521b69c8ae/dependencies/https___buildpacks.cloudfoundry.org_concourse-binaries_godep_godep-v74-linux-x64.tgz file:///tmp/buildpacks/d17226e3d1bc5f728403b1521b69c8ae/dependencies/https___buildpacks.cloudfoundry.org_concourse-binaries_glide_glide-v0.11.0-linux-x64.tgz -----&gt; Checking Godeps/Godeps.json file. -----&gt; Installing go1.6.3... done Downloaded [file:///tmp/buildpacks/d17226e3d1bc5f728403b1521b69c8ae/dependencies/https___storage.googleapis.com_golang_go1.6.3.linux-amd64.tar.gz] !! Installing package '.' (default) -----&gt; Running: godep go install -v -tags cloudfoundry --buildmode=pie . server/server.go:4:2: cannot find package "gopkg.in/gin-gonic/gin.v1" in any of: /tmp/cache/go1.6.3/go/src/gopkg.in/gin-gonic/gin.v1 (from $GOROOT) /tmp/app/.heroku/go/src/business-service/Godeps/_workspace/src/gopkg.in/gin-gonic/gin.v1 (from $GOPATH) /tmp/app/.heroku/go/src/gopkg.in/gin-gonic/gin.v1 godep: go exit status 1 Failed to compile droplet Exit status 223 Staging failed: Exited with status 223 Destroying container Successfully destroyed container </code></pre> <p>Godeps.json:</p> <pre><code>{ "ImportPath": "business-service", "GoVersion": "go1.6", "GodepVersion": "v74", "Deps": [ { "ImportPath": "github.com/gin-gonic/gin/binding", "Comment": "v1.0-2-g3900df0", "Rev": "3900df04d2a88e22beaf6a2970c63648b9e1b0e1" }, { "ImportPath": "github.com/gin-gonic/gin/render", "Comment": "v1.0-2-g3900df0", "Rev": "3900df04d2a88e22beaf6a2970c63648b9e1b0e1" }, { "ImportPath": "github.com/golang/protobuf/proto", "Rev": "98fa357170587e470c5f27d3c3ea0947b71eb455" }, { "ImportPath": "github.com/manucorporat/sse", "Rev": "ee05b128a739a0fb76c7ebd3ae4810c1de808d6d" }, { "ImportPath": "golang.org/x/net/context", "Rev": "65dfc08770ce66f74becfdff5f8ab01caef4e946" }, { "ImportPath": "gopkg.in/gin-gonic/gin.v1", "Comment": "v1.0", "Rev": "2dae550eb5392006a4582ce9c90016a9b5a74e8b" }, { "ImportPath": "gopkg.in/go-playground/validator.v8", "Comment": "v8.18.1", "Rev": "5f57d2222ad794d0dffb07e664ea05e2ee07d60c" }, { "ImportPath": "gopkg.in/yaml.v2", "Rev": "a5b47d31c556af34a302ce5d659e6fea44d90de0" } ] } </code></pre> </div>

使用foreach循环不是我想要的结果

<div class="post-text" itemprop="text"> <pre><code>$warehousesArray = array('Paharganj' =&gt; '5', 'Sant Nagar'=&gt;'11324', 'Mumbai'=&gt;'35798', 'UP Border'=&gt;'117262', 'Top Floor'=&gt;'170740', 'Gurgaon'=&gt;'170741'); $stockSummaryQuery1 = " SELECT p.productid, p.productname, scf.cf_976 AS stock_quantity, w.warehousename, SUM(IF(scf.cf_974=scf.cf_976 AND scf.cf_974 != 0,1,0)) AS number_of_packs FROM vtiger_products AS p LEFT JOIN vtiger_productcf AS pcf ON pcf.productid = p.productid LEFT JOIN vtiger_stockscf AS scf ON scf.cf_922 = p.productid LEFT JOIN vtiger_stocks AS s ON scf.stocksid = s.stocksid JOIN vtiger_crmentity AS stockent ON stockent.crmid = s.stocksid AND stockent.deleted = 0 LEFT JOIN vtiger_racks AS ra ON ra.racksid = scf.cf_924 JOIN vtiger_rackscf AS racf ON ra.racksid = racf.racksid JOIN vtiger_rooms AS ro ON ro.roomsid = racf.cf_900 JOIN vtiger_roomscf AS rocf ON rocf.roomsid = ro.roomsid JOIN vtiger_warehouses AS w ON rocf.cf_910 = w.warehousesid LEFT JOIN vtiger_vendor AS v ON v.vendorid = p.vendor_id WHERE 1 "; if (isset($_GET['vendor_name']) &amp;&amp; !empty($_GET['vendor_name'])) { $warehouseid_array = explode("_", $_GET['vendor_name']); $warehouseid = $warehouseid_array[0]; $stockSummaryQuery1 .= " AND v.vendorid = ".$warehouseid; } foreach ($warehousesArray as $key =&gt; $value) { echo $stockSummaryQuery1.= " AND w.warehousesid = $value"; echo "&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;"; } $stockSummaryQuery1 .= " GROUP BY p.productid ASC"; </code></pre> <p>i have echo the queries and the result is </p> <pre><code>SELECT p.productid, p.productname, scf.cf_976 AS stock_quantity, w.warehousename, SUM(IF(scf.cf_974=scf.cf_976 AND scf.cf_974 != 0,1,0)) AS number_of_packs FROM vtiger_products AS p LEFT JOIN vtiger_productcf AS pcf ON pcf.productid = p.productid LEFT JOIN vtiger_stockscf AS scf ON scf.cf_922 = p.productid LEFT JOIN vtiger_stocks AS s ON scf.stocksid = s.stocksid JOIN vtiger_crmentity AS stockent ON stockent.crmid = s.stocksid AND stockent.deleted = 0 LEFT JOIN vtiger_racks AS ra ON ra.racksid = scf.cf_924 JOIN vtiger_rackscf AS racf ON ra.racksid = racf.racksid JOIN vtiger_rooms AS ro ON ro.roomsid = racf.cf_900 JOIN vtiger_roomscf AS rocf ON rocf.roomsid = ro.roomsid JOIN vtiger_warehouses AS w ON rocf.cf_910 = w.warehousesid LEFT JOIN vtiger_vendor AS v ON v.vendorid = p.vendor_id WHERE 1 AND w.warehousesid = 5 SELECT p.productid, p.productname, scf.cf_976 AS stock_quantity, w.warehousename, SUM(IF(scf.cf_974=scf.cf_976 AND scf.cf_974 != 0,1,0)) AS number_of_packs FROM vtiger_products AS p LEFT JOIN vtiger_productcf AS pcf ON pcf.productid = p.productid LEFT JOIN vtiger_stockscf AS scf ON scf.cf_922 = p.productid LEFT JOIN vtiger_stocks AS s ON scf.stocksid = s.stocksid JOIN vtiger_crmentity AS stockent ON stockent.crmid = s.stocksid AND stockent.deleted = 0 LEFT JOIN vtiger_racks AS ra ON ra.racksid = scf.cf_924 JOIN vtiger_rackscf AS racf ON ra.racksid = racf.racksid JOIN vtiger_rooms AS ro ON ro.roomsid = racf.cf_900 JOIN vtiger_roomscf AS rocf ON rocf.roomsid = ro.roomsid JOIN vtiger_warehouses AS w ON rocf.cf_910 = w.warehousesid LEFT JOIN vtiger_vendor AS v ON v.vendorid = p.vendor_id WHERE 1 AND w.warehousesid = 5 AND w.warehousesid = 11324 SELECT p.productid, p.productname, scf.cf_976 AS stock_quantity, w.warehousename, SUM(IF(scf.cf_974=scf.cf_976 AND scf.cf_974 != 0,1,0)) AS number_of_packs FROM vtiger_products AS p LEFT JOIN vtiger_productcf AS pcf ON pcf.productid = p.productid LEFT JOIN vtiger_stockscf AS scf ON scf.cf_922 = p.productid LEFT JOIN vtiger_stocks AS s ON scf.stocksid = s.stocksid JOIN vtiger_crmentity AS stockent ON stockent.crmid = s.stocksid AND stockent.deleted = 0 LEFT JOIN vtiger_racks AS ra ON ra.racksid = scf.cf_924 JOIN vtiger_rackscf AS racf ON ra.racksid = racf.racksid JOIN vtiger_rooms AS ro ON ro.roomsid = racf.cf_900 JOIN vtiger_roomscf AS rocf ON rocf.roomsid = ro.roomsid JOIN vtiger_warehouses AS w ON rocf.cf_910 = w.warehousesid LEFT JOIN vtiger_vendor AS v ON v.vendorid = p.vendor_id WHERE 1 AND w.warehousesid = 5 AND w.warehousesid = 11324 AND w.warehousesid = 35798 </code></pre> <p>My desired result is the warehouseid is only written once and the values changes from <code>5</code> to <code>11324</code> and then <code>35798</code></p> </div>

名词解释,麻烦解释下这是个什么概念

什么是“数据融合pcf”? 当你看到“数据融合”和‘pcf’同时出现,可以明白是个什么东西吗? 它可能还涉及“核心网”的某些知识

IBM MQ MQJE001: 完成代码为 '2',原因为 '3013'

运行tools自带的样例 MQ服务器按照代码中的队列管理器和队列创建的 结果就抛这个异常,求大侠帮助. 个人联系方式 QQ 497673753 非常感谢 ----------------------------------------- MQJE001: 完成代码为 '2',原因为 '3013'。 Exception in thread "main" com.ibm.msg.client.jms.DetailedJMSException: JMSWMQ2008: 打开 MQ 队列 'Q1' 失败。 JMS 尝试执行 MQOPEN,但 WebSphere MQ 报告了错误。 使用链接的异常来确定此错误的原因。检查是否正确定义了指定的队列和队列管理器。 at com.ibm.msg.client.wmq.common.internal.Reason.reasonToException(Reason.java:585) at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:221) at com.ibm.msg.client.wmq.internal.WMQMessageProducer.checkJmqiCallSuccess(WMQMessageProducer.java:1061) at com.ibm.msg.client.wmq.internal.WMQMessageProducer.checkJmqiCallSuccess(WMQMessageProducer.java:1019) at com.ibm.msg.client.wmq.internal.WMQMessageProducer.access$800(WMQMessageProducer.java:68) at com.ibm.msg.client.wmq.internal.WMQMessageProducer$SpiIdentifiedProducerShadow.initialise(WMQMessageProducer.java:765) at com.ibm.msg.client.wmq.internal.WMQMessageProducer.<init>(WMQMessageProducer.java:995) at com.ibm.msg.client.wmq.internal.WMQSession.createProducer(WMQSession.java:886) at com.ibm.msg.client.jms.internal.JmsSessionImpl.createProducer(JmsSessionImpl.java:1232) at com.ibm.msg.client.jms.internal.JmsQueueSessionImpl.createSender(JmsQueueSessionImpl.java:136) at com.ibm.mq.jms.MQQueueSession.createSender(MQQueueSession.java:153) at mq.MQSender.sendMessage(MQSender.java:49) at mq.MQSender.main(MQSender.java:105) Caused by: com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ 调用失败,完成代码为 '2' ( 'MQCC_FAILED' ),原因为 '3013' ( '' )。 at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:209) ... 11 more Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=3013 at com.ibm.mq.ese.intercept.JmqiOpenInterceptorImpl.processExceptionAfterOpen(JmqiOpenInterceptorImpl.java:712) at com.ibm.mq.ese.intercept.JmqiOpenInterceptorImpl.afterSpiOpen(JmqiOpenInterceptorImpl.java:212) at com.ibm.mq.ese.jmqi.InterceptedJmqiImpl.spiOpen(InterceptedJmqiImpl.java:411) at com.ibm.mq.ese.jmqi.ESEJMQI.spiOpen(ESEJMQI.java:513) at com.ibm.msg.client.wmq.internal.WMQMessageProducer$SpiIdentifiedProducerShadow.initialise(WMQMessageProducer.java:762) ... 7 more Caused by: IBM WebSphere MQ Advanced Message Security Java 拦截器未能获取安全策略。原因码:'3013' The IBM WebSphere MQ Advanced Message Security Java interceptor was not able to obtain the security policy. See subsequent messages in the exception for more details about the cause of the error. at com.ibm.mq.ese.service.PolicyServiceImpl.failedToObtainPolicyException(PolicyServiceImpl.java:407) at com.ibm.mq.ese.service.PolicyServiceImpl.policyFromPcf(PolicyServiceImpl.java:613) at com.ibm.mq.ese.intercept.JmqiOpenInterceptorImpl.storeSecurityInfoInSmqiObject(JmqiOpenInterceptorImpl.java:357) at com.ibm.mq.ese.intercept.JmqiOpenInterceptorImpl.afterSpiOpen(JmqiOpenInterceptorImpl.java:209) ... 10 more Caused by: com.ibm.mq.headers.MQDataException: MQJE001: 完成代码为 '2',原因为 '3013'。 at com.ibm.mq.headers.pcf.PCFParameter.nextParameter(PCFParameter.java:91) at com.ibm.mq.headers.pcf.PCFMessage.initialize(PCFMessage.java:566) at com.ibm.mq.headers.pcf.PCFMessage.<init>(PCFMessage.java:133) at com.ibm.mq.ese.service.PolicyServiceImpl.policyFromPcf(PolicyServiceImpl.java:555) ... 12 more

Tomcat启动WARN,Failed to scan from classloader

我是用maven多模块项目,有以下几个子项目 admin(后台,springmvc) service(服务层,只有源码) data(数据访问层,只有源码) config(只有配置文件,mysql.yml) admin依赖service,service依赖data,data依赖config,在admin目录下面打包,做法是将config.jar用unpack,将里面的mysql.yml复制到admin的resource下面, admin的源码,resource,依赖的lib全都各自独立出来,在copy-dependencies到lib目录时,将config排除(因为已经复制了里面的配置文件)。现在把这些东西放到服务器上运行,启动tomcat时候会出现一个WARN,但是不影响启动,网站也能正常访问 ![WARN截图](https://img-ask.csdn.net/upload/201808/29/1535514997_537491.png) 下面是admin的打包方式 ``` <profiles> <profile> <id>development</id> <activation> <activeByDefault>true</activeByDefault> </activation> </profile> <profile> <id>install</id> <build> <finalName>${project.name}</finalName> <resources> <resource> <directory>src/main/resources</directory> <excludes> <exclude>**/*</exclude> </excludes> </resource> <resource> <directory>src/main/webapp</directory> <excludes> <exclude>**/*</exclude> </excludes> </resource> </resources> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> <manifest> <addClasspath>true</addClasspath> <classpathPrefix>lib/</classpathPrefix> <mainClass>xxx.Application</mainClass> </manifest> </archive> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>copy-dependencies</id> <phase>prepare-package</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <outputDirectory>${project.build.directory}/lib</outputDirectory> <overWriteReleases>false</overWriteReleases> <overWriteSnapshots>false</overWriteSnapshots> <overWriteIfNewer>true</overWriteIfNewer> <excludeArtifactIds>xxx-config</excludeArtifactIds> </configuration> </execution> <execution> <id>unpack</id> <phase>generate-resources</phase> <goals> <goal>unpack</goal> </goals> <configuration> <artifactItems> <artifactItem> <groupId>xxx</groupId> <artifactId>xxx-config</artifactId> <version>0.0.1-SNAPSHOT</version> <type>jar</type> <overWrite>true</overWrite> <outputDirectory>${project.build.directory}/resources</outputDirectory> <includes>mysql.yml,kafka.yml</includes> </artifactItem> </artifactItems> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <executions> <execution> <id>copy-resources</id> <phase>validate</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>${project.build.directory}/resources</outputDirectory> <resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> <exclude>server.sh</exclude> </resource> </resources> </configuration> </execution> <execution> <id>copy-webapp</id> <phase>validate</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>${project.build.directory}/resources/META-INF/resources</outputDirectory> <resources> <resource> <directory>src/main/webapp</directory> <filtering>true</filtering> </resource> </resources> </configuration> </execution> <execution> <id>copy-server-sh</id> <phase>validate</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>${project.build.directory}</outputDirectory> <resources> <resource> <directory>src/main/resources</directory> <include>server.sh</include> <filtering>true</filtering> </resource> </resources> </configuration> </execution> </executions> </plugin> </plugins> </build> </profile> </profiles> ``` ![服务器上的目录](https://img-ask.csdn.net/upload/201808/29/1535515279_245624.png) ![启动脚本](https://img-ask.csdn.net/upload/201808/29/1535515541_92802.png) 虽然是个WARN,不影响程序运行,但是我一直想找出来哪里出问题了,tomcat怎么就会去扫描一个不存在lib目录下的jar呢。 ps:tomcat是spring boot内置的容器

AllPosters.com SOAP有问题的响应

<div class="post-text" itemprop="text"> <p>I have a problem with the allposters.com SOAP (<a href="http://webservice.allposters.com/" rel="nofollow">http://webservice.allposters.com/</a>). I am trying to fetch some product information via (a slightly modified) nuSOAP PHP library (http://sourceforge.net/projects/nusoap/) on a PHP 5.3 installation.</p> <p>My request is (all the characters are exactly like here, they are not converted to entities):</p> <pre><code>POST /ProductInformationService.asmx HTTP/1.0 Host: webservice.allposters.com User-Agent: NuSOAP/0.9.5 (1.123) Content-Type: text/xml; charset=UTF-8 SOAPAction: "http://Webservice.Allposters.com/APCF.AffiliateWebService/ProductInformationService/GetProductByProductNumberInformation" Content-Length: 570 &lt;?xml version="1.0" encoding="UTF-8" ?&gt; &lt;soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt; &lt;soap:Body&gt; &lt;GetProductByProductNumberInformation xmlns="http://Webservice.Allposters.com/APCF.AffiliateWebService/ProductInformationService"&gt; &lt;APCSearchXml&gt; &lt;WebSiteID&gt;1234567890&lt;/WebSiteID&gt; &lt;SearchTerm&gt;1234567&lt;/SearchTerm&gt; &lt;LanguageID&gt;1&lt;/LanguageID&gt; &lt;CurrencyCode&gt;USD&lt;/CurrencyCode&gt; &lt;/APCSearchXml&gt; &lt;/GetProductByProductNumberInformation&gt; &lt;/soap:Body&gt; &lt;/soap:Envelope&gt; </code></pre> <p>And I get the error</p> <pre><code>Length cannot be less than zero. Parameter name: length </code></pre> <p>in this specific response</p> <pre><code>HTTP/1.1 200 OK Connection: keep-alive Date: Tue, 08 Jan 2013 18:46:59 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 4.0.30319 Cache-Control: private, max-age=0 Content-Type: text/xml; charset=utf-8 Content-Length: 821 &lt;APC_Search_Results&gt; &lt;StatusCode&gt;1&lt;/StatusCode&gt; &lt;Search_Error&gt; &lt;ErrorNumber&gt;1&lt;/ErrorNumber&gt; &lt;ErrorDescription&gt;Length cannot be less than zero. Parameter name: length&lt;/ErrorDescription&gt; &lt;/Search_Error&gt; &lt;/APC_Search_Results&gt; </code></pre> <p>The communication seems to be working fine; if I remove the "WebSiteID" element from my previous request, I would get</p> <pre><code>Index was out of range. Must be non-negative and less than the size of the collection. </code></pre> <p>Unfortunatelly, from the few examples I found on the web and from a 7-pages document on their website with a sample in Visual Basic (this is the only documentation I was able to find), I really can't figure out what I am missing, and that .NET error doesn't tell me something I can use.</p> <p>Did someone experienced similar problems with the allposters.com affiliate webservice and have some advice?</p> </div>

从Go程序中调用Windows批处理文件,以便在新窗口中打开[重复]

<div class="post-text" itemprop="text"> <div class="question-status question-originals-of-duplicate"> <p>This question already has an answer here:</p> <ul> <li> <a href="/questions/30182508/launching-a-new-command-window-from-golang-in-windows" dir="ltr">Launching a new command window from Golang in Windows</a> <span class="question-originals-answer-count"> 1 answer </span> </li> </ul> </div> <p>I have a batch file named cfw.bat which will accept 1 command-line parameter.</p> <p>I need to invoke or open this batch file from my go program and not to run as a command within go (because command within Go is not considering window's commands).</p> <p>This is my go code</p> <pre><code> foundationUrl := foundations.GetFoundationApiUrl(foundationNumber) command := exec.Command("call","cfw.bat",foundationUrl) fmt.Print("Executing Command &gt;&gt;&gt; ") fmt.Println(command.Args) bs,err :=command.CombinedOutput() </code></pre> <p>This is the error i get </p> <pre><code>Executing Command &gt;&gt;&gt; [call cfw.bat https://api.sys-pcf.com] Error exec: "call": executable file not found in %PATH% </code></pre> <p>Couldn't execute windows command.. If i directly execute using cfw.bat from go code, it won't work because the shell used by Go is only Linux / Unix supported</p> <p>Please help on how to trigger the batch as a seperate window from my Go Program</p> </div>

在Windows CMD中的GoLang中运行shell命令

<div class="post-text" itemprop="text"> <p>I am trying to execute cloudfoundry CF Client from my GoLang. The <code>cf login</code> command usually will not get executed in my git-bash terminal / cygwin terminal. It gets executed <strong>properly only in Command-Prompt</strong> (CMD.exe). So I always do <code>cf login</code> command from my CMD.exe only.</p> <p>Now i attempted to execute the command from GoLang and found that it is executing in cygwin / git-bash pattern and give me the below error as output</p> <pre><code>API endpoint: https://api.sys-pcf.cf.MYCOMPANY.com Authenticating... Credentials were rejected, please try again. Authenticating... Credentials were rejected, please try again. Authenticating... Credentials were rejected, please try again. </code></pre> <p>I get the same error when i execute cf login from cygwin. Below is my Go code</p> <pre><code> cf :="cf" login := "login" sso := "--sso" apiFlag := "-a" command := exec.Command(cf,login,sso,apiFlag,foundationUrl) stdout, err := command.Output() if err != nil { fmt.Println("Error") } fmt.Print(string(stdout)) </code></pre> <p>Please tell me how to execute these commands in windows-style or through command-prompt</p> <p>The os.exec package link <a href="https://golang.org/pkg/os/exec/" rel="nofollow noreferrer">here</a> tells that</p> <p><em>Unlike the "system" library call from C and other languages, the os/exec package intentionally does not invoke the system shell</em> </p> <p><em>Note that the examples in this package assume a Unix system. They may not run on Windows, and they do not run in the Go Playground used by golang.org and godoc.org.</em></p> <p>I think the exec package by itself doesn't support windows shell</p> </div>

即使IF语句为false,也会执行$ _FILES操作

<div class="post-text" itemprop="text"> <p>I am trying to add a file upload ability to an internal company ticketing system. The code works fine for the actual upload. The problem I am running into is that if there is no file, the code still executes. I have tried many things, from using the $_FILES error coding to adding a select menu to choose if you want to add a file or not, but the code still runs.</p> <p>It works like this:</p> <ol> <li>Ticket info is processed and entered into DB = dates, ticket info, email strings, etc</li> <li>File should then be validated and uploaded, and moved to a new folder (named the ticket number)</li> <li>File name and directory path are added to the DB.</li> <li>All info is passed to the notification email which is then sent out.</li> </ol> <p>When this script runs, if there is no file, the DB entry is made, and the info is added to the email, but it links to non-existant directory.</p> <p>Interesting tidbit: The code to make the new directory does NOT execute without the file, this is the correct action. Confusing thing is it's in the same block of code.</p> <p>I have spent a day and half trying to figure this out without resolution. Any help is greatly appreciated.</p> <pre><code>//fileUpload $fixedFileName = ""; $fileProcessed = 0; if($_POST['yesFile'] == "yes") { //select option in form - $allowedExts = array("gif", "jpeg", "jpg", "png", "txt", "pdf", "zip", "doc", "docx", "xls", "xlsx", "pcf"); $varForExt = explode(".", $_FILES["file"]["name"]); $extension = end($varForExt); if($_FILES["file"]["size"] &lt; 20000000 &amp;&amp; in_array($extension, $allowedExts)) { if($_FILES["file"]["error"] &gt; 0) { //echo "Return Code: " . $_FILES["file"]["error"] . "&lt;br&gt;"; $fixedFileName = print_r($_FILES); } else { $fixedFileName = trim(str_replace(' ','_', $_FILES["file"]["name"])); $dirToMake = '/var/www/html/eis/uploads/ESIG/'; $dirToMake .= $_SESSION['lastRID'].'/'; mkdir($dirToMake); if(move_uploaded_file($_FILES["file"]["tmp_name"], $dirToMake.$fixedFileName)) { //insert filepath/file into sql $fileProcessed = 1; } } } } </code></pre> </div>

返回密钥的问题是公钥长于私有

<div class="post-text" itemprop="text"> <p>I am generating a Key Pair using openssl_pkey_new. There seems to be an issue with the returned keys as the public key is longer than the private. Data signed with Private Key can be validated with the public key. I just want to make sure I am not doing something wrong somewhere. Thank you</p> <p>Here is the code I am using to generate the keys:</p> <pre><code>$config = array( "digest_alg" =&gt; "sha512", "private_key_bits" =&gt; 4096, "private_key_type" =&gt; OPENSSL_ALGO_SHA1, ); $res = openssl_pkey_new($config); openssl_pkey_export($res, $privKey); $pubKey = openssl_pkey_get_details($res); $pubKey = $pubKey["key"]; </code></pre> <p>Here is the code I am using to sign and validate</p> <pre><code>//sign data openssl_sign($data, $signature, $privKey, OPENSSL_ALGO_SHA1) or die("ERROR"); $signature = base64_encode($signature); //validate signature $signature = base64_decode($signature); $valid = openssl_verify($file, $signature, $pubKey, OPENSSL_ALGO_SHA1); </code></pre> <p>Here are sample keys returned from my server (Ubuntu 14.04):</p> <pre><code>-----BEGIN PRIVATE KEY----- MIIEZQIBADCCBDoGByqGSM44BAEwggQtAoICAQC15h4XFOpUx1KgHisqrj0hkuyk iGoLqS/qYqXCoBAN7jMO/vLdVpKlmy6jeGGl0aA/SfIgX4EUTMoMcTTEPi7YSbjg JiAtuOEGLYHI+94/xbd8+9M//RGV5EhR4LqsaxQPIdQv9JY8EBeZ7hqab5Mx+nQI zV7r4017dTQyvpxiXQg+3cAp/TZnY+ptlYLhup4RGL0VluJrEfkQj53n65YEm19f YQMp2Qq5CPQu5mUzDJLXZYFinwlLV+rtKKFfkdhu7/KLyVVf+XTl/ftxWBgqJLS7 RuBJOKM1rNlDvrGAo9ow2vU/siTIxkaCM0LYSFEv5d+jmkkXR3tNaK+Yv6Z7oNix f+MZBBvI+kOSZdLj2t+9K5CjpwstB4Um5iEFiFe6srE/PMnINlNrwLt34emY9nUs ozzL9B6DkceTr8XygDRDHqWArbO62/rdx28el/OBkolCpQWyo32Jwu54DNLxZjbG bVuyLQXSvPzoL+FJFSjqaO5DA0ThwcHk5BJEKEVijQPYTNW7s9RwSPSYDtAyIV17 ABfCE3SWmVEuc5lubRqpbBoNlYYav8SumNVmTPhb7SDpnKcoCGbRYxigiYZ3PkZ3 ylh3oOlmodNzKaCF6xoswgdYH5EBr4b6pvuEO3AHm8/Y4oRcsOBmkN83fx1daL/d CPv9RJ/M84LNJ6ai4QIhAJyNUW+/L7Gz61Y2ZcDOT9ZNuzAjud9yL5y7/kMGJlxJ AoICAQCSfv09VttO+p5V0d2Sb0BcFF00c9jMDlvhHvFi7EfZt7d0qVimyKegg2Rk Ryw5xfF3iknWq5ogPOjHZuNurf/rMETZ9gHt2oKOutIWiYko//n1wXwXStjDdi/O 2IX87e84UCJeLDHkc6uK3FJvob+qyOKhosEWKiawtCTMQkCS645pJPk3JKK2LQTz c596wmht9WmfJQVQU202OQHEzJwX/xiXyyRDdmYVSQ7/BFglqVsNsqZTFU7kBc1b 6WAb+V1VAg4KDm3/HhfUkx6TwKpPuU5RggJlNUFauGSZb6jTeEy4pGRaoMB0MUuA 1fsuzQgEe66OdMfVI1JxqV+MNHxH/scqz7hjdxjWemboQFVEAE7mxBy0bf/X58MJ VZSrwn5WV03Jq/aE57Pmj4a5TMbDtKus8MxQwBgucPtK7jIyXqdHZXUPnpbdYVAM qqvX3mP+jIepGvX+ijlShaaaIBnmuJzjBfqsez0uTRzfmoWUFX92okYn+1/DnbNX DIXXrR1A6ZSuDolGyDj5lKXjbI6Uuln3Nfps/3UFKV3QDPzWDhCmGAG5hN6XhLMn m+38IcHMuPNMt2QDAjH5fCHXI6wvcNLFI9U00arABSdxHBEET93/WgZj2S2HnAjG wMgt9pjWUZ8PuFw6nJF4U9uEft/XiR6iwKzRzQy8fcyW6uv2bAQiAiB7M9Ej3OKN DAGV1lKKijODBVsDjfwo4MNjiGqHjDvqug== -----END PRIVATE KEY----- -----BEGIN PUBLIC KEY----- MIIGSDCCBDoGByqGSM44BAEwggQtAoICAQC15h4XFOpUx1KgHisqrj0hkuykiGoL qS/qYqXCoBAN7jMO/vLdVpKlmy6jeGGl0aA/SfIgX4EUTMoMcTTEPi7YSbjgJiAt uOEGLYHI+94/xbd8+9M//RGV5EhR4LqsaxQPIdQv9JY8EBeZ7hqab5Mx+nQIzV7r 4017dTQyvpxiXQg+3cAp/TZnY+ptlYLhup4RGL0VluJrEfkQj53n65YEm19fYQMp 2Qq5CPQu5mUzDJLXZYFinwlLV+rtKKFfkdhu7/KLyVVf+XTl/ftxWBgqJLS7RuBJ OKM1rNlDvrGAo9ow2vU/siTIxkaCM0LYSFEv5d+jmkkXR3tNaK+Yv6Z7oNixf+MZ BBvI+kOSZdLj2t+9K5CjpwstB4Um5iEFiFe6srE/PMnINlNrwLt34emY9nUsozzL 9B6DkceTr8XygDRDHqWArbO62/rdx28el/OBkolCpQWyo32Jwu54DNLxZjbGbVuy LQXSvPzoL+FJFSjqaO5DA0ThwcHk5BJEKEVijQPYTNW7s9RwSPSYDtAyIV17ABfC E3SWmVEuc5lubRqpbBoNlYYav8SumNVmTPhb7SDpnKcoCGbRYxigiYZ3PkZ3ylh3 oOlmodNzKaCF6xoswgdYH5EBr4b6pvuEO3AHm8/Y4oRcsOBmkN83fx1daL/dCPv9 RJ/M84LNJ6ai4QIhAJyNUW+/L7Gz61Y2ZcDOT9ZNuzAjud9yL5y7/kMGJlxJAoIC AQCSfv09VttO+p5V0d2Sb0BcFF00c9jMDlvhHvFi7EfZt7d0qVimyKegg2RkRyw5 xfF3iknWq5ogPOjHZuNurf/rMETZ9gHt2oKOutIWiYko//n1wXwXStjDdi/O2IX8 7e84UCJeLDHkc6uK3FJvob+qyOKhosEWKiawtCTMQkCS645pJPk3JKK2LQTzc596 wmht9WmfJQVQU202OQHEzJwX/xiXyyRDdmYVSQ7/BFglqVsNsqZTFU7kBc1b6WAb +V1VAg4KDm3/HhfUkx6TwKpPuU5RggJlNUFauGSZb6jTeEy4pGRaoMB0MUuA1fsu zQgEe66OdMfVI1JxqV+MNHxH/scqz7hjdxjWemboQFVEAE7mxBy0bf/X58MJVZSr wn5WV03Jq/aE57Pmj4a5TMbDtKus8MxQwBgucPtK7jIyXqdHZXUPnpbdYVAMqqvX 3mP+jIepGvX+ijlShaaaIBnmuJzjBfqsez0uTRzfmoWUFX92okYn+1/DnbNXDIXX rR1A6ZSuDolGyDj5lKXjbI6Uuln3Nfps/3UFKV3QDPzWDhCmGAG5hN6XhLMnm+38 IcHMuPNMt2QDAjH5fCHXI6wvcNLFI9U00arABSdxHBEET93/WgZj2S2HnAjGwMgt 9pjWUZ8PuFw6nJF4U9uEft/XiR6iwKzRzQy8fcyW6uv2bAOCAgYAAoICAQCX8KyH tig1Zfk/QxC5d5cNEICobFmjq1UwbgtmCCwnP2A4Y5nxJS5Inf3VIJzp/10XMSMp 6OjS0bXgaor6Urznl0aDPfSucXpYpkKJBvPBeBC60NhHYLgFMPapIHPR9erlTlpN j/5jmXjSselV3aZd/gVt5TLBbevQdlJYmrGsrM8y8ZohgZGGnIGTqByu7x4q+8oV 53+Li5T/u9zmmZxwzABBLuxlrDlVsfyQLl31AULbYM+d08DoBWxX/NNb/1cvZZSS x2/lYpv+NYbNrzGI0RzkOyUZjkNmgZ2TZOY3r7DoAmHbCam3dDXfrgV25wnGX0Kr q+WK2TLgTPvf3DyPLCmgfgcDYKXx1spQRWwoBoKd8BaLbqob3r56U+v25hflSWHK y57uWSRPxLe6UUQ6IRoOEJ3Ld4WbW6y7Repn0DXog1JjjrAivbvXCDVDsVETDYr4 K+C4IypX6uasT498TsZ65WGyk/woNABgQesgv0UPSOYMGIfILe0MALK1MGOzJuXE pCf60ydWCMo+keVDA+mZpXh/yZR3Gc/myA/eKw7GoiD+d9ulHyOhjaXV02PsW112 YlkdmJLJ+FkCKt7TqJPSeWTV0/1TTYZMgX7av8uZQKQEcNNNXUYinSq75BrdH/tg wVDtl2d4MKvtijLhHpzxtAHuhax6hBg2ViuUjg== -----END PUBLIC KEY----- </code></pre> </div>

Android访问远程mysql数据库

<div class="post-text" itemprop="text"> <p>I've been trying, using multiple examples, to access a remote server (digitalocean) through an android application. Currently i'm getting an error with parsing the data from the URL and i'm not 100% sure why. Could you help me out, the code is below.</p> <p>java code:</p> <pre><code>public class MainActivity extends Activity { TextView txt1,txt2,txt3; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); new task().execute(); } class task extends AsyncTask&lt;String, String, Void&gt; { private ProgressDialog progressDialog = new ProgressDialog(MainActivity.this); InputStream is = null ; String result = ""; protected void onPreExecute() { progressDialog.setMessage("Fetching data..."); progressDialog.show(); progressDialog.setOnCancelListener(new OnCancelListener() { @Override public void onCancel(DialogInterface arg0) { task.this.cancel(true); } }); } @Override protected Void doInBackground(String... params) { String url_select = "http://server1.chris.waszczuk/webservice/select.php"; HttpClient httpClient = new DefaultHttpClient(); HttpPost httpPost = new HttpPost(url_select); ArrayList&lt;NameValuePair&gt; param = new ArrayList&lt;NameValuePair&gt;(); try { httpPost.setEntity(new UrlEncodedFormEntity(param)); HttpResponse httpResponse = httpClient.execute(httpPost); HttpEntity httpEntity = httpResponse.getEntity(); //read content is = httpEntity.getContent(); } catch (Exception e) { Log.e("log_tag", "Error in http connection "+e.toString()); } try { BufferedReader br = new BufferedReader(new InputStreamReader(is)); StringBuilder sb = new StringBuilder(); String line = ""; while((line=br.readLine())!=null) { sb.append(line+" "); } is.close(); result=sb.toString(); } catch (Exception e) { // TODO: handle exception Log.e("log_tag", "Error converting result "+e.toString()); } return null; } protected void onPostExecute(Void v) { // ambil data dari Json database try { JSONArray Jarray = new JSONArray(result); for(int i=0;i&lt;Jarray.length();i++) { JSONObject Jasonobject = null; txt1 = (TextView)findViewById(R.id.txt1); txt2 = (TextView)findViewById(R.id.txt2); txt3 = (TextView)findViewById(R.id.txt3); Jasonobject = Jarray.getJSONObject(i); //get an output on the screen String no = Jasonobject.getString("no// this should be same in the table field name"); String name = Jasonobject.getString("name"); String birthday = Jasonobject.getString("birthday"); txt1.setText(no); txt2.setText(name); txt3.setText(birthday); } this.progressDialog.dismiss(); } catch (Exception e) { // TODO: handle exception Log.e("log_tag", "Error parsing data "+e.toString()); } } } } </code></pre> <p>XML code: (internet permission is in the manifest (no need to upload))</p> <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" &gt; &lt;LinearLayout android:layout_height="wrap_content" android:layout_width="wrap_content" android:orientation="horizontal" android:layout_marginTop="10dp"&gt; &lt;TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="Id Number:" android:textStyle="bold" android:gravity="center" android:textSize="15dp" android:layout_marginLeft="15dp" /&gt; &lt;TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/txt1" android:layout_marginLeft="20dp"/&gt; &lt;/LinearLayout&gt; &lt;LinearLayout android:layout_height="wrap_content" android:layout_width="wrap_content" android:orientation="horizontal" android:layout_marginTop="10dp"&gt; &lt;TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:text=" userName:" android:textStyle="bold" android:gravity="center" android:textSize="15dp" android:layout_marginLeft="35dp"/&gt; &lt;TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/txt2" android:layout_marginLeft="20dp"/&gt; &lt;/LinearLayout&gt; &lt;LinearLayout android:layout_height="wrap_content" android:layout_width="wrap_content" android:orientation="horizontal" android:layout_marginTop="10dp"&gt; &lt;TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="Password: " android:textStyle="bold" android:gravity="center" android:textSize="15dp" android:layout_marginLeft="75dp"/&gt; &lt;TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/txt3" android:layout_marginLeft="20dp"/&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; </code></pre> <p>php files(select followed by connection(password removed):</p> <pre><code>&lt;?php include_once("connection.php"); $sqlString = "select * from registration "; $rs = mysql_query($sqlString); if($rs) { while($objRs = mysql_fetch_assoc($rs)) { $output[] = $objRs; } echo json_encode($output); } mysql_close(); ?&gt; &lt;?php mysql_connect("localhost","root",""); mysql_select_db("fantasyfootball"); ?&gt; </code></pre> <p>Edit: The logcat responses may be of use aswell:</p> <pre><code>04-01 14:01:21.730: I/dalvikvm(814): threadid=3: reacting to signal 3 04-01 14:01:22.740: W/dalvikvm(814): threadid=3: spin on suspend #1 threadid=11 (pcf=0) 04-01 14:01:22.740: D/dalvikvm(814): Temporarily moving tid 829 to fg (was 0) 04-01 14:01:22.740: D/dalvikvm(814): Temporarily raised priority on tid 829 (10 -&gt; 0) 04-01 14:01:22.750: W/dalvikvm(814): threadid=3: spin on suspend resolved in 1018 msec 04-01 14:01:22.750: D/dalvikvm(814): Restored policy of 829 to 0 04-01 14:01:22.760: D/dalvikvm(814): Restored priority on 829 to 10 04-01 14:01:23.190: I/Choreographer(814): Skipped 41 frames! The application may be doing too much work on its main thread. 04-01 14:01:23.200: I/dalvikvm(814): Wrote stack traces to '/data/anr/traces.txt' 04-01 14:01:24.250: I/Choreographer(814): Skipped 30 frames! The application may be doing too much work on its main thread. 04-01 14:01:25.430: I/Choreographer(814): Skipped 34 frames! The application may be doing too much work on its main thread. 04-01 14:01:25.840: E/log_tag(814): Error in http connection java.net.UnknownHostException: Unable to resolve host "server1.chris.waszczuk": No address associated with hostname 04-01 14:01:25.840: E/log_tag(814): Error converting result java.lang.NullPointerException: lock == null 04-01 14:01:25.950: I/Choreographer(814): Skipped 33 frames! The application may be doing too much work on its main thread. 04-01 14:01:25.990: E/log_tag(814): Error parsing data org.json.JSONException: End of input at character 0 of 04-01 14:01:26.440: I/Choreographer(814): Skipped 46 frames! The application may be doing too much work on its main thread. </code></pre> <p>Update: After changing the login_url to the IP Address of the server, a new parsing error appears.</p> <p>New url:</p> <pre><code>String url_select = "http://95.85.22.140/webservice/select.php"; </code></pre> <p>error:</p> <pre><code>04-01 14:19:26.206: E/log_tag(1037): Error parsing data org.json.JSONException: Value &lt;!DOCTYPE of type java.lang.String cannot be converted to JSONArray </code></pre> <p>Any help would be great thanks.</p> </div>

Windows版YOLOv4目标检测实战:训练自己的数据集

课程演示环境:Windows10; cuda 10.2; cudnn7.6.5; Python3.7; VisualStudio2019; OpenCV3.4 需要学习ubuntu系统上YOLOv4的同学请前往:《YOLOv4目标检测实战:训练自己的数据集》 课程链接:https://edu.csdn.net/course/detail/28745 YOLOv4来了!速度和精度双提升! 与 YOLOv3 相比,新版本的 AP (精度)和 FPS (每秒帧率)分别提高了 10% 和 12%。 YOLO系列是基于深度学习的端到端实时目标检测方法。本课程将手把手地教大家使用labelImg标注和使用YOLOv4训练自己的数据集。课程实战分为两个项目:单目标检测(足球目标检测)和多目标检测(足球和梅西同时检测)。 本课程的YOLOv4使用AlexyAB/darknet,在Windows系统上做项目演示。包括:安装软件环境、安装YOLOv4、标注自己的数据集、整理自己的数据集、修改配置文件、训练自己的数据集、测试训练出的网络模型、性能统计(mAP计算)和先验框聚类分析。还将介绍改善YOLOv4目标检测性能的技巧。 除本课程《Windows版YOLOv4目标检测实战:训练自己的数据集》外,本人将推出有关YOLOv4目标检测的系列课程。请持续关注该系列的其它视频课程,包括: 《Windows版YOLOv4目标检测实战:人脸口罩佩戴检测》 《Windows版YOLOv4目标检测实战:中国交通标志识别》 《Windows版YOLOv4目标检测:原理与源码解析》

2019数学建模历年题目及优秀论文

2019数学建模历年题目及优秀论文 ,好资源与大家分享!!

华为海思数字IC提前批笔试题目,2020届华为海思校园招聘,西南地区

华为海思数字IC提前批笔试题目,2020届华为海思校园招聘,西南地区。单选和多选题华为海思数字IC提前批笔试题目,2020届华为海思校园招聘,西南地区。单选和多选题

Java基础知识面试题(2020最新版)

文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性?原理是什么Java语言有哪些特点什么是字节码?采用字节码的最大好处是什么什么是Java程序的主类?应用程序和小程序的主类有何不同?Java应用程序与小程序之间有那些差别?Java和C++的区别Oracle JDK 和 OpenJDK 的对比基础语法数据类型Java有哪些数据类型switc...

三个项目玩转深度学习(附1G源码)

从事大数据与人工智能开发与实践约十年,钱老师亲自见证了大数据行业的发展与人工智能的从冷到热。事实证明,计算机技术的发展,算力突破,海量数据,机器人技术等,开启了第四次工业革命的序章。深度学习图像分类一直是人工智能的经典任务,是智慧零售、安防、无人驾驶等机器视觉应用领域的核心技术之一,掌握图像分类技术是机器视觉学习的重中之重。针对现有线上学习的特点与实际需求,我们开发了人工智能案例实战系列课程。打造:以项目案例实践为驱动的课程学习方式,覆盖了智能零售,智慧交通等常见领域,通过基础学习、项目案例实践、社群答疑,三维立体的方式,打造最好的学习效果。

软件测试2小时入门

本课程内容系统、全面、简洁、通俗易懂,通过2个多小时的介绍,让大家对软件测试有个系统的理解和认识,具备基本的软件测试理论基础。 主要内容分为5个部分: 1 软件测试概述,了解测试是什么、测试的对象、原则、流程、方法、模型;&nbsp; 2.常用的黑盒测试用例设计方法及示例演示;&nbsp; 3 常用白盒测试用例设计方法及示例演示;&nbsp; 4.自动化测试优缺点、使用范围及示例‘;&nbsp; 5.测试经验谈。

Python数据分析与挖掘

92讲视频课+16大项目实战+源码+¥800元课程礼包+讲师社群1V1答疑+社群闭门分享会=99元 &nbsp; 为什么学习数据分析? &nbsp; &nbsp; &nbsp; 人工智能、大数据时代有什么技能是可以运用在各种行业的?数据分析就是。 &nbsp; &nbsp; &nbsp; 从海量数据中获得别人看不见的信息,创业者可以通过数据分析来优化产品,营销人员可以通过数据分析改进营销策略,产品经理可以通过数据分析洞察用户习惯,金融从业者可以通过数据分析规避投资风险,程序员可以通过数据分析进一步挖掘出数据价值,它和编程一样,本质上也是一个工具,通过数据来对现实事物进行分析和识别的能力。不管你从事什么行业,掌握了数据分析能力,往往在其岗位上更有竞争力。 &nbsp;&nbsp; 本课程共包含五大模块: 一、先导篇: 通过分析数据分析师的一天,让学员了解全面了解成为一个数据分析师的所有必修功法,对数据分析师不在迷惑。 &nbsp; 二、基础篇: 围绕Python基础语法介绍、数据预处理、数据可视化以及数据分析与挖掘......这些核心技能模块展开,帮助你快速而全面的掌握和了解成为一个数据分析师的所有必修功法。 &nbsp; 三、数据采集篇: 通过网络爬虫实战解决数据分析的必经之路:数据从何来的问题,讲解常见的爬虫套路并利用三大实战帮助学员扎实数据采集能力,避免没有数据可分析的尴尬。 &nbsp; 四、分析工具篇: 讲解数据分析避不开的科学计算库Numpy、数据分析工具Pandas及常见可视化工具Matplotlib。 &nbsp; 五、算法篇: 算法是数据分析的精华,课程精选10大算法,包括分类、聚类、预测3大类型,每个算法都从原理和案例两个角度学习,让你不仅能用起来,了解原理,还能知道为什么这么做。

【大总结2】大学两年,写了这篇几十万字的干货总结

本文十天后设置为粉丝可见,喜欢的提前关注 不要白嫖请点赞 不要白嫖请点赞 不要白嫖请点赞 文中提到的书我都有电子版,可以评论邮箱发给你。 文中提到的书我都有电子版,可以评论邮箱发给你。 文中提到的书我都有电子版,可以评论邮箱发给你。 本篇文章应该算是Java后端开发技术栈的,但是大部分是基础知识,所以我觉得对任何方向都是有用的。 1、数据结构 数据结构是计算机存储、...

阿里巴巴高级面试题(首发、高频136道、含答案)

整理的136道阿里的Java面试题,都来挑战一下,看看自己有多厉害。下面题目都带超详细的解答,详情见底部。 java基础 Arrays.sort实现原理和Collection实现原理 foreach和while的区别(编译之后) 线程池的种类,区别和使用场景 分析线程池的实现原理和线程的调度过程 线程池如何调优 线程池的最大线程数目根据什么确定 动态代理的几种方式 HashMap的并发问题 了解LinkedHashMap的应用吗 反射的原理,反射创建类实例的三种方式是什么? clon

Java进阶高手课-核心篇

<p> <br> </p> <p> Java进阶的必经之路!<span></span> </p> <p> <br> </p> <p> <b>【超实用课程内容】</b><b></b> </p> <p> 本课程囊括了<span>Java</span>语言进阶的核心知识点,以真实场景项目实战为导向,循序渐进,深入浅出的了解Java并发编程、JVM虚拟机、网络编程和MySQL应用,讲解<span>Java</span>这门使用广泛的编程语言,助你能够游刃有余地游走在这些技术之中。<span> </span> </p> <p> <br> </p> <p> 套餐中一共包含<span>4</span>门<span>Java</span>进阶必学的核心知识(共<span>57</span>讲) </p> <p> 课程<span>1</span>:《<span>Java</span>进阶高手课<span>-</span>并发编程透彻理解》 </p> <p> 课程<span>2</span>:《<span>Java</span>进阶高手课<span>-</span>深入<span>JVM</span>虚拟机》 </p> <p> 课程<span>3</span>:《<span>Java</span>进阶高手课<span>-</span>深入浅出<span>Java</span>网络编程》 </p> <p> 课程<span>4</span>:《<span>Java</span>进阶高手课<span>-</span>必知必会<span>MySQL</span>》 </p> <p> <br> </p> <p> <strong>【</strong><strong>哪些人适合学习这门课程?</strong><strong>】</strong><strong></strong> </p> <p> 1)大学生,平时只接触了语言基础,并未学习深入语言内核; </p> <p> 2)对<span>Java</span>掌握程度薄弱的人,课程可以让你更好的理解<span>Java</span>语言原理及应用 </p> <p> 3)想修炼更好的<span>Java</span>内功,工作中遇到<span>Bug</span>可以游刃有余 </p> <p> 4)被面试官打破沙锅问到底的问题问到怀疑人生的应聘者 </p> <p> <br> </p> <p> <strong>【</strong><strong>你能收获到什么?</strong><strong>】</strong> </p> <p> 1.基础再提高,针对<span>Java</span>核心知识点学透,用对<span> </span> </p> <p> 2.能力再提高,日常工作中的代码换新貌,不怕问题<span> </span> </p> <p> 3.面试再加分,巴不得面试官打破沙锅问到底,竞争力<span>MAX</span> </p> <p> <br> <strong>【课程如何观看?】</strong> </p> <p> 1、登录<span>CSDN</span>学院<span> APP </span>在我的课程中进行学习; </p> <p> 2、移动端:<span>CSDN </span>学院<span>APP</span>(注意不是<span>CSDN APP</span>哦) </p> <p> 本课程为录播课,课程<span>2</span>年有效观看时长 </p> <p> <br> </p> <p class="ql-long-24357476"> <strong>【</strong><strong>资料开放</strong><strong>】</strong><strong></strong> </p> <p class="ql-long-24357476"> 课件、课程案例代码完全开放给你,你可以根据所学知识,自行修改、优化 </p> <p class="ql-long-24357476"> 下载方式:电脑登录课程观看页面,点击右下方课程资料、代码、课件等打包下载 </p> <p class="ql-long-24357476"> <img src="https://img-bss.csdn.net/202004200153008539.png" alt=""> </p> <p> <br> </p>

LINGO20200701.zip

2020第三届河北省研究生建模竞赛B题,利用lingo进行求解的代码。lingo在处理这类涉及下标的约束条件是个难点,希望我的代码能够提供一些帮助

oracle学习第三天

怎么建表? 根据需求建ER图 根据ER图和三范式建表 SQL structured query language 结构化查询语言 数据库执行语句 数据定义语言 (Data Definition Language, DDL) 是SQL语言集中负责数据结构定义与数据库对象定义的语言,由CREATE、ALTER与DROP三个语法所组成 数据控制语言(DCL:Data Control Language)是用来设置或者更改数据库用户或角色权限的语句,这些语句包括GRANT、REVOKE等语句 插入语句

2020联发科笔试题(IC方向)b.docx

文档位联发科公司的数字IC岗位笔试题,自己回忆版本,跟前一个A卷一起是完整版

使用TensorFlow+keras快速构建图像分类模型

课程分为两条主线: 1&nbsp;从Tensorflow的基础知识开始,全面介绍Tensorflow和Keras相关内容。通过大量实战,掌握Tensorflow和Keras经常用到的各种建模方式,参数优化方法,自定义参数和模型的手段,以及对训练结果评估与分析的技巧。 2&nbsp;从机器学习基础算法开始,然后进入到图像分类领域,使用MNIST手写数据集和CIFAR10图像数据集,从简单神经网络到深度神经网络,再到卷积神经网络,最终完成复杂模型:残差网络的搭建。完成这条主线,学员将可以自如地使用机器学习的手段来达到图像分类的目的。

点进来看看,为什么要学习【数据结构与算法】? 该如何学习?

【数据结构与算法】应该是大学计算机专业必修的一门课,为什么这门课会被列入到必修课的行列当中呢?因为对于每一个程序员来说,在以后的工作中不免要面对一些复杂的业务逻辑,同时要写对应的代码来实现这个复杂的业务。当然了,有很多种方式都可以实现同一个业务逻辑,但每种方式的代码运行效率可能不一样,我们接下来通过一个简单的例子感受一下。 例子: 假如你们班级里有一万个人,并且每个人的姓名和身份信息都存储在一个

《三天给你聊清楚redis》第2天看看redis怎么被搞出来的(22036字)

后端需要知道的关于redis的事,基本都在这里了。 此文后续会改为粉丝可见,所以喜欢的请提前关注。 你的点赞和评论是我创作的最大动力,谢谢。 3、单机实现 3.1、数据库概述 redis服务器将所有数据库都保存在redis/redisServer中,数组db存放所有数据库,每一项是一个redisdb结构。dbnum代表数据库数量。 客户端有一个指针指向当前数据库,可以切换,也就是移动指

中国全国省地县乡村五级地标kmz(很准)

中国全国省地县乡村五级地标kmz(很准),我也不知道写啥了,反正挺好用的

R语言入门基础

本课程旨在帮助学习者快速入门R语言: 课程系统详细地介绍了使用R语言进行数据处理的基本思路和方法。 课程能够帮助初学者快速入门数据处理。 课程通过大量的案例详细地介绍了如何使用R语言进行数据分析和处理 课程操作实际案例教学,通过编写代码演示R语言的基本使用方法和技巧

玩转Linux:常用命令实例指南

人工智能、物联网、大数据时代,Linux正有着一统天下的趋势,几乎每个程序员岗位,都要求掌握Linux。本课程零基础也能轻松入门。 本课程以简洁易懂的语言手把手教你系统掌握日常所需的Linux知识,每个知识点都会配合案例实战让你融汇贯通。课程通俗易懂,简洁流畅,适合0基础以及对Linux掌握不熟练的人学习; 【限时福利】 1)购课后按提示添加小助手,进答疑群,还可获得价值300元的编程大礼包! 2)本月购买此套餐加入老师答疑交流群,可参加老师的免费分享活动,学习最新技术项目经验。 --------------------------------------------------------------- 29元=掌握Linux必修知识+社群答疑+讲师社群分享会+700元编程礼包。 &nbsp;

利用 Python 爬取了 13966 条运维招聘信息,我得出了哪些结论?

作者:JackTian、黄伟呢 公众号:杰哥的IT之旅,后台回复:「运维」可获取本文完整数据 大家好,我是 JackTian。 我经常会收到读者关于一系列咨询运维方面的事情,比如:杰哥,运维到底是做什么的呀?运维的薪资水平/ 待遇怎么样呢?杰哥帮忙看下这个岗位的招聘需要对于小白来说,能否胜任的了呢?等等。 这里,我把之前写的《一篇文章带你解读从初级运维工程师到资深运维专家的学习路线》,本文从初级 / 中级 / 高级运维工程师以及到资深方向逐步展开给大家汇总了一些各阶段所具备的技能,仅供学习路线参考,如有.

2018年数学建模国赛A题matlab代码及注释.rar

2018年数学建模国赛A题matlab代码及注释,自己做题编写,实测有效,可以运行

微信公众平台开发入门

本套课程的设计完全是为初学者量身打造,课程内容由浅入深,课程讲解通俗易懂,代码实现简洁清晰。通过本课程的学习,学员能够入门微信公众平台开发,能够胜任企业级的订阅号、服务号、企业号的应用开发工作。 通过本课程的学习,学员能够对微信公众平台有一个清晰的、系统性的认识。例如,公众号是什么,它有什么特点,它能做什么,怎么开发公众号。 其次,通过本课程的学习,学员能够掌握微信公众平台开发的方法、技术和应用实现。例如,开发者文档怎么看,开发环境怎么搭建,基本的消息交互如何实现,常用的方法技巧有哪些,真实应用怎么开发。

实用主义学Python(小白也容易上手的Python实用案例)

3折秒杀! 系统掌握Python核心语法16点,轻松应对工作中80%以上的Python使用场景! 69元=72讲+源码+社群答疑+讲师社群分享会&nbsp; 【哪些人适合学习这门课程?】 1)大学生,平时只学习了Python理论,并未接触Python实战问题; 2)对Python实用技能掌握薄弱的人,自动化、爬虫、数据分析能让你快速提高工作效率; 3)想学习新技术,如:人工智能、机器学习、深度学习等,这门课程是你的必修课程; 4)想修炼更好的编程内功,优秀的工程师肯定不能只会一门语言,Python语言功能强大、使用高效、简单易学。 【超实用技能】 从零开始 自动生成工作周报 职场升级 豆瓣电影数据爬取 实用案例 奥运冠军数据分析 自动化办公:通过Python自动化分析Excel数据并自动操作Word文档,最终获得一份基于Excel表格的数据分析报告。 豆瓣电影爬虫:通过Python自动爬取豆瓣电影信息并将电影图片保存到本地。 奥运会数据分析实战 简介:通过Python分析120年间奥运会的数据,从不同角度入手分析,从而得出一些有趣的结论。 【超人气老师】 二两 中国人工智能协会高级会员 生成对抗神经网络研究者 《深入浅出生成对抗网络:原理剖析与TensorFlow实现》一书作者 阿里云大学云学院导师 前大型游戏公司后端工程师 【超丰富实用案例】 0)图片背景去除案例 1)自动生成工作周报案例 2)豆瓣电影数据爬取案例 3)奥运会数据分析案例 4)自动处理邮件案例 5)github信息爬取/更新提醒案例 6)B站百大UP信息爬取与分析案例 7)构建自己的论文网站案例

赵强老师:大数据从入门到精通(套餐)

本系列课程将基于RedHat Linux 7.4版本、Hadoop 2.7.3、Spark 2 版本全面介绍大数据的整体内容,让学员深入理解并掌握运行机制和原理,从而进一步掌握大数据的相关内容。

Python+OpenCV计算机视觉

Python+OpenCV计算机视觉系统全面的介绍。

2020联发科笔试题(IC方向)a.docx

文档为自己回忆 准确度高;2019年2020届笔试题;文档分上下两个章节,

Python代码实现飞机大战

文章目录经典飞机大战一.游戏设定二.我方飞机三.敌方飞机四.发射子弹五.发放补给包六.主模块 经典飞机大战 源代码以及素材资料(图片,音频)可从下面的github中下载: 飞机大战源代码以及素材资料github项目地址链接 ————————————————————————————————————————————————————————— 不知道大家有没有打过飞机,喜不喜欢打飞机。当我第一次接触这个东西的时候,我的内心是被震撼到的。第一次接触打飞机的时候作者本人是身心愉悦的,因为周边的朋友都在打飞机, 每

玩转 Spring 全家桶

<p> 新课上新福利:本套餐共包含 4 大课程,原价 ¥199,今日立减¥100,到手仅需¥99! </p> <p> <br> </p> <p class="MsoNormal" align="left"> <b>为什么每一个程序员都需要掌握</b><b> Java Spring </b><b>全家桶?</b><b><br> </b><b></b> </p> <p class="MsoNormal" align="left"> 1. Spring在如今Java的应用市场以及就业市场中,都成为炙手可热的部分。面试出镜率之高,市场应用之广,让其成为Java开发人员的必备技能之一,唯有系统的掌握Spring全家桶的思想、设计、以及实现,才可以让开发过程变得更容易、更高效,以适应当前市场的快速发展。 </p> <p class="MsoNormal" align="left"> <br> </p> <p class="MsoNormal" align="left"> <b>本套餐内容介绍:</b><b></b> </p> <p class="MsoNormal" align="left"> 本课程所有内容基于最新的Spring  Boot 2.2.5.RELEASE 版本,和Spring Cloud Hoxton.SR3 版本,其中大量的独家案例,以及本人多年的经验讲解。 </p> <p class="MsoNormal" align="left"> 课程循序渐进,内容中有Spring的核心基础内容,也有高级的进阶内容。 </p> <p class="MsoNormal" align="left"> 内容分为五大部分,分别是: </p> <p class="MsoNormal" align="left"> <b>初识篇</b><b>Spring Framework</b>:主要讲解Spring的核心内容IOC及AOP。本篇对Spring的基本概念进行大致的讲解,但主要的技术点皆以案例为主,同时会对项目中都会用到的日志进行讲解及案例说明。 </p> <p class="MsoNormal" align="left"> <br> </p> <p class="MsoNormal" align="left"> <b>基础篇</b><b>Spring MVC</b><b>:</b>主要以案例的方式讲解Spring的前端部分,比如表单、验证、国际化、主题、文件上传等,以及高阶内容过滤器、拦截器、多种异常处理方法 ,以及日志Log4j2及SLF4J的使用。最后,会结合Spring、Spring MVC及MyBatis(即SSM)进行产品的增删改查的案例讲解。 </p> <p class="MsoNormal" align="left"> <br> </p> <p class="MsoNormal" align="left"> <b>核心篇</b><b>Spring Boot</b><b>:</b>主要以案例的方式对如何使用Spring Boot开发进行讲解,包括热部署,扩展的启动行为,整合JSON、Thymeleaf、Freemarker、JSP的Web开发,全局异常处理,配置文件的使用,及Logback&SLF4J的日志使用,国际化,最后,会结合Spring Boot及MyBatis进行产品的增删改查的案例讲解。 </p> <p class="MsoNormal" align="left"> <br> </p> <p class="MsoNormal" align="left"> <b>核心篇</b><b>Spring Cloud</b><b>:</b>以案例的方式,结合Spring Boot,对注册中心,消费者与生产者,服务的调用OpenFeign,Hystrix监控,服务网关Gateway,消息驱动微服务Stream,分布式集群,及分布式配置中心进行讲解,使得我们快速掌握微服务的开发方法。 </p> <p class="MsoNormal" align="left"> <br> </p> <p class="MsoNormal" align="left"> <b>核心篇</b><b>Spring Data</b><b>:</b>主要以案例的方式讲解持久层的开发,分别对Spring Data JPA 及 Spring Data JDBC 进行讲解。 </p> <p class="MsoNormal" align="left"> <br> </p> <p class="MsoNormal" align="left"> <br> </p> <p class="MsoNormal" align="left"> <b>学习收获:</b><b></b> </p> <p class="MsoNormal" align="left"> 1、使用 Spring MVC 快速开发; </p> <p class="MsoNormal" align="left"> 2、搞定 Spring Boot 核心的实现原理; </p> <p class="MsoNormal" align="left"> 3、通过 Spring Cloud 快速构建微服务架构; </p> <p class="MsoNormal" align="left"> 4、掌握 Spring 的使用和开发技巧。 </p> <p class="MsoNormal" align="left"> <br> </p> <p class="MsoNormal" align="left"> <br> </p> <p class="MsoNormal" align="left"> <b>讲师介绍</b><b></b> </p> <p class="MsoNormal" align="left"> 杨春娟,05年毕业于清华大学,之后致力于 JavaEE 的设计开发,12年开始致力于 Hybris 的架构、设计及开发,及管理工作。精通C/ C++,Java, JavaEE,MySql,精通SAP Hybris等,善于将复杂的问题简单化并教授给学生,善于培养学生独立思考问题的能力。 </p> <p> <br> </p> <p> <img src="https://img-bss.csdn.net/202005180944265006.png" alt=""> </p> <p> <img src="https://img-bss.csdn.net/202005080326195251.png" alt=""> </p>

linux下利用/proc进行进程树的打印

在linux下利用c语言实现的进程树的打印,主要通过/proc下的目录中的进程文件,获取status中的进程信息内容,然后利用递归实现进程树的打印

相关热词 aero c# c#压缩图片 c# udp服务器 100线程 c# c# fidller请求 c# 参数 调用exe c# 打字母小游戏 c#显示未能加载文件 c# 右击菜单加快捷键 c#将重复的数据保留一条
立即提问