Reading does not work when measure is not called often

Here's a simple example to reproduce this issue on an Arduino Nano, with a DHT type 11 sensor attached to pin D5.
#include <DHT_Async.h>

DHT_Async dhtSensor(5, DHT_TYPE_11);

void setup()
{
    Serial.begin(9600);
}

int i = 0;

void loop()
{
    i++;

    float temperature;
    float humidity;
    if (dhtSensor.measure(&temperature, &humidity))
    {
        Serial.println();
        Serial.print("Got Temperature: ");
        Serial.print(temperature);
        Serial.println(" degC");
    }
    else
    {
        Serial.print(i); Serial.print(" ");
    }
    delay(100);
}

If you remove the delay(100);, you get something like this
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
Got Temperature: 23.70 degC
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
Got Temperature: 23.70 degC
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281
Got Temperature: 23.70 degC

But with the delay(100); there, you only get one line of ever-increasing numbers (i.e. "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 " and so on) at a rate of close to 10 numbers per second, but you never get any measurement values.
Replacing the delay(100) with the following code also does not help.
auto startTime = millis();
while (millis() - startTime < 100) { }

If seems that if measure is not called often enough, reading the sensor doesn't work. In my case, I can't guarantee my that the code gets to calling measure often enough. I see some timing stuff in DHT_Async.cpp that happens across multiple calls to measure, but those are only a minimum delay, not a maximum. The part where the values are actually read (readData) happens within one call to measure, so I'm not sure why this happens.

Dear,
I added the sync method if you don't want to be asynchronous and do some other checking logic.
and above all, I have added automatic checking that if the program runs too long, it will automatically switch to the synchronization mechanism.
1.0.4 new version

Sugar,
I've finally had time to do some testing. As far as I can tell, you have some unnecessary parts in your sequence. Here's how it should work according to the DHT11 datasheet I have:

With "pull high" I mean pinMode(..., INPUT) and either using an external pull-up to pull the bus high, or use digitalWrite(..., HIGH) to use the MCU's internal pull-up, (or use both). With "drive high/low" i mean pinMode(..., OUTPUT), i.e. driving the pin high/low with low impedance.
Note that the datasheet is a bit misleading in a detail:

These transitions are not caused by the MCU changing the pin state, but by the DHT. As such, these lines should be beige, not black.
Here's your current implementation:

And my thoughts:

Minor point: During idle (from the constructor and after completing a read) you pull the bus high. It probably won't make a difference in practice, but since the purpose of holding the bus high is to keep the DHT idle, it seems sensible to me to drive the bus high, instead of just pulling it.
DHT_BEGIN_MEASUREMENT is unnecessary. That step doesn't do anything other than setting dhtState to DHT_BEGIN_MEASUREMENT_2, so you can immediately call readAsync (through measure) again to advance by one more step. Similarly, once the COOLDOWN_TIME is elapsed, the step DHT_COOLDOWN sets dhtState to DHT_IDLE, so you can immediately call readAsync twice again.
With DHT_BEGIN_MEASUREMENT_2, you pull the bus high for at least 250ms, which, as far as I can tell, is unnecessary. The bus is already pulled high (either from the constructor, or from the end of the last transmission), so pulling it high again doesn't do anything. Also, you already have the COODOWN_TIME, so there is no point in having an additional delay here.

The 20ms delay is what caused problems for me. The sensor doesn't respond properly if it's significantly longer than 20ms, which is exactly what happened between two calls of measure in my project. I don't see why the sensor would be so particular about this duration, and the datasheet doesn't specify a maximum time either, but whatever. I just replaced this with a fixed delay(20) in my project and that works fine.
I'm not sure whether 20ms of being able to do other stuff while waiting is worth the possible trouble caused by taking too long between calls; that's a design decision you have to make. But if you deem it useful enough, you should restructure your API to make it more clear which delay is happening (Start signal or cooldown) and that the start signal timing is critical.
Also a note about the cooldown:
It's probably a good idea to make this delay configurable (via a constructor parameter). In my case, even 100ms was well enough to get the sensor to respond (though I can't make any promises to the accuracy of the readings). But even the datasheet's specified "Sampling period at intervals should be no less than 1 second." is much shorter than your 2 seconds.

Hi all,
I have the same problems when slow-sampling a DHT22 sensor (about 5Hz).
@Niko-O, do you have your code available? I would like to test it in my application.

@xopxe Sure. I adapted it heavly for my specific project and I didn't take care to make the code particularly easy to use for others. YMMV.
u8, u16, u32, etc. are unsigned 8/16/32/etc bit integers. Likewise s8 for signed.
enum class DhtType : u8
{
    Type11 = 0,
    Type12 = 1,
    Type21 = 2,
    Type22 = 3
};

class DisableInterruptsGuard
{
    public:
        DisableInterruptsGuard()
        {
            noInterrupts();
        }

        ~DisableInterruptsGuard()
        {
            interrupts();
        }
};

class DhtSensor
{

    private:
        u8 pinNumber;
        DhtType sensorType;
        u8 pinBitMask;
        u8 pinPort;
        u32 maxCycles;

    public:
        DhtSensor(u8 pinNumber, DhtType sensorType)
            : pinNumber(pinNumber),
              sensorType(sensorType),
              pinBitMask(digitalPinToBitMask(pinNumber)),
              pinPort(digitalPinToPort(pinNumber))
        {
            maxCycles = microsecondsToClockCycles(1000);
            pinMode(pinNumber, INPUT);
            digitalWrite(pinNumber, HIGH);
        }

        bool measure(float* temperature, float* humidity)
        {
            u8 data[5];
            if (!readData(data))
            {
                return false;
            }
            *temperature = getTemperature(data);
            *humidity = getHumidity(data);
            return true;
        }

    private:
        bool readData(u8 data[5])
        {
            // Send start signal.
            digitalWrite(pinNumber, LOW);
            pinMode(pinNumber, OUTPUT);
            delay(20);

            u16 cycles[80];

            {
                volatile DisableInterruptsGuard interrupt;

                // End the start signal by setting data line high for 40 microseconds.
                digitalWrite(pinNumber, HIGH);
                delayMicroseconds(40);

                // Now start reading the data line to get the value from the DHT sensor.
                pinMode(pinNumber, INPUT);
                // Delay a bit to let sensor pull data line low.
                delayMicroseconds(10);

                // First expect a low signal for ~80 microseconds followed by a high signal
                // for ~80 microseconds again.
                if (expectPulse(LOW) == 0) {
                    return false;
                }
                if (expectPulse(HIGH) == 0) {
                    return false;
                }

                // Now read the 40 bits sent by the sensor.  Each bit is sent as a 50
                // microsecond low pulse followed by a variable length high pulse.  If the
                // high pulse is ~28 microseconds then it's a 0 and if it's ~70 microseconds
                // then it's a 1.  We measure the cycle count of the initial 50us low pulse
                // and use that to compare to the cycle count of the high pulse to determine
                // if the bit is a 0 (high state cycle count < low state cycle count), or a
                // 1 (high state cycle count > low state cycle count). Note that for speed all
                // the pulses are read into a array and then examined in a later step.
                for (int i = 0; i < 80; i += 2) {
                    cycles[i] = expectPulse(LOW);
                    cycles[i + 1] = expectPulse(HIGH);
                }

                /* Timing critical code is now complete. */
            }

            digitalWrite(pinNumber, HIGH);
            pinMode(pinNumber, INPUT);

            // Inspect pulses and determine which ones are 0 (high state cycle count < low
            // state cycle count), or 1 (high state cycle count > low state cycle count).
            data[0] = data[1] = data[2] = data[3] = data[4] = 0;

            for (int i = 0; i < 40; ++i) {
                u32 low_cycles = cycles[2 * i];
                u32 high_cycles = cycles[2 * i + 1];
                if ((low_cycles == 0) || (high_cycles == 0)) {
                    return false;
                }
                data[i / 8] <<= 1;
                // Now compare the low and high cycle times to see if the bit is a 0 or 1.
                if (high_cycles > low_cycles) {
                    // High cycles are greater than 50us low cycle count, must be a 1.
                    data[i / 8] |= 1;
                }
                // Else high cycles are less than (or equal to, a weird case) the 50us low
                // cycle count so this must be a zero.  Nothing needs to be changed in the
                // stored data.
            }

            // Check we read 40 bits and that the checksum matches.
            if (data[4] == ((data[0] + data[1] + data[2] + data[3]) & 0xFF)) {
                return true;
            } else {
                return false;
            }
        }

        float getTemperature(u8 data[5])
        {
            float f = NAN;

            switch (sensorType)
            {
                case DhtType::Type11:
                    f = data[2];
                    if (data[3] & 0x80)
                    {
                        f = -1 - f;
                    }
                    f += (data[3] & 0x0f) * 0.1;
                    break;

                case DhtType::Type12:
                    f = data[2];
                    f += (data[3] & 0x0f) * 0.1;
                    if (data[2] & 0x80)
                    {
                        f *= -1;
                    }
                    break;

                case DhtType::Type21:
                case DhtType::Type22:
                    f = ((u16) (data[2] & 0x7F)) << 8 | data[3];
                    f *= 0.1;
                    if (data[2] & 0x80)
                    {
                        f *= -1;
                    }
                    break;
            }

            return f;
        }

        float getHumidity(u8 data[5])
        {
            float f = NAN;

            switch (sensorType)
            {
                case DhtType::Type11:
                case DhtType::Type12:
                    f = data[0] + data[1] * 0.1;
                    break;

                case DhtType::Type21:
                case DhtType::Type22:
                    f = ((u16) data[0]) << 8 | data[1];
                    f *= 0.1;
                    break;
            }

            return f;
        }

        u16 expectPulse(bool level)
        {
            u16 count = 0;
            u8 portState = level ? pinBitMask : 0;
            while ((*portInputRegister(pinPort) & pinBitMask) == portState)
            {
                if (count++ >= maxCycles)
                {
                    return 0; // Exceeded timeout, fail.
                }
            }
            return count;
        }

};

Usage:
// Declare globally:
DhtSensor Sensor(PinNumber, DhtType::YourType);

// Then in your main loop:
if (Sensor.measure(&Temperature, &Humidity))
{
  // Use Temperature and Humidity
}

If it doesn't compile and you can't figure it out, let me know and I'll have a look.

Thanks a lot @Niko-O ! I've made some test, and it runs robustly on an Arduino Nano.
But there is something weird when running on my Sparkfun ESP32 Thing board, my actual platform. The board cotinuosly resets with Core  Panics (Interrupt wdt timeout on CPU1)  UNLESS I use the Pin 5 for the DHT22 data line. This pin is different because it has the board's LED wired, so I suspect is something weird the pin initialization / pulls. When using any other pin the board resets wheter the data pin is connected or not.
Any idea in what could it be? For reference the  Arduino sketch I use:
#include <Arduino.h>

