我用以下内容构建了一个 docker 容器(全部在一个容器上):
在 localhost/phpmyadmin 上,如果我不手动设置 host 指令,则无法登录/etc/phpmyadmin/config.inc.php,例如:
$cfg['Servers'][$i]['host'] = "{$dbserver}:{$cfg['Servers'][$i]['port']}";$cfg['Servers'][$i]['host'] = $dbserver.':'.$dbport$cfg['Servers'][$i]['host'] = "{$dbserver}:3306";$cfg['Servers'][$i]['host'] = "localhost:3306";本质上,配置文件中忽略了 dbport
如果我离开$cfg['Servers'][$i]['host'] = $dbserver它就会失败。即使已$cfg['Servers'][$i]['port']设置。
文件 config.inc.php(除了主机指令之外的默认文件):
<?php
/**
* Debian local configuration file
*
* This file overrides the settings made by phpMyAdmin interactive setup
* utility.
*
* For example configuration see
* /usr/share/doc/phpmyadmin/examples/config.sample.inc.php
* or
* /usr/share/doc/phpmyadmin/examples/config.manyhosts.inc.php
* …Run Code Online (Sandbox Code Playgroud) 这纯粹是好奇心,我正在使用 cmath 函数,即 cos 等。查看 cmath 标头后,我看到了这样的事情:
inline _GLIBCXX_CONSTEXPR float
acos(float __x)
{ return __builtin_acosf(__x); }
Run Code Online (Sandbox Code Playgroud)
还有“__builtin__”,我在谷歌上找不到任何来源。我有兴趣查看他们如何实现数学函数的源代码,我的意思是我猜他们使用泰勒之类的东西,但我想看看他们是如何做到的。它是由于专有原因而隐藏还是可以找到?
我的代码是:
#include <memory>
#include <vector>
struct Core{
Core(int n){} };
int main() {
int base;
std::vector<std::unique_ptr<Core>> cores;
cores.push_back( std::move(std::unique_ptr<Core>(new Core(base))) );
cores[0].swap(std::unique_ptr<Core>(new Core(base)));
return 0;
}
Run Code Online (Sandbox Code Playgroud)
我收到这个错误:
|| === Build:Test in Release(编译器:GNU GCC编译器)=== |
在函数'int main()'错误:没有匹配函数调用'std :: unique_ptr <Core> :: swap(std :: unique_ptr <Core>)'
注意:候选人是:
注意:void std :: unique_ptr <_Tp,_Dp> :: swap(std :: unique_ptr <_Tp,_Dp>&)[with_Tp = Core; _Dp = std :: default_delete <Core>]
注意:参数1从'std :: unique_ptr <Core>'到'std :: unique_ptr <Core>&'没有已知的转换
为什么 MVVM 代表 Model - View - View Model 而不是 MVMV for Model - View Model - View 或 VVMM for View - View Model - Model
由于信息从视图到视图模型直到模型或其他方式,MVVM 是不是错误的初始化?
从那里:https : //kotlinlang.org/docs/reference/this-expressions.html#qualified
我们有这样的代码:
val funLit = lambda@ fun String.() {}
Run Code Online (Sandbox Code Playgroud)
在那里运行https://pl.kotl.in/Syah1jaIN它会编译并被无误地调用
我认为“lambda@”是一个注释,但这里的文档:https : //kotlinlang.org/docs/reference/annotations.html 指的是类似于“@word”的语法,而不是“word@”。
我知道这个问题很简单,但是很简单,我没有找到任何资源来定义什么是"支撑或平等".
那些是所有支撑或等于初始化器吗?
++++++++++++++++++++++++++++++++++++++
int foo= 42;
int foo{42};
int foo= {42};
int foo[]{41,42,43};
int foo[]={41,42,43};
struct Foo{
int data= 42;
};
Run Code Online (Sandbox Code Playgroud)
考虑到上述结构,在两种情况下都是data初始化或不是初始化:
Foo foo{42}
Foo foo= {42}
Foo foo{.data=42}
Foo foo= {.data=42}
Run Code Online (Sandbox Code Playgroud)
++++++++++++++++++++++++++++++++++++++
c++ ×3
apache ×1
built-in ×1
c++11 ×1
docker ×1
initializer ×1
kotlin ×1
mvvm ×1
mysql ×1
php ×1
phpmyadmin ×1
swap ×1
unique-ptr ×1