RError.com

RError.com Logo RError.com Logo

RError.com Navigation

  • 主页

Mobile menu

Close
  • 主页
  • 系统&网络
    • 热门问题
    • 最新问题
    • 标签
  • Ubuntu
    • 热门问题
    • 最新问题
    • 标签
  • 帮助
主页 / user-206336

Bitrix24's questions

Martin Hope
Bitrix24
Asked: 2020-06-28 03:33:08 +0000 UTC

如何保护照片不被下载?

  • 0

在我的项目中,重要的是照片受到保护,理想情况下,它们不能被下载。可以使用哪些保护方法?

безопасность
  • 3 个回答
  • 10 Views
Martin Hope
Bitrix24
Asked: 2020-11-17 23:36:36 +0000 UTC

分组后如何显示重复元素?

  • 0

有一个包含 a 列和 b 列的表,这两个列都是 INT 类型的。给出的请求:

select a, count(*) from t group by a

如何更改此查询以显示表中出现超过 2 次的唯一值“a”?

mysql
  • 1 个回答
  • 10 Views
Martin Hope
Bitrix24
Asked: 2020-07-20 06:46:37 +0000 UTC

将 18 到 22 之间的调用者的完整年数设置为 mysql

  • 2

我有一张桌子:

CREATE TABLE `users` (
    `id`        INT(11) NOT NULL AUTO_INCREMENT,
    `name`  VARCHAR(255) DEFAULT NULL,
    `gender`    INT(11) NOT NULL COMMENT '0 - не указан, 1 - мужчина, 2 - женщина.',
    `birth_date`    INT(11) NOT NULL COMMENT 'Дата в unixtime.',
    `phone` VARCHAR(255) DEFAULT NULL,
    PRIMARY KEY (`id`)
);

按要求:SELECT name, floor(datediff(YEAR, curdate(), birth_date)) FROM用户;提供人的姓名和年龄。

我提出一个条件:

SELECT name where  floor( datediff(curdate(), FROM_UNIXTIME(birth_date))/365 ) > 18 and  floor( datediff(curdate(), FROM_UNIXTIME(birth_date))/365 ) < 22 FROM `users` 

我收到一个错误:

1064 - 您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以在第 1 行的 'where floor( datediff(curdate(), FROM_UNIXTIME(birth_date))/365 ) > 18 和 flo' 附近使用正确的语法

我在哪里犯错?

mysql
  • 2 个回答
  • 10 Views
Martin Hope
Bitrix24
Asked: 2020-11-08 22:36:35 +0000 UTC

在对象的引用数组中查找对象之间的最短路径

  • 0

我有一组对象,它们存储彼此的链接。如果有,我需要找到从一个对象 X 到对象 Y 的最短路径(如果没有,则需要声明)。

我知道 Dijkstra 不会拉到这里。数组很大(大约 20,000,000 个对象)。如何绕过它,你会建议什么寻路算法,为什么?不仅可以为此使用本机解决方案,请,我要求您不仅提供解决方案,还提供可能有用的现有库。

python
  • 1 个回答
  • 10 Views
Martin Hope
Bitrix24
Asked: 2020-10-04 07:28:14 +0000 UTC

如何全局存储临时数据?WordPress

  • 0

我正在使用 WordPress,我需要将数据存储在某个地方以在几个不同的脚本中检索它(即一个人已经浏览了几个不同的页面)。如果可能,请举例说明如何以某种结构保存数据并检索它。谢谢!

php
  • 1 个回答
  • 10 Views
Martin Hope
Bitrix24
Asked: 2020-06-08 19:18:34 +0000 UTC

请帮我处理 Magento 日志

  • 2

我/正在使用 Magento。我安装了 ImageRecircle 插件。很可能是问题所在。它出现在日志中。我真的很想弄清楚错误是什么,或者至少找出如何检测它。感谢所有订阅的人。

exception 'Mage_Core_Exception' with message 'Invalid block type: Imagerecycle_Imagerecycle_Block_Core_Text' in TSA-UPGRADE/webroot/app/Mage.php:595
2017-04-03T15:21:24+00:00 ERR (3): Warning: file_exists(): open_basedir restriction in effect. File(/usr/lib/php/Imagerecycle/Imagerecycle/Block/Core/Text.php) is not within the allowed path(s): (/home/vinnybyr:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp) in /home/vinnybyr/public_html/app/code/core/Mage/Core/functions.php on line 145