#define u8 uint8_t
#define u16 uint16_t
#define u32 uint32_t

enum class DhtType : u8 {
  Type11 = 0,
  Type12 = 1,
  Type21 = 2,
  Type22 = 3
};

class DisableInterruptsGuard {
public:
  DisableInterruptsGuard() {
    noInterrupts();
  }

  ~DisableInterruptsGuard() {
    interrupts();
  }
};

class DhtSensor {

private:
  u8 pinNumber;
  DhtType sensorType;
  u8 pinBitMask;
  u8 pinPort;
  u32 maxCycles;

public:
  DhtSensor(u8 pinNumber, DhtType sensorType)
    : pinNumber(pinNumber),
      sensorType(sensorType),
      pinBitMask(digitalPinToBitMask(pinNumber)),
      pinPort(digitalPinToPort(pinNumber)) {
    maxCycles = microsecondsToClockCycles(1000);
    pinMode(pinNumber, INPUT);
    digitalWrite(pinNumber, HIGH);
  }

  bool measure(float* temperature, float* humidity) {
    u8 data[5];
    if (!readData(data)) {
      return false;
    }
    *temperature = getTemperature(data);
    *humidity = getHumidity(data);
    return true;
  }

private:
  bool readData(u8 data[5]) {
    // Send start signal.
    digitalWrite(pinNumber, LOW);
    pinMode(pinNumber, OUTPUT);
    delay(20);

    u16 cycles[80];

    {
      volatile DisableInterruptsGuard interrupt;

      // End the start signal by setting data line high for 40 microseconds.
      digitalWrite(pinNumber, HIGH);
      delayMicroseconds(40);

      // Now start reading the data line to get the value from the DHT sensor.
      pinMode(pinNumber, INPUT);
      // Delay a bit to let sensor pull data line low.
      delayMicroseconds(10);

      // First expect a low signal for ~80 microseconds followed by a high signal
      // for ~80 microseconds again.
      if (expectPulse(LOW) == 0) {
        return false;
      }
      if (expectPulse(HIGH) == 0) {
        return false;
      }

      // Now read the 40 bits sent by the sensor.  Each bit is sent as a 50
      // microsecond low pulse followed by a variable length high pulse.  If the
      // high pulse is ~28 microseconds then it's a 0 and if it's ~70 microseconds
      // then it's a 1.  We measure the cycle count of the initial 50us low pulse
      // and use that to compare to the cycle count of the high pulse to determine
      // if the bit is a 0 (high state cycle count < low state cycle count), or a
      // 1 (high state cycle count > low state cycle count). Note that for speed all
      // the pulses are read into a array and then examined in a later step.
      for (int i = 0; i < 80; i += 2) {
        cycles[i] = expectPulse(LOW);
        cycles[i + 1] = expectPulse(HIGH);
      }

      /* Timing critical code is now complete. */
    }

    digitalWrite(pinNumber, HIGH);
    pinMode(pinNumber, INPUT);

    // Inspect pulses and determine which ones are 0 (high state cycle count < low
    // state cycle count), or 1 (high state cycle count > low state cycle count).
    data[0] = data[1] = data[2] = data[3] = data[4] = 0;

    for (int i = 0; i < 40; ++i) {
      u32 low_cycles = cycles[2 * i];
      u32 high_cycles = cycles[2 * i + 1];
      if ((low_cycles == 0) || (high_cycles == 0)) {
        return false;
      }
      data[i / 8] <<= 1;
      // Now compare the low and high cycle times to see if the bit is a 0 or 1.
      if (high_cycles > low_cycles) {
        // High cycles are greater than 50us low cycle count, must be a 1.
        data[i / 8] |= 1;
      }
      // Else high cycles are less than (or equal to, a weird case) the 50us low
      // cycle count so this must be a zero.  Nothing needs to be changed in the
      // stored data.
    }

    // Check we read 40 bits and that the checksum matches.
    if (data[4] == ((data[0] + data[1] + data[2] + data[3]) & 0xFF)) {
      return true;
    } else {
      return false;
    }
  }

  float getTemperature(u8 data[5]) {
    float f = NAN;

    switch (sensorType) {
      case DhtType::Type11:
        f = data[2];
        if (data[3] & 0x80) {
          f = -1 - f;
        }
        f += (data[3] & 0x0f) * 0.1;
        break;

      case DhtType::Type12:
        f = data[2];
        f += (data[3] & 0x0f) * 0.1;
        if (data[2] & 0x80) {
          f *= -1;
        }
        break;

      case DhtType::Type21:
      case DhtType::Type22:
        f = ((u16)(data[2] & 0x7F)) << 8 | data[3];
        f *= 0.1;
        if (data[2] & 0x80) {
          f *= -1;
        }
        break;
    }

    return f;
  }

  float getHumidity(u8 data[5]) {
    float f = NAN;

    switch (sensorType) {
      case DhtType::Type11:
      case DhtType::Type12:
        f = data[0] + data[1] * 0.1;
        break;

      case DhtType::Type21:
      case DhtType::Type22:
        f = ((u16)data[0]) << 8 | data[1];
        f *= 0.1;
        break;
    }

    return f;
  }

  u16 expectPulse(bool level) {
    u16 count = 0;
    u8 portState = level ? pinBitMask : 0;
    while ((*portInputRegister(pinPort) & pinBitMask) == portState) {
      if (count++ >= maxCycles) {
        return 0;  // Exceeded timeout, fail.
      }
    }
    return count;
  }
};

DhtSensor Sensor(5, DhtType::Type22);

void setup() {
  Serial.begin(115200);
  Serial.println("Started");
  delay(1000);
}

void loop() {
  float temperature;
  float humidity;

  if (Sensor.measure(&temperature, &humidity)) {
    Serial.print("T = ");
    Serial.print(temperature, 1);
    Serial.print(" deg. C, H = ");
    Serial.print(humidity, 1);
    Serial.println("%");
  }
  delay(100);
}

This is weird, pin 4 also works. I do not see anything in the pinout schemes that could explain this, I'm not sure what's going on.

@xopxe I don't have access to an ESP32 based board at the moment, so I can't test it. To make it easier for others, if others chime in too, please write down the exact board name that you are using.
I'd try to mess with the pin directly to test what could cause the problem. Something like this (with no other code in the file (aside from maybe the #include <Arduino.h>, if it's required)):
#define pinNumber 5

void setup() {
  Serial.begin(115200);
  Serial.println("3");
  delay(1000);
  Serial.println("2");
  delay(1000);
  Serial.println("1");
  delay(1000);
  noInterrupts();
}

void loop() {
  Serial.println("Input High");
  pinMode(pinNumber, INPUT); digitalWrite(pinNumber, HIGH);
  delay(1000);
  Serial.println("Input Low");
  pinMode(pinNumber, INPUT); digitalWrite(pinNumber, LOW);
  delay(1000);
  Serial.println("Output High");
  pinMode(pinNumber, OUTPUT); digitalWrite(pinNumber, HIGH);
  delay(1000);
  Serial.println("Output Low");
  pinMode(pinNumber, OUTPUT); digitalWrite(pinNumber, LOW);
  delay(1000);
}

Try with everything disconnected from the board except power and a way to get the serial output VS peripherals attached.
Try pin 5 VS other pins.
Try commenting out the noInterrupts(); at the end of setup VS leaving it in.
Does it crash too VS run fine?
If it crashes, what's the output you see?

Oh, interesting, there seems to be an interaction between  noInterrupts() and 'delay()'.
When I comment out the noInterrupts(), it runs fine. When I disable interrupts, the loop() runs at full speed (without the delays) and crashes after a couple of looping rounds.
3
2
1
Input High
Input Low
Output High
Output Low
Input High
Input Low
Output High
Output Low
Input High
Input Low
Output High
OutpuGuru Meditation Error: Core  1 panic'ed (Interrupt wdt timeout on CPU1).
-- snip register dumps

This crash is very consistent across runs and across pins (even the ones that worked for me).
This seems to be a specific ESP32 issue. If you google "esp32 arduino delay nointerrupts," you will get a lot of hits. I will look a bit more into this.


Show error message about why fsevents could not be required

At present the error is silenced:
try { fsevents = require('fsevents'); } catch (error) {}

https://github.com/paulmillr/chokidar/blob/85df8a78af3fd654784286cd79c9307391c18357/lib/fsevents-handler.js#L7
Sometimes fsevents cannot be required because it has been compiled against the wrong node abi.
try { fsevents = require('fsevents'); } catch (error) { console.log(error) }

Error: Module did not self-register.
    at Error (native)
    at Object.Module._extensions..node (module.js:583:18)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/Vaughan/dev-live/webpackerator/node_modules/.registry.npmjs.org/fsevents/1.1.1/node_modules/fsevents/fsevents.js:14:14)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/Vaughan/dev-live/webpackerator/node_modules/.registry.npmjs.org/chokidar/1.6.1/node_modules/chokidar/lib/fsevents-handler.js:7:18)

Or the user has not installed it correctly.
We could check for the different kinds of errors that occur when requiring a module and show an informative error message.
A very common issue is high CPU usage (100%+) when fsevents fails to be required when using webpack (watchpack requires chokidar). I would say that a lot of the time the user doesn't notice what went wrong, but their computer is being slowed down immensely. For this reason, I )would argue for the error message to be shown...or have an event hook...or have an environment variable that would allow printing the error message. E.g. process.env.CHOKIDAR_PRINT_FSEVENTS_STATUS.

Not going to have chokidar start printing messages. That's the domain of the app/tool, not the utility module.
However, I would consider the event hook and env var ideas. But it would have to overcome the counterargument that if the tool using chokidar wants to go out of their way to utilize the feature and print a message, why can't they just directly detect the condition regarding fsevents themselves? Perhaps a separate fsevents-compat-warning module, if there's an appetite for such a thing.

why can't they just directly detect the condition regarding fsevents themselves?

Unless you add a console.log to that line of code, you cannot be 100% sure that it is being used.
If you tried adding require('fsevents') to your code, it would be resolving it from your __dirname which would not be the same as how it is required in chokidar. You would have to use something like the require-from package, but then you would have to locate the specific chokidar package as there could be multiple instances. Other package managers have different node_modules structures, etc.
For these reasons, I would argue for the env var approach. Which would report the __dirname and whether it failed, and for what reason. And also report when it is enabled.

The thing I don't like about the ENV approach is that it still leaves chokidar to do the actual messaging, and I think the dependent tools should take direct control over that.
Chokidar could perhaps gather the data in the catch, then later emit it as a specialized error event when a watcher instance is instantiated, and tool authors could take it from there. Can you think of any other lightweight approach?
You've made your case about the need for some sort of solution. PR welcome.

it still leaves chokidar to do the actual messaging, and I think the dependent tools should take direct control over that

