Typically, you only need to execute the following command for compiling project.
bash
xmake
xmake will probe your host environment and target platform automaticly.
The default mode is release and xmake will compile all targets.
You can compile only one given target which name is 'test' for executing the follo继续阅读 »
xmake provides some api, which can detect whether exist some library functions.
```lua
target("test")
-- checks some libc functions from the header files: wchar.h and stdlib.h
add_cfuncs("libc", nil, {"wchar.h", "stdlib.h"}, "wcscat",
继续阅读 »
Introduction
This is a very simple and lightweight x86 virtual machine which can load and run the assembly code from ida pro directly.
Features
Supports cross-platform and it's able to run the x86 assembly code on linux, windows, maxosx, android and ios ...
Supports the frequently-used x86 assembly instruction (.e.g继续阅读 »
find_package
This interface refers to the design of CMake for the find_* interfaces, which finds and adds package dependencies in the project target.
lua
target("test")
set_kind("binary")
add_files("*.c")
on_load(function (target)
import("lib.detect.find_package")
target:add(find_package("继续阅读 »
最近做了一个表单,需要提交好多信息和一些图片,后台的同学说要图片随着表单一起提交。那就不能用 ajax 单张上传了~
图片的话,最多可以选8张,选中了的也可以取消掉,因为并没有传到服务器,所以删除很easy。
然后我就想到了可以用 FormData 来做,因为之前好像用过,感觉很方便。
FormData
The FormData interface provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using t继续阅读 »
What Is Google C++ Mocking Framework?
When you write a prototype or test, often it's not feasible or wise to rely on real objects entirely. A mock object implements the same interface as a real object (so it can be used as one), but lets you specify at run time how it will be used and what it should do (which methods 继续阅读 »
I had shared a precommit here which help you check your code before your commit.
If you want to deploy it on test machine even production machine, you may need this.继续阅读 »
单元测试Unit Test
很早就知道单元测试这样一个概念,但直到几个月前,我真正开始接触和使用它。究竟什么是单元测试?我想也许很多使用了很久的人也不一定能描述的十分清楚,所以写了这篇文章来尝试描述它的特征和原则,以帮助更多人。
什么是单元测试?
先来看看单元测试的定义,在维基百科英文版中可以找到Kolawa Adam在 Automated Defect Prevention: Best Practices in Software Management 一书中对单元测试的定义:
In computer programming, unit testing is a method by which individual unit继续阅读 »
Last month I have study a course on Coursera, it is called
Learning how to learn.
It is a course that teach you how to learn efficiently. I made some notes about it
and share here.
(I just list each view point which I think is important, but I think I can figure out
better way to show next time)继续阅读 »