2017-04-03T15:21:24+00:00 ERR (3): Warning: include(Enterprise/Cms/Helper/Data.php): failed to open stream: No such file or directory in /home/vinnybyr/public_html/lib/Varien/Autoload.php on line 94

2017-04-03T15:21:24+00:00 ERR (3): Warning: include(Enterprise/Cms/Helper/Data.php): failed to open stream: No such file or directory in /home/vinnybyr/public_html/lib/Varien/Autoload.php on line 94

2017-04-03T15:21:24+00:00 ERR (3): Warning: include(): Failed opening 'Enterprise/Cms/Helper/Data.php' for inclusion (include_path='/home/vinnybyr/public_html/app/code/local:/home/vinnybyr/public_html/app/code/community:/home/vinnybyr/public_html/app/code/core:/home/vinnybyr/public_html/lib:.:/usr/lib/php:/usr/local/lib/php') in /home/vinnybyr/public_html/lib/Varien/Autoload.php on line 94

2017-04-03T15:21:24+00:00 ERR (3): Warning: file_exists(): open_basedir restriction in effect. File(/usr/lib/php/Imagerecycle/Imagerecycle/Block/Core/Text.php) is not within the allowed path(s): (/home/vinnybyr:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp) in /home/vinnybyr/public_html/app/code/core/Mage/Core/functions.php on line 145

2017-04-03T15:21:25+00:00 ERR (3): Warning: include(Enterprise/Cms/Helper/Data.php): failed to open stream: No such file or directory in /home/vinnybyr/public_html/lib/Varien/Autoload.php on line 94

2017-04-03T15:21:25+00:00 ERR (3): Warning: include(Enterprise/Cms/Helper/Data.php): failed to open stream: No such file or directory in /home/vinnybyr/public_html/lib/Varien/Autoload.php on line 94

2017-04-03T15:21:25+00:00 ERR (3): Warning: include(): Failed
2017-03-24T20:49:42+00:00 ERR (3): exception 'Mage_Core_Exception' with message 'Invalid block type: Imagerecycle_Imagerecycle_Block_Core_Text' in /home/vinnybyr/public_html/app/Mage.php:595

这是堆栈跟踪。

#0 /home/vinnybyr/public_html/app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('Invalid block t...')

#1 /home/vinnybyr/public_html/app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('core/text', Array)

#2 /home/vinnybyr/public_html/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('core/text', 'stripe.js')

#3 /home/vinnybyr/public_html/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('core/text', 'stripe.js')

#4 /home/vinnybyr/public_html/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))

#5 /home/vinnybyr/public_html/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))

#6 /home/vinnybyr/public_html/app/code/local/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()

#7 /home/vinnybyr/public_html/app/code/core/Mage/Catalog/controllers/CategoryController.php(148): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()

#8 /home/vinnybyr/public_html/app/code/local/Mage/Core/Controller/Varien/Action.php(419): Mage_Catalog_CategoryController->viewAction()

#9 /home/vinnybyr/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('view')

#10 /home/vinnybyr/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))

#11 /home/vinnybyr/public_html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()

#12 /home/vinnyb
php
  • 1 个回答
  • 10 Views
Martin Hope
Bitrix24
Asked: 2020-04-24 05:31:24 +0000 UTC

使用 GMail API 时无法读取属性错误

  • 2

无法使用 GMail API。每次 GMail 都无法读取并且是一个空属性。我正在组织起来,我可以使用 YouTube API,但我无法让 Google API 工作。请帮我弄清楚我的错误。

我给出代码:

