MiniGUI移植总结

2024-01-05 09:58
文章标签 总结 移植 minigui

本文主要是介绍MiniGUI移植总结,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

需准备的软件包:
libminigui-1.6.x-linux.tar.gz           //开发库
minigui-res-1.6.tar.gz                  //资源文件,如bmp,font,icon
minigui-dev-1.6.2-for-win32          // 用于在 windows VC 开发的程序包
下载地址: www.minigui.org
参考文献:
1 Hily Jiang. MiniGUI 源码走读 .http://hily.iyi.cn
2 uClinux 下显示驱动移植及 minigui 的移植
感谢:
qq . 嵌入式技术交流 02. 小鹤
1 开启uClinuxFrameBuffer支持
1.1 修改 /uClinux-dist/vendors/Samsung/44B0/config.linux-2.4.x
确定 CONFIG_VT=y    //VT 应该是Virtual Terminal
1.2 修改/uClinux-dist/linux-2.4.x/drivers/video/s3c44b0xfb.c
默认情况下是支持16灰度屏的,如果是256色屏,则需要将#define    LCD_GRAY_16 注释掉。
1.3 增加fb0设备
修改vendors/Samsung/44B0/Makefile
1.4 驱动确定
linux-2.4.x/drivers/video/Config.in
if [ "$CONFIG_CPU_S3C44B0X" = "y" ]; then
      tristate ' Samsung S3C44B0X built-in LCD controller frame buffer support' CONFIG_FB_S3C44B0X
fi
linux-2.4.x/drivers/video/Makefile
obj-$(CONFIG_FB_S3C44B0X)          +=s3c44b0xfb.o
linux-2.4.x/drivers/video/fbmem.c
extern int s3c44b0xfb_init(void);
extern int s3c44b0xfb_setup(void);
#ifdef CONFIG_FB_S3C44B0X
         {“s3c44b0xfb”,s3c440xfb_init,s3c44b0xfb_setup},
#endif
DEVICES = /
         fb0,c,29,0
