自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(15)
  • 收藏
  • 关注

原创 原生ajax发送请求报文.

工具:VScode,node,以及VScode内部下载express插件,浏览器启动插件(运行html)通过终端输入命令express npm install express -g然后输入npm i express --save.写好代码后,在相应的目录通过node server.js启动服务端再从html上发送请求,我的html中如果要查看是否发送成功,在html运行后的网页上按F12即可观看交互结果.__________当看不明白时,上哔哩哔哩搜索尚硅谷AJAX,老师讲的挺明白.发送GET

2021-07-18 11:30:24 117 1

原创 Android Studio---发送通知.

主要部分:NotificationManager类:通知栏管理,通过该类才能发送通知.NotificationManager mNotificationManager=(NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);//获取状态通知栏管理mNotificationManager.notify(id,NotificationCompat.Builder的一个实例);//发送通知mNotificationManage

2020-05-21 19:36:16 1747

原创 AndroidStudio---播放音频.

**主要部分:**MediaPlayer类的使用.MediaPlayer类是播放音频的主要类,通过设置MediaPlayer的以下方法能使音频播放.MediaPlayer = new mediaPlyaer();//实例化mediaPlayer.getDataResourse(该出填入音频的路径);//确定播放的音频文件mediaPlayer.prepare();//播放器进入准备状态mediaPlayer.setOnPreparedListener();//为了避免还没有装载完成就调用sta

2020-05-20 20:19:53 2858

原创 AndroidStudio---startActivityForResult();

目的:使用startActivityForResult()将另一个活动的数据传回.总结:记住startAcitivityForResult的用法.如何存数据,如何取数据.MainActivity.java:package com.example.helloworld7;import android.content.Intent;import android.os.Bundle;impo...

2020-04-12 16:03:28 765

原创 forks代码分析

forks代码在最下面.该文章主要针对fork()函数的分析首先简述一下fork()函数的特性:调用一次,返回两次,父进程中返回子进程的ID,创建的子进程中返回的为0.从fork/*forks.c - Examples of Unix process control*/#include <stdlib.h>#include <stdio.h>#includ...

2019-12-08 16:24:12 323

原创 系统I/O代码分析

csapp文件在最下方.先来看cpfile.c文件中的代码:在这里插入代码片/* $begin csapp.c */#include “csapp.h”/**************************Error-handling functions*************************// $begin errorfuns // $begin unixerr...

2019-12-08 16:23:47 129

原创 链接

本次主要查看.o文件首先看sum.c文件中的代码汇编后产生的.o文件:

2019-12-08 16:23:11 164

原创 sq.c代码体会

#include <stdio.h>#include <stdlib.h>int sq(int x) { return x*x;}int main(int argc, char *argv[]) { int i; for (i = 1; i < argc; i++) { int x = atoi(argv[i]); int sx...

2019-05-30 23:10:47 118

原创 bufdemo.c代码分析

/* Demonstration of buffer overflow */#include <stdio.h>#include <stdlib.h>/* Implementation of library function gets() */char *gets(char *dest){ int c = getchar(); char *p = des...

2019-05-30 23:09:24 85

原创 测试电脑内存

#include <stdio.h>#include <stdlib.h>int recurse(int x) { int a[1<<15]; /* 4 * 2^15 = 64 KiB */ printf("x = %d. a at %p\n", x, a); a[0] = (1<<14)-1; a[a[...

2019-05-30 22:57:26 327

原创 show_bytes代码分析

/* show-bytes - prints byte representation of data *//* $begin show-bytes */#include <stdio.h>/* $end show-bytes */#include <stdlib.h>#include <string.h>/* $begin show-bytes */...

2019-05-30 22:50:30 290

原创 struct.c

#include <stdio.h>#include <stdlib.h>typedef struct { int a[2]; double d;} struct_t;double fun(int i) { volatile struct_t s; s.d = 3.14; s.a[i] = 1073741824; /* P...

2019-05-30 21:45:05 69

原创 locate.c代码分析

#include <stdlib.h>#include <stdio.h>#include <unistd.h>static void show_pointer(void *p, char *descr) { // printf("Pointer for %s at %p\n", descr, p); printf("%s\t%p\...

2019-05-29 15:21:08 153

原创 hexify.c代码分析

#include <stdio.h>#include <stdlib.h>int main(int argc, char *argv[]) { int i; for (i = 1; i < argc; i++) { unsigned long dig = strtoul(argv[i], NULL, 16); putchar((char) di...

2019-05-28 22:47:42 129

原创 fsum.c代码分析

#include <stdio.h>#include <stdlib.h>#include <string.h>#define BUFSIZE 256int main(int argc, char *argv[]) { char prefix[BUFSIZE]; char next[BUFSIZE]; int i; float...

2019-05-28 13:15:49 120

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除