我正在尝试为我的网站管理员创建简单的通知系统,我只需要向每个管理员用户发送实时消息.但是当我使用firebase时,它会在每个页面上加载旧数据,并且用户可以看到来自数据库的所有消息.如果我设置limit(1),用户将在每个页面重新加载时看到最后一个通知:
var eventsList = new Firebase('https://*****-messages.firebaseio.com/');
eventsList.on('child_added', function(message) {
var message = message.val();
$.notification(message.message);
});
Run Code Online (Sandbox Code Playgroud)
如何在没有旧通知历史的情况下仅加载新邮件?
我有一些html表单,其中包含以下字段:
<input type="text" name="input[]">
<input type="text" name="input[]">
<input type="text" name="input[]">
<input type="text" name="input[]">
Run Code Online (Sandbox Code Playgroud)
我如何用django表单保存这个表单?
我有一个包含大量数据的模型,Django 创建删除确认页面很长时间。我必须跳过这个过程并在没有任何确认的情况下删除数据。我尝试了一些来自互联网的解决方案,但它不起作用 - 我仍然看到确认页面。
有谁知道怎么做?
我需要从我的Python脚本中获取PHP(Wordpress)配置文件中的一些数据.我如何解析配置数据?例如,我如何获得$ wp_version值?配置示例:
/**
* The WordPress version string
*
* @global string $wp_version
*/
$wp_version = '3.5.1';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
*
* @global int $wp_db_version
*/
$wp_db_version = 22441;
/**
* Holds the TinyMCE version
*
* @global string $tinymce_version
*/
$tinymce_version = '358-23224';
/**
* Holds the required PHP version
*
* @global string $required_php_version
*/
$required_php_version = '5.2.4';
/**
* Holds the …Run Code Online (Sandbox Code Playgroud)