上一页 1 2 3 4 5 6 7 ··· 10 下一页
摘要: 当按下一个按钮时,有两种事件促发的方式,一种是通过回调,一种是通过事件监听。 回调: xml中: 只要设置android:onclick="回调函数名字" '主函数中重写回调函数即可。 事件监听: 第一种: 通过创建一个类,该类实现监听的接口: public class mylistener imp 阅读全文
posted @ 2020-12-14 13:20 sunshine_gzw 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 两个活动之间的跳转要通过intent来进行,intent跳转分为隐式的和显示的。 首先xml中定义Button,通过按下按钮实现回调,在回调函数中进行相应intent设置。 <Button android:id="@+id/btn1" android:layout_width="wrap_conte 阅读全文
posted @ 2020-12-14 13:12 sunshine_gzw 阅读(155) 评论(0) 推荐(0) 编辑
摘要: //去除左边空格void TrimLeft(char* str) { if (*str == ' ')return; char* t = str; while (*t == ' ')t++; while (*str++ = *t++); } //去除右边空格 void TrimRight(char* 阅读全文
posted @ 2020-12-10 16:20 sunshine_gzw 阅读(232) 评论(0) 推荐(0) 编辑
摘要: char* mystrcpy(char* str_one,const char* str_two) { char* tmp = str_one; while (*str_one++ = *str_two++)return tmp; } char* mystrcat(char* str_one,con 阅读全文
posted @ 2020-12-10 12:54 sunshine_gzw 阅读(177) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/cpcpcp123/article/details/108885922 https://liruzhen.blog.csdn.net/article/details/81843468?utm_medium=distribute.pc_relevant.no 阅读全文
posted @ 2020-11-30 14:59 sunshine_gzw 阅读(96) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include<string.h> #include<stdlib.h> #define PRINT_ERROR_FILE(e)\ do\ {\ if(e==NULL)\ {\ printf("打开文件失败!\n");\ exit(-1);\ }\ }whil 阅读全文
posted @ 2020-11-22 11:11 sunshine_gzw 阅读(538) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/weixin_45263548/article/details/93846505 阅读全文
posted @ 2020-11-18 12:10 sunshine_gzw 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 首先看一下效果: 接下来具体分析一下: 第一步划分段,首先是数据段:来保存字符串“welcome to masm!”。 data segment db 'welcome to masm!' db 00000010B ;1 db 00100100B ;2 db 01110001B ;3 data en 阅读全文
posted @ 2020-10-27 12:17 sunshine_gzw 阅读(154) 评论(0) 推荐(0) 编辑
摘要: shm_write.c: #include<stdio.h> #include<stdlib.h> #include <stdlib.h> #include <unistd.h> #include <sys/file.h> #include <sys/mman.h> #include <sys/wa 阅读全文
posted @ 2020-10-18 19:33 sunshine_gzw 阅读(154) 评论(0) 推荐(0) 编辑
摘要: my_semqueue_send.c: #include<stdio.h> #include<errno.h> #include<mqueue.h> #include<fcntl.h> #include<stdlib.h> #include<string.h> #include<unistd.h> 阅读全文
posted @ 2020-10-18 16:29 sunshine_gzw 阅读(104) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 10 下一页