1.5 编译uClinux
FrameBuffer部分配置的选择
/********************************************************************************
*
* Console drivers
*
VGA text console (CONFIG_VGA_CONSOLE) [N/y/?] (NEW) n
Support Frame buffer devices (CONFIG_FB) [N/y/?] (NEW) y
*
* Frame-buffer support
*
Support for frame buffer devices (EXPERIMENTAL) (CONFIG_FB) [Y/n/?]
Acorn VIDC support (CONFIG_FB_ACORN) [N/y/?] (NEW) n
  CLPS711X LCD support (CONFIG_FB_CLPS711X) [N/y/?] (NEW) n
  Cyber2000 support (CONFIG_FB_CYBER2000) [N/y/?] (NEW) n
  SA-1100 LCD support (CONFIG_FB_SA1100) [N/y/?] (NEW) n
  Advanced low level driver options (CONFIG_FBCON_ADVANCED) [N/y/?] (NEW) y
  Monochrome support (CONFIG_FBCON_MFB) [N/y/?] (NEW) n
  2 bpp packed pixels support (CONFIG_FBCON_CFB2) [N/y/?] (NEW) n
  4 bpp packed pixels support (CONFIG_FBCON_CFB4) [N/y/?] (NEW) n
  8 bpp packed pixels support (CONFIG_FBCON_CFB8) [N/y/?] (NEW) y
  16 bpp packed pixels support (CONFIG_FBCON_CFB16) [N/y/?] (NEW) n
  24 bpp packed pixels support (CONFIG_FBCON_CFB24) [N/y/?] (NEW) n
  32 bpp packed pixels support (CONFIG_FBCON_CFB32) [N/y/?] (NEW) n
  Amiga bitplanes support (CONFIG_FBCON_AFB) [N/y/?] (NEW) n
  Amiga interleaved bitplanes support (CONFIG_FBCON_ILBM) [N/y/?] (NEW) n
  Atari interleaved bitplanes (2 planes) support (CONFIG_FBCON_IPLAN2P2) [N/y/?] (NEW) n
  Atari interleaved bitplanes (4 planes) support (CONFIG_FBCON_IPLAN2P4) [N/y/?] (NEW) n
  Atari interleaved bitplanes (8 planes) support (CONFIG_FBCON_IPLAN2P8) [N/y/?] (NEW) n
  Amiga bitplanes support (CONFIG_FBCON_AFB) [N/y/?] (NEW) n
  Amiga interleaved bitplanes support (CONFIG_FBCON_ILBM) [N/y/?] (NEW) n
  Atari interleaved bitplanes (2 planes) support (CONFIG_FBCON_IPLAN2P2) [N/y/?] (NEW) n
  Atari interleaved bitplanes (4 planes) support (CONFIG_FBCON_IPLAN2P4) [N/y/?] (NEW) n
  Atari interleaved bitplanes (8 planes) support (CONFIG_FBCON_IPLAN2P8) [N/y/?] (NEW) n
  Mac variable bpp packed pixels support (CONFIG_FBCON_MAC) [N/y/?] (NEW) n
  VGA 16-color planar support (CONFIG_FBCON_VGA_PLANES) [N/y/?] (NEW) n
  VGA characters/attributes support (CONFIG_FBCON_VGA) [N/y/?] (NEW) n
  HGA monochrome support (EXPERIMENTAL) (CONFIG_FBCON_HGA) [N/y/?] (NEW) n
  Support only 8 pixels wide fonts (CONFIG_FBCON_FONTWIDTH8_ONLY) [N/y/?] (NEW) n
  Select compiled-in fonts (CONFIG_FBCON_FONTS) [N/y/?] (NEW) y
  VGA 8x8 font (CONFIG_FONT_8x8) [N/y/?] (NEW) y
  VGA 8x16 font (CONFIG_FONT_8x16) [N/y/?] (NEW) y
  Sparc console 8x16 font (CONFIG_FONT_SUN8x16) [N/y/?] (NEW) n
  Pearl (old m68k) console 8x8 font (CONFIG_FONT_PEARL_8x8) [N/y/?] (NEW) n
  Acorn console 8x8 font (CONFIG_FONT_ACORN_8x8) [N/y/?] (NEW) n
 
Virtual terminal (CONFIG_VT) [Y/n/?]
  Support for console on virtual terminal (CONFIG_VT_CONSOLE) [N/y/?] (NEW) n
*********************************************************************************/
因为LCD256色的,所以选择下项
8 bpp packed pixels support (CONFIG_FBCON_CFB8) [N/y/?] (NEW) y
如果下载内核后进不去系统,则Virtual Terminal 不选,如果进去后fb0不能用,则要选,因为不选的话会屏蔽Support Frame buffer devices (CONFIG_FB) [N/y/?] (NEW) y的设置Virtual Terminal 意思是超级终端显示的数据在LCD上显示,同时超级终端也显示。
1.6 测试/dev/fb0
1测度程序 test1.c
测试/dev/fb0 有没存在,以及其属性
/*******************************************************************************
#include <linux/fb.h>
#include <unistd.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
int main ()
{
int fp=0;
struct fb_var_screeninfo vinfo;
struct fb_fix_screeninfo finfo;
fp = open ("/dev/fb0",O_RDWR);
if (fp < 0){
printf("Error : Can not open framebuffer device/n");
return 0;
}
if (ioctl(fp,FBIOGET_FSCREENINFO,&finfo)){
printf("Error reading fixed information/n");
return 0;
}
if (ioctl(fp,FBIOGET_VSCREENINFO,&vinfo)){
printf("Error reading variable information/n");
return 0;
}
printf("The mem is :%d/n",finfo.smem_len);
printf("The line_length is :%d/n",finfo.line_length);
printf("The xres is :%d/n",vinfo.xres);
printf("The yres is :%d/n",vinfo.yres);
printf("bits_per_pixel is :%d/n",vinfo.bits_per_pixel);
close (fp);
return 0;
}
*******************************************************************************/
2) 测试程序test2.c
LCD上显示一张图片
/**********************************************************************************
#include <linux/fb.h>
#include <unistd.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
const unsigned char gImage_bmp[76560]={……}
//该数组可能过Image2LCD软件生成,该软件可在www.baidu.com找到
int main()
{
 int framebuffer_device;
 int line_size,buffer_size,i;
 char *screen_memory;
 struct fb_var_screeninfo var_info;
 struct fb_fix_screeninfo fix_info;
 
 framebuffer_device=open("/dev/fb0",O_RDWR);
 ioctl(framebuffer_device,FBIOGET_VSCREENINFO,&var_info);
 ioctl(framebuffer_device,FBIOGET_FSCREENINFO,&fix_info);
 line_size=var_info.xres*var_info.bits_per_pixel/8;
 buffer_size=line_size*var_info.yres;
 var_info.xoffset=0;
 var_info.yoffset=0;
 screen_memory=(char*)mmap(0,buffer_size,PROT_READ|PROT_WRITE,0,framebuffer_device,0);
 for(i=0;i<buffer_size;i++)
 {
    *(screen_memory+i)=gImage_bmp[i];
 }
 sleep(2);
 return 0;
}
**********************************************************************************/
3) 将程序编译进内核
uClinux-dist/romfs/ 里的文件是最终生成的内核文件,也是开发板上系统能看到的文件,要将文件编译进内核,只需把文件放到这里就行,然后make
arm-elf-gcc –elf2flt –o test1 test1.c
arm-elf-gcc –elf2flt –o test2 test.c
test1 test2 放到uClinux-dist/romfs/usr/
Make 两次,我发现make一次没装进去。
内核编译后下载进开发板,进入系统,运行程序就可测出/dev/fb0有没存在,FrameBuffer有没配置成功。
2 minigui移植
2.1 安装库和资源
1) 解压 minigui-res-1.6.tar.gz , 设置config.linux文件,将编译器设置为arm-elf-gcc。并将安装路径设置为arm-elf-gcc所在的目录。
tar –zxvf minigui-res-1.6.tar.gz
修改config.linux
prefix = $(TOPDIR)/usr/local/
CC     = arm-elf-gcc
然后
Make install
安装到/usr/local/lib/minigui/res
该res 是MiniGUI.cfg 里面资源引用的位置,也是进行移植的资源。
prefix = $(TOPDIR)/usr/local/arm-elf
CC     = arm-elf-gcc
然后
Make install
安装到/usr/local/arm-elf/lib/minigui/res 编译器库里的资源
2) 解压 libminigui-1.6.x-linux.tar.gz, 修改编译参数
tar –zxvf libminigui-1.6.x-linux.tar.gz
修改 libminigui-1.6.2-linux/scripts/mkconfig
if check_value "CONFIG_COMPILER_ARM_ELF"; then
   # CFLAGS="$CFLAGS -D__PIC__ -fpic -msingle-pic-base"
     CFLAGS="$CFLAGS -D__PIC__ -fno-pic -fno-PIC"
