Welcome to Bo-Blog.

在折腾MioMap2008时遇到了不少困难,如MioMap 3.5"手写输入,MioGoGo不能启动。经过2天奋斗终于解决了上述问题,虽然还有MioGoGo不能输入的问题,不过可以凑合着用了,高手不要笑话 我对miogateway.exe的修改哦。在此要向为3.5"手写输入解决方案首发者虎坛的minpig、乐游200 OEM的HUTAN和提供n多资源的胖熊表示最崇高的感谢。哈哈!好了废话少说,下面将讲具体操作过程:

1、参阅胖熊的帖子《MIOMAP 2008 V3.0 整盘【更新VGA机器补丁】》找到乐游c230DVD更新光盘,并下载。
http://www.sosaw.com/dispbbs.asp?boardid=43&Id=134735

http://www.rayfile.com/files/7c3f3e61-c6b9-11dd-b9d8-0019d11a795f/
2、将目录中的MapRecoveryMioMapMioMap下的所有文件和目录,拷贝到你要运行的SD卡相应目录,例如我这里的
Storage CardNavigationsMioMap2008,同时将MioGateway目录也拷贝到该目录下

3、下载本文附件,解压,将其中的miomap.exe/miokeyboard.dll/
miokeyboard.lib/MRSPhonim.dll复制到MioMap2008的主目录在我这里是Storage CardNavigationsMioMap2008;将miogateway.exe复制到主目录下的miogateway目录下,在我这里是Storage CardNavigationsMioMap2008MioGateway

3.5、感谢
乐游200 OEM BY HUTAN

4、将解压文件中的RECOGBIG.dll更名为IM.dll复制到My Flash Disk目录下

4.5、说明3.5"手写破解原理见http://www.cyberfans.cn/bbs/viewthread.php?tid=10836&extra=&page=1

5、导入注册表Keyboard.reg,如果你使用MioPocket的话,直接用该文件覆盖MioAutoRunRegistry下的那个同名文件。

6、好了,你可以爽一下了。看看miomap2008在c220上是什么样子的。


增加其它WINCE5/3.5"办法。
7、步骤1-3不变,步骤4改为使用myreplace.exe将MRSPhonim.dll中的字符串“My Flash DiskIM.dll”替换成RECOGBIG.dll需要置放的位置,如下图所示。切记,修改后字符串长度不能超过之前的长度。然后将RECOGBIG.dll复制到你在MRSPhonim.dll中制定的位置和文件名。其余步骤应该相同。

图片点击可在新窗口打开查看此主题相关图片如下:myreplace.jpg
图片点击可在新窗口打开查看
修改工具:
下载信息  [文件大小:9.1 KB  下载次数:0]
图片点击可在新窗口打开查看点击浏览该文件:myreplace.rar
扣除积分数2


注意:Keyboard.reg内的路径需要根据你的实际情况修改!
下载信息  [文件大小:976.6 KB  下载次数:6]
图片点击可在新窗口打开查看点击浏览该文件:fixedfiles.part1.rar
扣除积分数2

下载信息  [文件大小:710.4 KB  下载次数:6]
图片点击可在新窗口打开查看点击浏览该文件:fixedfiles.part2.rar
扣除积分数2


图片点击可在新窗口打开查看此主题相关图片如下:capture002.bmp
图片点击可在新窗口打开查看

图片点击可在新窗口打开查看此主题相关图片如下:capture005.bmp
图片点击可在新窗口打开查看

图片点击可在新窗口打开查看此主题相关图片如下:capture004.bmp
图片点击可在新窗口打开查看

图片点击可在新窗口打开查看此主题相关图片如下:capture006.bmp
图片点击可在新窗口打开查看

图片点击可在新窗口打开查看此主题相关图片如下:capture007.bmp
图片点击可在新窗口打开查看

  

