Recently, xmake's description syntax has been enhanced to support two different grammar styles at the same time.
The set-add style
The key-val style
The set-add style
This is xmake's classic style, for example:
lua
target("test")
set_kind("static")
add_defines("DEBUG")
add_files("src/*.c", "test/*.cpp")
继续阅读 »
Introduction
xmake lua has supported REPL(read-eval-print), we can write and test script more easily now.
Enter interactive mode:
```bash
$ xmake lua
1 + 2
3
a = 1
a
1
for _, v in pairs({1, 2, 3}) do
print(v)
end
1
2
3
```继续阅读 »
1. 直接上正文
正文就是,关于这点,SO已经有多答案了,下面我引用一下投票最多的答案。
Trunk:would be the main body of development, originating from the start of the project until the present.
Branch: will be a copy of code derived from a certain point in the trunk that is used for applying major changes to the code while preserving the integrity of the 继续阅读 »
分析:最直接的想法是如下代码:
cpp
bool on = false;
for (int i = 1; i <=n; i++)
if (n % i == 0)
on = !on
但n最大可达数十亿,此法计算效率太低!那么能不能倒过来想:n可以被多少个不大于n的数整除?很容易给n分解质因数:more继续阅读 »
This release introduces a number of new feature updates, as detailed in Some new features of xmake v2.1.5.
If you want to known more usage, please see online documents。
Source code: Github, Gitee.
New features
#83: Add add_csnippet and add_cxxsnippet into option for detecting some compiler features.
#83: Add user e继续阅读 »
more
```cpp
include
include
using namespace std;
typedef long long ll_t;
bool load_input(vector & s) {
s.clear();
int n;
if (!(cin >> n))
return false;
for (int i = 0; i < n; i++) {
ll_t k;
if (!(cin >> k))
return false;
s.push_back(k);
}
return true;
}继续阅读 »
When looking at container orchestration platforms, open-source communities have produced a number of viable options including Kubernetes, Marathon-Mesos, or Docker Swarm. Kubernetes stands out as a popular choice amongst many users looking to run cloud-native on-line workloads. It has built-in support for a number of u继续阅读 »