Fi
不然在开发板运行程序时会出现如下错误码:
Unhandled fault:external abort on linefetch (F4) at 0x00000001
Fault-common.c(97):start_code=0xc2b9ca0,start_stack=0xc63ff98)
Pid 28:failed 7
3) 配置编译环境
make menuconfig

System wid option
选择
Clipboard support
Unit of timer is 10ms
Mouse button can do double click 

Gal engine option

选择

GAL and its engines:NEWGAL

Include Advanced 2D Graphics APIs

NEWGAL dummy engine

NEWGAL engine on Linux FrameBuffer console

Have console on

IAL engine options

选择

Dummy IAL engine

Font options

选择

Raw bitmap font

Image option

选择

GIF file support

Appearance options

选择

Flat

Ext library options

选择

TreeView control

ListView control

MonthCalendor control

SpinBox control

CoolBar control

Animation control

IconView control

Grid control

Development environment options

The target operating system:uClinux

Compiler:arm-elf-gcc

Libc:uClibc

uClinux-dist directory:/opt/uClinux-dist         //uClinux-dist 的位置

Path prefix:/usr/local/arm-elf                              //arm-elf-gcc 的位置

CFLAGSLDFLAGS I 不填。

Tarball baler options

选择

uClinux

保存退出

make

make install

