#StackBounty: #bash #ubuntu #ssh #arch-linux #vim Why can't I use tab for autocompletion in neovim over SSH?

Bounty: 50

When used locally on arch I can easily use tab for auto completion in vim when e.g. filling in a path with deoplete. If I SSH to this computer from my laptop then tab still works for completion. But if I SSH from this computer to an Ubuntu 18.04 (or any version I think) machine then when I type tab it simply inserts a tab. What is causing this issue and how can I fix it so I can use tab over SSH when connected to an Ubuntu server?

All machines I mentioned are also running the exact same vimrc and are all using neovim.


Get this bounty!!!

#StackBounty: #reactjs #react-final-form Clear a field's value on input clear in react-final-form

Bounty: 50

I’m using a custom component with react-final-form. On input change it sets the value to the address field. But when the input is cleared it doesn’t update the value of the field. So I’m trying to do it with form mutators.

I have already added a mutator for clearing the field:

mutators={{
  clear: ([address], state, { changeValue }) => {
    changeValue(state, "address", () => undefined);
  }
}}

I tried to add it to my custom onChange function, but it doesn’t work.

onChange={event =>
  props.input.onChange !== undefined
    ? props.input.onChange({ value: event })
    : form.mutators.clear
}

Or maybe this can be done without mutators at all? I would really appreciate your help. Here is a live example (clearing the field works only on the button click as onClick={form.mutators.clear}).


Get this bounty!!!

#StackBounty: #robots.txt #cms #mediawiki #validation #custom-variables Refer to a MediaWiki website's domain in robots.txt by a va…

Bounty: 50

I have a website (built with MediaWiki 1.33.0 CMS) which contains a robots.txt file.
In that file there is one line containing the literal domain of that site:

Sitemap: https://example.com/sitemap/sitemap-index-example.com.xml

I usually prefer to replace literal domain referrals with a variable value call that will somehow (depends on the specific case) will be changed in execution to the value which is the domain itself.

An example to a VVC would be a Bash variable substitution.


Many CMSs have a global directives file which usually contains the base address of the website:
In MediaWiki 1.33.0 this file is LocalSettings.php which contains the base address in line 32:

$wgServer = "https://example.com";

How could I call this value with a variable value call in robots.txt?
This will help me avoid confusion and malfunction if the domain of the website is changed; I wouldn’t have to change the value manually there as well.


Get this bounty!!!

#StackBounty: #bash #ubuntu #ssh #arch-linux #vim Why can't I use tab for autocompletion in neovim over SSH?

Bounty: 50

When used locally on arch I can easily use tab for auto completion in vim when e.g. filling in a path with deoplete. If I SSH to this computer from my laptop then tab still works for completion. But if I SSH from this computer to an Ubuntu 18.04 (or any version I think) machine then when I type tab it simply inserts a tab. What is causing this issue and how can I fix it so I can use tab over SSH when connected to an Ubuntu server?

All machines I mentioned are also running the exact same vimrc and are all using neovim.


Get this bounty!!!

#StackBounty: #robots.txt #cms #mediawiki #validation #custom-variables Refer to a MediaWiki website's domain in robots.txt by a va…

Bounty: 50

I have a website (built with MediaWiki 1.33.0 CMS) which contains a robots.txt file.
In that file there is one line containing the literal domain of that site:

Sitemap: https://example.com/sitemap/sitemap-index-example.com.xml

I usually prefer to replace literal domain referrals with a variable value call that will somehow (depends on the specific case) will be changed in execution to the value which is the domain itself.

An example to a VVC would be a Bash variable substitution.


Many CMSs have a global directives file which usually contains the base address of the website:
In MediaWiki 1.33.0 this file is LocalSettings.php which contains the base address in line 32:

$wgServer = "https://example.com";

How could I call this value with a variable value call in robots.txt?
This will help me avoid confusion and malfunction if the domain of the website is changed; I wouldn’t have to change the value manually there as well.


Get this bounty!!!

#StackBounty: #android What is the correct way to exclude a selected preference file from full backup? I'm getting "is not in …

Bounty: 500

I have some preference data, which should not be backup as they are not valid across different devices.

These are my Manifest.xml and backup rule file.

Manifest.xml

<application
    android:name=".WeNoteApplication"
    android:backupAgent="com.yocto.wenote.auto_backup.CustomBackupAgent"
    android:fullBackupOnly="true"
    android:allowBackup="true"
    android:fullBackupContent="@xml/my_backup_rules"

my_backup_rules.xml

<?xml version="1.0" encoding="utf-8"?>
<full-backup-content>
    <include domain="sharedpref" path="com.yocto.wenote_preferences.xml" />

    <exclude domain="sharedpref" path="com.yocto.wenote.backup.Backuper.xml" />
</full-backup-content>

I want to explicitly exclude preference with name “com.yocto.wenote.backup.Backuper”

I’m getting the following error from IDE

enter image description here

com.yocto.wenote.backup.Backuper.xml is not in an included path

May I know why it is so? How can I certainly exclude selected preference XML file from being backup-ed?

A similar issue was raised before : Android full backup: "file.xml is not in an included path" But, there are no solution.


Get this bounty!!!

#StackBounty: #php #iis #windows #iis8 #web-platform-installer PHP 7.3 doesn't show in Web Platform Installer (WPI) in IIS 8.5

Bounty: 100