var API_KEY = 'AIzaSyBnm60DnSJ2xVsRjo-L_9Mx_mALPy4ttUY'; 
var OAUTH2_CLIENT_ID = '435367929011-rutrvfe1hp1c85ra9a7vhnmtk3q72afa.apps.googleusercontent.com';
var OAUTH2_SCOPES = [
  'https://www.googleapis.com/auth/youtube',
  'https://www.googleapis.com/auth/gmail.readonly'
];
var DISCOVERY_DOCS = ["https://www.googleapis.com/discovery/v1/apis/gmail/v1/rest"];

  var GoogleAuth;
  var SCOPE = 'https://www.googleapis.com/auth/youtube.force-ssl';
  function handleClientLoad() {
    // Load the API's client and auth2 modules.
    // Call the initClient function after the modules load.
    gapi.load('client:auth2', initClient);
  }

  function initClient() {
    // Retrieve the discovery document for version 3 of YouTube Data API.
    // In practice, your app can retrieve one or more discovery documents.
    var discoveryUrl = 'https://www.googleapis.com/discovery/v1/apis/youtube/v3/rest';

    // Initialize the gapi.client object, which app uses to make API requests.
    // Get API key and client ID from API Console.
    // 'scope' field specifies space-delimited list of access scopes.
    gapi.client.init({
        'apiKey': API_KEY,
        'discoveryDocs': [discoveryUrl],
        'clientId': OAUTH2_CLIENT_ID,
        'scope': SCOPE
    }).then(function () {
      GoogleAuth = gapi.auth2.getAuthInstance();

      // Listen for sign-in state changes.
      GoogleAuth.isSignedIn.listen(updateSigninStatus);

      // Handle initial sign-in state. (Determine if user is already signed in.)
      var user = GoogleAuth.currentUser.get();
      setSigninStatus();

      // Call handleAuthClick function when user clicks on
      //      "Sign In/Authorize" button.
      $('#sign-in-or-out-button').click(function() {
        handleAuthClick();
      }); 
      $('#revoke-access-button').click(function() {
        revokeAccess();      
      }); 
    });
  }

  function handleAuthClick() {
    if (GoogleAuth.isSignedIn.get()) {
      // User is authorized and has clicked 'Sign out' button.
      GoogleAuth.signOut();
    } else {
      // User is not signed in. Start Google auth flow.
      GoogleAuth.signIn();
    }
  }

  function revokeAccess() {
    GoogleAuth.disconnect();
  }

  function setSigninStatus(isSignedIn) {
    var isAuthorized = user.hasGrantedScopes(SCOPE);
    if (isAuthorized) {
      $('#sign-in-or-out-button').html('Sign out');
      $('#revoke-access-button').css('display', 'inline-block');
      $('#auth-status').html('You are currently signed in and have granted ' +
          'access to this app.');
    } else {
      $('#sign-in-or-out-button').html('Sign In/Authorize');
      $('#revoke-access-button').css('display', 'none');
      $('#auth-status').html('You have not authorized this app or you are ' +
          'signed out.');
    }
    gapi.client.gmail.users;
  }

  function updateSigninStatus(isSignedIn) {
    setSigninStatus();
  }
  function gmailInit()
  {
    GoogleAuth.currentUser.get();
      gapi.client.init({
          'discoveryDocs': ["https://www.googleapis.com/discovery/v1/apis/gmail/v1/rest"],
          'clientId': OAUTH2_CLIENT_ID,
          'scope': "https://www.googleapis.com/auth/gmail.readonly",
          'apiKey': API_KEY
        }).then(function(){
          gapi.client.gmail.Users.getProfile({
            'userId': 'me'
          }).then(function(response) {
            var labels = response.result.labels;
            appendPre('Labels:');

            if (labels && labels.length > 0) {
              for (i = 0; i < labels.length; i++) {
                var label = labels[i];
                appendPre(label.name)
              }
            } else {
              appendPre('No Labels found.');
            }
          });
        });

  }
$(window).load(function() {
  $('#gmail-init-button').on('click',function() {
    gmailInit();      
  });
});
javascript
  • 1 个回答
  • 10 Views
Martin Hope
Bitrix24
Asked: 2020-04-13 02:02:43 +0000 UTC

如何为重复布局模板的内容创建WordPress模块​​?

  • 0

该模块应具有三个文本字段和一个用于图片的字段。通过该模块,需要在数据库中创建几条记录(这三个字段和一张图片将存储在那里)。该模块应连接到页面并在语法上显示具有不同信息的相同块。事实上,我以前使用 Joomla,但我不知道 WordPress 是如何工作的。你能至少给出一个如何做到这一点的大概思路吗?

php
  • 1 个回答
  • 10 Views
Martin Hope
Bitrix24
Asked: 2020-03-05 02:27:50 +0000 UTC

为什么不加载 joomla! 的子菜单项?3?[关闭]

  • 0
关闭。这个问题需要澄清或补充细节。目前不接受回复。

你想改进这个问题吗?添加更多详细信息并通过编辑此帖子澄清问题。

5 年前关闭。

改进问题

菜单行为异常。第二层的子项只有在链接到第一层的父元素时才可见。这是第二次在两个独立开发的网站上发生这种情况。请告诉我!

