2016-11-15 ruki
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") 继续阅读 »
2017-05-10 ruki
概述 此次更新,主要增强xmake lua插件,支持交互式命令执行(read-eval-print, REPL)以及一些稳定性问题修复。 有时候在交互模式下,运行命令更加的方便测试和验证一些模块和api,也更加的灵活,不需要再去额外写一个脚本文件来加载。 我们先看下,如何进入交互模式: ```bash 不带任何参数执行,就可以进入 $ xmake lua 进行表达式计算 1 + 2 3 赋值和打印变量值 a = 1 a 1 多行输入和执行 for _, v in pairs({1, 2, 3}) do print(v) end 1 2 3 ``` 继续阅读 »
2017-05-10 ruki
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 ``` 继续阅读 »
2020-12-07 安兴乐-siler
好久之前写过K-Means, 但写的极其丑陋,使用的时候还得用 sklearn.cluster.KMeans 包来干。最近需要手撕k-Means,自己也受不了多重for 循环这么disgusting的方式。sklearn.cluster.KMeans等包加入了相当多细节优化和向量化计算,同时也想能否用 numpy 来原生实现更高效的加速。在网上找了半天,终于看到简洁又高效的numpy 实现 了。 继续阅读 »
2014-11-14 litaotao
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 继续阅读 »
2013-06-21 Robert Zhang
分析:最直接的想法是如下代码: cpp bool on = false; for (int i = 1; i <=n; i++) if (n % i == 0) on = !on 但n最大可达数十亿,此法计算效率太低!那么能不能倒过来想:n可以被多少个不大于n的数整除?很容易给n分解质因数:more 继续阅读 »
2017-08-05 ruki
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 继续阅读 »
2013-04-20 Robert Zhang
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; } 继续阅读 »
2016-01-18 ALEX LIN
开发社区 iOS 开源代码库 http://www.code4app.com/ 苹果开发中文社区 http://www.cocoachina.com/ Github https://github.com ObjC 中国 http://objccn.io/ 歪果仁教程:Ray Wenderlich | Tutorials for iPhone / iOS Developers and Gamers http://www.raywenderlich.com/ 开发者头条,各类技术干货 http://toutiao.io 开源项目 YY作者常用第三方库整理 http://github.ibireme.com/github/list/i 继续阅读 »
2016-08-24 Klaus Ma
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 继续阅读 »