The issue is that a developer using chokidar may never encounter the error themselves to realise that they should handle it. They will only realise the error after they are responding to someone else's github issue, and go through a long debug session like I did to discover that the error is being swallowed silently. Its putting the user through some real pain.
We could handle the individual errors for require failing.
If we regex match the error to be: Module did not self-register. then we should throw because that is an exceptional circumstance. But I guess then this would tie us to a specific Node version range if they change the error message.
We could only not throw for error module not found
If the module is not found, the chokidar consumer should definitely be able to receive a notification of this. But as I said earlier, most developers won't see the need to until they are debugging someone else's code.
Option for showing fsevents warning
How about an option passed to chokidar that tells it whether to silence the fsevents not found error.
By default this could be false, meaning the error would be printed to the console.
It could also take a callback function with the actual error to allow the user to alert the user themselves.
The advantage of this approach is that the chokidar consumer is forced to think about this occurring, and if it does occur for someone, the complaint will be "I always see this warning message about fsevents", instead of "webpack-dev-server is incredibly slow".

I'll maintain that it is not chokidar's place to start printing console messages for any reason. Based on past experience, I predict many more users would be upset by it than the number who are helped. Chokidar does its job when fsevents is absent or fails to run. Comparatively poorer performance is not quite the same as an error.
I understand you just went through some pain trying to support a user that got into an odd state. I think this merits some explanation in the troubleshooting section of the readme, but not necessarily much else. If you want to take it further and submit a patch that emits information about the failed require as an error event so that tools can choose to notify their users in an appropriate way, I'd consider that as well.


TOKEN

What will be the token value in conf.dart file

The token is a user token that you can generate from the Traccar web interface


Update Phone Gap Build Plugin Repository

Is it possible to release a new version for Phone Gap Build?
Also... Thanks so much for your efforts!

It seems I can't update the version there anymore. You should be able to use this instead:
http://plugins.cordova.io/#/package/com.synconset.imagepicker
Details are here: http://phonegap.com/blog/2014/12/09/phonegap-build-new-features/


make optimization parameters default

initial commit

Looks like this may need to be rebased - there are a lot of commits showing up on this PR.

Looks like this may need to be rebased - there are a lot of commits showing up on this PR.

everything looked ok when rebasing but those commits are still there, so im not sure how to get rid of them


⚠ ComboForum has degraded performance

In 9c38c3d, ComboForum (https://comboforum.com) experienced degraded performance:

HTTP code: 200
Response time: 3367 ms

Resolved: ComboForum performance has improved in 3fa77b9.


nanomsgxx 0.1 (new formula)

All Submissions:

[x] Have you followed the guidelines in our Contributing document?
[x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?

You can erase any parts of this template not applicable to your Pull Request.
New Formulae Submissions:

[x] Does your submission pass
brew audit --strict --online <formula> (where <formula> is the name of the formula you're submitting)?
[x] Have you built your formula locally prior to submission with brew install <formula>?

Changes to Homebrew's Core:

[x] Have you added an explanation of what your changes do and why you'd like us to include them?
[x] Have you written new tests for your core changes, as applicable? Here's an example if you'd like one.
[x] Have you successfully ran brew tests with your changes locally?

Description of nanomsgxx
nanomsgxx aims to provide a very thin abstraction on top of the nanomsg C API, while taking advantage of C++11's features to make the code easier to read and write.
Despite the version number, according to the author, this is a stable release.

This is the first release of nanomsgxx, it's mostly stable as it's known to be used by a bunch of people. While this is not a 1.x version it's really unlikely that breaking changes will be brought to the API.

Known Audit Problems

GitHub repository not notable enough (<20 forks, <20 watchers and <50 stars)

Only CI failure is the audit.
The codebase looks a few years old, so "first release" may not completely describe its maturity.

@BrewTestBot test this please

Popularity is the only failure at this point.

@BrewTestBot test this please

Audit is still failing due to notability.
failed: brew audit nanomsgxx --strict --online

Stacktrace
        Error: 1 problem in 1 formula
nanomsgxx:
  * GitHub repository not notable enough (<20 forks, <20 watchers and <50 stars)

At this point, we can't accept this in core Homebrew. But if the project becomes more popular, feel free to re-submit this on the new homebrew/core repo. In the meantime, you can create your own tap for it.


When a user's biola_id updates, it should update

in the WS Legacy Email Table.

Shouldn't there be some updated specs?

Updated spec


mapping update for PreZero in Arnhem

My next pmd update went missing, I checked the states and the next_type value looked unfamiliar. Maybe line 30 & 31 are no longer needed now, but I am unable to test that myself.

Since PreZero is now scheduling the pickup of paper for two different times of the day, maybe it's worth it to add some attributes to the sensors? I'm not using any fancy Lovelace cards yet, but it's probably easier if the sensor contains an indication of the time of day for the planned pickup. A default pickup time could be put in the configuration of the component, that way the mapping in _waste_type_rename could remain relatively clean. I'm not proficient in Python yet, but I think this function could also return the time of day for pickup, depending on the input argument 'item_name'? See https://github.com/xirixiz/homeassistant-afvalwijzer/commit/9e0f604ab2c538a5eed574a7b99accdba96b10b5 for an example I tried this afternoon


Please add the elmtooling extension

[✓] Extension name: Elmtooling.elm-ls-vscode
[✓] Extension GitHub or homepage: https://github.com/elm-tooling/elm-language-client-vscode

Thank you for your request! The extension is now live in the code-server extension marketplace.


No access to the Profiles and Permission Sets tab

Describe the bug
A clear and concise description of what the bug is.
Hello Vincent, bonne année 2023 et encore bravo pour orgCheck !
I'm trying to access the "Profiles and permission sets" tab of orgCheck in my dev org, but it throws me an error message (see below).
Note : I'm a System Admin, I've cleared the cache before and after the following steps and I've just removed all perm sets except some Trailhead permission sets and the Key Manager pset (I had tested Salesforce shield in this org a while ago) which contains the "Manage Encryption keys" permission. In order to make sure this is not Shield related, I've disabled field encryption and file encryption, so that Shield no longer applies in my org, but I'd rather not play with the Key Manager permission in this dev org (which is my historical dev org!), as I'd like to keep access!... Maybe this has nothing to deal with Shield, but I prefer to warn!
Thanks for your help and time and Happy new year!
Alban
To Reproduce
When clicking on Profiles and permission sets of orgCheck, it stops during the process
Dataset [profiles]: ended successfuly
Dataset [permissionSets]: ended with an error
Dataset [permissionSetAssignments]: ended successfuly
Mapping process ended with an error
Records: initialize...
Actions: initialize...
... And throws me the following error message.
Salesforce Information
Salesforce API Version: 56
Installed on OrgId: 00D24000000r53K
Type of this org: Developer Edition
Current running UserId:<PHONE_NUMBER>1E17cAAC
Current Daily Api Requests: undefined
Navigation Information
Page: /apex/OrgCheck_ProfilesPermSets_VFP
System Information
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36
Language: fr-FR
Issue #0: TypeError
Stack:
TypeError: Cannot read properties of undefined (reading 'records')
at /resource/1662018423000/orgcheck__OrgCheck_SR/js/orgcheck.js:1:57930
at Array.forEach ()
at /resource/1662018423000/orgcheck__OrgCheck_SR/js/orgcheck.js:1:57898

Merci bonne année à toi également !
Ton bug m'a permis de tester une extension dans VS Code pour aller directement à la bonne ligne et colonne dans le fichier orgcheck.js  --> https://marketplace.visualstudio.com/items?itemName=davidfreer.go-to-character-position
Comme le fichier javascript "orgcheck.js" est généré automatiquement sur une ligne... pas facile de voir ou l'erreur se trouve avec la stack !! Pour info l'extension est top !!
The error is located on the code OrgCheck.Salesforce.js file:

result.records seems to be undefined in your case for the dataset "permissionSets".
Indeed in the code i dont check if the records property is defined or not.
Can you tell me in your org what is the result of this SOQL query (using REST, not tooling api) ?
SELECT COUNT(Id) FROM PermissionSet WHERE IsOwnedByProfile = FALSE

Thank you !!!

Merci de ton retour rapide ;) !
ça fait 5 :

and if you type this SOQL does it give you an INVALID TYPE or a nice result?
SELECT COUNT(Id) FROM PermissionSetGroup

I have the following error message :

Permission Set Groups are not available in this old dev org... That's probably the reason. I've checked the release updates and found no mention to Pset groups + documentation and it says I should have the "Manage Profiles and Permission Sets" permission, which is the case. I'll open a Case at Salesforce, but here is my orgId if you want to investigate yourself: 00D24000000r53K (I've just authorized Salesforce and orgcheck support if needed ;) !). Again, thanks for your time, I'll keep you updated if I find a fix

no no don't anything.... that just helps me to find the origin of your issue.
and to reproduce it!

i also have a DE with no PSgroup feature so hopefully i can reproduce the error on my side.
but having the checking in the code i just added earlier should do the trick anyway...

Bim just reproduced it!!

Stay tune for Helium!!!

Thanks Vincent !


chore: Add codecov integration.

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@de02e27). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #18   +/-   ##
=======================================
  Coverage        ?   85.48%
=======================================
  Files           ?       54
  Lines           ?     1888
  Branches        ?        0
=======================================
  Hits            ?     1614
  Misses          ?      274
  Partials        ?        0

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update de02e27...3705226. Read the comment docs.


Use TypeScript

This dashboard should eventually be refactored to TypeScript. My plan for this to use Webpack, as it also brings features like auto-reload and the possibility to use SCSS.

Done by release 2.4.0!


multi-choice-foreach not work on sp2019

Category

[ ] Bug

Expected or Desired Behavior
Use list formatting json in multi-choice-foreach sample, expect to render field as picture in demo.

Observed Behavior
Get error message choiceIterator was not found on the data object.. choiceIterator is the iterator name in forEach. Actually, I test forEach in lookup field, it doesn't work either.
Steps to Reproduce

open file in location https://github.com/SharePoint/sp-dev-list-formatting/blob/master/column-samples/multi-choice-foreach/multi-choice-foreach.json and copy content.
create a choice column in a custom list with options A, B, C, and paste the formatter json content to column formatting, modify to enable debugMode.
create an item in list created in step 2, and set the choice column value to A, C.
refresh the list, and check the result. Error in explorer console window in IE, firefox.

You are correct that this format uses operators that are not supported in SharePoint 2019. It also uses Excel Style expressions which are also not supported in SharePoint 2019.
I have called out formats that have this limitation in the sample README files. Thank you very much for bringing this gap to our attention!


Working example code for R2D1

