- 博客(9)
- 资源 (5)
- 收藏
- 关注
原创 在数组中保存/获取 指针
原理使用memcpy 复制指针内容到数组#include <cstdio>#include <cstdlib>#include <cstring>// 测试在int数组中保存/获取 指针int main(){ int arr[10]; int *p = (int *)malloc(3 * sizeof(int)); ...
2020-03-25 11:30:37 422 1
原创 strtok注意事项
问题最近使用strtok函数分割字符串,代码异常退出,报段错误。错误代码如下#include "string.h"#include <stdio.h>int main(){ char *a = "ni hao wos s sd"; // 错误做法 // char a[] = "ni hao wos s sd"; // 正确做法 char *b = s...
2020-03-22 12:06:48 395
原创 自己动手写bootloader
自己动手写bootloader环境准备开发操作系统:Ubuntu 18.04所需软件apt install bochs bochs-x nasm build-essential写 bootloaderboot.asm 代码; filename boot.asmorg 7c00h ; bis start address; int 10 mov ax, csmo...
2020-03-08 16:55:44 378 1
原创 ubuntu 18.04 下 nasm 写hello world
hello world代码; 编译:; 1, nasm -f elf64 hello.asm 如果是32位系统则 nasm -f elf32 hello.asm; 2, gcc -no-pie hello.osection .textglobal mainmain: mov eax,4 ;4号调用 mov ebx,1 ;ebx送1表示输出 mov ecx,m...
2020-03-08 16:51:32 403
原创 java 使用spring aop/mybatis记录操作日志到数据库
maven依赖需要spring aop, 由于要用到数据库,使用mybatis-plus生成crud代码,将mybatis-plus依赖也加上 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-aop&...
2020-01-03 10:06:12 2781
原创 使用c++统计pv uv
使用c++读取日志统计pv uv使用c++读取日志统计pv uv代码代码思路使用c++读取日志统计pv uv在linux系统下通过c++读取日志文件,统计pv uv。代码main.cpp 文件如下, 执行下面命令编译g++ -o sumary main.cpp#include <iostream>#include <vector>#include <s...
2019-06-29 20:29:07 225
原创 cat 021 解析
cat 021 解析把 https://blog.csdn.net/qingfengleerge/article/details/81102854#commentBox 代码改了下,不依赖vs,去掉windows.h头文件,只使用c++标准库,使得代码可以直接使用gcc编译。代码如下:// cat021_test_1.cpp : 定义控制台应用程序的入口点。//使用C++对网络数据包进...
2019-04-29 16:43:23 3890
原创 java 获取对象路径
java 获取对象路径获取对象路径获取对象路径 public static String getObjectPath(Object obj){ try { return obj.getClass().getProtectionDomain().getCodeSource().getLocation().toURI().getPath(); ...
2019-04-04 11:05:37 1122
scala-sbt-scala编译工具
2015-06-12
css_and_html_design_patterns_source_code
2013-10-08
Pro CSS and HTML Design Patterns
2013-10-08
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人