如果设备是英文的,我如何发送通知并发送其他所有语言的通知?
我试图让两个不同的观众,但两个观众都是空的。
我无法使用-std = c ++ 17进行编译,我得到了:
error: invalid value 'c++17' in '-std=c++17'
Run Code Online (Sandbox Code Playgroud)
但是我更新了Xcode和clang。
我的Clang版本是:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin`
Run Code Online (Sandbox Code Playgroud)
我加载了最新的标头,如可选的,我必须做
#include <experimental/optional>
Run Code Online (Sandbox Code Playgroud)
代替
#include <optional>
Run Code Online (Sandbox Code Playgroud) 我想知道文件是目录还是带有 stat 的常规文件:
#define _DEFAULT_SOURCE
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
int is_regular_file(const char *path)
{
struct stat path_stat;
stat(path, &path_stat);
return S_ISREG(path_stat.st_mode);
}
Run Code Online (Sandbox Code Playgroud)
我在 Mac 和 Linux 上尝试,当我打印 S_ISREG(path_stat.st_mode) 总是等于 1 并且 path_stat.st_mode 总是等于 16877。
我使用 Django 和 VueJs。
我尝试在 Django 模板中使用 Vue,但是当尝试从我的脚本中显示数据时,什么也没有出现。
这是我的 html 文件:
{% load static %}
<body>
<p>No polls are available.</p>
<div id="app">
{{message}}
</div>
<script src="{% static "app.js" %}" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.16/vue.js">
</script>
</body>
Run Code Online (Sandbox Code Playgroud)
在我的 app.js 中:
new Vue({
el: '#app',
data: {
message: 'Hello Vue!'
}
})
Run Code Online (Sandbox Code Playgroud)
我的脚本已加载,但您好 Vue!不会出现。