安装到/usr/local/arm-elf-gcc/

2.2 移植配置文件和资源

1) 配置文件 MiniGUI.cfg

配置文件的名称必需是MiniGUI.cfg,放在/etc/ 下。

由于DRAM的大小限制,我对MiniGUI的资源进行了裁减,主要是字体部分。fbcon 表示采用Framebufferdummy表示没有输入设备,如触摸屏。

[varbitmapfonts]

font_number=0

表示没有varbitmapfonts,会忽略该字段下的资源引用。

/******************************************************************************

[system]

# GAL engine

gal_engine=fbcon

# IAL engine

ial_engine=dummy

mdev=none

mtype=none

[fbcon]

defaultmode=320x240-8bpp

[qvfb]

defaultmode=320x240-8bpp

display=0

# The first system font must be a logical font using RBF device font.

[systemfont]

font_number=1

font0=rbf-fixed-rrncnn-8-16-ISO8859-1

#font1=*-fixed-rrncnn-*-16-GB2312

#font2=*-Courier-rrncnn-*-16-GB2312

#font3=*-Times-rrncnn-*-16-GB2312

#font4=*-Helvetica-rrncnn-*-16-GB2312

default=0

wchar_def=0

fixed=0

caption=0

menu=0

control=0

[rawbitmapfonts]

font_number=1

name0=rbf-fixed-rrncnn-8-16-ISO8859-1

fontfile0=/usr/res/font/8x16-iso8859-1.bin

#name1=rbf-fixed-rrncnn-16-16-GB2312.1980-0

#fontfile1=/usr/res/font/song-16-gb2312.bin

[varbitmapfonts]

font_number=0

name0=vbf-Courier-rrncnn-10-15-ISO8859-1

fontfile0=/usr/res/font/Courier-rr-10-15.vbf

name1=vbf-Helvetica-rrncnn-15-16-ISO8859-1

fontfile1=/usr/res/font/Helvetica-rr-15-16.vbf

name2=vbf-Times-rrncnn-13-15-ISO8859-1

fontfile2=/usr/res/font/Times-rr-13-15.vbf

[mouse]

dblclicktime=300

[event]

timeoutusec=300000

repeatusec=50000

[cursorinfo]

# Edit following line to specify cursor files path

cursorpath=/usr/res/cursor/

cursornumber=4

cursor0=d_arrow.cur

cursor1=d_beam.cur

cursor2=d_pencil.cur

cursor3=d_cross.cur

[iconinfo]

# Edit following line to specify icon files path

iconpath=/usr/res/icon/

# Note that max number defined in source code is 5.

iconnumber=5

icon0=form.ico

icon1=w95mbx01.ico

icon2=w95mbx02.ico

icon3=w95mbx03.ico

icon4=w95mbx04.ico

[bitmapinfo]

# Edit following line to specify bitmap files path

bitmappath=/usr/res/bmp/

# Note that max number defined in source code is 7

bitmapnumber=2

bitmap0=capbtns.bmp

# bitmap1=arrows.bmp

# use large bitmap if your default font is 16 pixel height.

bitmap1=arrows16.bmp

bitmap2=none

bitmap3=none

bitmap4=none

bitmap5=none

# background picture, use your favirate photo

bitmap6=none

# bitmap used by BUTTON control

button=button.bmp

pushbutton=none

pushedbutton=none

# bitmap used by LISTBOX control

checkmark=checkmark.bmp

# bitmap used by COMBOBOX control

downarrow=downarrow.bmp

updownarrow=updownarrow.bmp

leftrightarrow=leftrightarrow.bmp

# bitmap used by IME window

IMEctrlbtn=shurufa.bmp

# bitmap used by About dialog box

logo=MiniGUI256.bmp

# logo=MiniGUI16.bmp

[bgpicture]

position=center

# position=upleft

# position=downleft

# position=upright

# position=downright

# position=upcenter

# position=downcenter

# position=vcenterleft

# position=vcenterright

# position=none

[mainwinmetrics]

minwidth=50

minheight=50

border=2

thickframe=2

thinframe=1

captiony=+4

iconx=16

icony=16

menubary=+0

menubaroffx=8

menubaroffy=5

menuitemy=+0

intermenuitemx=12

intermenuitemy=2

menuitemoffx=18

menutopmargin=4

menubottommargin=4

menuleftmargin=4

menurightmargin=4

menuitemminx=64

menuseparatory=4

menuseparatorx=4

sb_height=14

sb_width=16

sb_interx=2

cxvscroll=16

cyvscroll=16

cxhscroll=16

cyhscroll=16

minbarlen=9

defbarlen=18

[windowelementcolors]

bkc_caption_normal=0x00808080

fgc_caption_normal=0x 00C 0C 0C 0

bkc_caption_actived=0x00800000

fgc_caption_actived=0x00FFFFFF

bkc_caption_disabled=0x00808080

fgc_caption_disabled=0x 00C 0C 0C 0

wec_frame_normal=0x00000000

wec_frame_actived=0x00FF0000

wec_frame_disabled=0x00000000

bkc_menubar_normal=0x 00C 0C 0C 0

fgc_menubar_normal=0x00000000

bkc_menubar_hilite=0x00800000

fgc_menubar_hilite=0x00FFFFFF

fgc_menubar_disabled=0x00808080

bkc_menuitem_normal=0x 00C 0C 0C 0

fgc_menuitem_normal=0x00000000

bkc_menuitem_hilite=0x00800000

fgc_menuitem_hilite=0x00FFFFFF

fgc_menuitem_disabled=0x00808080

bkc_pppmenutitle=0x 00C 0C 0C 0

fgc_pppmenutitle=0x00FF0000

fgc_menuitem_frame=0x 00C 66931

wec_3dbox_normal=0x 00C 0C 0C 0

wec_3dbox_reverse=0x00000000

wec_3dbox_light=0x00FFFFFF

wec_3dbox_dark=0x00808080

wec_flat_border=0x00808080

bkc_control_def=0x 00C 0C 0C 0

fgc_control_normal=0x00000000

fgc_control_disabled=0x 00C 0C 0C 0

bkc_hilight_normal=0x00FF0000

bkc_hilight_lostfocus=0x00BDA 69C

fgc_hilight_normal=0x00FFFFFF

fgc_hilight_disabled=0x 00C 0C 0C 0

bkc_desktop=0x00FF0000

bkc_dialog=0x 00C 0C 0C 0

bkc_tip=0x 00C 8FCF8

[imeinfo]

imetabpath=/usr/res/imetab/

imenumber=0

ime0=pinyin

[appinfo]

apprespath=/usr/local/lib/shared/miniguiapps/

********************************************************************/