摄影师拍到南非松鼠表演中国功夫(图)

        
http://www.sina.com.cn  2008年12月11日 08:55  新浪科技
                                                                                                                         
            .moduleSingleImg01 img{border:1px solid #D1E3F4}                                                                                         
摄影师拍到南非松鼠表演中国功夫(图)

功夫松鼠

  
摄影师拍到南非松鼠表演中国功夫(图)

功夫松鼠

  
摄影师拍到南非松鼠表演中国功夫(图)

功夫松鼠

  
摄影师拍到南非松鼠表演中国功夫(图)

一群地松鼠

  

  新浪科技讯 北京时间12月11日消息,据英国《每日邮报》报道,最近英国一名摄影师拍到了几只南非地松鼠搏斗的场景,松鼠的一招一式一点不逊于“功夫熊猫”。

  这些照片是几天前英国获奖摄影师大卫·斯拉特拍摄的。有些场面简直不像是野生动物摄影,倒像是暴力影片《量子危机》中的场景,在纳米比亚埃托沙 国家公园,一只南非地松鼠猛烈袭击一位“入侵者”。对手倒在地上,这只地松鼠毫不犹豫地用它毛茸茸的腿一阵猛踢,以保护自己领地不受侵犯。

  南非地松鼠分布在非洲干燥地区,地松鼠是群居动物,大群可达到30只。它们不擅长攀爬,喜欢生活在相同连通的洞中,有时还会与猫鼬住在一起。这 些南非地松鼠通常使用毛茸茸的大粗尾巴遮阳蔽日,上下挥舞尾巴则是向其他成员传递一种警报信号,这时候通常是它无法打败邻近的动物。(孝文)


#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <time.h>

typedef struct child
{
    struct node * son;
    struct child * next;
}child_node;

typedef struct node
{
    struct node * father;
    int step;
    int checked;
    char map_string[17];
    struct node * next;
}map_node;

int Map[4][4];
map_node * Map_Que=NULL;
child_node * Final=NULL;
int MinStep=-1;
clock_t start,end;

void print_map(void)
{
    int i,xpos,ypos;
    for (i=0;i<16;i++)
    {
        xpos=i%4;
        ypos=i/4;
        if (Map[xpos][ypos]<10)
        {
            printf("%2u",Map[xpos][ypos]);
        }
        else
        {
            printf("%2c",Map[xpos][ypos]+55);
        }
        if (xpos==3) printf(" ");
    }
}

void string_to_map(char *map_string)
{
    int i,xpos,ypos;
    for(i=0;i<16;i++)
    {
        xpos=i%4;
        ypos=i/4;
        if (map_string[i]<='9')
        {
            Map[xpos][ypos]=map_string[i]-0x30;
        }
        else
        {
            Map[xpos][ypos]=map_string[i]-0x37;
        }
    }
}

char *map_to_string()
{
    static char map_string[17];
    int i,xpos,ypos;
    map_string[16]=0;
    for(i=0;i<16;i++)
    {
        xpos=i%4;
        ypos=i/4;
        if (Map[xpos][ypos]<10)
        {
            map_string[i]=Map[xpos][ypos]+0x30;
        }
        else
        {
            map_string[i]=Map[xpos][ypos]+0x37;
        }
    }
    return map_string;
}

int calculate_map_string(char*map_string,int mode)
{
    int i,xpos,ypos,x,y,distance,val,dist,times=14;
    distance=dist=0;
    //成功与否在你真正实现之前,我们能做的只能是评估。

    //而评估的方法千差万别,但对你修正自己的目标却是至关重要!

    for(i=0;i<16;i++)
    {
        if (map_string[i]==0x30) continue;
        xpos=i%4;
        ypos=i/4;
        val=map_string[i]-0x30;
        if (val>9) val-=7;
        if (val==i+1) times--;
        x=(val-1)%4;
        y=(val-1)/4;
        distance+=abs(x-xpos)+abs(y-ypos);
        dist+=(x-xpos)*(x-xpos)+(y-ypos)*(y-ypos);
    }
    //而且在不同的场合我们所需要的评估手段也不尽相同

    if (mode==1) return distance;
    return dist*times;
}

map_node *new_map_status(map_node * father_node,char *map_string,int steps)
{
    map_node *new_node;
    new_node=(map_node *)malloc(sizeof(map_node));
    if (new_node!=NULL)
    {
        //每一步的都是崭新的,但是也已经蕴藏了是否能成功的关键

        new_node->father=father_node;
        strcpy(new_node->map_string,map_string);
        new_node->step=steps;
        new_node->next=NULL;
        new_node->checked=0;
    }
    return new_node;
}

int compare_map(char *map1,int step1,char *map2,int step2)
{
    int dist1,dist2;
    dist1=calculate_map_string(map1,0);
    dist2=calculate_map_string(map2,0);
    if (dist1>dist2) return 1;
    if (dist1<dist2) return -1;
    //在成功之前,我们面对的竞争是残酷的,即使一点微小的差别,也会导致落选!

    if (step1>step2) return 1;
    if (step1<step2) return -1;
    return 0;
}

map_node * insert_map_que(map_node *father_node,char *map_string,int steps)
{
    map_node * queue=Map_Que;
    map_node * result=NULL;
    map_node * last=NULL;
    int checked=0;
    while (queue!=NULL)
    {
        //迟到会让机会永远跟你说再见

        if (checked==0 && queue->step<steps && strcmp(queue->map_string,map_string)==0) return NULL;
        //如果有人成功过,那么你所面临的淘汰可能是空前的!

        if (checked==1 && MinStep>0 && queue->step+calculate_map_string(queue->map_string,1)>MinStep)
        {
            if (last!=NULL)
            {
                last->next=queue->next;
                free(queue);
                queue=last->next;
                continue;
            }
            else
            {
                Map_Que=queue->next;
                free(queue);
                queue=Map_Que;
                continue;
            }
        }
        //先下手未必强,后来者也可居上!

        if (checked==1 && queue->step>steps && strcmp(queue->map_string,map_string)==0)
        {
                last->next=queue->next;
                free(queue);
                queue=last->next;
                continue;
        }
        //竞争的残酷,居然可以蔓延到下一代!

        if (checked==1 && queue->father!=NULL && queue->father->map_string!=NULL && strcmp(queue->father->map_string,map_string)==0)
        {
            queue->father=result;
            last=queue;
            queue=queue->next;
            continue;
        }
        //肃清运动一定会是彻底而残酷的!

        if (checked==1)
        {
            last=queue;
            queue=queue->next;
            continue;
        }
        //在队列中找到了自己的位置,那只是一切的开始!

        if (compare_map(map_string,steps,queue->map_string,queue->step)==-1 || queue->next==NULL)
        {
            result=new_map_status(father_node,map_string,steps);
            if (result==NULL)
            {
                printf("ERROR IN INSERT_MAP_QUE! ");
                exit(1) ;
            }
            if (last!=NULL)
            {
                last->next=result;
            }
            else
            {
                Map_Que=result;
            }
            result->next=queue;
            result->checked=0;
            checked=1;
        }
        last=queue;
        queue=queue->next;
    }
    return result;
}

void add_child(map_node* now_node)
{
    child_node * new_node;
    new_node=(child_node *)malloc(sizeof(child_node));
    if (new_node==NULL)
    {
        printf("ERROR IN APPLY MEMORY IN ADD_CHILD! ");
        exit(1) ;
    }
    new_node->son=now_node;
    new_node->next=Final;
    Final=new_node;
    return;
}

int develop_node(map_node* now_node)
{
    int i;
    char map_string[17];
    map_node* candidate;

    for (i=0;i<16;i++)
    {
        if (now_node->map_string[i]=='0')
        {
             //寻找出路的过程是漫长而乏味的,上下以求索,是成功前必由之路

             //Up Side Move

            strcpy(map_string,now_node->map_string);
            if (i/4>=1)
            {
                map_string[i-4]=now_node->map_string[i];
                map_string[i]=now_node->map_string[i-4];
                if (MinStep==-1 || calculate_map_string(map_string,1)+now_node->step<MinStep)
                {
                    //能够成为候选者应该是一种荣幸,特别是在有人成功以后!

                    candidate=insert_map_que(now_node,map_string,now_node->step+1);
                }
            }
            
            //Left Side Move

            strcpy(map_string,now_node->map_string);
            if (i%4>0)
            {
                map_string[i-1]=now_node->map_string[i];
                map_string[i]=now_node->map_string[i-1];
                if (MinStep==-1 || calculate_map_string(map_string,1)+now_node->step<MinStep)
                {
                    candidate=insert_map_que(now_node,map_string,now_node->step+1);
                }
            }

            //Right Side Move

            strcpy(map_string,now_node->map_string);
            if (i%4<3)
            {
                map_string[i+1]=now_node->map_string[i];
                map_string[i]=now_node->map_string[i+1];
                if (MinStep==-1 || calculate_map_string(map_string,1)+now_node->step<MinStep)
                {
                    candidate=insert_map_que(now_node,map_string,now_node->step+1);
                }
            }

            //Down Side Move

            strcpy(map_string,now_node->map_string);
            if (i/4<3)
            {
                map_string[i+4]=now_node->map_string[i];
                map_string[i]=now_node->map_string[i+4];
                if (MinStep==-1 || calculate_map_string(map_string,1)+now_node->step<MinStep)
                {
                    candidate=insert_map_que(now_node,map_string,now_node->step+1);
                }
            }

        }
    }
    return 0;
}

map_node *get_next_node()
{
    map_node* queue=Map_Que;
    map_node* last=NULL;
    while(queue!=NULL)
    {
        //成功者是暂时的强者,但它可以用来鉴定后来者的质素!

        if (MinStep>0 && queue->step+calculate_map_string(queue->map_string,1)>MinStep)
        {
            if (last!=NULL)
            {
                last->next=queue->next;
                free(queue);
                queue=last->next;
                continue;
            }
            else
            {
                Map_Que=queue->next;
                free(queue);
                queue=Map_Que;
                continue;
            }
        }
        //尚未触及的世界总是值得我们去探知的!

        if (queue->checked==0)
        {
            queue->checked=1;
            return queue;
        }
        last=queue;
        queue=queue->next;
    }
    return NULL;
}

int main()
{
    int i,now_distance=-1;
    int xpos,ypos;
    map_node* now_node;
    void *last;

    //机遇和挑战常常是以时间作为自变量的随机函数!

    //会有雷同,但不停变化!

    srand(time(NULL));
    for(i=0;i<16;i++)
    {
        xpos=i%4;
        ypos=i/4;
        Map[xpos][ypos]=0;
    }
    for(i=0;i<14;i++)
    {
        do
        {
            xpos=rand()*4/(RAND_MAX+1);
            ypos=rand()*4/(RAND_MAX+1);
        }while (Map[xpos][ypos]!=0);
        //面临的一切总不相同!

        Map[xpos][ypos]=i+1;
    }
    print_map();
    getchar();
    start=clock();
    //一切问题的开始总是那么简单,然而处理的过程有时却恰恰相反!

    Map_Que=new_map_status(NULL,map_to_string(),0);
    now_node=get_next_node();
    while(now_node!=NULL)
    {
        //探索的过程总是很乏味的,发现,判断,继续发现,继续判断,直到我们找到我们人为最好的解决方法

        develop_node(now_node);
        if (now_distance==-1 || calculate_map_string(now_node->map_string,0)<now_distance)
        {
            string_to_map(now_node->map_string);
            print_map();
            end=clock();
            printf("[%7lf] Step:%3u Distance:%2u ",(double)(end-start)/(double)CLOCKS_PER_SEC,now_node->step,calculate_map_string(now_node->map_string,0));
            now_distance=calculate_map_string(now_node->map_string,0);
        }

        if (calculate_map_string(now_node->map_string,0)==0)
        {
            if (MinStep==-1 || now_node->step<MinStep)
            {
                MinStep=now_node->step;
                end=clock();
                printf("[%7lf] Now Min Step Is %u ",(double)(end-start)/(double)CLOCKS_PER_SEC,MinStep);
            }

        }
        now_node=get_next_node();
    }
    printf(" ");
    end=clock();
    printf("[%7lf] Seeking Finished! ",(double)(end-start)/(double)CLOCKS_PER_SEC);
    printf(" ");
    if (MinStep!=-1)
    {
        now_node=Map_Que;
        while(now_node!=NULL)
        {
            //这些才是最终胜出的!

            if (calculate_map_string(now_node->map_string,0)==0)
            {
                add_child(now_node);
                while(Final!=NULL)
                {
                    string_to_map(Final->son->map_string);
                    print_map();
                    printf("Step %u Distance %u ",Final->son->step,calculate_map_string(Final->son->map_string,0));
                    last=Final;
                    Final=Final->next;
                    free(last);
                }
                printf("=============================== ");
            }
            now_node=now_node->next;
        }
    }
    //学会清理是很重要的!

    while(Map_Que!=NULL)
    {
        last=Map_Que->next;
        free(Map_Que);
        Map_Que=last;
    }
    exit(0);
}

说老实话,个人觉得OpenSUSE除了它的GRUB出彩一点,其它的都很一般。所以为了更好的利用这个很酷的启动界面,试着用它创建了Live USB和Live CD。考虑到大多数玩家喜欢Windows多一些,把所有的创建过程移植到了Windows平台。这里先把相关的工具包放出来,之后慢慢说如何启动WINPE和制作或定制Live Ubuntu。顺便把抑制的mkblfont源代码挂上来。有兴趣的朋友可以写个GUI的程序,我比较懒,而且喜欢脚本和命令行多于GUI。抱歉了。关于如何使用工具包,压缩包里有较为详细地说明。

Frankly, I think the OpenSUSE nothing better except the GRUB. So in order to take the advantage of this cool boot interface, I tried to establish my Live USB and Live CD based on it. Considering most of buddies like Windows more, I did some work to migrate the whole thing to Windows platform. Here I just release the tool kits and discuss the detail processing of booting WINPE or customerize Live Ubuntu later. BTW, I also put the source code of mkblfont for Windows here. If anyone interesting in writing a GUI tool to cover all those function would be great, since I'm lazy and preffer the script and text mode command line more than GUI. So sorry about NO GUI here. About how to use the tools pack, please reference the readme inside the zip file, it should be clarify most issues.


mkblfont<--源代码[Source Code]
tools <--工具包[Tools Pack]

Ubuntu gfxmenu中文显示的脚本

| 不指定 October 28, 2008 @ 13:32, Robin Hoo
更新了在Ubuntu上修改gfxmenu中文显示的脚本。有空的时候,将它改成Windows下可以运行的执行文件。


      
Bash语言: gfxmenu中文显示脚本
      
01 #!/bin/bash
02 DEBUG=1
03 START_DIR=`pwd`
04 ##定义图形启动包的位置
05 MESSAGE=/boot/message
06 ##定义字形生成程序位置
07 MKBLFONT=mkblfont
08 ##定义menu.lst位置
09 MENU_LST=/boot/grub/menu.lst
10 ##定义键盘映射程序位置
11 KEYMAPCHARS=/usr/share/gfxboot/bin/keymapchars
12 ##定义键盘映射表位置
13 KEYTABLES=/usr/share/gfxboot-theme-ubuntu/keytables.inc
14 ##定义临时文件位置
15 TMP_FOLD=message
16 ##定义字形所用字体
17 TTFFont=simli
18 ##定义字体目录
19 TTFPath=/usr/share/fonts/truetype/microsoft
20 ##定义界面语言
21 LANGUAGE=简体中文
22 ##定义语言ID
23 LANG_ID=zh
24 ##定义默认启动语言
25 DEF_LANG=zh_CN
26 debug_msg()
27 {
28     [ $DEBUG == 1 ] && echo "[`date +"%F %T"`] $@" >&2
29 }
30
31 install_pkg()
32 {
33     local PKG=`sudo dpkg-query -W --showformat='${Package} ' |grep $1`
34     if [ -z $PKG ]; then
35         sudo aptitude install $1 -y
36         debug_msg "安装软件包 $1"
37     else
38         debug_msg "软件包 $1 已安装"
39     fi
40 }
41 install_pkg gfxboot-theme-ubuntu
42 echo $DEF_LANG >lang
43 mkdir $TMP_FOLD 2>/dev/null
44 cd $TMP_FOLD
45 #ls -l $MESSAGE #>/dev/null 2>&1
46 if [ -e $MESSAGE ]; then
47     cat $MESSAGE |cpio -i
48 else
49     echo "抱歉没发现要修改的$MESSAGE"
50     exit
51 fi
52 echo $DEF_LANG >lang
53 if [ -e translations.$LANG_ID ]
54 then
55      echo "发现${LANGUAGE}翻译文件!"
56 else
57     echo "没有${LANGUAGE}的翻译文件,退出!"
58     exit
59 fi
60 if grep -q  $LANG_ID languages
61 then
62    echo "文件languages含有${LANGUAGE}的ID!"
63 else
64     echo $LANG_ID > tmp.txt
65     cat tmp.txt languages >languages1
66     mv -f languages1 languages
67     echo "文件languages含有${LANGUAGE}的ID!"
68 fi
69 cat *.tr translations.* $MENU_LST >tmp.txt
70 echo $LANGUAGE>> tmp.txt
71 set -x
72 $MKBLFONT -v -l 18 -p /usr/share/fonts/X11/misc
73     -c ISO-8859-15 -c ISO-8859-2 -c koi8-r
74     `$KEYMAPCHARS $KEYTABLES`
75     -t tmp.txt
76     -p $TTFPath
77     -f $TTFFont:prop=2:space_width=4:size=17:nobitmap=1:autohint=1
78     16x16.fnt >16x16.fnt.log
79 set +x
80 rm -f tmp.txt
81 mv 16x16.fnt.log $START_DIR
82 echo "备份以前文件"
83 mv $MESSAGE $MESSAGE.bck
84 ls . |cpio -o > $MESSAGE
85 cd $START_DIR
86 rm -rf $TMP_FOLD
    

分页: 1/26 第一页 1 2 3 4 5 6 7 8 9 10 下页 最后页 [ 显示模式: 摘要 | 列表 ]