I have 3 Windows servers, two of them are Windows Server 2012 R2 – IIS 8.5 and the other is Windows Server 2012 – IIS 8.0.

I wanted to update to PHP 7.3.x automatically through the Web Platform Installer, but in both R2 boxes with IIS 8.5 there appears no version of PHP 7.3.x in WPI, While on the IIS 8.0 box, PHP 7.3.7 appears on WPI.

Does anyone why doesn’t PHP 7.3.x appears in the IIS 8.5 WPI? If so, will it at some point? Must I do something?


Get this bounty!!!

#StackBounty: #php #apache #eventsource Server Side Events in php send all events at once at the end

Bounty: 100

I have this code:

<?php

class Events {
    function __construct($fn, $options=array()) {
        $settings = array_merge(array(
            'headers' => array(
                'Content-Type' => 'text/event-stream',
                'Cache-Control' => 'no-cache',
                'Connection' => 'keep-alive'
            ),
            'retry' => 2000
        ), $options);
        foreach($settings['headers'] as $header => $value) {
            header("$header: $value");
        }
        $lastId = intval(isset($_SERVER["HTTP_LAST_EVENT_ID"]) ? $_SERVER["HTTP_LAST_EVENT_ID"] : 0);
        echo ":" . str_repeat(" ", 2048) . "n";
        echo "retry: " . $settings['retry'] . "n";
        $id = $lastId;
        $i = 0;
        foreach ($fn($id) as $value) {
            echo "id:" . $id++ . "n";
            echo "data: " . $value . "nn";
            ob_flush();
            flush();
            if ($i++ == 10) {
                break;
            }
        }
    }
}
if (isset($_SERVER['HTTP_ACCEPT']) && preg_match("%text/event-stream%", $_SERVER['HTTP_ACCEPT'])) {

    new Events(function($id) {
        while(true) {
            $array = array("Foo", "Bar", "Baz", "Quux");
            yield json_encode(array("message" => $array[array_rand($array)]));
            sleep(1);
        }
    });
} else { ?><!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title>Leash</title>
    <meta name="Description" content=""/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    https://code.jquery.com/jquery-3.1.1.min.js
    
var source = new EventSource("/EventSource.php");
source.addEventListener("message", function(message) {
    console.log(JSON.parse(message.data).message);
});
    
    <body>
        <textarea></textarea>
    </body>
</html><?php } ?>

it work locally on wamp server but it don’t on my shared hosting, I have this in php info:

Server API          CGI/FastCGI

Directive           Local Value    Master Value
output_buffering    4096           4096

and I’m not able to change it, I’ve try to add ob_start() to my script also ini_set('output_buffering', 0) and removing ob_flush but that didn’t help.

I’ve also try to set output_buffering to 0 in .user.ini for directory and the php info show that Local Value is 0 but server side events still don’t work, I get all events all at once and the developer tools say (pending) with empty type until it finish after 10 seconds.

Developer tools

Anybody know how to fix this?

EDIT:

I’ve again try to run the code, but it give same results. Gzip is not turn on but the messages are showing at the end.

I’ve tried:

  • add header 'X-Accel-Buffering' => 'no'
  • also adding echo "event:". $event ."n";

without success.

I was looking at Server-side PHP event page not loading when using while loop but the solution didn’t work, the code give same error as OP had (he don’t have much rep so he’s probably not active on SO), mine at least showing the events but I’m breaking the loop, his code have infinite loop.

This are headers sent by the server (Fedora):

Cache-Control: no-cache
Connection: keep-alive, Keep-Alive
Content-Type: text/event-stream;charset=UTF-8
Date: Tue, 17 Sep 2019 07:40:44 GMT
Keep-Alive: timeout=5, max=92
Server: Apache/2.4.41 (Fedora) OpenSSL/1.1.1c
Transfer-Encoding: chunked
X-Accel-Buffering: no
X-Powered-By: PHP/7.2.22

The same happen on simple code from http://demo.howopensource.com/sse/


Get this bounty!!!

#StackBounty: #php #iis #windows #iis8 #web-platform-installer PHP 7.3 doesn't show in Web Platform Installer (WPI) in IIS 8.5

Bounty: 100

I have 3 Windows servers, two of them are Windows Server 2012 R2 – IIS 8.5 and the other is Windows Server 2012 – IIS 8.0.

I wanted to update to PHP 7.3.x automatically through the Web Platform Installer, but in both R2 boxes with IIS 8.5 there appears no version of PHP 7.3.x in WPI, While on the IIS 8.0 box, PHP 7.3.7 appears on WPI.

Does anyone why doesn’t PHP 7.3.x appears in the IIS 8.5 WPI? If so, will it at some point? Must I do something?


Get this bounty!!!

#StackBounty: #bash #ubuntu #ssh #arch-linux #vim Why can't I use tab for autocompletion in neovim over SSH?

Bounty: 50

When used locally on arch I can easily use tab for auto completion in vim when e.g. filling in a path with deoplete. If I SSH to this computer from my laptop then tab still works for completion. But if I SSH from this computer to an Ubuntu 18.04 (or any version I think) machine then when I type tab it simply inserts a tab. What is causing this issue and how can I fix it so I can use tab over SSH when connected to an Ubuntu server?

All machines I mentioned are also running the exact same vimrc and are all using neovim.


Get this bounty!!!