various changes and updates

Description
Closes #26
Checklist

[ ] Updated CHANGELOG files
[ ] Updated Documentation
[ ] Unit Tests Created
[ ] php-cs-fixer

Codecov Report
Attention: 56 lines in your changes are missing coverage. Please review.

Comparison is base (1fd79bb) 74.03% compared to head (3349823) 73.42%.
Report is 2 commits behind head on main.

Files
Patch %
Lines

.../SonsOfPHP/Bard/src/Console/Command/AddCommand.php
0.00%
19 Missing :warning:

...SonsOfPHP/Bard/src/Console/Command/CopyCommand.php
0.00%
10 Missing :warning:

...SonsOfPHP/Bard/src/Console/Command/PushCommand.php
0.00%
10 Missing :warning:

...onsOfPHP/Bard/src/Console/Command/SplitCommand.php
0.00%
10 Missing :warning:

...SonsOfPHP/Bard/src/Console/Command/InitCommand.php
0.00%
3 Missing :warning:

...sOfPHP/Bard/src/Console/Command/ReleaseCommand.php
0.00%
2 Missing :warning:

src/SonsOfPHP/Bard/src/JsonFile.php
0.00%
1 Missing :warning:

...sOfPHP/Bard/src/Worker/File/Bard/UpdateVersion.php
0.00%
1 Missing :warning:

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #201      +/-   ##
============================================
- Coverage     74.03%   73.42%   -0.62%
- Complexity     1309     1348      +39
============================================
  Files           207      207
  Lines          3247     3274      +27
============================================
  Hits           2404     2404
- Misses          843      870      +27

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


[1748] Record form errors/success on publish

Context
Record form errors/success on publish and send to Google Analytics.
Changes proposed in this pull request
Added the data-ga-event-form to error element and pass in values "error" or "success"

 Record each success and error message to Google Analytics as a GA Event


VirtualScroller: forceUpdateGrid does not call rowHeight function

Hi! I love your project, its awesome!!!
I think I've run into a bug, or I'm doing something incorrectly because I can't get forceUpdateGrid to run the rowHeight function.
I have a list of components that can be expanded to see more info at which point i try to call the forceUpdateGrid function but it doesn't have an effect.
Basically the way this component works is that the child component has some logic that will make it bigger. This component listens for that updates its state and changes the row height for the corresponding building component
import React from 'react'
import { VirtualScroll,AutoSizer } from 'react-virtualized';
import DealroomBuilding from '../../containers/broker_dashboard/DealroomBuilding';