2) 资源包 res

res/ 放在/usr/ 下。

RES/

BMP/              包含位图文件

CURSOR/              包含光标文件

FONT/             包含字体文件

ICON/             包含图标文件

IMETAB/              包含输入法文件

FONT/ 里只放8x16-iso8859-1.bin文件,由于字体只有一种,所以下面都选0.

default=0

wchar_def=0

fixed=0

caption=0

menu=0

control=0

资源文件不要配置得太多,如果DRAM不够,而配置资源多的话,会出现如下错误:

Allocation of length 1259251 from process 16 failed

Buffer memory: 356kB

Cache memory: 344kB

Free pages: 2384kB ( 0kB HighMem)

Zone:DMA freepages: 0kB

Zone: Normal freepages: 2384kB

Zone:HighMem freepages: 0kB

( Active: 138, inactive: 37, free: 596 )

= 0kB)

0*4kB 0*8kB 1*16kB 0*32kB 1*64kB 0*128kB 1*256kB 0*512kB 0*1024kB 1*2048kB = 23)= 0kB)

Unable to allocate RAM for process text/data, errno 12

或者

pid 16: failed 4

或者

直接重启

3 测试程序

Hello.c

/**********************************************************************************

#include <minigui/common.h>

#include <minigui/minigui.h>

#include <minigui/gdi.h>

#include <minigui/window.h>

#include <minigui/control.h>

 

//#pragma comment(lib,"minigui.lib")

//#pragma comment(lib,"pthreadVC1.lib") 用于VC编译

 

 

static int MainWinProc(HWND hWnd, int message, WPARAM wParam, LPARAM lParam)

 

{

 

    HDC           hdc;

    switch (message)

         {

        case MSG_CREATE:   

            break;

        case MSG_PAINT:

            hdc = BeginPaint (hWnd);//得到绘图设备                     

            EndPaint (hWnd, hdc);//结束绘图

                            break;

        case MSG_CLOSE://当窗口关闭时该消息产生

                       DestroyMainWindow (hWnd);//注销窗口

            PostQuitMessage (hWnd);

            return 0;

    }

    return DefaultMainWinProc(hWnd, message, wParam, lParam);//未处理的函数在此默认处理

}

 

int MiniGUIMain (int argc, const char* argv[])//main函数对应WindowsWinMaincmain

 

{

 

    MSG Msg;//定义消息

    HWND hMainWnd;//生成主窗口句柄

    MAINWINCREATE CreateInfo;//定义主窗口结构

 

#ifdef _LITE_VERSION//预处理:判断是否Lite版本

 

    SetDesktopRect(0, 0, 1024, 768);

 

#endif

 

    CreateInfo.dwStyle = WS_VISIBLE| WS_BORDER | WS_CAPTION;//设置主窗口风格

    CreateInfo.dwExStyle = WS_EX_NONE;//设置主窗口扩展风格

    CreateInfo.spCaption = "Sk.";//设置主窗口标题

    CreateInfo.hMenu = 0; //设置主窗口菜单

    CreateInfo.hCursor = GetSystemCursor(0); //设置主窗口鼠标光标

    CreateInfo.hIcon = 0; //设置主窗口图标

    CreateInfo.MainWindowProc = MainWinProc; //设置主窗口消息处理函数过程

    CreateInfo.lx = 0; //设置主窗口位置x坐标

    CreateInfo.ty = 0; //设置主窗口位置y坐标

    CreateInfo.rx = 320; //设置主窗口宽度

    CreateInfo.by = 240; //设置主窗口高度

    CreateInfo.iBkColor = COLOR_green; //设置主窗口客户区背景色

    CreateInfo.dwAddData = 0; //设置主窗口的附加数据,通常不需要

    CreateInfo.hHosting = NULL; //设置主窗口的托管窗口,通常为桌面DESKTOP

 

    hMainWnd = CreateMainWindow (&CreateInfo);//创建主窗口 

    if (hMainWnd == HWND_INVALID)//失败则退出

        return -1;

 

    ShowWindow(hMainWnd, SW_SHOWNORMAL);//显示主窗口

 

    while (GetMessage(&Msg, hMainWnd))

         {//进入消息处理

        TranslateMessage(&Msg);

        DispatchMessage(&Msg);

    }

 

    MainWindowThreadCleanup (hMainWnd);

    return 0;

}

**********************************************************************************/

