如果它不存在,我一直在尝试在数据库中插入一条记录,这是查询:
insert into evt(e_id, t_id)
values( '1597', '4')
where not exists( select id from evt where e_id = '4' and t_id = '1597');
Run Code Online (Sandbox Code Playgroud)
该查询返回以下错误:
ERROR 1064 (42000):您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以了解在“where not exists( select id from evt where e_id = '4' and t_id = ' at line 1
我不明白为什么它不起作用
我需要阻止来自某些国家/地区的某些 IP,但我只得到起始 IP 和结束 IP,如下所示:
11.22.33.44 - 11.22.35.200
Run Code Online (Sandbox Code Playgroud)
我想计算子网,如下所示:
(not accurate)
11.22.33.44/14
Run Code Online (Sandbox Code Playgroud)
如何在 Python 中确定给定 IP 地址范围的子网?
string Farfallino::decode(string buff) {
string stringa;
size_t pos;
while(1) {
while(pos = (buff.find("afa"))) {
buff.erase(pos, 3);
buff.insert(pos, "a");
}
while(pos = (buff.find("efe"))) {
buff.erase(pos, 3);
buff.insert(pos, "e");
}
while(pos = (buff.find("ifi"))) {
buff.erase(pos, 3);
buff.insert(pos, "i");
}
while(pos = (buff.find("ofo"))) {
buff.erase(pos, 3);
buff.insert(pos, "o");
}
while(pos = (buff.find("ufu"))) {
buff.erase(pos, 3);
buff.insert(pos, "u");
}
}
return stringa;
}
Run Code Online (Sandbox Code Playgroud)
我试图擦除传递给函数的字符串中的每个"afa""efe""ifi""ofo"和"ufu",但它给了我这个错误.我不知道我做错了什么..
什么是一些好的c ++框架?
我对qt感到很兴奋,我进入了页面,"哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇
显然许可证已经更改,您必须共享您的源代码才能免费使用该框架.
我现在分享我的代码没有问题,但如果将来我想做一些接近采购的东西我必须购买许可证,你必须联系他们知道价格.
我真的很兴奋,我尝试了MFC,但它很复杂/弃用,并且正在寻找将来会使用的东西..
我该怎么做?整整一天我一直在寻找解决方案:(它在c ++中,所有问题都在标题中,谢谢
if(fp.is_open())
{
while(getline(fp, buff))
{
if(buff.length() == lung)
{
// check if the characters are in the string
while(found != string::npos)
{
cout << i << "\r";
for(int x = 0; x < buff.length(); ++x)
{
found = lettere_possibili.find(buff[x]);
if(found == string::npos)
{
continue;
}
}
++i;
}
j = 0;
}
++k;
}
fp.close();
}
Run Code Online (Sandbox Code Playgroud) 在我的开发服务器上,一切都很好,我通过表单上传的图像被转换
Image::make($img)->encode('webp');
Run Code Online (Sandbox Code Playgroud)
当我去检查它时,它是完美的.
在我的生产服务器上,事情有点不同,例如,如果我上传一个方形图像(完全红色),在编码后我最终得到一个褐色/金色图像和其他图像我最终得到一个空白区域.
由于正在创建图像,我认为编码时存在问题,可能是我错过了一些配置.
dev服务器上的GD库版本为2.4.1,生产版本为2.1.1
所有东西都在Ubuntu 17.10上运行,开发时间为16.04.
Laravel版本5.5
编辑
开发和生产方面的PHP 7.0版
编辑2
这是出现的那种形象