const DealroomStateList = React.createClass({`

    getInitialState(){
        return {
            buildings_expanded: {},
            buildings_hiding_listings: {},
            row_count: this.props.building_ids.length,
        }
    },

    _onBuildingExpandToggle(b_id, is_expanded){
        var self = this;

        var buildings_expanded = this.state.buildings_expanded;
        buildings_expanded[b_id] = is_expanded;

      this.setState({buildings_expanded},
      ()=>{

        self.refs.auto_sizer.refs.scroller.forceUpdateGrid();
      }
    );

   },

    _onShowListingsToggle(b_id, is_showing){
       var self = this;

       var buildings_hiding_listings = this.state.buildings_hiding_listings;
       buildings_hiding_listings[b_id] = !is_showing;

       //hack because i can't get virtual scroller to forceupdate (the index check part)
       //  so i have to update one of the properties of the virtualscroller
      var row_count = this.state.row_count+1;

       this.setState({buildings_hiding_listings, row_count},
           ()=>{
              self.setState({
                row_count: row_count-1,
              })
           }
         );
   },

  _getVirtualScrollRow({index, isScrolling}){
      if(index === 0){
          return this._getDLCounterHtml();
      }
      return this._getDealroomBuildingHtml(index-1);
  },

 _getDLCounterHtml(){
    return(

                {this.props.dl_count} {this.props.title}

                {this.props.children?

                        {this.props.children}

                    :
                    null
                }

     )
 },
 _getDealroomBuildingHtml(index){
     const building_ids = this.props.building_ids;
     const b_id = building_ids[index];

    return(
        <DealroomBuilding key={b_id} id={b_id}
            onBuildingExpandToggle={this._onBuildingExpandToggle}
            onShowListingsToggle={this._onShowListingsToggle}
         />
    )

 },

 _getRowHeight({index}){
     if(index === 0 || index > this.props.building_ids.length){
        return 50;
     }

    const{
        buildings_expanded,
        buildings_hiding_listings,
     } = this.state;

     const b_id = this.props.building_ids[index - 1];

     var height = 39;

     if(buildings_expanded[b_id]){
         height += 193;
     }
    else{
        height += 59;
    }

    if(!buildings_hiding_listings[b_id]){
         return height + 100;
    }

     return height

},

render(){
    return(

            <AutoSizer ref='auto_sizer'>
                 {({ height, width }) =>{ return(
                     <VirtualScroll
                          ref='scroller'
                          rowCount={this.state.row_count + 1}
                          rowHeight={this._getRowHeight}
                          rowRenderer={this._getVirtualScrollRow}
                          height={height}
                          width={width}
                      />
                  )}}
              </AutoSizer>

       )
  }
 });

the hack I've used to get around this is to have rowCount as a state variable which i increment then decrement to force the virtualscroller to have to rerender since its props change.
The hack is being used in _onShowListingsToggle. When that function is called everything works perfectly and the list is resized appropriately.
However when _onBuildingExpandToggle is called I call forceGridUpdate and nothing happens. I put a break point inside _getRowHeight, but its never called

I have a list of components that can be expanded to see more info at which point i try to call the forceUpdateGrid function but it doesn't have an effect.

forceUpdateGrid forces a re-render but does not invalidate cached measurements. (They're cached for performance reasons.) You actually want to call recomputeRowHeights instead. Pass it the index of the row that's changed and it will keep all cached measurements before that row, but remeasure that row (and the ones below it) as necessary.

Closing this issue because I'm pretty confident that's all it is. Let me know if not! :)

This was exactly what I needed, thank you for pointing that out!


Unknown Issue in working Tensorflow

I use tensorflow as backend in keras. Implementation is done in R. Everything was working properly but today I got an error calling lstm model. Could you please help inrectifying the problem. Below is the message I get and then R stops working
2018-03-11 11:12:48.620511: W C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2018-03-11 11:12:48.977900: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\gpu\gpu_device.cc:955] Found device 0 with properties:
name: Quadro K2000
major: 3 minor: 0 memoryClockRate (GHz) 0.954
pciBusID 0000:03:00.0
Total memory: 2.00GiB
Free memory: 1.64GiB
2018-03-11 11:12:48.978254: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\gpu\gpu_device.cc:976] DMA: 0
2018-03-11 11:12:48.978386: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\gpu\gpu_device.cc:986] 0:   Y
2018-03-11 11:12:48.978612: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\gpu\gpu_device.cc:1045] Creating TensorFlow device (/gpu:0) -> (device: 0, name: Quadro K2000, pci bus id: 0000:03:00.0)

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
Have I written custom code
OS Platform and Distribution
TensorFlow installed from
TensorFlow version
Bazel version
CUDA/cuDNN version
GPU model and memory
Exact command to reproduce

It has been 14 days with no activity and the awaiting response label was assigned. Is this still an issue?

Sorry for late response. The issue has got resolved after re-intalling CUDA driver and cuDNN packages. Seems CUDA and cuDNN had been corrupted. This led to connection breach between tensorflow and GPU and hence, tensorflow was not able to find GPU.


Staking-info command returns a ResourceExhausted error

Instructions
Problem
flow accounts staking-info 0xbf91cf149c03a3b3 -n mainnet
❌ Command Error: error getting total stake for node: client: rpc error: code = ResourceExhausted desc = request is rate limited
Acceptance Criteria
This command should return the staking info.
Context
The error is incorrect. The rate limits are definitely high enough to accommodate to one request per second.
The command however works against a different access node -
$ flow accounts staking-info 0xbf91cf149c03a3b3  --host="access-001.mainnet24.nodes.onflow.org:9000"
If a 50ms sleep is added here https://github.com/onflow/flow-cli/blob/master/internal/accounts/staking-info.go#L120 then the command works against the public access node (access.mainnet.nodes.onflow.org:9000) as well. This indicates that the flow cli times out prematurely and throws an incorrect error after that.

I believe we should deal with the "request is rate limited" issue by making sure to retry a few times before giving up on all our calls ( by checking rate limit response info). I think the best spot to incorporate this is within the flow-go-sdk Client.

Adding that 50ms sleep means that the loop will make at most 20 requests per second. I suspect that it's then sending fewer requests than the limit.
fwiw, that command appears to be working now, so the header changes QN made seems to have fixed this.

I totally agree that the client should be smart and know about rate limits and headers and do the right thing.


APK size increases to 1.4 GB after integrating Programmable Chat

Description
After adding implementation of Twilio Programmable Chat in my build.gradle file, the generated debug APK size increased to 1.4 GB.
I introspected APK, and found the lib folder contains 4 folders with Twilio files in it. It all together took 1.4 GB.
Pleasehelp me out with this issue and how to resolve this.
Steps to Reproduce

Add Twilio Programmable Chat implementation in build.gradle
Rebuild the project
Generate debug APK
And the size would be in GBs

Code (optional)
implementation 'com.twilio:chat-android-with-symbols:6.1.1'

Chat Android SDK
Which SDK version did you use? [eg. 2.0.8]
6.1.1
Screenshots attached.

Do you have NDK  installed? if you use implementation 'com.twilio:chat-android-with-symbols:6.1.1'  then you need NDK installed to strip out the debug symbols after the build.
Try with implementation 'com.twilio:chat-android:6.1.1' instead first (this will not give you debug info, but the APK should definitely be smaller), then install NDK if you actually require debug symbols.

Ok thanks, I will try out this solution of yours and let you know if any issues faced further.


Added solutions in Python for Array I

Hey @MohammedHamzaMalik, please review my submission and merge it.

You must also add an explanation about the problem above the code.


Plugin Loads in Docs, but not functional

I installed the plugin.  I have the side panel open, but none of the dropdowns work nor can I import anything from a URL.  Seems to be nonfunctional  Thank you

Hi, sorry for the late reply.
This is interesting since I'm not able to reproduce it.
Could you please state what browser do you use (ideally also with version)
Possibly add a screenshot of how the sidebar looks like if opened?
Meanwhile, I'll try to think of what could cause the issue :thinking:


Missing font after system reboot

Environment
Windows build number: Microsoft Windows [版本 10.0.18363.628]
Windows Terminal version (if applicable): 0.8.10261.0

Any other software? No

Steps to reproduce

I use Cascadia Code PL font:
"defaults": {             "fontFace": "Cascadia Code PL",             "suppressApplicationTitle": true         },
And it works well after saving the config file. But after system reboot, the font seems missing. I have to reinstall the font to make it work in terminal.
Expected behavior

Actual behavior

The font seems missing in terminal:

But it works well in VS:

And can be found in the system fonts folder:

Thanks for the info! This looks like a /dupe of #3257


STM32G4: Write to flash Bank 2 address 0x08040000 does not work

Describe the bug
Write to flash Bank 2 address 0x08040000 from Bank 1 using the zephyr API, flash_write() does not seem to work as expected in STM32G474.
I am using 256K flash version of STM32G474 and BFB2 bit to switch between flash Banks 1 & 2. I am trying to write a new image to flash Bank 2 address 0x08040000, from the Bank 1. But I don't see anything being written to this address. However, when I use the address 0x08020000 instead, I can see the bytes written to the flash correctly.
I don't know if I am messing up with the address offset here.
Is there anything special that needs to be done so that the proper flash bank is selected during the erase operation in the function erase_page()?
Below is my code.
dest_address = 0x08040000;
uint32_t address = dest_address - CONFIG_FLASH_BASE_ADDRESS; // To get the offset
flash_write_protection_set(flash_dev, false);
flash_erase(flash_dev, address, FLASH_PAGE_SIZE);
flash_write_protection_set(flash_dev, false);
flash_write(flash_dev, address, (uint8_t *)source_buf, FLASH_PAGE_SIZE);
flash_write_protection_set(flash_dev, true); (edited)
Flash partition
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
slot0_partition: partition@8000000 {
label = "image-0";
reg = <0x08000000 0x1F000>;
};
slot1_partition: partition@8040000 {
label = "image-1";
reg = <0x08040000 0x1F000>;
};
image_header_partition: partition@801F000 {
label = "image-header";
reg = <0x801F000 0x800>;
};
ota_status_partition: partition@801F800 {
label = "ota-status";
reg = <0x0801F800 0x800>;
};
};
};
Environment:
OS: Windows
Toolchain: Zephyr
Commit SHA or Version used: v2.4-branch
Additional context
RM0440 of the MCU states that the Bank2 address starts at 0x08040000 even though a Bank size is 128K.
I will try to create an example non-working code to demo this.
Reference
https://github.com/barafael/g4-dual-bank-example

An update on this:
I have replaced the above partition with this now without any benefit yet:
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
	slot0_partition: partition@0 {
		label = "image-0";
		reg = <0x00000000 0x1F000>;
	};

	slot1_partition: partition@40000 {
		label = "image-1";
		reg = <0x00040000 0x1F000>;
	};

	/* To store the image header*/
	image_header_partition: partition@1F000 {
		label = "image-header";
		reg = <0x0001F000 0x00000800>;
	};

	/* The flash address to write the OTA status. This corresponds to the last page of Bank 1*/
	ota_status_partition: partition@1F800 {
		label = "ota-status";
		reg = <0x0001F800 0x00000800>;
	};
};

};

I placed the below code in the main.c of the zephyr flash_shell example.
uint8_t data[64];

printk("Testing: write to flash offset 0x40000 \n");

int ret;

off_t offset = 0x40000;
size_t size = 64;

// for(int i = 0; i < 2048; i++) {data[i]= i;}
for(int i = 0; i < 64; i++) {data[i]= i;}

ret = flash_write_protection_set(flash_device, false);
if (ret) {
	printk("Failed to disable flash protection (err: %d)."
			"\n", ret);
	return;
}
ret = flash_erase(flash_device, offset, size);
if (ret) {
	printk("flash_erase failed (err:%d).\n", ret);
	return;
}

// ret = flash_write(flash_device, offset, &data, FLASH_PAGE_SIZE);
ret = flash_write(flash_device, offset, &data, sizeof(data));
if (ret) {
	printk("flash_write failed (err:%d).\n", ret);
	return;
}

ret = flash_write_protection_set(flash_device, true);
if (ret) {
	printk("Failed to enable flash protection (err: %d)."
			"\n", ret);
	return;
}

uint8_t buf[64];
ret = flash_read(flash_device, offset, buf, sizeof(buf));
if (ret) {
    printf("Error reading from flash \r\n");
}
else {
    printf("Reading from flash. \n");
    for (int k = 0; k < sizeof(buf); k++) {
        printf("%.2x ", buf[k]);
    }
    printf("\n");
}

printk("Testing: write to flash offset 0x20000 \n");

offset = 0x20000;

for(int i = 0; i < 64; i++) {data[i]= 0xAA;}

ret = flash_write_protection_set(flash_device, false);
if (ret) {
	printk("Failed to disable flash protection (err: %d)."
			"\n", ret);
	return;
}
ret = flash_erase(flash_device, offset, size);
if (ret) {
	printk("flash_erase failed (err:%d).\n", ret);
	return;
}

ret = flash_write(flash_device, offset, &data, sizeof(data));
if (ret) {
	printk("flash_write failed (err:%d).\n", ret);
	return;
}

ret = flash_write_protection_set(flash_device, true);
if (ret) {
	printk("Failed to enable flash protection (err: %d)."
			"\n", ret);
	return;
}

ret = flash_read(flash_device, offset, buf, sizeof(buf));
if (ret) {
    printf("Error reading from flash. \n");
}
else {
    printf("Reading from flash.. \n");
    for (int k = 0; k < sizeof(buf); k++) {
        printf("%.2x ", buf[k]);
    }
    printf("\r\n");
}

printk("Success");

Both write operations worked fine in the nucleo board stm32g474re and the output was as below.
*** Booting Zephyr OS build zephyr-v2.4.0  ***
Found flash controller FLASH_CTRL.
Flash I/O commands can be run.

What could be possibly wrong here?

It doesnt make sense to me in G474 with only 128K size for each bank, how did it even allow me to successfully write to and read from the flash offset 0x20000.
I thought this offset shouldn't even exist because the bank 2 starts from offset 0x40000 as per the user manual. Also the maximum bank size is 128k = 0x20000. So, where in flash did my write actually save the bytes?

Hi @azeemshatp,
It is working fine on my side (with default partition settings)

with flash_shell sample (without changes)
with your code (original post) in condition to activate switch MPU_ALLOW_FLASH_WRITE
i.e. same solution that for #29796

Because flash_shell sample activate this switch, it may explain it is working when you use flah_shell sample.
Can you check the same?

It doesnt make sense to me in G474 with only 128K size for each bank, how did it even allow me to successfully write to and read from the flash offset 0x20000.

G474 in dualbank configuration has 2 bank of 128 pages, with 2K pages. So 1st bank ends at 0x3FFFF. So 0x20000 is part of bank1

Regarding the point 2:
May be I am missing something here.
I am using STM32G474RCT, which is a 256K flash version. So this can only have a single bank size of 128K max. So if we consider 2k sized pages in dual bank mode, there could only be 64 pages per bank, or not?

Just noticed that the nucleo board where I found the code was working fine, has the MCU STM32G474RET, which is a 512K flash version. So the issue seems to be only with the 256K version.

I am using STM32G474RCT,

Ok, as it was not specified, I was supposing you used  nucleo_g474re which is supported in zephyr.
So now, knowing that it seems you can write to address 0x08020000 and not at  0x08040000,
maybe you are in single bank configuration.
Can you check the value of option byte  DBANK ?Aand make sure it is set to 1.

The value of option byte DBANK was 1 already.
Is there any specific reason why we don't have a zephyr board definition available yet for nucleo_g474rc ?

So with the dualbank configuration on STM32G474RCT,
there is a discontinuity between bank1 and bank2 (0x08020000 -- 0x0803FFFF is physically not accesssible).
Unfortunately, it seems STM32G4 flash driver is not able to tackle this discontinuity, specially when creating flash layout.
In other word it assumes that bank2 is contigiuous to bank1, which explain why you cannot write at 0x08040000.
I will check whether we can trick the driver to make it work.

Also looking into this a bit. It seems like the issue is even beyond the STM32G4 implementation. The struct flash_pages_layout only contains the number of pages and their size, but no offset. So even if flash_stm32_page_layout in the flash_stm32g4x.c returned a separate layout for each bank, the function flash_get_page_info would not be able to know about the gap in the flash layout.
A very dirty trick to make it work is to just multiply the pages count by a factor of 2:
https://github.com/zephyrproject-rtos/zephyr/blob/e83fab32d721034feabee8f1192bd2a9b8598e3b/drivers/flash/flash_stm32g4x.c#L192
I tried this out and it works. But it's interesting that I can still read out the written data at 0x08020000 from the previous tries using a debugger. So now I have the data in both locations. What would be the expected result if writing to a memory location that's physically not present (the discontinuity). I double-checked on my custom board, it's definitely an STM32G474RCT6. Same as @azeemshatp stated above.

Played around a bit more and I can confirm that 0x08020000 and 0x08040000 are not mapped to the same physical memory, as I can store different data which persists after reset. Seems like we get additional 256k flash for free if we ignore the FLASH_SIZE register ;)
Btw, the value of FLASH_SIZE register correctly reads 0x0100FFFF, which means 256k.

Hi,
I don't want to modify flash_pages_layout as it is defined out of stm32 stuff,
so I tried a much more complex trick.
I push a branch in my fork (https://github.com/ABOSTM/zephyr.git):
branch: FLASH_G4_BANK_DISCONTINUITY
It seems working but I don't have STM32G474RCT6 chip to test.
@azeemshatp , @martinjaeger, could you test my branch on your board ?
I am interested by status of  both operations :

write to 0x08040000 should work
write to 0x08020000 should fail

Seems like we get additional 256k flash for free if we ignore the FLASH_SIZE register ;)

You are lucky :smile:  ... but you have no guaranty of any kind.

Morning @ABOSTM. Tested your solution and it works like a charm.
At address 0x08040000 I can successfully read and write, at 0x08020000 I get E: Erase range invalid. Offset: 131072, len: 64.
I like the idea to create a large dummy flash page. Much cleaner than my quick hack. Are you creating a PR?

Thanks a lot @ABOSTM and @martinjaeger for the fix.
I am also gonna try this, and will update you how it went.

With the workaround, just noticed that erasing the offset 0x1F800 as below throws error when I use FLASH_PAGE_SIZE. Works fine when I used a smaller size = 64.
flash_erase(flash_device, offset, FLASH_PAGE_SIZE);
Could you please check this @martinjaeger

@azeemshatp: Yes, same issue here. FLASH_PAGE_SIZE is correctly set to 2048 (verified with printf), so there seems to be a bug somewhere in the validation.

I created the PR #30231, with a cleaner version of the patch.
I fix the issue of offset 0x1F800 (condition at the border)

Dear @ABOSTM
Did you get a chance to look at the issue that I mentioned in the PR already?.
A write to the offset 0x5F800 from Bank 2 fails every second time giving me the below log:
*** Booting Zephyr OS build zephyr-v2.4.0  ***
Found flash controller FLASH_CTRL.
Flash I/O commands can be run.
Flash offset: 5F800
Reading from flash ..
00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f
Flash offset: 5F800
E: Word at offs 391168 not erased
flash_write failed (err:-5).
I was using the below code to test,
uint8_t data[64];
uint8_t buf[64];
int ret;
size_t size = 64;

// off_t offset = 0x20000;
// off_t offset = 0x40000;
off_t offset = 0x5F800;

static const struct device *flash_device;
flash_device =
	device_get_binding(DT_CHOSEN_ZEPHYR_FLASH_CONTROLLER_LABEL);
if (flash_device) {
	printk("Found flash controller %s.\n",
		DT_CHOSEN_ZEPHYR_FLASH_CONTROLLER_LABEL);
	printk("Flash I/O commands can be run.\n");
} else {
	printk("**No flash controller found!**\n");
	printk("Run set_device <name> to specify one "
	       "before using other commands.\n");
}

printf("Flash offset: %.X \r\n", offset);

for(int i = 0; i < 64; i++) {data[i]= i;}

ret = flash_write_protection_set(flash_device, false);
if (ret) {
	printk("Failed to disable flash protection (err: %d)."
			"\n", ret);
	return;
}
ret = flash_erase(flash_device, offset, size);
if (ret) {
	printk("flash_erase failed (err:%d).\n", ret);
	return;
}

ret = flash_write(flash_device, offset, &data, sizeof(data));
if (ret) {
	printk("flash_write failed (err:%d).\n", ret);
	return;
}

ret = flash_write_protection_set(flash_device, true);
if (ret) {
	printk("Failed to enable flash protection (err: %d)."
			"\n", ret);
	return;
}

ret = flash_read(flash_device, offset, buf, sizeof(buf));
if (ret) {
    printf("Error reading from flash \r\n");
}
else {
    printf("Reading from flash .. \r\n");
    for (int k = 0; k < sizeof(buf); k++) {
        printf("%.2x ", buf[k]);
    }
    printf("\r\n");
}

printf("Flash offset: %.X \r\n", offset);

for(int i = 0; i < 64; i++) {data[i]= 0xAA;}

ret = flash_write_protection_set(flash_device, false);
if (ret) {
	printk("Failed to disable flash protection (err: %d)."
			"\n", ret);
	return;
}
ret = flash_erase(flash_device, offset, size);
if (ret) {
	printk("flash_erase failed (err:%d).\n", ret);
	return;
}

ret = flash_write(flash_device, offset, &data, sizeof(data));
if (ret) {
	printk("flash_write failed (err:%d).\n", ret);
	return;
}

ret = flash_write_protection_set(flash_device, true);
if (ret) {
	printk("Failed to enable flash protection (err: %d)."
			"\n", ret);
	return;
}

ret = flash_read(flash_device, offset, buf, sizeof(buf));
if (ret) {
    printf("Error reading from flash \r\n");
}
else {
    printf("Reading from flash .. \r\n");
    for (int k = 0; k < sizeof(buf); k++) {
        printf("%.2x ", buf[k]);
    }
    printf("\r\n");
}

printk("Success");

@azeemshatp can you please tell me the value at address 0x1FFF6FFE ?
(You can read with STM32CubeProgrammer)
Normally you should get something like 0xFFFF00D3.

It reads 0xFFFF00D4 and not 0xFFFF00D3

Yea, you are right and that seemed to be fixed in the updated system bootloader.


Example http server not work on Windows 7

I use ActiveState Python 3.4.1
I install asyncio and aiohttp adn chardet
Trying to start server example from http://aiohttp.readthedocs.org/en/v0.14.4/
python httpserver.py
I got:
Traceback (most recent call last):
File "C:\bin\Python\lib\asyncio_init_.py", line 16, in
from . import _overlapped
ImportError: cannot import name '_overlapped'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "httpserver.py", line 1, in
import asyncio
File "C:\bin\Python\lib\asyncio_init_.py", line 18, in
import _overlapped  # Will also be exported.
ImportError: No module named '_overlapped'

That is not aiohttp related. You need to install asyncio from binary package or compile c extension

Thanks.
i install other python from https://www.python.org/downloads/
and problem solved.


Created Unit test for classes in PR

Description
In this PR, we have created unit test for classes
Book✅
Person✅
Student✅
Teacher✅
Classroom✅
Rental✅
all classes that you created while implementing the Decorator design pattern✅

@supreeti I have made the changes required. 😄


Setting 'permalinks' has no effect

Issue Summary
Setting 'permalinks' has no effect
To Reproduce
Given one recently published post with slug foo,

Issue update settings set value = '/:year/:slug/' where `key` = 'permalinks'; in MySQL
Visit /

Actual: Post is shown at path /foo
Expected: Post is shown at path /2020/foo
Technical details:

Ghost Version: 3.5.0
Node Version: ^12.10.0
Browser/OS: All
Database: MySQL

Hi @joallard, modifying database directly in not encouraged as the application won't be able to pick up the change and you risk ending up in an unknown state. Please use our forum to clarify what problem you were trying to solve and I'm sure the community will be happy to help out :wink:

Seemed to me like this was a bug, but okay. Thing is with the forum, that it pretty much feels like talking into the void. After all, I'm just trying to solve problems here.

Besides, saying this STR here is the intended behavior and not a bug is kind of a bold statement. Why wouldn't the internals matter?
"Don't you dare hack things, mortal!"

"Don't you dare hack things, mortal!"

I'm was not implying this. And I don't appreciate such attitude.
The application state is dependent on all the changes being done on the application layer not on the DB layer. To take effect in the URL service, the application should know there has been a change in state. If you do that strictly in the DB without the app restart the change won't take effect.
Sidenote, the most appropriate way to customize your URLs within ghost is to utilize dynamic routing the use of permalink comming from the DB has been discouraged and removed since https://github.com/TryGhost/Ghost/commit/8bb7088ba026efd4a1c9cf7d6f1a5e9b4fa82575. :v:

@joallard This isn't a support desk, and nobody owes you anything.
https://ghost.org/faq/open-source-etiquette/


Changed condition for installing gpg keys

Cause this block does not work for Ubuntu 16.04

The CI test failed:
TASK [ansible-zabbix-agent : Debian | Installing zabbix-agent] *****************
skipping: [zabbix-agent-centos]
fatal: [zabbix-agent-ubuntu]: FAILED! => {"cache_update_time":<PHONE_NUMBER>, "cache_updated": true, "changed": false, "failed": true, "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\"     install 'zabbix-agent'' failed: E: There are problems and -y was used without --force-yes\n", "rc": 100, "stderr": "E: There are problems and -y was used without --force-yes\n", "stderr_lines": ["E: There are problems and -y was used without --force-yes"], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nThe following extra packages will be installed:\n  libasn1-8-heimdal libcurl3 libgssapi3-heimdal libhcrypto4-heimdal\n  libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal\n  libkrb5-26-heimdal libldap-2.4-2 libroken18-heimdal librtmp0 libsasl2-2\n  libsasl2-modules libsasl2-modules-db libwind0-heimdal\nSuggested packages:\n  libsasl2-modules-otp libsasl2-modules-ldap libsasl2-modules-sql\n  libsasl2-modules-gssapi-mit libsasl2-modules-gssapi-heimdal\nThe following NEW packages will be installed:\n  libasn1-8-heimdal libcurl3 libgssapi3-heimdal libhcrypto4-heimdal\n  libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal\n  libkrb5-26-heimdal libldap-2.4-2 libroken18-heimdal librtmp0 libsasl2-2\n  libsasl2-modules libsasl2-modules-db libwind0-heimdal zabbix-agent\n0 upgraded, 16 newly installed, 0 to remove and 1 not upgraded.\nNeed to get 1438 kB of archives.\nAfter this operation, 5509 kB of additional disk space will be used.\nWARNING: The following packages cannot be authenticated!\n  zabbix-agent\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "The following extra packages will be installed:", "  libasn1-8-heimdal libcurl3 libgssapi3-heimdal libhcrypto4-heimdal", "  libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal", "  libkrb5-26-heimdal libldap-2.4-2 libroken18-heimdal librtmp0 libsasl2-2", "  libsasl2-modules libsasl2-modules-db libwind0-heimdal", "Suggested packages:", "  libsasl2-modules-otp libsasl2-modules-ldap libsasl2-modules-sql", "  libsasl2-modules-gssapi-mit libsasl2-modules-gssapi-heimdal", "The following NEW packages will be installed:", "  libasn1-8-heimdal libcurl3 libgssapi3-heimdal libhcrypto4-heimdal", "  libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal", "  libkrb5-26-heimdal libldap-2.4-2 libroken18-heimdal librtmp0 libsasl2-2", "  libsasl2-modules libsasl2-modules-db libwind0-heimdal zabbix-agent", "0 upgraded, 16 newly installed, 0 to remove and 1 not upgraded.", "Need to get 1438 kB of archives.", "After this operation, 5509 kB of additional disk space will be used.", "WARNING: The following packages cannot be authenticated!", "  zabbix-agent"]}
The following extra packages will be installed:
  krb5-locales libcurl3 libgssapi-krb5-2 libk5crypto3 libkeyutils1 libkrb5-3
  libkrb5support0 libldap-2.4-2 librtmp1 libsasl2-2 libsasl2-modules
  libsasl2-modules-db libssh2-1
Suggested packages:
  krb5-doc krb5-user libsasl2-modules-otp libsasl2-modules-ldap
  libsasl2-modules-sql libsasl2-modules-gssapi-mit
  libsasl2-modules-gssapi-heimdal logrotate
The following NEW packages will be installed:
  krb5-locales libcurl3 libgssapi-krb5-2 libk5crypto3 libkeyutils1 libkrb5-3
  libkrb5support0 libldap-2.4-2 librtmp1 libsasl2-2 libsasl2-modules
  libsasl2-modules-db libssh2-1 zabbix-agent
0 upgraded, 14 newly installed, 0 to remove and 42 not upgraded.
changed: [zabbix-agent-debian]

Can you please take a look and fix it?

It is very strange, but it works for me. Tested it twice on Ubuntu 16.04

Then it won't work on older Ubuntu versions. I believe the tests are using 14.04.


register(): Extend types.

The register function is currently typed to receive only PreLoadable params. Allowing it to receive partial values of EnhancedPreLoadable will fix typing errors when using parameters such as cached, placeholder and extract.
As an example, I was having a really hard time understanding why the following code wasn't working:
register({ require: () => require('./TestComponent').NamedExport }).
The reason this wasn't possible is because getComponent (in map.ts) takes the extract variable and uses it to extract a named (or default) export from the given require function. This was never clear to me because the register function doesn't accept in any of the cached, placeholder or extract values form the EnhancedPreLoadable type.
I was then able to fix my issue by simply changing my function signature to:
register({ extract: 'NamedExport', require: () => require('./TestComponent') }).
This works perfectly, but still leaves TS errors as register is not typed to receive EnhancedPreLoadable variables.

Oops, sorry for the misleading...
Yes, the register method can accept additional parameters, such as cached, placeholder and extract. It was a mistake from my side. I completely forgot to add additional parameters to the type declaration, because on my project there were only default exports everywhere :)
Thanks for pointing out this error. Your changes look good to me. I am going to merge them, and publish a new version 1.0.9.
Thanks again for your contribution!


Changes resulting from http2-client waitStream change.

Depends on https://github.com/lucasdicioccio/http2-client/pull/75

Thanks again!

Thanks again!


docs: get new code example

name: Bug fix
about: Fixing a problem with Flutter OTP Autofill.
assignees: MbIXjkee

Checklist

[ ] Have you added an explanation of what your changes do and why you'd like us to include them?
[ ] Is there an existing issue for this PR?

link issue here

[ ] Have the files been linted and formatted?
[ ] Have the docs been updated to match the changes in the PR?
[ ] Have the tests been updated to match the changes in the PR?
[ ] Have you run the tests locally to confirm they pass?

Changes
What is the current behavior, and the steps to reproduce the issue?
What is the expected behavior?
How does this PR fix the problem?

Codecov Report
Base: 100.00% // Head: 100.00% // No change to project coverage :thumbsup:

Coverage data is based on head (71edc61) compared to base (f69c382).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #29   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            3         3
  Lines           79        79
=========================================
  Hits            79        79

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Support dynamic filter query on slice value and map value

Hi goccy, glad to see your dynamic filter feature perfectly meets what we need in our JSON log situation.
What we face is, we have a lot of huge thrift-generated request/response structs that we cannot control how to dump as JSON. But with dynamic filter feature, we may drastically shrink our logs and reduce performance loss.
However, seems like it only supports pure nested struct data model, I've found that if value.Filter() is chained through SliceCode and MapCode, it could handle slice layers and map layers properly.
func (c *SliceCode) Filter(query *FieldQuery) Code {
	sliceCode := &SliceCode{
		typ:   c.typ,
		value: c.value.Filter(query),
	}
	return sliceCode
}

func (c *MapCode) Filter(query *FieldQuery) Code {
	mapCode := &MapCode{
		typ:   c.typ,
		key:   c.key,
		value: c.value.Filter(query),
	}
	return mapCode
}

With that said, when query is set as "XA", a JSON like [{"XA":1,"XB":2}] will be serialized as [{"XA":1}].
So, do you think it's reasonable to allow query apply on slice value and map value? Maybe I can fire a pull request for this.

Thank you for the contribution !!
As you said, regarding map, it seems that it can be handled by implementing Filter. You can do the same with slice , but you have to think about how the user will specify the elements of slice. Currently, it is specified based on the ( struct's ) field name.


The WXKG12LM button does not display any action.

The WXKG12LM button does not display any action. Please help me figure out why it's not working.
Zigbee2mqtt  version: 1.22.2-1
Sonoff Z-Stack_3.x.0_20220103
Home Assistant 2021.12.10
Home Assistant Supervised

Please tell me why the button does not display the action. Why does the action line show N/A .

The WXKG12LM and WXKG01LM buttons do not appear in the dashboard tab. They are in the device tab.

WXKG12LM and WXKG01LM do not appear on the dashboard tab. Why ?


Inline script execution and styling in superset violating content security policy

Using Superset frontend in environments that enforce strict content security policies, for example  which blocks the use of inline css and JavaScript causes some elements not to be rendered, including data visulisations.
Ref: https://developers.google.com/web/fundamentals/security/csp#inline_code_is_considered_harmful
Examples of the inline code are as follows:

                Message Status

                count

                % count

There are also inline functions on buttons such as the example below

Expected results
Superset should be able to run in secure environments with strictly enforced policies. It should not have any inline JS or css, css should be class oriented and both css/js should be referenced in an external file.
Actual results
Superset UI loads, but it's not working, strict Content Security Policy will block inline styles and inline functions from executing.
Screenshots

How to reproduce the bug

Go to '...'
Click on '....'
Scroll down to '....'
See error

Environment
(please complete the following information):

superset version: 0.36.0
python version: 3.6.0
node.js version: 10-jessie

Checklist
Make sure to follow these steps before submitting your issue - thank you!

[x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
[x] I have reproduced the issue with at least the latest released version of superset.
[x] I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context
Add any other context about the problem here.

I fear that creating a system of data visualizations with no inline CSS will be impossible. We will take this under advisement as a possible future enhancement to the platform.


Project 1 Peer Review - Team Epsilon

Hi Team,
I tried to set up your Project on my System which is a MAC running (Monterey v12.1) in which port 5000 is being already used by the OS and I saw that your api gateway runs on PORT 5000, so I tried to update it to an open port in my system (Port 6000) but it still didn't work and then I found out that you have written the port in  files other than the configuration files and even after changing them it didn't work.
I would suggest not to write PORT details directly in the code like it was done in garuda.apigateway/server.py and you can also try to look what can be done so that such issues with PORTS can be handled with less changes or changes at a single place like changing the port in docker-compose.yml maybe should change the PORT dependency everywhere.
You can have a look at "Environment" tag for docker-compose.

Thanks for your review !
We were planning to move the ports and host name outside to environment variable in the next spring. Your review gave a good excuse to open a feature request now.
Regarding your CORS issue, we had added CORS specific header at server side. Maybe the front end is requesting on port 5000 but since you made the server listen on port 6000 a change on the client side was also needed. This can be managed easily once we move all the ports and hostname to env variables as you suggested.
Thanks for the review.

@chanakyaken Much appreciated.
For time being could you follow this link
So that you could run our project.
Thanks.

Issue opened in #76


Bundle generation issues warnings for APIs removed in k8s 1.25 but their v2 is still available

Bug Report

What did you do?
Set minKubeVersion: 1.25.0 and use
            - apiGroups:
                - autoscaling
              resources:
                - horizontalpodautoscalers
              verbs:
                - create
                - delete
                - get
                - list
                - patch
                - watch

            - apiGroups:
                - discovery.k8s.io
              resources:
                - endpointslices
              verbs:
                - get
                - list
                - watch

What did you expect to see?
No warnings
What did you see instead? Under which circumstances?
WARN[0000] Warning: Value kong-gateway-operator.v1.2.0-rc.1: this bundle is using APIs which were deprecated and removed in v1.25. More info: https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-25. Migrate the API(s) for endpointslices: (["ClusterServiceVersion.Spec.InstallStrategy.StrategySpec.ClusterPermissions[0].Rules[40]"]),horizontalpodautoscalers: (["ClusterServiceVersion.Spec.InstallStrategy.StrategySpec.ClusterPermissions[0].Rules[6]"]),
INFO[0000] All validation tests have completed successfully

Environment
Operator type:

Kubernetes cluster type:

$ operator-sdk version
./bin/operator-sdk version
operator-sdk version: "v1.34.1", commit: "edaed1e5057db0349568e0b02df3743051b54e68", kubernetes version: "v1.28.0", go version: "go1.22.0", GOOS: "darwin", GOARCH: "arm64"

$ go version (if language is Go)

$ kubectl version
kubectl version
\WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"26", GitVersion:"v1.26.0", GitCommit:"b46a3f887ca979b1a5d14fd39cb1af43e7e5d12d", GitTreeState:"clean", BuildDate:"2022-12-08T19:58:30Z", GoVersion:"go1.19.4", Compiler:"gc", Platform:"darwin/arm64"}
Kustomize Version: v4.5.7
Server Version: version.Info{Major:"1", Minor:"29", GitVersion:"v1.29.2", GitCommit:"4b8e819355d791d96b7e9d9efe4cbafae2311c88", GitTreeState:"clean", BuildDate:"2024-02-14T22:25:42Z", GoVersion:"go1.21.7", Compiler:"gc", Platform:"linux/arm64"}
WARNING: version difference between client (1.26) and server (1.29) exceeds the supported minor version skew of +/-1

Possible Solution

Additional context
Warnings in community operator pipeline: https://github.com/k8s-operatorhub/community-operators/pull/4015#issuecomment-1992638925

Pretty sure this is expected behavior. We do this check based on permissions, we don't have the actual version # of the resource. So we're bubbling up this warning to let you know that it might not work. If you're confident you're using a non deprecated version of the resource, you can ignore this warning.


ValueError in Intent Classification if running from script

import json
from deeppavlov.core.commands.infer import build_model_from_config
NER_CONFIG_PATH = 'sentiment_twitter_preproc.json'
config = json.load(open(NER_CONFIG_PATH, mode='rt'))
new_model = build_model_from_config(config)
new_model(['привет!))'])

gives me

ValueError                                Traceback (most recent call last)
 in
----> 1 new_model(['привет!))'])
~/projects/intent-classification/env/lib/python3.6/site-packages/deeppavlov/core/common/chainer.py in call(self, *args, **kwargs)
104
105     def call(self, *args, **kwargs):
--> 106         return self._predict(*args, **kwargs)
107
108     def _predict(self, x, y=None, to_return=None):
~/projects/intent-classification/env/lib/python3.6/site-packages/deeppavlov/core/common/chainer.py in _predict(failed resolving arguments)
139                 res = component(**dict(zip(in_keys, x)))
140             else:
--> 141                 res = component(*x)
142             if len(out_params) == 1:
143                 mem[out_params[0]] = res
~/projects/intent-classification/env/lib/python3.6/site-packages/deeppavlov/models/classifiers/keras_classification_model.py in call(self, data, *args)
223         preds = np.array(self.infer_on_batch(data), dtype="float64")
224
--> 225         labels = proba2labels(preds, confident_threshold=self.opt['confident_threshold'], classes=self.classes)
226         return labels, [dict(zip(self.classes, preds[i])) for i in range(preds.shape[0])]
227
~/projects/intent-classification/env/lib/python3.6/site-packages/deeppavlov/models/classifiers/utils.py in proba2labels(proba, confident_threshold, classes)
70             y.append(np.array(classes)[to_add].tolist())
71         else:
---> 72             y.append(np.array([np.array(classes)[np.argmax(sample)]]).tolist())
73
74     return y
~/projects/intent-classification/env/lib/python3.6/site-packages/numpy/core/fromnumeric.py in argmax(a, axis, out)
1002
1003     """
-> 1004     return _wrapfunc(a, 'argmax', axis=axis, out=out)
1005
1006
~/projects/intent-classification/env/lib/python3.6/site-packages/numpy/core/fromnumeric.py in _wrapfunc(obj, method, *args, **kwds)
50 def _wrapfunc(obj, method, *args, **kwds):
51     try:
---> 52         return getattr(obj, method)(*args, **kwds)
53
54     # An AttributeError occurs if the object does not have
ValueError: attempt to get argmax of an empty sequence

Though all is OK if running from command line as
$ python -m deeppavlov interact ../sentiment_twitter_preproc.json
What I am doing wrong?

Hello!
I've tried to reproduce your error but didn't faced this problem.
Do you use master branch of DeepPavlov?

Also, please, try to download pre-trained models again.

Hello!
I've tried to reproduce this error but didn't fase it.
Do you use master branch of deeppavov?
Could you, please, try to download pre-trained models again and run scripts?
Also you can check whether you use the same environment to run code?

Whatever you want.
I think git-version can be better if you are developing something (you can use another branches of DeepPavlov, you can create your own mirror of the repo to develop and control versions with git) while pip version is ok if your are only using models on your own data.


Density dependent tokens broken by nesting

The ordering of density scoped variables is broken if the component name is also used and there are nested densities, i.e. in situations like:
.uitk-density-high .MyComponent {
--myComponent-var: ;
}
.uitk-density-medium .MyComponent {
--myComponent-var: ;
}
This can be seen when looking at 'Compare with Original Toolkit' stories if the above format is in code. Mostly, when the canvas is in medium density, everything appears OK, but switching to e.g. touch density will impact from which density the styling is from due to nesting and CSS ordering conflicts.
The current best fix (as seen in #323) is to scope these density variables only to e.g. .uitk-density-medium, rather than .uitk-density-medium .MyComponent. The downside to this is that it explodes the amount of variables exposed within the density scopes, which also makes these variables seem like theme tokens rather than component tokens.

Closing since I believe this is now fixed. Will re-open if not


提问太快啦，请休息一下再问我吧

[INFO][2023-06-04 13:25:37][log.py:32] - [CHATGPT] api_base= proxy=http://<IP_ADDRESS>:7890
[INFO][2023-06-04 13:25:37][log.py:32] - [CHATGPT] query=hello
[WARNING][2023-06-04 13:25:40][log.py:39] - You exceeded your current quota, please check your plan and
billing details.
[WARNING][2023-06-04 13:25:45][log.py:39] - [CHATGPT] RateLimit exceed, 第1次重试
[WARNING][2023-06-04 13:25:45][log.py:39] - You exceeded your current quota, please check your plan and
billing details.

同样遇到这个问题
[WARNING][2023-06-05 10:11:57][log.py:39] - You exceeded your current quota, please check your plan and billing details.
[WARNING][2023-06-05 10:12:02][log.py:39] - [CHATGPT] RateLimit exceed, 第1次重试
[WARNING][2023-06-05 10:12:02][log.py:39] - You exceeded your current quota, please check your plan and billing details.
<IP_ADDRESS> - - [05/Jun/2023 10:12:02] "POST /chat HTTP/1.1" 200 -

应该是免费的次数到了，要付费api才可以


Can't post house rental ads

When ever I try to post a house rental ad I get a 500 Internal Server Error

Which specific Kijiji category are you attempting to post an ad to?

if I recall, it was a date formatting issue. was fixed in mine a while ago (check around line 638 in server.py).

Fixed in commit 7bdb6f0


React 16

Hi, @chiedo .
What do you think about supporting latest react version? Also halogen library with loaders freezed and doesn't support it.
I can do PR if you don't mind

That sounds great to me @ostapch
Thanks!

Hi @ostapch!
Did you already have a go at this? I've noticed that the two main issues seem to be that react-stl-viewer as well as halogen are using React.propTypes instead of prop-types (I only briefly tested though).

Hey @sonsoleslp I wasn't planning on doing so if I'm being honest, but I will now that you've brought it to my attention! I'm no longer working on the project I built this for so it's fallen to the back of mind.

That'd be great! I was planning on using it for a project and maybe even contribute to your library if it falls short of my requirements.

Thank you so much @chiedo !


ModelHparams isn't a general interface as it implies

@dataclass
class ModelHparams(hp.Hparams, ABC):
    initializers: List[Initializer] = hp.optional(
        default_factory=lambda: [],
        doc="The initialization strategy for the model",
    )

    num_classes: Optional[int] = hp.optional(
        doc="The number of classes.  Needed for classification tasks",
        default=None,
    )

    @abstractmethod
    def initialize_object(self) -> ComposerModel:
        pass

num_classes is classification specific (mostly) and using initializers with torchvision or other integrated models will require wrapping them in constructor functions like landen did for deeplab. Right now many of our models are subclassing ModelHparams and overwriting or not using the built in properties.
perhaps ModelHparams should be:
@dataclass
class ModelHparams(hp.Hparams, ABC):
    @abstractmethod
    def initialize_object(self) -> ComposerModel:
        pass

and we could have task specific interfaces to go with them?
@dataclass
class ClassifierHparams(ModelHparams):
      num_classes: Optional[int] = hp.optional(
        doc="The number of classes.  Needed for classification tasks",
        default=None,
    )

    @abstractmethod
    def initialize_object(self) -> ComposerModel:
        pass

@ravi-mosaicml , @Landanjs

I agree it makes sense to remove num classes from the base class. I would like to keep the initializers (for #472) but otherwise sg.

I'm in favor of remove num_classes and initializers, but would like to discuss more about keeping initializers in the base ModelHparams.
Since we are removing the optional arguments from the base class, this allows us to use required arguments. To me, it would be great if task specific models like ClassifierHparams only had required hparams like num_classes. Subclasses should be adjusted to have required classes when desired.
Do you need help with this @A-Jacobson?

Re: initializers, would it make sense to allow the user to pass the path to a python function (that can be dynamically imported), in addition to the enum values? This would more easily allow for custom initialization when using yahp.

I can see defining a model level weight initialization scheme in one function as a callable but what do you mean by "in addition to the enum values"? I'm having a hard time imagining what this interface looks like.

Currently via the hparams path you can provide an Initializer enum to describe the initialization scheme. The hparams field would be a string -- it would first attempt to match against an enum, and if that fails, then it would attempt to match against a path to a python function.

Maybe? Perhaps with some kind of initializer registry? I'm still skeptical that these would be used across models but it may be good to cover the case where someone explicitly writes multiple initialization schemes for a specific model and wants to test the difference between them.

Since there's still design needed for the initializers (see #472 ), I propose we move num_classes out of the base, and then defer the initializers change until v0.5 to align with #472 .

YAHP is gone


Remove built in functions?

How can i do this, I am trying to use this as a sort of plugin language.. but dont want the functions that are there interfering, i tried removing them from the commands but i could not build the project when i was done, the jar that resulted was always empty

Yes, the only way commands are accessible is by having them available.
I can't think why the jar would build but be empty, assuming you are skipping tests.
mvn -DskipTests

Will look into this.

May i suggest an option to disable the commands inside BeanShell, It would be useful for others who wish to use it as a scripting language as well

If the command cannot be found it is disabled. This allows you to create custom commands.
Still not sure why the jar file should be empty. Doesn't make sense...

It says i should mark things for inclusion but I have no idea how to do that and think it should be the projects job to do that

Not sure this was resolved though.

Removing the commands work as expected.
$ rm src/main/resources/bsh/commands/*
$ mvn package -DskipTests
$ ll target/bsh-3.0.0-SNAPSHOT.jar
-rw-r--r--  1 interperon  staff   535K 20 Jun 15:08:25 2019 target/bsh-3.0.0-SNAPSHOT.jar
$ unzip -l target/bsh-3.0.0-SNAPSHOT.jar | grep commands
        0  06-20-2019 15:08   bsh/commands/
     3670  06-20-2019 13:06   bsh/commands/dir.class

The jar file is not empty and all that remains of the /bsh/commands package is the java source (not bsh script) command dir which you can also delete and remove before packaging a jar file.
$ ll src/main/java/bsh/commands
total 16
-rw-r--r--  1 interperon  staff   5.0K 20 Jun 15:03:37 2019 dir.java

To return the commands:
git checkout src/main/resources/bsh/commands

See #493 current development for separate distributed artefacts ie. bsh-core-3.0.0.jar and bsh-commands-3.0.0.jar etc.
Closed: works as expected


Implement available Horovod Runners directly

🚀 Feature
Motivation
The current implementation requires an external run of the python script with horovodrun.
Pitch
For convinience, available horovod runners for plattforms like Spark or Ray could be directly called inside of PyTorch Lightning. This would allow to specify the number of gpus only once during the initialization of the trainer.
Alternatives
Just keep it the way it is.
Additional context
This could provide a nice way to enable multi node/gpu inside of Databricks notebooks. Detection of Databricks can easily be done via the env var DATABRICKS_RUNTIME_VERSION. Spark could be detected via env vars as well. For Ray there is alredy a Horovod on Ray Plugin.

If you enjoy Lightning, check out our other projects! ⚡

Metrics: Machine learning metrics for distributed, scalable PyTorch applications.

Flash: The fastest way to get a Lightning baseline! A collection of tasks for fast prototyping, baselining, finetuning and solving problems with deep learning

Bolts: Pretrained SOTA Deep Learning models, callbacks and more for research and production with PyTorch Lightning and PyTorch

Lightning Transformers: Flexible interface for high performance research using SOTA Transformers leveraging Pytorch Lightning, Transformers, and Hydra.

Dear @twsl ,
Thanks for opening this issue. We are currently in the process to move the Horovod Plugin to the Horovod library, so I believe this feature should be build there directly.
Best,
T.C

@tchaton is there any issue you can link for me to track progress? But that sounds good, I hope the ETA is not too far away

Dear @twsl,
Mind sharing some background on why this feature is important for you ?
Best,
T.C

I prefer notebooks to python scripts for researching and would like to simply scale my code by updating the trainer parameter and selecting a different cluster.
Databricks is the easiest way for me to access a cluster and comes with horovod spark setup while ddp doesn't work in notebooks.


chore: run tests in random order

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

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 81.47%

Totals

Change from base Build<PHONE_NUMBER>4:
0.0%

Covered Lines:
5931

Relevant Lines:
7280

💛  - Coveralls

Hey @aidan-casey there is this migrade:fresh command test for which I can't for the life of me figure out why is failing, the MemoryOutputBuffer gets some values set but, by the time we get to actually assert the output buffer, its empty.
Maybe you have some idea?

@vsergiu93 - I honestly think the fibers tester is too clever. 😛
It looks to me like something is happening with the output buffer singletons that shouldn't be, because the object IDs are not matching between the ConsoleTester class and the MigrateFreshCommand class. I haven't done enough digging to figure out why.

@aidan-casey Hmm, yeah is very strange, I followed a bit the call stack

Here basically things start to diverge, as you can see $consoleCommandClass holds an instance of console with output buffer having a different id that the one found in $this->container.
For context: I added and id property to MemoryOutputBuffer which I'm setting in the constructor like this  $this->id = spl_object_id($this); and when we get to this method getCallable from ExecuteConsoleCommand class I start to see that what I have in the container is not the same as what we have in the resolved object in $consoleCommandClass

@brendt That makes sense, it was just an idea.

For what it's worth, it was a good idea, @vsergiu93 and clearly shows we have a bug to work out. I'll create an issue for this so we can resolve before v1.


Extract feed URLs from webpages

To add a feed URL to Newsboat's urls file, a user has to find that URL. Some sites display their feeds prominently by adding an RSS icon, but some don't. In that case, user has to take additional steps to find the link (like opening "Page Details" in Firefox and using "Feeds" tab there.)
Newsboat might make it easier by providing something like this:

user presses a key, and an input field shows up;
user enters page URL;
Newsboat downloads the page and presents the user with a list of all feeds the page links to. (It  gets that list by examining <link rel="alternate"> tags in the <head> of the page);
user chooses a URL from the list, Newsboat adds it to the end of urls file, the dialog is closed;
(optional) if user wants their urls file sorted some particular way, the user can press E (edit-urls operation; already exists) and edit their file to their taste.

@noctux already implemented the third step as a standalone app (backup gist). He also points out that there ought to be something similar for remote APIs; in that regard, I mentioned my old Newsbeuter PR. But that's probably worthy of an issue of its own, if anyone's interested.

Just some comments from my side on the sample:
As no License is given in the source: I hereby place that snippet in the public domain, so that it can be integrated with newsboat without hassle. If you would prefere a different one, just let me know, whatever suits you.
To distinguish the different feed-types, one simply has to add a xmlGetProp(doc, "type") here.
When integrating, please take a look at the error handling routine (the error checking should hopefully be fine), currently it simply prints an error to stdout and returns an empty list of feeds...
Finally: I'm sorry for the bad indentation, this is close to embarassing :)

I edited my post to change "@noctux implemented" to "@noctux drafted an implementation", to better reflect the status of the paste. Didn't intend to use it verbatim anyway, but hey, explicit is better than implicit.

Additionally, it would be nice to be able to able to use newsboat from the command-line as a handler for feed MIME types. This would enable using newsboat -<flag> %s on a file of type application/atom+xml for example and have the feed added to the list of URLs (currently possible with a shell script, but it'd be nice if it were directly in newsboat).

As I mentioned on the IRC, it's unclear how to select from multiple feeds on the CLI. Wordpress blogs, for example, usually publish a "posts" feed and "comments" feed. ;)


Add support for unifying quote style (single- vs. double-quotes) of string literals

When pasting code from documentation, tutorials, stackoverflow, etc. I often have to manually unify the quote style (single-quotes vs. double-quotes) of string literals. It would be super cool if js-beautify had an option for that.

+1 :+1:

I was able to make some changes to the javascript version to change single quotes to double quotes (or vice versa). It might not work in all cases. See https://gist.github.com/nmalaguti/576d191c4547cdf7e0cb lines 18-21 and 114-119 for the code changes.


Very noisy logs

Describe the bug
I have just upgraded Ambassador from Helm chart v6.5.11 to v6.5.18 and have noticed that the logs coming from the ambassador pods are very noisy:
time="2021-02-17 16:49:40" level=warning msg="license_secret_watch: empty decoded license data" func=github.com/datawire/apro/cmd/amb-sidecar.runE.func3 file="github.com/datawire/apro/cmd/amb-sidecar/main.go:259" CMD=amb-sidecar PID=13 THREAD=/license_secret_watch
2021/02/17 16:49:43 Taking K8sSecret snapshot.SecretRef{Namespace:"apps", Name:"...n-cf-ca-cert"}
2021/02/17 16:49:43 Taking K8sSecret snapshot.SecretRef{Namespace:"apps", Name:"...-cf-ca-cert"}
2021/02/17 16:49:43 Taking K8sSecret snapshot.SecretRef{Namespace:"apps", Name:"...-cf-ca-cert"}
2021/02/17 16:49:43 Taking K8sSecret snapshot.SecretRef{Namespace:"apps", Name:"...-cf-ca-cert"}
2021/02/17 16:49:43 Taking K8sSecret snapshot.SecretRef{Namespace:"apps", Name:"...-cf-ca-cert"}
2021/02/17 16:49:43 Taking K8sSecret snapshot.SecretRef{Namespace:"ambassador", Name:"ambassador-edge-stack"}
2021/02/17 16:49:43 Taking K8sSecret snapshot.SecretRef{Namespace:"ambassador", Name:"fallback-self-signed-cert"}
2021-02-17 16:49:44 diagd 1.11.1 [P27TAEW] INFO: configuration updated (complete) from snapshot snapshot (S25 L5 G12 C8)

The above lines are repeated every 4 seconds. Before upgrading the log was almost exclusively just HTTP log lines (i.e. `ACCESS [time] "GET /api HTTP...". Now, oddly, I do not see those lines often at all (even though they should be very regular given I have external probes that constantly hit the services)
Expected behavior
A lot less noise in the logs. These lines are offering little value, and especially at the rate I am seeing them.
Versions (please complete the following information):

Ambassador Helm Chart v6.5.18
Azure Kubernetes Cluster v1.18.10

Same issue on v6.5.17. What's more important, the CPU usage is extremely high when compared to v6.5.11

@barclayadam Ouch, mea culpa. Thanks for the report!
@MateuszCzubak Could you open a separate issue for the CPU usage you're seeing? Thanks!

This is fixed in Ambassador 1.12.0.


Can't find assets directory?

My attempt at a build is erroring because it can't find an assets directory:
┌ Warning: DocumenterVitepress: no assets directory found.
└ @ DocumenterVitepress ~/.julia/packages/DocumenterVitepress/SZzuS/src/writer.jl:228

...

build error:
RollupError: Could not resolve "./assets/figures/f.gif" from "build/.documenter/basics.md"

although it's unchanged from the usual Documenter.jl structure:
docs
└───src
    └───basics.md
    └───index.md
    └───.vitepress
        └───config.mts
    └───assets
        └───logo.png
        └───logo.svg
        └───styles.css
        └───figures
            └───f.gif
    └───reference
        └───api.md
        └───functionindex.md

Is there some  configuration option I've overlooked?

Repo? Branch?

ah, the issue here is that we move the files in the src/assets folder into .documenter/public during the build step.  I can walk that change back and only move files matching logo.* and favicon into public instead.

Yes, I'm using Markdown links such as ![ alt text](assets/figures/figure.svg) (Documenter-style). I'm hoping that I wouldn't have to rewrite them all.

I see. Yes, I have the same issue. Going from assets to public (replacing/ renaming) its confusing. Maybe it should be better to keep assets as assets :D, and create the extra folder public in docs? and then copy both? public is mandatory in vitepress ....

@cormullion could you try your build on the latest master?

Works perfectly!

Perfect!  That package looks really cool, by the way :)


Orebfuscator not working correctly

What is the output link of /viaversion dump?
Not included
Are you using any additional software like BungeeCord? If so, what software and version? (Please list your plugins as well)
HexaCord (fork of BungeeCord) BungeeCord-Bootstrap:1.11-SNAPSHOT:5a1da1f:120 by md_5
How does this error happen? login? Using an item?
Exploring the world.
Is there an error in the console? Use pastebin.com. Is there a kick message?
No
Issue
Orebfuscator not working correctly:

If you're not providing the output from ViaVersion dump how do you expect us to help?
Also have you ensured Orebfuscator has the correct settings?

java.io.IOException: Server returned HTTP response code: 403 for URL: http://hastebin.com/documents
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1840) ~[?:1.8.0_101]
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441) ~[?:1.8.0_101]
        at us.myles.ViaVersion.commands.defaultsubs.DumpSubCmd$1.run(DumpSubCmd.java:64) [ViaVersion-1.0.3.jar:?]
        at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:71) [spigot.jar:git-Spigot-db6de12-18fbb24]
        at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53) [spigot.jar:git-Spigot-db6de12-18fbb24]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_101]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_101]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101]```

I'm using default settings.

@Inuun You're definitely not on the latest ViaVersion can you ensure you're on latest ViaVersion and latest Orefuscator that I released.

See above.


Add more details on undo/redo command message

Closes #363.
This PR additionally refactors the undo/redo commands, which closes #270.

Codecov Report
Base: 55.10% // Head: 54.80% // Decreases project coverage by -0.29% :warning:

Coverage data is based on head (a8c4a89) compared to base (9cd29f3).
Patch coverage: 61.42% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #375      +/-   ##
============================================
- Coverage     55.10%   54.80%   -0.30%
  Complexity      879      879
============================================
  Files           179      179
  Lines          4045     4058      +13
  Branches        522      526       +4
============================================
- Hits           2229     2224       -5
- Misses         1711     1729      +18
  Partials        105      105

Impacted Files
Coverage Δ

...c/main/java/seedu/uninurse/logic/LogicManager.java
61.53% <0.00%> (-5.13%)
:arrow_down:

...seedu/uninurse/logic/commands/EditTaskCommand.java
3.12% <0.00%> (ø)

...ava/seedu/uninurse/logic/commands/RedoCommand.java
0.00% <0.00%> (ø)

...ava/seedu/uninurse/logic/commands/UndoCommand.java
0.00% <0.00%> (ø)

src/main/java/seedu/uninurse/model/Model.java
100.00% <ø> (ø)

...a/seedu/uninurse/model/PersistentUninurseBook.java
28.94% <0.00%> (-19.44%)
:arrow_down:

...ava/seedu/uninurse/model/UninurseBookSnapshot.java
35.71% <16.66%> (-33.52%)
:arrow_down:

...c/main/java/seedu/uninurse/model/ModelManager.java
81.42% <57.14%> (-1.47%)
:arrow_down:

...a/seedu/uninurse/logic/commands/CommandResult.java
62.85% <90.00%> (+9.01%)
:arrow_up:

...u/uninurse/logic/commands/AddConditionCommand.java
92.30% <100.00%> (ø)

... and 23 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Use - instead of 0 on count badges

This PR implements an idea from @bilogic on #168820, which was supported by @lszomoru and @daviddossett
After:

Before:

And a mockup trying U+2219 (Bullet Operator) as an alternative to the "-" character in one place:

As currently implemented all count badges with a zero value use the new symbol unless the constructor call explicitly specifes false on the new symbolicZero property of ICountBadgeOptions

Thanks! Really appreciate your help!

Anything I can do to move this forward?

Help :)

@bilogic the team are in endgame at the moment. I'm hoping this may get attention from one of them next week 🤞

Thank you all for your patience. We have discussed this internally and we have explored multiple options: 1) hide the counter when the value is 0, 2) use a special character, 3) use colour to distinguish. Since there are already multiple places in the product where the counter is only being shown when the value is non-zero, I would like us to explore this option in the source control repositories view. I will go ahead and explore this approach and will update the PR with my findings.

Further looked into this and I have stumbled upon the scm.providerCountBadge setting which was added couple of years ago. As we already have a setting, I have made changes so that the "Source Control Repositories" view uses this setting. Let's see how it feels and we can adjust the behaviour based on feedback. Here is a PR with my change - https://github.com/microsoft/vscode/pull/194696.


Enter the page for the first time, then click back; BeforeRouteLeave is not executed

What problem does this feature solve?
The h5 form embedded in the native app is confirmed to be saved before leaving
What does the proposed API look like?
BeforeRouteLeave can be the same as any other page

if reporting a bug, please provide a repro as pointed out by the issue helper


DReyeVR Util Sensor does not work with Additional Maps

Hi,
I'm trying to collect sensor data from additional maps such as Town 6. I imported the tarball here: https://carla-releases.s3.eu-west-3.amazonaws.com/Linux/AdditionalMaps_0.9.13.tar.gz
into the ./Import folder of the built-from-source CARLA folder, then ran ImportAssets.sh to install them.
It seems that CARLA itself loads the world fine (and it is possible to drive in VR to explore these towns), but the find_ego_sensor() from DReyeVR_utils.py is unable to find the DReyeVR sensor in Town 6. Here is the full output in my implementation:
initialized DReyeVRSensor PythonAPI client
Starting scenario runner
Recording on file: D:\VRDRiving\data\test_09_30_2022_15_41_13\replay.rec
Saving sensor data to: D:\VRDRiving\data\test_09_30_2022_15_41_13\sensors.csv
Unable to find DReyeVR ego vehicle in world!
initialized DReyeVRSensor PythonAPI client
INFO:  Found the required file in cache!  Carla/Maps/TM/Town06.bin
Traceback (most recent call last):
  File "D:\carla\PythonAPI\examples\VRDriving_study.py", line 216, in <module>
    main()
  File "D:\carla\PythonAPI\examples\VRDriving_study.py", line 208, in main
    start_scenario_runner(scenario_runner_instance)
  File "D:\carla\PythonAPI\examples\VRDriving_study.py", line 41, in start_scenario_runner
    result = scenario_runner_instance.run()
  File "D:\VRDriving\scenario_runner\scenario_runner.py", line 529, in run
    result = self._run_route()
  File "D:\VRDriving\scenario_runner\scenario_runner.py", line 494, in _run_route
    result = self._load_and_run_scenario(config)
  File "D:\VRDriving\scenario_runner\scenario_runner.py", line 370, in _load_and_run_scenario
    if not self._load_and_wait_for_world(config.town, config.ego_vehicles):
  File "D:\VRDriving\scenario_runner\scenario_runner.py", line 346, in _load_and_wait_for_world
    self.setup_sensor()
  File "D:\VRDriving\scenario_runner\scenario_runner.py", line 123, in setup_sensor
    self.sensor.ego_sensor.listen(self.callback)
AttributeError: 'NoneType' object has no attribute 'listen'

self.sensor is created via:
def setup_sensor(self):
        from DReyeVR_utils import DReyeVRSensor
        self.sensor = DReyeVRSensor(self.world)
        self.sensor.ego_sensor.listen(self.callback)

Is this expected (I saw there were some quirks mentioned with Additional Maps not being included)? Does this mean that DReyeVR cannot work with Towns 6, 7, and 11?

Hi, this is a problem that the sensor.dreyevr.dreyevrsensor is not being found in your self.world client.
May I ask why you are importing the Carla maps from the AdditionalMaps link? We already provide all the maps here. This is important because the maps include the EgoVehicle (and a custom DReyeVRLevel script) embedded in the blueprints, so you can't use the vanilla Carla maps.
This is probably why there is no EgoVehicle in your new maps, so the EgoSensor cannot be found.
You should be able to use our maps in both editor and package mode (though you might need to copy them over manually since the additional maps aren't included in Carla's default build pipeline).

Thanks! I'm trying to use it with the package mode. I saw an error that Town 6 was not found, and I had used CARLA before for a separate project and assumed I could go ahead and import the usual way.
Maps in DReyeVR being different from vanilla maps makes a lot of sense to me now. Where would I copy them over manually?
Would it be in
WindowsNoEditor\CarlaUE4\Content\Carla\Maps ?

Yes! You should be able to manually copy the Maps we provide to that folder in the Build directory

I just tried to copy/paste it into the location of the packaged build which I mentioned above, and I got an error here:
Experiment ID:  test
initialized DReyeVRSensor PythonAPI client
Starting scenario runner
Recording on file: D:\VRDRiving\data\test_09_30_2022_16_28_28\replay.rec
Saving sensor data to: D:\VRDRiving\data\test_09_30_2022_16_28_28\sensors.csv
initialized DReyeVRSensor PythonAPI client
The CARLA server uses the wrong map: Town03
This scenario requires to use map: Town06

And it looks for a .bin file with the currently loaded town afterwards:
INFO:  Found the required file in cache!  Carla/Maps/TM/Town03.bin

I am actually not familiar with these maps in CARLA; are the .umap files all I need to load the towns?

How are you running these experiments? I think you need to copy both the .umap and the .uexp files.

Where the .uexp files be?
Also the experiments are just run using ScenarioRunner. I modified ScenarioRunner so that a DReyeVR sensor is being spawned after the world is restarted.
The town is being read from the ScenarioRunner routes xml file.

You should also look into our ScenarioRunner changes (specifically run_experiment.py) which we use to run custom routes with ScenarioRunner.
My bad, I thought the .uexp files were in the editor mode, they are temporary files that are build when you package the game. You should copy all the maps into Unreal/CarlaUE4/Content/Carla/Maps and then rebuild make package from there to see the updated maps in your WindowsNoEditor\CarlaUE4\Content\Carla\Maps dir

I will try this and get back to you! Thanks for quick and helpful responses :)
I think your version of run_experiment.py is the one I am using, thankfully.
What I have done is, I made some minor changes in ScenarioRunner class itself to "find" the sensor again once the scenario is loaded. Adding the sensor in run_experiment results in the sensor reference being lost due again when the world is reloaded by SRunner.

Hi Gustavo,
I tried to paste those maps from DReyeVR Maps folder to the Unreal/CarlaUE4/Content/Carla/Maps location and rebuild, unfortunately it did not work. Then, I did a fresh install of DReyeVR to try again (in case I messed anything from previous attempts), and noticed that the DReyeVR make install also does that on its own. I copied one more time to be sure and ran make package. However, I still get the same error with map not found.
Would it be easier to use the additional maps in editor mode?

Hm, yes the DReyeVR make install command does copy over all the maps from this repo over to Carla, that should work.
In the editor mode can you open these additional maps and use them (play-in-editor)?
What does your packaged build directory look like? Do you have the .uexp files in there too or only the .umap for Town01-4?

make launch works with the additional maps! Packaged version still does not. We can use editor version for now.
Here is what the packaged build directory looks like at carla\Build\UE4Carla\0.9.13-dirty\WindowsNoEditor\CarlaUE4\Content\Carla\Maps

Gotcha, okay well hopefully the editor mode is good enough for now (for those maps).
This is unfortunately a known Carla issue that I thought we addressed but looks like we didn't. We'll look into it soon.

Will close this issue now, thanks for the help Gustavo!


Improved mouseover behaviour - alternative option

Alternative fix for https://github.com/pixijs/pixi.js/issues/2914
That, https://github.com/pixijs/pixi.js/pull/2917, this allows mouseovers to work even if you have a dom overlayed onto that section of the canvas.

https://jsfiddle.net/n7hrxbzv/1/

For what it's worth, it appears that the other PR also solves other open issues and thus I believe is the preferred option.

Closing in favor of #2917.


char_code/2: missing representation error

?- M = 1114110,char_code(C,M), char_code(C,N), M = N.
false.                         % incorrect

When converting a code to characters and back one should always get the very same code.
?- M = 1114110,char_code(C,M), char_code(C,N).
M = 1114110, C = '', N = 65534.            % incorrect

It seems you are only supporting Unicode 1.1. So for other integers that are not character codes a representation_error(character_code) should be issued.
Already perfect:
?- char_code(a, non_integer).
uncaught exception: error(type_error(integer, non_integer), '/'(char_code, 2))

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt

Note that charCodeAt() will always return a value that is less than 65536. This is because the higher code points are represented by a pair of (lower valued) "surrogate" pseudo-characters which are used to comprise the real character. Because of this, in order to examine or reproduce the full character for individual characters of value 65536 and above, for such characters, it is necessary to retrieve not only charCodeAt(i), but also charCodeAt(i+1) (as if examining/reproducing a string with two letters), or to use codePointAt(i) instead. See example 2 and 3 below.

I was using surrogate pairs in my Prolog system to extend the codepoint range above 65535. But this is quite complicated, and renders some of the built-ins much slower. You can start thinking about it what it means for atom_length/2. The source code of all this is here:
atom_length(Str, Len) :-
sys_atom_word_len(Str, Count),
sys_atom_word_count(Str, 0, Count, Len).
https://github.com/jburse/jekejeke-devel/blob/master/jekrun/headless/jekpro/reference/structure/atom.p
https://github.com/jburse/jekejeke-devel/blob/master/jekrun/headless/jekpro/reference/structure/ForeignAtom.java

@jariazavalverde: For the standard, and all _char and _code built-ins, like get_char/1, there is only a PCS (Processor character set) where each character maps to a collating sequence integer (vulgo: character code). So any such encoding is only visible on the byte level with get_byte/1. It seems that all of this is quite costly to implement. So as a first start, simply produce a representation error whenever you have such problems.

Not really, get_byte/1 has to do with byte streams and is rather externally, and competely independent of text streams. Nothing to do how strings respectively atoms are interenally represented. Also if you go the route write some text read some bytes, you only see what the text encoding does, bot not how strings respectively atoms are internally represented.
Obviously from the JavaScript docu, the JavaScript strings use surrogate pair. Y
ou would see them when you use as text encoding UTF-16.
https://en.wikipedia.org/wiki/UTF-16
U+0000 to U+D7FF and U+E000 to U+FFFF
Both UTF-16 and UCS-2 encode code points in this range as single 16-bit code units that are numerically equal to the corresponding code points.
U+10000 to U+10FFFF
The top ten bits (a number in the range 0x0000..0x03FF) are added to 0xD800 to give the first 16-bit code unit or high surrogate, which will be in the range 0xD800..0xDBFF.
The low ten bits (also in the range 0x0000..0x03FF) are added to 0xDC00 to give the second 16-bit code unit or low surrogate, which will be in the range 0xDC00..0xDFFF.
But anything that considers bytes, when charAt() already returns a word, is
anyway inefficient. From the JavaScript docu you see that charAt() already
returns a word. So all you have to do is sometimes combine two words
into a single code point.

I see, you are already having fun with Unicode:
https://twitter.com/tau_prolog/status/1056350064560521217


[packchk] Add a check for using forward slashes in  element

The packchk (Version 1.3.95) utility fails to detect the use of a backward slash when specifying the location of the license file in the element <license>
The following shall be reported as Warning M327 - Path is not conformant ...
   <license>licenses\license.dat</license>

Fixed - do you need a new version now?


[hotfix] add hadoop user name to yarn logs command

What is the purpose of the change
if use yarn proxy user to submit the application to yarn cluser, the real hadoop user name will be the proxy user name, so use yarn logs -applicationId <appId>  will return nothing. it's right to use yarn logs -applicationId <appId> -appOwner <userName>.
example, before submiting app to yarn cluster, if set the proxy user, when the app finished or killed.
yarn logs -applicationId <appId> will return nothing.
yarn logs -applicationId <appId> -appOwner test will return log info.
proxy user
export HADOOP_USER_NAME=flink
export HADOOP_PROXY_USER=test

hi, @zentol, cc  :)

Hi @twalthr, can you please take a look?


Add support for earlier OS versions + Change stream line separator to CRLF

Lower the minimum supported OS versions to macOS 10.15 and iOS 13, the lowest versions that support Swift Concurrency.
Also I noticed an issue while creating a polyfill: the Twitter developer page mentions that the line separator in the streaming API is \r\n, but AsyncLineSequence interprets CR (\r), LF (\n), CRLF (\r\n), NEL (\u{85}), LS (\u{2028}) and PS (\u{2029}) as line separators. This could potentially cause problems with tweets containing these characters. So I created AsyncCRLFLineSequence.

Personally, I would put extensions & polyfills each in their own file based on what type they're extending, e.g. DateExtensions.swift (common Swift style), Date+TwiftExtensions.swift (older Obj-C style), or following the existing naming of files in Twift, Date++.swift , or maybe  Date+Polyfill.swift considering the use-case.
Also, you can wrap functions & structs in available (by using @available instead of #available), so they can have the same name as Apple's identifiers, but not conflict with them on newer OSes.
E.G. Change this:
extension Date {
  func _ISO8601Format() -> String {
    if #available(iOS 15.0, macOS 12.0, *) {
      …
    }
  }
}

to this:
@available(iOS 15.0, macOS 12.0, *)
extension Date {
  func ISO8601Format() -> String {
    … // only your custom implementation here; no need to call out to `ISO8601Format()`
  }
}

and likewise for AsyncBytes.

Thank you for pointing those out. I’ve fixed them.


Allow parsing of multiple args for a command

Allow stuff like
menu.Add("greet", (x,y) => Greet(x,y), "Greets a name a number of times.");
Would be great to have multiple parsed arguments instead of a single string.

Do I understand this correctly: You want to add a menu entry. When this entry is called like
$ greet Jon 4

It should call the action body with the two parameters Jon and 4, i.e. it should call
`Greet("Jon","4")`

Is that right?
I think the only generic approach to this would be to add something like a regex, that parses the argument and fills in the varargs of the action body. This could probably be done in the library itself. But why not just parse the regex in the action body directly? You have full control then.
That is to say, I would probably do it like this:
menu.Add ("greet", s => {
	var regex = new Regex (@"(?<name>[^ ]*) (?<times>[0-9]*)");
	var match = regex.Match (s);
	var name = match.Groups["name"].Value;
	var times = int.Parse (match.Groups["times"].Value);
	for (int i = 0; i < times; i++) {
		Console.WriteLine ($"Hello {name}!");
	}
}, "Greets a name a number of times.");

$ greet Jon 3
Hello Jon!
Hello Jon!
Hello Jon!

You understand it right. :) In addition I would even like to call Greet("Jon", 4), i.e. with the second value directly parsed to an int. It would be very convinient to have the parsing done in the library instead of writing it everytime on my own. Currently I do that in combintation with PowerArgs. Having both of your libraries work together feels like a custom git bash with my own commands :) . So, in summary:
Yeah, it works your way, but it is not that convinient. Maybe think about adding a argument parsing similar to PowerArgs.
Let me know your decision.

It's in the master branch. I'll push it to Nuget later, too.


Font size calculation to pass into ZPL

I want to specify the font height and width which I'm setting in my windows applications for Label Elements. As of now I'm converting the font size as below.
font = new ZPLFont(fontWidth:0, fontHeight: (203 / 96) * (int) control.Font.SizeInPoints);
I'm scaling the ZPL elements from screen resolution DPI i.e 96 to Printer resolution DPI i.e 203.
The scaling is done properly and the output is also fine when I view it in Labelary viewer online.
But when it gets printed in the Zebra printer, the font sizes are not fitting into the Label dimension.
Given below the sample ZPL:
Label Dimension : 1.2 x 1.0 - 203 DPI
^XA
^CI28
^MMT
^PW220
^LS0
^FX ''1.2 x 1.0 Blank''
^FO106,15  ^A0N,25,25 ^FH^FD@Title@^FS
^FO10,49 ^A0N,24,0  ^FH^FD@Prepped@^FS
^FO10,76 ^A0N,24,0 ^FH^FD@Opened@^FS
^FO10,106 ^A0N,26,0 ^FH^FD@SDate@^FS
^FO120,106 ^A0N,26,0  ^FH^FD@STime@^FS
^FO10,137 ^A0N,24,0 ^FH^FD@Discard@^FS
^FO10,167 ^A0N,26,0  ^FH^FD@EDate@^FS
^FO120,167 ^A0N,26,0  ^FH^FD@ETime@^FS
^PQ
^XZ
The above command looks fine in Labelary viewer. But when printed it is not proper.
Any thoughts ?
thanks.
NK

Can you try to describe what exactly is "not proper"? I can't see anything wrong with the ZPL code and Labelary viewer.  Do you think it is a hardware specific issue?

I notice you set 0 for the font width, I think it should be same as the height?

Setting the width also didn't resolve the issue. I have to reduce the font size by few points and then send it to ZPL utility. Say for example if the font size is set to Arial 12pt, I have to reduce it by 5 points (for all font sizes which are >10). Now the printer is printing the Label within the Label dimension.

I think not font can be scaled smoothly, can you try to test with an text array like:
^FO10,15^A0N,20,20 ^FH^FD@Title@^FS
^FO10,25^A0N,21,21 ^FH^FD@Title@^FS
^FO10,35^A0N,22,22 ^FH^FD@Title@^FS
.....

Compare from the labelary with your printed result?


Need additional API call which can pass a pre-compiled Openbmc and/or rom image to the CI

After checking out a system via API, we need the ability to pass pre-compiled openbmc and/or rom images to the CI.


Arts 260 testbranch

The PR covers the mocha API automation tests using Chai assertions. The reports are generated in the form of HTML reports which can launched on any local browser.
A spike Jira ticket is  added to ARTS backlog in order to keep the changes in loop.
https://ndph-arts.atlassian.net/browse/ARTS-260

Closing the PR as I have raised a PR into main rather than the branch feature/trial-config.

Closing the PR as I have raised a PR into main rather than the branch feature/trial-config.


repo add seems broken on Windows

Using 0.22.0, I ran:

func repo add https://github.com/boson-project/templates
func repo list

But the last one gives me the following output:
Error: parse "file://C:\\Users\\JeffMAURY\\.config\\func\\repositories/me": invalid port ":\\Users\\JeffMAURY\\.config\\func\\repositories" after host

@jeffmaury I believe I fixed similar issue already. Could you please check latest main version?


Error after updating steam-user

I updated steam user using npm update steam-user and now I'm getting this error when trying to run the script:
let g_StartupTimestamp = Math.floor(Date.now() / 1000);
^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/aleks/Documents/Programming/Javascript/tf2_bot/node_modules/steam-user/index.js:1:63)
    at Module._compile (module.js:410:26)

Update your node version.

Works now, thanks!

I'm pretty shocked that anything was working for you on a node version older than v4. I'll add a note to package.json that this version (v3) requires 4.0.0 or later. I'm planning on a major release (v4) which requires node 6 or later in the not-so-distant future.

@DoctorMcKay heh, I decided to get back to bot-scripting after a long hiatus, that's why everything was so outdated


Allow up to 10 "Working Days"

Background
In TaaS we have members (ResourceBookings) who are assigned to the customer's Jobs for some period of time. This time is divided into weeks (WorkPeriods) and payments to the ResourceBookings (members) is processed weekly per WorkPeriod. For each WorkPeriod we can enter how many days user worked per that week (0 till 5) and process payments for the working days. If ResourceBooking's ends in middle of the week (let's say Wednesday), than during that week we cannot enter more working days than actually fit the week (maximum 3 working days can fit week until Wednesday). This is already implemented, but sometimes ResourceBooking can work like double shift or even on the weekends, so we would like to allow managers to enter up to 10 working days per Work Period even there are no so many real working days in that WorkPeriod.

Task

Allow setting "Working Days" to maximum 10.

When there is already 10 working days selected, the + button has to be disabled, the same like when - is disabled if we choose 0 days.

As soon as we increase the "Working Days" to more than this week can fit we have to show a confirmation modal window:

for example if we increase from 5 to 6, we show this modal

or if this week can fit only 3 days, then if we increase form 3 to 4, we also show this modal (see this issue to learn how to know the maximum value https://github.com/topcoder-platform/micro-frontends-taas-admin-app/issues/37 - the code is already implemented to calculate this value and can be reused)

but the current value is already more than maximum of this week, we don't show this confirmation anymore, so if we increase from 6 to 7, no more confirmation

if inside confirmation we click yes then value should stay increased

if inside confirmation we click no, then value should be reverted back to the previous one

We already have a modal implemented in the Admin App. It can be seen like shown on this screenshot https://monosnap.com/file/vtLasCWUEocTs3CVPg4typTRYbfjVU.

Please, reuse the code for confirmation modal.

API

API has been updated to allow up to 10 working days https://github.com/topcoder-platform/taas-apis/issues/428

Verified on Prod Env. Working as expected.
cc: @nkumar-topcoder


crash when clicking and dragging from RHS of UI

I've observed a crash when clicking and dragging on tracks on the right hand side of the UI. Verified repros on Autopush channel.
To assist with debugging please attach or link to the trace you were viewing.

Viewed on: https://ui.perfetto.dev

Uncaught Error: Failed assertion
Error: Failed assertion
    at assertTrue (https://ui.perfetto.dev/v33.0-f9bccac79/frontend_bundle.js:2185:15)
    at FrontendLocalState.selectArea (https://ui.perfetto.dev/v33.0-f9bccac79/frontend_bundle.js:4115:32)
    at PanAndZoomHandler.onSelection (https://ui.perfetto.dev/v33.0-f9bccac79/frontend_bundle.js:382161:40)
    at DragGestureHandler.onDrag (https://ui.perfetto.dev/v33.0-f9bccac79/frontend_bundle.js:335356:22)
    at DragGestureHandler.onMouseMove (https://ui.perfetto.dev/v33.0-f9bccac79/frontend_bundle.js:335210:18)

v33.0-f9bccac79 f9bccac79bd099457b4195da7b9acc28b33b666e
UA: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36

How to reproduce issue:
This can be easily reproduced with the "test/data/async-trace-1.json" trace in the test/data folder. There is nothing special about this trace other than it makes a very simple reproducer. This happens with similar protobuf traces as well.

open the trace: ./tools/open_trace_in_ui -i test/data/async-trace-1.json
click and drag from the right hand side of the ui in one of the traces as shown in attached video:

https://user-images.githubusercontent.com/77857237/228052524-5e18b47f-e435-48e7-9bb9-0edaa9e61e6b.mov

Steve: can you PTAL at this?

I noticed something similar in the overview section of the UI
The following is some info I've gathered on the issue:
Issue is caused in part by the additional space to the right of the overview timeline. In Chrome on Windows the scrollbar gave me space to drag, but on FireFox on Linux the scrollbar was on top of the overview, so it didn't create the necessary space to cause the issue.

https://github.com/google/perfetto/assets/121060410/ba544b84-bf46-4ac3-b5c2-d743a3d9c11d

I noticed something similar in the overview section of the UI
The following is some information I've found about the issue:
By dragging a selection over the scrollbar and the overview at the same time it is possible to get an error stating you have made an impossible selection.
Issue seems to be caused in part by the additional space to the right of the overview timeline.
In Chrome on Windows the scrollbar gave me space to drag, but on FireFox on Linux the scrollbar was on top of the overview, so it didn't create the necessary space.

https://github.com/google/perfetto/assets/121060410/5ba3c2b0-abca-424b-8e29-a293667e0fba

Closing the issue as this appears to have been fixed since I can no longer reproduce. Feel free to re-open if you feel different.