编译 arm-elf-gcc –elf2flt –fno-pic –fno-PIC –o hello hello.c –lminigui –lpthread –lm

在配置minigui采用newgal方式 时,编译程序必须加上-lm,不然会出现 sin ,cos 之类没定义的错误。

-l lmnl

 

 

 

 

 

 

 

这篇关于MiniGUI移植总结的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/572494

相关文章

HarmonyOS学习(七)——UI(五)常用布局总结

自适应布局 1.1、线性布局(LinearLayout) 通过线性容器Row和Column实现线性布局。Column容器内的子组件按照垂直方向排列,Row组件中的子组件按照水平方向排列。 属性说明space通过space参数设置主轴上子组件的间距,达到各子组件在排列上的等间距效果alignItems设置子组件在交叉轴上的对齐方式,且在各类尺寸屏幕上表现一致,其中交叉轴为垂直时,取值为Vert

学习hash总结

2014/1/29/   最近刚开始学hash,名字很陌生,但是hash的思想却很熟悉,以前早就做过此类的题,但是不知道这就是hash思想而已,说白了hash就是一个映射,往往灵活利用数组的下标来实现算法,hash的作用:1、判重;2、统计次数;

git使用的说明总结

Git使用说明 下载安装(下载地址) macOS: Git - Downloading macOS Windows: Git - Downloading Windows Linux/Unix: Git (git-scm.com) 创建新仓库 本地创建新仓库:创建新文件夹,进入文件夹目录,执行指令 git init ,用以创建新的git 克隆仓库 执行指令用以创建一个本地仓库的