php
  • 1 个回答
  • 10 Views
Martin Hope
Bitrix24
Asked: 2020-09-12 15:11:23 +0000 UTC

如何在 FoxPro 中创建具有所需文件名的表格?(在 SQL 中)

  • 1

应创建一个名为realizations的表。文件的名称应该是当前日期(我将通过 Visual Studio c# 获取当前日期的值)。如果数据库中的表应该称为实现,如何使用我需要的名称保存表文件?

sql
  • 2 个回答
  • 10 Views
Martin Hope
Bitrix24
Asked: 2020-09-05 01:26:49 +0000 UTC

为什么水平滚动条没有消失?

  • 1

我已经设置为<body>:

@media  only screen and (max-width: 990px) {
   overflow-x: hidden;
}

但它不起作用。这是该站点的链接。右边总是有空间。如何删除它?我附上截图来自overflow:hidden。

截屏

html
  • 1 个回答
  • 10 Views
Martin Hope
Bitrix24
Asked: 2020-09-02 02:32:56 +0000 UTC

填写网站上的字段并获取请求的结果。如何实施?

  • 0

是否可以通过 IOS 应用程序以某种方式在某个站点上填写表单,将数据发送到服务器。然后获取数据并进行处理(当然是对应输入的字段)?

示例:在图书站点的搜索字段中输入书名,然后模拟回车键,并处理搜索结果。

问题不在于数据处理。该问题涉及模拟用户操作以获得与请求相对应的数据的能力。

javascript
  • 1 个回答
  • 10 Views

Sidebar

Stats

  • 问题 10021
  • Answers 30001
  • 最佳答案 8000
  • 用户 6900
  • 常问
  • 回答
  • Marko Smith

    我看不懂措辞

    • 1 个回答
  • Marko Smith

    请求的模块“del”不提供名为“default”的导出

    • 3 个回答
  • Marko Smith

    "!+tab" 在 HTML 的 vs 代码中不起作用

    • 5 个回答
  • Marko Smith

    我正在尝试解决“猜词”的问题。Python

    • 2 个回答
  • Marko Smith

    可以使用哪些命令将当前指针移动到指定的提交而不更改工作目录中的文件?

    • 1 个回答
  • Marko Smith

    Python解析野莓

    • 1 个回答
  • Marko Smith

    问题:“警告:检查最新版本的 pip 时出错。”

    • 2 个回答
  • Marko Smith

    帮助编写一个用值填充变量的循环。解决这个问题

    • 2 个回答
  • Marko Smith

    尽管依赖数组为空,但在渲染上调用了 2 次 useEffect

    • 2 个回答
  • Marko Smith

    数据不通过 Telegram.WebApp.sendData 发送

    • 1 个回答
  • Martin Hope
    Alexandr_TT 2020年新年大赛! 2020-12-20 18:20:21 +0000 UTC
  • Martin Hope
    Alexandr_TT 圣诞树动画 2020-12-23 00:38:08 +0000 UTC
  • Martin Hope
    Air 究竟是什么标识了网站访问者? 2020-11-03 15:49:20 +0000 UTC
  • Martin Hope
    Qwertiy 号码显示 9223372036854775807 2020-07-11 18:16:49 +0000 UTC
  • Martin Hope
    user216109 如何为黑客设下陷阱,或充分击退攻击? 2020-05-10 02:22:52 +0000 UTC
  • Martin Hope
    Qwertiy 并变成3个无穷大 2020-11-06 07:15:57 +0000 UTC
  • Martin Hope
    koks_rs 什么是样板代码? 2020-10-27 15:43:19 +0000 UTC
  • Martin Hope
    Sirop4ik 向 git 提交发布的正确方法是什么? 2020-10-05 00:02:00 +0000 UTC
  • Martin Hope
    faoxis 为什么在这么多示例中函数都称为 foo? 2020-08-15 04:42:49 +0000 UTC
  • Martin Hope
    Pavel Mayorov 如何从事件或回调函数中返回值?或者至少等他们完成。 2020-08-11 16:49:28 +0000 UTC

热门标签

javascript python java php c# c++ html android jquery mysql

Explore

  • 主页
  • 问题
    • 热门问题
    • 最新问题
  • 标签
  • 帮助

Footer

RError.com

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

帮助

© 2023 RError.com All Rights Reserve   沪ICP备12040472号-5