It seems like the code in experiments/ is outdated - I've managed to update the import errors and get most of the code running, however I get the following issue when running the atari_r2d1_gpu.py script:
Traceback (most recent call last):
  File "rlpyt/experiments/scripts/atari/dqn/train/atari_r2d1_gpu.py", line 50, in <module>
    build_and_train(*sys.argv[1:])
  File "rlpyt/experiments/scripts/atari/dqn/train/atari_r2d1_gpu.py", line 46, in build_and_train
    runner.train()
  File "/home/david/Repos/rlpyt/rlpyt/runners/minibatch_rl.py", line 240, in train
    opt_info = self.algo.optimize_agent(itr, samples)
  File "/home/david/Repos/rlpyt/rlpyt/algos/dqn/r2d1.py", line 133, in optimize_agent
    self.replay_buffer.append_samples(samples_to_buffer)
  File "/home/david/Repos/rlpyt/rlpyt/replays/sequence/prioritized.py", line 52, in append_samples
    T, idxs = super().append_samples(samples)
  File "/home/david/Repos/rlpyt/rlpyt/replays/frame.py", line 46, in append_samples
    buffer_samples = BufferSamples(*(v for k, v in samples.items()
TypeError: __new__() missing 2 required positional arguments: 'done' and 'prev_rnn_state'

Any tips on making the required modifications? If not, is there any place in the codebase which has working R2D1 example code?

Yes, sorry about that, I should clean that up.  Meantime, this one should be fresh, and with all the bells and whistles:
rlpyt/experiments/scripts/atari/dqn/launch/pabti/launch_atari_r2d1_async_alt_gravitar.py

rlpyt/experiments/scripts/atari/dqn/launch/pabti/launch_atari_r2d1_async_alt_gravitar.py

Hi @astooke, The link above is not working. can you provide a fresh example?

Sorry!  Was just a bad link, here it is:
https://github.com/astooke/rlpyt/blob/master/rlpyt/experiments/scripts/atari/dqn/launch/pabti/launch_atari_r2d1_async_alt_gravitar.py

Thanks for the great repo @astooke! Super excited to use it!
I was trying to train R2D1/pong on a single machine, and was able to this working, but I only have 1 gpu despite needing to set n_gpu=2 in the affinity there. I was also unable to get the serial sampler working with R2D1 (dqn, example_1.py works tho :) ). Do you happen to have any recommended settings or perhaps a fix for the 'done' and 'prev_rnn_state' error in launch_atari_r2d1_gpu_basic.py. Thanks again for providing this great resource Adam!

@crizCraig Thanks for the kind words!
Fixed the gpu_basic case in commit: 229f4bf1a1b9eb274dfa19d858dd3c0443939c05 (had bad, leftover code for putting samples into the replay which was used in non-async modes, such as serial; just changed it to the newer method)

Not sure about the problem with the async_alt code, though.  What errors are you hitting? Or could you print out what the affinities are that are being made?  The affinity generation for the async case might not be perfectly general.

Thanks @astooke! Actually n_gpu=1 works with the r2d1_test config, so I think I was wrong about n_gpu=2 being the problem. There was no error, but training hangs with the async_alt_pabti config after
/home/c2/anaconda3/envs/rlpyt/bin/python /home/c2/src/rlpyt/rlpyt/experiments/scripts/atari/dqn/launch/pabti/launch_atari_r2d1_async_alt_gravitar.py

call string:
 taskset -c 0,1,2,3 python rlpyt/experiments/scripts/atari/dqn/train/atari_r2d1_async_alt.py 0slt_4cpu_1gpu_0hto_1ass_1oss_1alt /home/c2/src/rlpyt/data/local/2020_03-03_11-01.36/atari_r2d1_async_alt/pong 0 async_alt_pabti
my config:
{
  "agent": {
    "eps_final": 0.1,
    "eps_final_min": 0.0005
  },
  "model": {
    "dueling": true
  },
  "algo": {
    "discount": 0.997,
    "batch_T": 80,
    "batch_B": 64,
    "warmup_T": 40,
    "store_rnn_state_interval": 40,
    "replay_ratio": 1,
    "learning_rate": 0.0001,
    "clip_grad_norm": 80.0,
    "min_steps_learn": 100000,
    "double_dqn": true,
    "prioritized_replay": true,
    "n_step_return": 5,
    "pri_alpha": 0.9,
    "pri_beta_init": 0.6,
    "pri_beta_final": 0.6,
    "input_priority_shift": 2,
    "replay_size": 4000000
  },
  "optim": {},
  "env": {
    "game": "pong",
    "episodic_lives": false,
    "clip_reward": false,
    "horizon": 27000,
    "num_img_obs": 4
  },
  "eval_env": {
    "game": "pong",
    "episodic_lives": false,
    "horizon": 27000,
    "clip_reward": false,
    "num_img_obs": 4
  },
  "runner": {
    "n_steps": 20000000.0,
    "log_interval_steps": 1000.0
  },
  "sampler": {
    "batch_T": 40,
    "batch_B": 264,
    "max_decorrelation_steps": 1000,
    "eval_n_envs": 44,
    "eval_max_steps": 1232000,
    "eval_max_trajectories": 120
  }
}
using seed 7446
2020-03-03 11:01:37.324067  | async_alt_pong_0 Running 20000 sampler iterations.
2020-03-03 11:01:37.471631  | async_alt_pong_0 Frame-based buffer using 4-frame sequences.```

Looks like the affinity code is `0slt_4cpu_1gpu_0hto_1ass_1oss_1alt`. Perhaps I just need to wait longer? I see low compute usage/growth - but haven't delved much more into it. Thanks again for the fix!

@crizCraig , were you able to fix this?
Tried a quick run here and it also hanged. Simple non async stuff (DQN) did work well.


Fix sequence interpolation

I found we were using the wrong interpolation. It is not cubic, but it is an ease in-out interpolation, which have a slow start and end but a fast middle.
Before the fix:

After the fix:

Notice here how the fixed version fades out the "light" on the title screen quicker and the animations of NEW GAME and LOAD are way more accurate now:
Before the fix:

After the fix:

I noticed that the interpolation was wrong while I was developing the menu. I clearly remembered that the animation when you open the menu slows down when close to the end of the animation. This was definitively not happening before the fix, as the menu would instantly appear.
Before the fix:

After the fix:

Tests are now green. They were broken because, after the interpolation algorithm has changed, as consequence some expected values were not equal to the actual ones anymore.


add support ZigBee stack for EFR32 MCU

Is your enhancement proposal related to a problem? Please describe.
A clear and concise description of what the problem is.
Please add support ZigBee for EFR32 chips
Describe the solution you'd like
A clear and concise description of what you want to happen.
Zephyr is a great OS, I would like to have ZigBee support for EFR32 chips
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or graphics (drag-and-drop an image) about the feature request here.

This is related to  https://github.com/zephyrproject-rtos/zephyr/issues/17005


Regression in 2.2.2: can't run the attester-maven-plugin when Sublime Text is running with the project folder open

When I try to run maven build on my machine while Sublime Text is running, I get the following exception
[INFO] --- attester-maven-plugin:2.2.2:test (default) @ myproject ---
[INFO] Extracting artifact com.ariatemplates.attester:attester:zip:project:2.2.2 to d:\git\myproject\target\com.ariatemplates.attester-attester-2.2.2-project
[ERROR] An exception occurred while extracting the com.ariatemplates.attester:attester:zip:project:2.2.2 artifact.
java.lang.Exception: Failed to rename directory d:\git\myproject\target\extract2824396073130557478.tmp to d:\git\myproject\target\com.ariatemplates.attester-attester-2.2.
2-project.
        at com.ariatemplates.attester.maven.ArtifactExtractor.inplaceExtractDependency(ArtifactExtractor.java:140)
        at com.ariatemplates.attester.maven.RunAttester.extractDependency(RunAttester.java:283)
        at com.ariatemplates.attester.maven.RunAttester.extractAttester(RunAttester.java:296)
        at com.ariatemplates.attester.maven.RunAttester.execute(RunAttester.java:302)
        at com.ariatemplates.attester.maven.RunTests.execute(RunTests.java:105)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)

WORKAROUND: Everything's fine when I close Sublime Text
But it's not a viable solution to always close Sublime when I want to run a build :/
WORKAROUND 2: downgrade attester to 2.2.1
I checked with Unlocker that Sublime on Windows does create a lock when you open a folder with it, which is probably why the renaming of the file fails.
Note BTW this problem with Sublime is manifesting itself also in other cases... Like when you switch git branch and git wants to delete some files, Sublime prevents it from being deleted (though it seems to be Windows-only)

I suppose the problem happens when mvn clean tries to delete the target directory, doesn't it?
This is a problem in Sublime, which should probably not be fixed in attester.
However, if you want to prevent attester-maven-plugin from extracting files and renaming a folder at build time, you can manually copy the extracted files to a known fixed location and set the attesterPath parameter through the com.ariatemplates.attester.path property in the maven command line (with -Dcom.ariatemplates.attester.path=...) or in the maven settings (by adding a profile enabled by default which contains <com.ariatemplates.attester.path>...</com.ariatemplates.attester.path>)


Update licenses

Signed-off-by: maxwolfs<EMAIL_ADDRESS>Question: Should there also be a sentence within the Readme stating something like All logos are property of their respective owners?
closes #46

Question: Should there also be a sentence within the Readme stating something like All logos are property of their respective owners?

Yes, definitly! We should move all restricted logos to a dedicated subdirectory and make this clear within the README.


Fix webpack config

What it does
Checks the user configurable webpack.congig.js into the git.
close #134
How to test

see e2e-est
make sure that file is not ignored

Review checklist

[x] as an author, I have thoroughly tested my changes and carefully followed the review guidelines

Reminder for reviewers

as a reviewer, I agree to behave in accordance with the review guidelines

waiting for for<EMAIL_ADDRESS>to get back to me, something not working with my account sign-up despite there being a green note claiming success

Thanks @duncdrum - the content looks good to me. Would you be able to squash these 3 commits, e.g. replacing them with one commit: "misc README updates" or such?

If you're not sure how to do that I can help - just ask.

done


Pytest keeps running

When running pytest on the speed_comparison validation, it seems to keep running sometimes (see actions in GitHub). This, most likely, has to do with the new GFunction class.
This behaviour should be investigated further.

This problem is due to the fact that there can be a 'loop' between the iterative sizing procedure and the already precalculated data so no convergence occurs. This is solved by stating that whenever the newly calculated depth differs less than 1m from the previous one, it just takes the gvalues of the previous calculation


replace json with ujson>=4.2.0

As per https://github.com/facebookresearch/dynabench/issues/639, replaces the builtin json library with ujson. Interestingly, support for the default argument in .dumps() which allows one to massage unserialisable objects into a serialisable form was only added a month ago in the latest release (4.2.0) of ujson, so we were pretty lucky.

Hrm yeah I did a conda install ujson and it gave me the wrong version, while pip gave me the right one.. Just hoping this won't break prod, and it looks like it doesn't given that we use pip: https://github.com/facebookresearch/dynabench/blob/main/devops/bootstrap.sh#L75


Option to select a specific file

Some ideas:

Add a whitelist for video file extensions
If only one video is found, only that is downloaded.
If several videos are found, it depends on what the default should be:
Either the user is asked to select one
or keep downloading the largest video. But then add a new option -select-file to allow overriding.

I'm a bit concerned about over-complicating the selection part, as it is really neat now, and having to select a file comes up very rarely.
The biggest issue that I see is a user-friendly way to select the desired file(s).
In any case, peerflix does this, so we might get some ideas from it: https://github.com/mafintosh/peerflix/blob/master/index.js#L53

I'm a bit concerned about over-complicating the selection part, as it is really neat now, and having to select a file comes up very rarely.

In that case, I'd be ok with only a bool-flag -select-file to override the default "largest file". The file extension whitelist is not needed then.

The biggest issue that I see is a user-friendly way to select the desired file(s).

I was thinking of something simple like:
0: File1.mkv
1: File2.mkv
...
20: File21.mkv

Enter # (0-20) of the file you want to play.

If we go in that direction, it might worth to port the whole ui to termui, and implement the selector there.
 (On the other hand they are rarely actionable, but at the very least they are a visual annoyance now.)

termui looks quite nice. Alternatively you could pause the refresh while asking for input.

On second thought, termui seems more specialized towards being a dashboard. gocui might be an alternative.


Get Some Idea of Performance Cost of Using Position Tracking Zipper

I've been meaning to do this for a while.
When asked, I have typically told folks that I expect the position tracking zipper incurs a performance hit, but maybe I should get at least some vague idea of what that hit is.
And document it.
Inspired by #170, #171

Not sure how many of these I'll hit, but environments of interest:

Clojure
ClojureScript (probably NodeJs only?)
Graal native-image
Graal native-image SCI interpreted (maybe through Babashka?)

I think measuring 1 and 2 is the most important. If those get faster, then I expect that 3 and 4 also get faster (although sometimes 3 optimizes more aggressively.
In short, I would optimize for 1 (JVM) and 2 (but even then I think 1 is, given the areas where rewrite-clj is most used, is by far the most important).

Yeah, that sounds very reasonable, thanks!

@lread I don't mean to steal your thunder, but I had to know...
Here's my analysis of cljs/core.cljs, the file you suggested. That file has 12K lines, which is way outside the norm for a Clojure file. But, it makes for interesting analysis...
It takes approximately the same amount of time to parse the file either as a tracked or untracked zipper. An untracked zipper can traverse all the nodes in about a quarter as much time.

cljs/core.cljs
tracked
stddev
untracked
stddev
% of tracked

z/of-file
318ms
50ms
312ms
38ms
98%

(iterate z/next*)
422ms
30ms
111ms
1ms
26%

This equivalent parsing time and faster traversing time is explained by the fact that a tracked zipper calculates its position data on the fly, as you traverse it.
But I think this overstates the performance differences between tracked and untracked zippers. What if you were to do a little work at each node, and in particular, what if you were to ask each node about its position? Forcing both zippers to deal with position data would be a more apples-to-apples comparison.
A good candidate for that kind of comparison is z/find-last-by-pos, which needs to calculate node position data. As we're doing this, we can look at how it fares navigating to a node near the top of the file, versus one near the bottom.

z/find-last-by-pos
tracked
stddev
untracked *
stddev
% of tracked

top of file
909ms
8ms
653ms
5ms
72%

bottom of file
904ms
9ms
653ms
6ms
72%

* untracked z/find-last-by-pos needs a patched zraw/position that returns node metadata
The first thing to notice is that z/find-last-by-pos takes about the same time whether finding a node at the top or bottom of the file. Since it uses last, it always inspects every node. The second thing to notice is that the untracked version takes about three quarters as much time. This isn't as big of a difference as with plain traversing, but still suggests that adding together z/extents, which a tracked zipper does as you traverse it, adds significant overhead.
While we're doing this, we might as well compare z/find-last-by-pos to the alternate implementation from clojure-lsp I described in #171.

lsp/find-at-pos
tracked
stddev
untracked
stddev
% of tracked

top of file
<1ms
0ms
<1ms
0ms
-

botttom of file
107ms
1ms
2ms
0ms
2%

% of z/find-las-by-pos
12%

<1%

I think it's clear this algorithm is faster than z/find-last-by-pos. Finding a node at the top of the file is effectively instantaneous. Finding a node at the end of the file is also much faster, regardless of what type of zipper you use, but especially for untracked zippers. One thing to note is that the version of lsp/find-at-pos that I'm testing here only inspects the node's metadata. So, you'd think that the tracked and untracked times would be the same. But, apparently, to get all the way z/right* in this huge file takes about 100ms for a tracked zipper. The untracked zipper doesn't seem to have this overhead.
Even with the optimized algorithm it takes 107ms to get to the bottom of the file in a tracked zipper, versus 2ms for an untracked zipper. This suggests the tracked zipper isn't zippy enough for clojure-lsp. It was worth checking though.
Let me know if you want the code that generated these stats. Or, I could pretty easily re-run it with smaller files, if you'd like that for comparison.
All benchmarking done with criterium. JVM 11, Clojure 1.11. 2.5 GHz Dual-Core Intel Core i7, 16 GB RAM.

This suggests the tracked zipper isn't zippy enough for clojure-lsp.

FWIW, when I started building clj-kondo I discovered that not using zippers at all was much better for performance, so I went that route.

when I started building clj-kondo I discovered that not using zippers at all was much better for performance

It appears that clojure-lsp leans on that discovery. It tends to construct a zipper only when it plans to edit a file. Otherwise for the most part it uses the (cached) analysis from clj-kondo.

Hey ho! Thanks for the thoughtful analysis @mainej.
I barely started looking at this. I was also using cljs/core.cljs while poking around.
Like you, I'm finding tracked/untracked vs untracked give similar results on parse.
I used z/of-string where you used z/of-file but see a mean of 331ms for untracked vs a mean of 318ms for tracked.
My next test was to try a z/next* until I hit the end of the source.
Fun fact: this traverses 94173 nodes.
For untracked I see a mean of 115ms and tracked gives me 495ms, so similar to your results.

But I think this overstates the performance differences between tracked and untracked zippers. What if you were to do a little work at each node, and in particular, what if you were to ask each node about its position?

I think this is very interesting, but I don't see it as the focus of this specific issue (still relevant to #171 tho!) Here I'm just trying to get a rough idea of the cost of choosing a position tracking zipper today.

I'm just trying to get a rough idea of the cost of choosing a position tracking zipper today

That's reasonable. So, to focus on that case a little bit more, I ran clj-async-profiler on a traversal of every node:
(let [tracked (z/of-file "/path/to/clojurescript/src/main/cljs/cljs/core.cljs"
                         {:track-position? true})]
    (println "\n\n\ntracked, traverse")
    (time
      (profiler/profile
        {:min-width 5}
        (dotimes [_ 25]
          (->> tracked
               (iterate z/next*)
               (take-while (complement z/end?))
               last
               z/node)))))

I'll attach the flamegraph here, but Github always "helpfully" converts the nicely interactive SVG where you can drilldown into subsections into a static image. If you want, I can share the original file somewhere else.
My summary is: the profiler was in rewrite-clj code about 92% of the time. That time breaks down roughly like this:
 3% (take-while (complement z/end?))
 3% other zipper navigation
10% clojure.core assoc/conj/etc.
 2% +extent
67% extent
 7% miscellaneous other

So, obviously, extent is the place to focus energy. To break that 67% down a little further:
 1% meta
 8% reverse
18% one of the filters for \newline
15% the other filter for \newline
21% (string node)
 4% miscellaneous other

Q: To what extent do we have a performance issue?
A: Yes.
Ya, that would have been my guess, but nice to see it in flames.

The best I've been able to do so far is the following, which benchmarks around 250ms, cutting the difference between tracked and untracked cursors by about 55% (with all the usual caveats: on this file, under this one workload of seeking through every node, on my machine).
        (let [s (string node)
              last-c (subs s (dec (count s)))
              lines (string/split s #"\n" -1) ;; -1 includes trailing empty lines
              rows (dec (count lines)) ;; all on one line moves the cursor zero rows
              cols (cond-> (count (last lines))
                     ;; count trailing newline when elided by split
                     (= last-c "\n") inc)]
          [rows cols])

I tried string/split-lines but that drops trailing newlines, messing up the row counts, which I was only able to fix with the barely document -1 argument to string/split.
I also experimented a little with line-seq, but it didn't look promising. First, I don't think it exists in ClojureScript, which probably excludes it right away. Second, it has the same trailing newline problems as string/split-lines. And finally, it didn't even seem much faster than the regex, although I didn't make it all the way to actually benchmarking it.
I suspect there's some lower-level string manipulation that would be faster than a regex. I'll keep exploring.

Uh wait... Why does the original algorithm return the same thing for both of these strings?
"\n"  ;; => [1 1]
"\na" ;; => [1 1]

I'd expect it to be:
"\n"  ;; => [1 0]
"\na" ;; => [1 1]

But maybe not... I guess in an editor, when you're on a new blank line, your cursor is on the first column. And after you add a character, that character is also in the first column. Not very intuitive to my brain.

OK, last note for today. Here's a lower-level version. It benchmarks at 231ms, a (somewhat disappointingly) small improvement.
        (let [s (string node)
              ;; indexes of newlines
              is (loop [idx -1
                        idxs []]
                   (if-let [i (string/index-of s \newline (inc idx))]
                     (recur i (conj idxs i))
                     idxs))
              s-length (count s)]
          [(count is)
           (if (seq is)
             (let [trailing-newline? (= "\n" (subs s (dec s-length)))]
               (cond-> (- s-length (last is))
                 (not trailing-newline?) dec))
             s-length)])

That cuts the difference between the tracked and untracked zippers by 61%. Or to think about it a different way, originally the tracked zipper took 3.8 times as long as the tracked zipper, and now it takes 2.1 times.
Breaking down times... of the 98% of the total time that the profiler spent in rewrite-clj, 53% was in extent. Slicing that 53% (in percents of total time):
35% (string node)
13% finding newlines
5% other

There may be more to eke out from newline counting—13% is still a sizable chunk—but I'm out of techniques. The next bottleneck in extent is (string node). And that one's gonna be harder to get around. Unless we can find a way to not call extent as often, we're a little stuck. Since next* visits every node, and string recursively calls itself on children nodes, you end up stringing the same node several times. Maybe there's an optimization there, though I'm not sure.
I'll also point out that something like 25% of the time is doing other custom-zipper maintenance (mostly in z/right*) that you don't need to do in an untracked zipper. If all we do is focus on extent, that'll be a lower bound on how close we can get them.

Thanks for taking a peek @mainej, I'll let this simmer in my noggin for a bit before diving in any deeper.

Yeah, back to the hammock.

This suggests the tracked zipper isn't zippy enough for clojure-lsp.

FWIW, when I started building clj-kondo I discovered that not using zippers at all was much better for performance, so I went that route.

@borkdude what does clj-kondo do instead of using zippers?

I just manually process nodes, no zipping, too much waste of performance


Resources can't be accessed using Cocoapods

I added DZNWebViewController to my project using Cocoapods. Now, however, all the images/icons don't show up, for ex. for the toolbar items.

I’m using the prerelease v0.36.3 of Cocoapods and the newest version of DZNWebViewController.
On Sat, Apr 11, 2015 at 7:30 PM, Ignacio Romero Zurbuchen
<EMAIL_ADDRESS>wrote:

What version of cocoapods are you using? What version of DZNWebViewController are you installing?
Reply to this email directly or view it on GitHub:
https://github.com/dzenbot/DZNWebViewController/issues/23#issuecomment-91887919

I’ve also tested against the official release v0.36, where the issue was also present. I’m mainly using Swift in my project, although I doubt that this has any effect. The buttons with the assets were also still press-able, however they showed no icon. Thanks for this incredible component and thanks for investigating this bug!

That's weird. I tried your example project – the toolbar items are displayed, however the open in Safari icon is empty. I've also tried re-installing the pod in my project: now the progress bar continues to display after the view controller is dismissed and causes a weird crash. For your reference, my project is at www.github.com/thehexagon/RSSReader. I really have no clue what's wrong.

Same issue with CocoaPods 0.36.4 and DZNWebViewController 3.0, I think the problem is Dynamic Frameworks.

@retsohuang I've built a similar component from the ground-up using swift. I haven't published it yet, but if you want, I could share it with you.

@thehexagon Sounds good :)

@retsohuang I've sent you an email. For everyone else, I'll be publishing it soon, but in the meantime, if you have interest, feel free to hit me with an email.


Adding text to the Demons registration documentation files.

Adding the overview for the algorithms. Explanations of what the code
is doing.
Change-Id: I822e8359f7179c5988399444e815fdeac3e858bb

The additional prove look pretty good. There are two points to discuss:

Your paragraphs are a single line of text. I think it would be better to wrap the lines as is done in the C++ doxygen comments and here.
The paragraph regarding using histogram matching is mostly repeated. As with code, repeating prose should be avoided. Perhaps a link from the second example to the prose in the first would suffice?

I changed the paragraphs to use hard line breaks.
With regard to the content, for now I would like each of the examples to be self contained so let's keep it as is. We should revisit this once we figure out the overall layout for SimpleITK documentation (user guide, examples, doxygen, notebooks) and what content goes where.


BUG: ImportError goodness_of_fit

Describe your issue.
I can't import  goodness_of_fit in version 1.10.1 even though it seems to be in the stats/_fit.py file.
I checked the version, correct Python kernel and pip version. Also checked the contents of _fit.py and the function seems to be present. The function fit() of the same directory can be imported without issues.
Reproducing Code Example
# Both of the following do work

from scipy.stats._fit import fit
from scipy.stats import fit

# Both of the following do not work

from scipy.stats._fit import goodness_of_fit
from scipy.stats import goodness_of_fit

Error message
# Depending on the Import Method i get either

ImportError                               Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_17656/1136089079.py in
     44 # goodness of fit
     45
---> 46 from scipy.stats._fit import goodness_of_fit
     47 #from scipy.stats import goodness_of_fit
     48

ImportError: cannot import name 'goodness_of_fit' from 'scipy.stats._fit'

# or

ImportError                               Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_17656/1640458354.py in
     45
     46 #from scipy.stats._fit import goodness_of_fit
---> 47 from scipy.stats import goodness_of_fit
     48
     49 goodness_of_fit()

ImportError: cannot import name 'goodness_of_fit' from 'scipy.stats'

SciPy/NumPy/Python version and system information
1.10.1 1.23.4 sys.version_info(major=3, minor=9, micro=13, releaselevel='final', serial=0)
~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\scipy\__config__.py:140: UserWarning: Install `pyyaml` for better output
  warnings.warn("Install `pyyaml` for better output", stacklevel=1)
{
  "Compilers": {
    "c": {
      "name": "gcc",
      "linker": "ld.bfd",
      "version": "10.3.0",
      "commands": "cc"
    },
    "cython": {
      "name": "cython",
      "linker": "cython",
      "version": "0.29.33",
      "commands": "cython"
    },
    "c++": {
      "name": "gcc",
      "linker": "ld.bfd",
      "version": "10.3.0",
      "commands": "c++"
    },
    "fortran": {
      "name": "gcc",
      "linker": "ld.bfd",
      "version": "10.3.0",
      "commands": "gfortran"
    },
    "pythran": {
      "version": "0.12.1",
      "include directory": "C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pip-build-env-u63ta2f1\\overlay\\Lib\\site-packages\\pythran"
    }
  },
  "Machine Information": {
    "host": {
      "cpu": "x86_64",
      "family": "x86_64",
      "endian": "little",
      "system": "windows"
    },
    "build": {
      "cpu": "x86_64",
      "family": "x86_64",
      "endian": "little",
      "system": "windows"
    },
    "cross-compiled": false
  },
  "Build Dependencies": {
    "blas": {
      "name": "openblas",
      "found": true,
      "version": "0.3.18",
      "detection method": "pkgconfig",
      "include directory": "c:/opt/openblas/if_32/64/include",
      "lib directory": "c:/opt/openblas/if_32/64/lib",
      "openblas configuration": "USE_64BITINT= DYNAMIC_ARCH=1 DYNAMIC_OLDER= NO_CBLAS= NO_LAPACK= NO_LAPACKE= NO_AFFINITY=1 USE_OPENMP= PRESCOTT MAX_THREADS=4",
      "pc file directory": "c:/opt/openblas/if_32/64/lib/pkgconfig"
    },
    "lapack": {
      "name": "openblas",
      "found": true,
      "version": "0.3.18",
      "detection method": "pkgconfig",
      "include directory": "c:/opt/openblas/if_32/64/include",
      "lib directory": "c:/opt/openblas/if_32/64/lib",
      "openblas configuration": "USE_64BITINT= DYNAMIC_ARCH=1 DYNAMIC_OLDER= NO_CBLAS= NO_LAPACK= NO_LAPACKE= NO_AFFINITY=1 USE_OPENMP= PRESCOTT MAX_THREADS=4",
      "pc file directory": "c:/opt/openblas/if_32/64/lib/pkgconfig"
    }
  },
  "Python Information": {
    "path": "C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-a1px0t3e\\cp39-win_amd64\\build\\venv\\Scripts\\python.exe",
    "version": "3.9"
  }
}

on Colab, there is no problem:
import scipy
print(scipy.__version__)
from scipy.stats import goodness_of_fit
help(goodness_of_fit)

begins like:
1.10.1
Help on function goodness_of_fit in module scipy.stats._fit:

goodness_of_fit(dist, data, *, known_params=None, fit_params=None, guessed_params=None, statistic='ad', n_mc_samples=9999, random_state=None)
    Perform a goodness of fit test comparing data to a distribution family.

Can you execute that code snippet?

Thanks that was what got me on the right track!
I got this:
1.9.2
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
[~\AppData\Local\Temp/ipykernel_17656/1204443348.py](~AppData/Local/Temp/ipykernel_17656/1204443348.py) in
      1 import scipy
      2 print(scipy.__version__)
----> 3 from scipy.stats import goodness_of_fit
      4 help(goodness_of_fit)

ImportError: cannot import name 'goodness_of_fit' from 'scipy.stats' ([~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\scipy\stats\__init__.py](file://~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0/LocalCache/local-packages/Python39/site-packages/scipy/stats/__init__.py))

Even though i double checked all PATH-variables and the environment of my IDE, there was apparently an issue with the package of another python version. After uninstalling all versions, clearing of the PATH and reinstalling, the issue was resolved.
Sorry for that, not a bug.


Use lowercase for npm

Just a minor capitalization fix: NPM -> npm
npm should never be capitalized:
https://github.com/npm/cli#is-it-npm-or-npm-or-npm
Also, npms.io does not use uppercase characters:
https://npms.io/about

Can't argue with sound logic.  Thanks for the contribution!


Fixed a bug with zero-copy cargo feature

I am sorry to tell that I left out one of the most important changes when I was making the previous #39 PR.
self should be passed to ManuallyDrop instead of self.0, because this one doesn't have a ZeroCopyBuffer wrapper. I apologize for the mistake.

I made a vec_to_dart_native_external_type_data to avoid duplication. Also, I added CI tests with cargo features enabled, which uses cargo fmt and clippy, that also tells you about an error.

Could we take a moment to think about how would be able to test something like that in our Mocked DartVM vm.rs?
@fzyzcjy did you figure out a way to do End to End testing with Memory checks using real Dart VM And Rust?

@fzyzcjy did you figure out a way to do End to End testing with Memory checks using real Dart VM And Rust?

Check the valgrind section in my ci.yaml. However, I just checked memory leaks, and do not check invalid memory accesses, because Dart seems to violate so many valgrind operations...
Related: dart-lang/sdk#47346

Fair enough. @temeddix are you open to make a PR that introduce these kind of checks into our code and then we merge it here into your PR? I want to make sure that we do not introduce any other memory bugs because of a new feature we added.

I'm not familiar with valgrind tests, but I'll try to apply those in a few days :)

I dug into the valgrind test code of flutter_rust_bridge for some time, and unfortunately, it is too complicated for me to make that work here.
In flutter_rust_bridge, Github CI calls a justfile command, and that justfile command calls many other justfile commands, some of which call the .sh bash commands in the Dart folder, which calls a Python code, which executes valgrind. This logic is not simple enough for me to fully understand properly.
Apart from this 'deep call stack', there's no Dart example like flutter_rust_bridge in this repo. There are only Rust files here, which means there many Dart codes for testing the library's features should be added. I'm not sure if I can understand all the features of this library and organize it into a testing Dart file. This complexity deserves a whole new PR :|
In my opinion, we could focus on fixing the bug and adding CI for Rust linting error in this PR.

Fair enough. Okay I guess I will go an merge this PR.


Ollie: Watch axdraft.com

Ollie requests the watch of the watch_keyword axdraft\.com. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

axdraft\.com has been seen in 0 true positives, 0 false positives, and 0 NAAs.

Approved by Spevacus in Charcoal HQ


Why not use the MELPA package?

I've installed the regular Emacs MELPA package on Spacemacs by adding dracula-theme to  dotspacemacs-additional-packages. i.e.:
dotspacemacs-additional-packages '(
    editorconfig
    dracula-theme
)

Why is that not the recommended way? That would also have the benefit of getting automatic updates whenever the MELPA package changes.

In fact, this shape is also correct, since melpa has integration with spacemacs. The method described in the repository guarantees only full compatibility regardless of the version / branch.


Fix lint warnings and errors

While I was looking at the other issue, my IDE started notifying me that there were some issues with the code. I fixed those.

One of these was that a new logger was created and passed forward. This is actually not needed, as far as I remember, in logrus. You can just set the default and use log directly. Passing it on, copies a lock that exists inside the logger:

$ go vet .
# github.com/scross01/prometheus-klipper-exporter
./main.go:26:61: handler passes lock by value: github.com/sirupsen/logrus.Logger contains github.com/sirupsen/logrus.MutexWrap
./main.go:59:59: call of collector.New copies lock value: github.com/sirupsen/logrus.Logger contains github.com/sirupsen/logrus.MutexWrap
./main.go:87:17: call of handler copies lock value: github.com/sirupsen/logrus.Logger contains github.com/sirupsen/logrus.MutexWrap

The ioutil.ReadAll was replaced by io.ReadAll a while back. It's a drop-in replacement.

In New in collector.go, a collector was returned, which should then be exported (start with a capital letter).

There were some explicit type castings to float64 from a float64, which is reduntant.

The service's unit file has restart=Always. In systemd, this doesn't work as expected. If your service starts up too quickly, and then crashes to quickly, it will trigger the rate limit and stop trying to restart the service. This happened on my system when it crashed over the bug fixed in the previous PR. I added the rate limit configuration to hopefully make sure it doesn't trigger anymore.

I hope the changes in this PR are helpful. Please don't see them as nitpicking or critique on the code, I just can't stand my IDE yelling at me :)

This is great, thanks for taking the time to improve the code.


Debugger support on OSX

At this moment, the debugger on OSX is not working, this makes it difficult to debug and solve "OSX" only bugs.
The debugger must be supported on OSX.
If you try to build on OSX with the debugger attached the wallet crash instantly. Even though the wallet works fine all the time without the debugger being attached.

Debuger is working with latest Xcode and QT Creator version


Make naming consistent in Staking and Governance view

Choose between: staking/unstaking bonding/unbonding delegating/undelegating? :)

Designs will determine naming


Using easy_hook for per-request parameters

Currently the easy_hook function gets passed an info parameter with URL, method and headers:
https://github.com/JuliaLang/Downloads.jl/blob/e22219f6cf8e474ace8624534188f23858e56779/src/Downloads.jl#L341-L342
But I can't see how to use this to set options on a per-request basis as HTTP.jl currently allows for things like the connection timeout (https://curl.se/libcurl/c/CURLOPT_CONNECTTIMEOUT.html). Ideally we'd add connection timeouts and some other obviously useful parameters (will post a separate issue about those), but to cover more unforeseen settings it would be helpful if there was some way to get per-request items into the info struct.
I'm not sure what's best for the API. A couple of possible ideas:

Add an easy_hook_opts::Any=nothing keyword to request, and just pass this through in the info tuple.
Add an easy_hook::Union{Function,Nothing}=nothing keyword to request and invoke this on the easy handle (maybe in addition to the easy hook which is contained in the Downloader).

I kind of favor the second of these ideas. Perhaps not as a public part of the API, but as an escape hatch it sure would be handy.

Another example of this: AWS.jl has a new Downloads-based backend (https://github.com/JuliaCloud/AWS.jl/pull/396) but they needed to set Curl.CURLOPT_FOLLOWLOCATION to false. Currently they're accepting a potential race condition in one part of the code to set the easy_hook on the downloader: https://github.com/JuliaCloud/AWS.jl/pull/396#discussion_r688658942

For the redirects case we ran into in AWS.jl, I think it could make sense to expose a redirect keyword like HTTP.jl does, and then set the hook accordingly, to expose a slightly nicer API over the lower-level Curl options.
But for the general case, I agree it would be good to be able to configure this on a per-request basis. My understanding is you often do want a shared downloader object in order to re-use connections and things like that, which is why the possible solution of "just make a new downloader globally configured how you want" isn't ideal in general. So I think it would be good to be able to configure this on a per-request level.

Apply downloader easy hook callbacks in order

I think this can already be done in a round about way — if the user has a Downloader, the can install an easy_hook closure which internally uses a stack of options or functions to apply.

Yes, but the point is that if multiple independent parties have set easy hooks, currently it will break. Instead, we would like for that to work.

Can't independent parties just use their own Downloader instances to get a well-defined set of curl options? Some subsets of options are interdependent so it doesn't seem very composable to have multiple parties setting them.
For the global Downloader instance I feel like that can only be safely modified at the whole-application level — if several libraries modify it they can easily clash in non-composable ways. So it may be adequate to have a single easy_hook for use by the application.
I could be persuaded otherwise. Do you have a particular use case in mind where it would be useful to compose options without a central authority (ie, the application) knowing the complete list?

Right, but it's fairly common for someone to want to set libcurl options that will affect the global downloader because they're needed to make download operations done somewhere else work. Suppose, for example, someone wants to inject some auth header when making requests to certain hosts. Someone else wants to set some other option. That could be made to work. Obviously, if you're in a position to inject a custom downloader into the download operation, that's better, but that's not always the case.


No unique visitors graph

I'm using goaccess 1.1.1 and monitoring nginx log but there is no graph on unique visitors.

Looks like a log-format issue. Can you please post a few lines from your access log and the log-format that you are using?

This is my log. and I used following formats
cat example-access.log* | goaccess --no-global-config --log-format='%h
%^[%d:%T %^]  %s "%r" %b %^ "%u" "%R" %^ %^ %^' --date-format='%d/%b/%Y'
--time-format='%T' -o /var/www/web/report.html
On Mon, Jan 30, 2017 at 10:13 AM Gerardo O<EMAIL_ADDRESS>wrote:

Looks like a log-format issue. Can you please post a few lines from your
access log and the log-format that you are using?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/allinurl/goaccess/issues/643#issuecomment-275966869,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFzS6iLnna-ZcRna_Ss1O7pP0jTT9lkZks5rXUdUgaJpZM4Lw_ER
.

Looks like you got the time wrong there, try this:
cat example-access.log* | goaccess --no-global-config --log-format='%h %^[%d:%t %^] %s "%r" %b %^ "%u" "%R" %^' --date-format='%d/%b/%Y' --time-format='%T' -o /var/www/web/report.html

I got error
root@kickseed:~/logs# cat example-access.log* | goaccess --no-global-config
--log-format='%h %^[%d:%t %^] %s "%r" %b %^ "%u" "%R" %^'
--date-format='%d/%b/%Y' --time-format='%T' -o /var/www/web/report.html
Parsed 10 lines producing the following errors:
Token '' doesn't match specifier '%s'
Token '' doesn't match specifier '%s'
Token '' doesn't match specifier '%s'
Token '' doesn't match specifier '%s'
Token '' doesn't match specifier '%s'
Token '' doesn't match specifier '%s'
Token '' doesn't match specifier '%s'
Token '' doesn't match specifier '%s'
Token '' doesn't match specifier '%s'
Token '' doesn't match specifier '%s'
Format Errors - Verify your log/date/time format
On Mon, Jan 30, 2017 at 11:30 AM Gerardo O<EMAIL_ADDRESS>wrote:

Looks like you got the time wrong there, try this:
cat example-access.log* | goaccess --no-global-config --log-format='%h %^[%d:%t %^] %s "%r" %b %^ "%u" "%R" %^' --date-format='%d/%b/%Y' --time-format='%T' -o /var/www/web/report.html
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/allinurl/goaccess/issues/643#issuecomment-275973459,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFzS6vYHFly_5EVCRFbVA3SgpTX-1plqks5rXVlEgaJpZM4Lw_ER
.

Thank you very much. It is working now. double spaces have in front of %s.
On Mon, Jan 30, 2017 at 3:14 PM Tseveendorj Ochirlantuu <
<EMAIL_ADDRESS>wrote:

I got error
root@kickseed:~/logs# cat example-access.log* | goaccess
--no-global-config --log-format='%h %^[%d:%t %^] %s "%r" %b %^ "%u" "%R"
%^' --date-format='%d/%b/%Y' --time-format='%T' -o /var/www/web/report.html
Parsed 10 lines producing the following errors:
Token '' doesn't match specifier '%s'
Token '' doesn't match specifier '%s'
Token '' doesn't match specifier '%s'
Token '' doesn't match specifier '%s'
Token '' doesn't match specifier '%s'
Token '' doesn't match specifier '%s'
Token '' doesn't match specifier '%s'
Token '' doesn't match specifier '%s'
Token '' doesn't match specifier '%s'
Token '' doesn't match specifier '%s'
Format Errors - Verify your log/date/time format
On Mon, Jan 30, 2017 at 11:30 AM Gerardo O<EMAIL_ADDRESS>wrote:
Looks like you got the time wrong there, try this:
cat example-access.log* | goaccess --no-global-config --log-format='%h %^[%d:%t %^] %s "%r" %b %^ "%u" "%R" %^' --date-format='%d/%b/%Y' --time-format='%T' -o /var/www/web/report.html
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/allinurl/goaccess/issues/643#issuecomment-275973459,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFzS6vYHFly_5EVCRFbVA3SgpTX-1plqks5rXVlEgaJpZM4Lw_ER
.

Glad that worked.


vm_image_build job does not work for aws.s3 because it demands parameters

What happened? What is the problem?
I was playing locally with the vm_image_build packit feature and I wanted to avoid having AWS account to get the image build. For that reason there is AWS.S3 scheme which based on the Image Builder API don't need any options to have set. However, packit will fail because it expects options to be set.
I'm getting this output:
2023-05-23 16:55:01.702 utils.py          DEBUG  Input directory is an upstream repository.
2023-05-23 16:55:02.602 vm_image_build.py DEBUG  image_customizations -> payload_repositories []
2023-05-23 16:55:02.824 utils.py          ERROR  400 Client Error: Bad Request for url: https://console.redhat.com/api/image-builder/v1/compose
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/packit/cli/utils.py", line 50, in covered_func
    func(config=config, *args, **kwargs)
  File "/usr/lib/python3.11/site-packages/packit/cli/utils.py", line 149, in covered_func
    func(*args, **decorated_func_kwargs)
  File "/usr/lib/python3.11/site-packages/packit/cli/builds/in_image_builder.py", line 78, in in_image_builder
    build_id = api.submit_vm_image_build(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/packit/api.py", line 1877, in submit_vm_image_build
    return ib.create_image(
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/packit/vm_image_build.py", line 205, in create_image
    response = self.image_builder_request("POST", "compose", payload=payload)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/packit/vm_image_build.py", line 85, in image_builder_request
    response.raise_for_status()
  File "/usr/lib/python3.11/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://console.redhat.com/api/image-builder/v1/compose

What did you expect to happen?
This configuration pattern should work:
  - job: vm_image_build
    trigger: pull_request
    image_request:
      architecture: x86_64
      image_type: image-installer
      upload_request:
        type: aws.s3
    image_customizations:
      packages: []
    image_distribution: fedora-rawhide
    owner: "@rhinstaller"
    project: Anaconda
    copr_chroot: fedora-rawhide-x86_64

Example URL(s)
No response
Steps to reproduce
Create a packit configuration with use of aws.s3 without any `image_request.upload_request.options` specified or with `image_request.upload_request.options` empty and run `packit build in-image-builder test.iso` locally.

Workaround

[ ] There is an existing workaround that can be used until this issue is fixed.

Participation

[ ] I am willing to submit a pull request for this issue. (Packit team is happy to help!)

We should look at this problem and we should  also look at the answer content and if there is no something useful ask to Image Builder Service to improve the answer.

@TomasTomecek there is a list of errors present in the response: https://console.redhat.com/docs/api/image-builder/v1#operations-default-ComposeImage

@jkonecny12 the problem with your image build is that Image Builder does not support fedora-rawhide :/
value "fedora-rawhide" is not one of the allowed values
Schema:
  {
    "enum": [
      "rhel-8",
      "rhel-84",
      "rhel-85",
      "rhel-86",
      "rhel-87",
      "rhel-9",
      "rhel-90",
      "rhel-91",
      "rhel-92",
      "centos-8",
      "centos-9",
      "fedora-35",
      "fedora-36",
      "fedora-37",
      "fedora-38"
    ],
    "type": "string"
  }

@ondrejbudai would it be possible to add fedora-rawhide? We are doing all the development there.


Redesign/side navigation search

Description
Reworked the side navigation, now an autoblock instead of needing to be included on every documentation page manually. Will be included if the page's metadata includes: Template: guides
Also includes new card list block.
Test URLs (Block - Side Navigation):

Before: https://website-redesign--helix-website--adobe.hlx.page/drafts/redesign/blocks/side-navigation
After: https://redesign-side-navigation-search--helix-website--adobe.hlx.page/drafts/redesign/blocks/side-navigation

Test URLs (In Use):

Before: https://website-redesign--helix-website--adobe.hlx.page/drafts/redesign/documentation
After: https://redesign-side-navigation-search--helix-website--adobe.hlx.page/drafts/redesign/documentation

Test URLs (Block - Card List):

Before: https://main--helix-website--adobe.hlx.page/drafts/redesign/blocks/card-list
After: https://redesign-side-navigation-search--helix-website--adobe.hlx.page/drafts/redesign/blocks/card-list

Documentation:

Readme

@nicolerego - can you resolve the CSS conflicts? When we optimize pages, we can look at the CLS timing for this one.


"Home Data Inspector" is hidden on macs with notches

Although it looks fine on macbook air, on macs with notches the Home Data Inspector text is hard to find on macs with notches. Need to change it into an icon.

addressed feedback from Ben


Create new skin symptoms page for review

Description
Create new skin symptoms guidance
Probably needs restructuring. Needs more work tomorrow.
Is it possible to have this in a review environment for now, please?
Related issue
https://github.com/nhsuk/nhsuk-service-manual/issues/1212
Checklist

[ ] Tested against the NHS.UK frontend testing policy (Resolution, Browser & Accessibility)
[ ] Code follows the NHS.UK frontend coding standards
[ ] Version number has been increased in package.json (using SEMVER)
[ ] CHANGELOG entry - not yet
[ ] Whats new page entry - not yet
[ ] Page updated date - not yet

Awaiting clinical sign off.


Fix autoloader attributes

Fix autoload for attributes that have additional classes defined in the
attribute controller.php file.

Add class map for select Option class
Add class map for address Value class

Note: This does not address autoloading in the /application directory

Not sure if this is the best way to do this or if I'm including the \Concrete\Attribute\Select\Option incorrectly. Which is very possible.

Interesting. This would totally work – but I'm wondering if we shouldn't do what we've done in the case of classes like "\Concrete\Block\Form\MiniSurvey" and break the classes out into their own files in the "select" directory.

@aembler We could certainly clean it up a bit and break those out into new files. I'd leave it up to you to decide on possible issues of people upgrading, but because of autoloading we could move them out and it should just work without any other changes I believe. Also, I split this PR into two commits if you just want to merge in the test case.

@aembler I'm going to leave this open, but feel free to close and direct me to create the new files to line up with the autoloader. I think it's a better solution barring any concerns about upgrades etc.

Thanks – I moved the classes out to their own files and kept the tests so we could make sure this didn't happen again.


Merge branch 'main' into dev

Pull Request Test Coverage Report for Build<PHONE_NUMBER>8
Details

3969 of 4302 (92.26%)  changed or added relevant lines in 38 files are covered.
328 unchanged lines in 10 files lost coverage.
Overall coverage increased (+0.3%) to 89.264%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/ast/dcl.rs
8
9
88.89%

src/ast/dml.rs
9
10
90.0%

src/ast/helpers/stmt_create_table.rs
6
7
85.71%

src/dialect/ansi.rs
1
2
50.0%

src/dialect/bigquery.rs
1
2
50.0%

src/dialect/databricks.rs
1
2
50.0%

src/dialect/hive.rs
1
2
50.0%

src/dialect/mysql.rs
1
2
50.0%

tests/sqlparser_bigquery.rs
63
64
98.44%

tests/sqlparser_duckdb.rs
95
96
98.96%

Files with Coverage Reduction
New Missed Lines
%

src/ast/ddl.rs
1
86.33%

tests/sqlparser_databricks.rs
1
89.61%

src/ast/query.rs
3
86.27%

tests/sqlparser_mssql.rs
3
93.31%

tests/sqlparser_postgres.rs
5
88.65%

tests/sqlparser_bigquery.rs
6
90.67%

src/ast/mod.rs
6
82.41%

src/parser/mod.rs
9
92.86%

tests/sqlparser_common.rs
56
89.83%

src/lib.rs
238
12.47%

Totals

Change from base Build<PHONE_NUMBER>:
0.3%

Covered Lines:
29889

Relevant Lines:
33484

💛  - Coveralls


support dotnet tool pwsh

supoort:dotnet tool install -g powershell

I don’t know the compatible of $current.Name, I just tested it on Powershell 5 and  Powershell Core 7. If there is any compatibility problem, please change to Select-Object -ExpandProperty Name


Simulator limitations

A collection of issues discovered when running against the simulator that may require it to be updated to match the real detector.

[x] Some parameters have the wrong type causing the wrong PVs to be generated
[x] Acquisition logic ignores ntrigger. It should run ntrigger subacquisitions of nimage frames. Currently it only does one regardless of the value of ntrigger.
[x] Add special handling for subsystem keys that avoids nesting response within {"value": [keys]}. The response should just be [keys]
[x] Return 404 when commands that don't take a value are given one

Will be resolved in https://github.com/DiamondLightSource/tickit-devices/pull/111


Some detection fixes

Details in the commits.
The second one ("fail detection when record is nil") could also be addressed by saying that the zjson/ndjson readers accept a final line without trailing newline, but I'm not sure if we want to do that and went for the direct fix.

(I should add some tests...)

(I should add some tests...)

Finally added! Merging.


Upgrade Netlify plugin and add strip search config

Close #2529 and fix #2520

Thanks for this one, I'm using netlify w/ the same issue :)

Oh, the release that just came out (20 mins ago lol) seems to have fixed the netlify problem.


Node issue post upgrade from v1.16.0 to saffron v1.17.0

Hi Team,
We have been running an archival provenance node with docker and have been updating it accordingly over the past year.
Our node stopped syncing at block 13736000, using image: provenanceio/provenance:v1.16.0
At this block, we went for upgrade to Saffrom v.1.17.0:

Stopped the existing node container.
Started it back again with command: docker run -d --rm -it --name node-prov -p 1317:1317 -p 26657:26657 -p 9090:9090 -v /DataDisk/provenance-arch-node:/home/provenance provenanceio/provenance:v1.17.0 provenanced start

But the node logs are stuck at this for the past 48 hours:

Please let us know if any changes are needed to the docker command we're using.
Thank you for supporting us for more than a year now!
Palak

Hi Palak,
Do you happen to know what database your node is using.  Is it the cleveldb or goleveldb?

@nullpointer0x00 Nope, Is there a way to find this out?

Hi Team, Still waiting for help here. Our node is still down

@Palak3196 We have a dbmigrate tool in the Provenance repo. I would recommend backing up your $PIO_HOME/data and trying that out.
You can build and install dbmigrate with the following commands
make build-dbmigrate
make install-dbmigrate
You can then run the dbmigrate command with goleveldb set as your target.
Make sure $PIO_HOME is the home directory you wish to migrate otherwise include the --home flag.
dbmigrate goleveldb
This should hopefully update your databases and allow you to continue running.

sounds perfect, let me try. Thank you for the quick support

Hi @Taztingo, do I need to have provenanced installed for the dbmigrate command to run? Because it doesn't run if I simply docker exec -it inside the container.
And yes the config and data directories exist at /DataDisk/provenance-arch-node

You may want to run whereis provenanced to find the exact location of the binary and verify that is part of your PATH.

Hi, unfortunately, whereis provenanced also gives no response

I have tried the installation on Ubuntu 18.04 and 20.04.

This means that you do not have your GOBIN in your path ... this is the folder where go will install binaries built with make build
%%> echo $GOBIN
/Users/[...]/Projects/go/bin

and
 %%> echo $PATH
/opt/homebrew/opt/libpq/bin /opt/homebrew/bin /opt/homebrew/sbin /opt/homebrew/opt/fzf/bin /Users/[...]/Projects/go/bin [...]

This is why I am able to resolve my installed provenanced binary like so
%%> which provenanced
/Users/[...]/Projects/go/bin/provenanced

Thanks @iramiller  I added GOBIN in the path as suggested:

And then ran make build in the provenance binaries' directory (taken from v 1.17.0), but it ran into errors (attached in the note)
Prov error.txt
Also, I saw the release notes for Release v1.17.1 and tried the below steps too to goleveldb from cleveldb:
Stop your node.
Back up your data and config directories.
Update your config.toml to have db_backend = "goleveldb".
Update your app.toml to have either app-db-backend = "" or app-db-backend = "goleveldb".
Restart your node.
For this, my docker container runs into the below error:

Sorry that's a lot of information! Let me know if there's anything wrong here

@Palak3196 It looks like you are having an issue with ziphash when attempting to build. This may be an issue with your go modcache.

This looks abandoned. Feel free to re-open if there's still an issue.