二分最大匹配总结

HDU 2444  黑白染色 ,二分图判定 const int maxn = 208 ;vector<int> g[maxn] ;int n ;bool vis[maxn] ;int match[maxn] ;;int color[maxn] ;int setcolor(int u , int c){color[u] = c ;for(vector<int>::iter

整数Hash散列总结

方法:    step1  :线性探测  step2 散列   当 h(k)位置已经存储有元素的时候,依次探查(h(k)+i) mod S, i=1,2,3…,直到找到空的存储单元为止。其中,S为 数组长度。 HDU 1496   a*x1^2+b*x2^2+c*x3^2+d*x4^2=0 。 x在 [-100,100] 解的个数  const int MaxN = 3000

状态dp总结

zoj 3631  N 个数中选若干数和(只能选一次)<=M 的最大值 const int Max_N = 38 ;int a[1<<16] , b[1<<16] , x[Max_N] , e[Max_N] ;void GetNum(int g[] , int n , int s[] , int &m){ int i , j , t ;m = 0 ;for(i = 0 ;

go基础知识归纳总结

无缓冲的 channel 和有缓冲的 channel 的区别? 在 Go 语言中,channel 是用来在 goroutines 之间传递数据的主要机制。它们有两种类型:无缓冲的 channel 和有缓冲的 channel。 无缓冲的 channel 行为:无缓冲的 channel 是一种同步的通信方式,发送和接收必须同时发生。如果一个 goroutine 试图通过无缓冲 channel

9.8javaweb项目总结

1.主界面用户信息显示 登录成功后,将用户信息存储在记录在 localStorage中,然后进入界面之前通过js来渲染主界面 存储用户信息 将用户信息渲染在主界面上,并且头像设置跳转,到个人资料界面 这里数据库中还没有设置相关信息 2.模糊查找 检测输入框是否有变更,有的话调用方法,进行查找 发送检测请求,然后接收的时候设置最多显示四个类似的搜索结果

FreeRTOS-基本介绍和移植STM32

FreeRTOS-基本介绍和STM32移植 一、裸机开发和操作系统开发介绍二、任务调度和任务状态介绍2.1 任务调度2.1.1 抢占式调度2.1.2 时间片调度 2.2 任务状态 三、FreeRTOS源码和移植STM323.1 FreeRTOS源码3.2 FreeRTOS移植STM323.2.1 代码移植3.2.2 时钟中断配置 一、裸机开发和操作系统开发介绍 裸机:前后台系

java面试常见问题之Hibernate总结

1  Hibernate的检索方式 Ø  导航对象图检索(根据已经加载的对象,导航到其他对象。) Ø  OID检索(按照对象的OID来检索对象。) Ø  HQL检索(使用面向对象的HQL查询语言。) Ø  QBC检索(使用QBC(Qurey By Criteria)API来检索对象。 QBC/QBE离线/在线) Ø  本地SQL检索(使用本地数据库的SQL查询语句。) 包括Hibern