Can I store txt files inside azure sql database?

Can I store txt files inside azure sql database?

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: cf421288-ba40-3904-72d1-07de1c69e211
Version Independent ID: f388925a-a573-65ab-e0db-fe61245df123
Content: char and varchar (Transact-SQL) - SQL Server
Content Source: docs/t-sql/data-types/char-and-varchar-transact-sql.md
Product: sql
Technology: t-sql
GitHub Login: @MikeRayMSFT
Microsoft Alias: mikeray

@Anmolgan81 -- you can store text in an Azure SQL Database as a varchar field, up to 2GB in length.  The top of the article indicates that it applies to Azure SQL Database, and other products as well.
The article you mention indicates that a varchar field can be defined with either 1) a number indicating the length up to 8,000 characters, or 2) a literal max for a length up to 2 GB.
I am closing this issue 2371 now.  Please feel free to @ mention me if you have any further questions.

Hi William, can I store .txt files in azure sql database??
Regards
Anmol Ganju

From: William Anton Rohm<EMAIL_ADDRESS>Sent: Monday, June 24, 2019 10:59:15 PM
To: MicrosoftDocs/sql-docs
Cc: Anmol Ganju; Mention
Subject: Re: [MicrosoftDocs/sql-docs] Can I store txt files inside azure sql database? (#2371)
@Anmolgan81https://github.com/Anmolgan81 -- you can store text in an Azure SQL Database as a varchar field, up to 2GB in length. The top of the article indicates that it applies to Azure SQL Database, and other products as well.
The article you mention indicates that a varchar field can be defined with either 1) a number indicating the length up to 8,000 characters, or 2) a literal max for a length up to 2 GB.
I am closing this issue 2371 now. Please feel free to @ mention me if you have any further questions.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/MicrosoftDocs/sql-docs/issues/2371?email_source=notifications&email_token=AII4VJ3W2A6YBV2ZERC4GHDP4D76XA5CNFSM4H27NKN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYNUUJY#issuecomment-505104935, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AII4VJZ5EO4CPZC67AWAHIDP4D76XANCNFSM4H27NKNQ.
This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. IFI Techsolutions Pvt. Ltd. : www.ifi.tech

I am talking about .txt files and not the text data type.
Regards
Anmol Ganju

From: William Anton Rohm<EMAIL_ADDRESS>Sent: Monday, June 24, 2019 10:59:15 PM
To: MicrosoftDocs/sql-docs
Cc: Anmol Ganju; Mention
Subject: Re: [MicrosoftDocs/sql-docs] Can I store txt files inside azure sql database? (#2371)
@Anmolgan81https://github.com/Anmolgan81 -- you can store text in an Azure SQL Database as a varchar field, up to 2GB in length. The top of the article indicates that it applies to Azure SQL Database, and other products as well.
The article you mention indicates that a varchar field can be defined with either 1) a number indicating the length up to 8,000 characters, or 2) a literal max for a length up to 2 GB.
I am closing this issue 2371 now. Please feel free to @ mention me if you have any further questions.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/MicrosoftDocs/sql-docs/issues/2371?email_source=notifications&email_token=AII4VJ3W2A6YBV2ZERC4GHDP4D76XA5CNFSM4H27NKN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYNUUJY#issuecomment-505104935, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AII4VJZ5EO4CPZC67AWAHIDP4D76XANCNFSM4H27NKNQ.
This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. IFI Techsolutions Pvt. Ltd. : www.ifi.tech


[Tooltip] Leaking Event Listeners / DOM Nodes

Bug, feature request, or proposal:
Bug
What is the expected behavior?
To not leak.
What is the current behavior?
Leaking event listeners and DOM nodes
What are the steps to reproduce?
See Stackblitz
https://stackblitz.com/edit/angular-material2-issue-xna6gn?file=app/app.component.html
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Latest of all, but I've tried a variety of versions w/ same behaviour.
Is there anything else we should know?

Possibly related to: https://github.com/angular/material2/pull/9109
Possibly related to: https://github.com/angular/material2/issues/8989

Screenshot of chrome profile - Garbage was collected before/after this run.

I think the event listener leaking is fixed by #10160, but although the commit from that PR was tagged with 5.2.4 it isn't actually in the 5.2.4 release.

I don't think so, considering the stackblitz template I posted is depending on 6.0.0-beta4 and still has the leak.

I'm on Angular 6.1.4 with Material 6.4.6 and also discovered the tooltip leak.
Removed them for now, but it seems to be an old issue and is still problematic despite a PR that has been merged to address this...

I can not find how to unsubscribe from event in MediaQueryList. Possibly somebody had such problem like in my case?
That's my leak screenshots:

MatTooltip

TooltipComponent

Probably somebody resolved such issue...
I'm using:
"dependencies": {
    "@angular/animations": "6.0.6",
    "@angular/cdk": "6.3.0",
    "@angular/common": "6.0.6",
    "@angular/compiler": "6.0.6",
    "@angular/core": "6.0.6",
    "@angular/forms": "6.0.6",
    "@angular/http": "6.0.6",
    "@angular/material": "6.3.0",
    "@angular/platform-browser": "6.0.6",
    "@angular/platform-browser-dynamic": "6.0.6",
    "@angular/router": "6.0.6",
    "@progress/kendo-angular-buttons": "4.1.1",
    "@progress/kendo-angular-charts": "3.2.1",
    "@progress/kendo-angular-dateinputs": "3.4.2",
    "@progress/kendo-angular-dropdowns": "3.0.2",
    "@progress/kendo-angular-excel-export": "2.1.0",
    "@progress/kendo-angular-grid": "3.5.0",
    "@progress/kendo-angular-inputs": "3.1.3",
    "@progress/kendo-angular-intl": "1.4.1",
    "@progress/kendo-angular-l10n": "1.2.0",
    "@progress/kendo-angular-popup": "2.4.1",
    "@progress/kendo-angular-upload": "4.1.2",
    "@progress/kendo-data-query": "1.3.1",
    "@progress/kendo-drawing": "1.5.6",
    "@progress/kendo-theme-default": "2.54.0",
    "core-js": "2.5.7",
    "crypto-js": "3.1.9-1",
    "jsplumb": "2.4.3",
    "leaflet": "1.2.0",
    "leaflet.markercluster": "1.1.0",
    "lzma": "2.3.2",
    "material-design-icons": "3.0.1",
    "moment": "2.22.2",
    "ng2-dnd": "5.0.2",
    "ng2-responsive": "0.8.4",
    "ngx-markdown": "6.1.0",
    "roboto-fontface": "0.8.0",
    "rxjs": "6.2.1",
    "rxjs-compat": "6.2.1",
    "rxjs-tslint-rules": "4.7.2",
    "signalr-no-jquery": "0.1.8",
    "web-animations-js": "2.3.1",
    "webpack": "4.12.2",
    "zone.js": "0.8.26"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "0.6.8",
    "@angular-devkit/build-optimizer": "0.6.8",
    "@angular-devkit/core": "0.6.8",
    "@angular/cli": "^6.0.8",
    "@angular/compiler-cli": "6.0.6",
    "@angular/language-service": "6.0.6",
    "@types/hammerjs": "2.0.35",
    "@types/jasmine": "2.8.8",
    "@types/jasminewd2": "2.0.3",
    "@types/leaflet": "1.2.0",
<EMAIL_ADDRESS>"1.0.1",
    "@types/node": "9.4.0",
    "@types/uglify-js": "2.6.30",
    "codelyzer": "4.3.0",
    "hammerjs"<EMAIL_ADDRESS>    "jasmine-core": "3.1.0",
    "jasmine-spec-reporter": "4.2.1",
    "karma": "2.0.2",
    "karma-chrome-launcher": "2.2.0",
    "karma-cli": "1.0.1",
    "karma-coverage": "1.1.2",
    "karma-coverage-istanbul-reporter": "2.0.0",
    "karma-jasmine": "1.1.2",
    "karma-jasmine-html-reporter": "1.1.0",
    "karma-spec-reporter": "0.0.32",
    "karma-teamcity-reporter": "1.1.0",
    "line-awesome": "github:icons8/line-awesome",
    "protractor": "5.3.2",
    "ts-node": "7.0.0",
    "tslint": "5.10.0",
    "typescript": "2.7.2",
    "uglify-es": "3.3.5"
  }

I ran some further tests to see if this is still an issue, especially with the new Ivy renderer.
Version 6: https://angular-material2-issue-xna6gn.stackblitz.io/
Version 9 (with Ivy): https://angular-ivy-ukp9bw.stackblitz.io/
In both versions, I moused over the tooltips many times and ran garbage collection to see what comes out. It seems the Ivy version has indeed fixed the issue of holding onto old references.
In the following screenshot, you can see that version 6 held onto many references (here, 297 TooltipComponent and 36 MatTooltip)

Now, in Ivy, here is the result with only 5 MatTooltip (as expected):


Covariance not working when used beside destructuring in type.

Here is a concise repro tested in try flow:
https://flow.org/try/#0C4TwDgpgBAsglgDzgOygXigbwD4CgpQCGA-AFxQDOwATigOYA0u2AvgNy66iRQBChFCABVw0DJnxQA1ADNyVWskaSA9CqhDqIKNQgBbAPYA3elGAALaMggJgUADYpohZABMoIAwFcoAdzj29pQQ0BaEdgDGxoS0LhHQBjJQMnAQ9u4A5DIZfgbUANYUUGDUBpDU9iAAdJJVdfBIyEzsnNzQAMpeAEYR9gIUIjziknJQGQbWOdhjwL4GGUwEdVUNKM0cuFHIVGYQVOSdPX0UA6LoWCPk45PrnFs7XQLCe8Dk-IKDYrtUHEA
The code is:
type Mixin = {|
  a?: string,
|};

type BaseType = {
  +f: string,
  // Try removing the next line and you will see that covariance of field 'f' works properly.
  ...Mixin,
};

type SubclassType = {
  f: 'one' | 'two',
  ...Mixin,
};

const test: SubclassType = {
  f: 'one',
};

const baseTest: BaseType = test;

The issue is that covariance of field 'f' is incorrectly ignored when used beside the destructured type Mixin in the definition of BaseType. If the destructured Mixin statement is removed in BaseType, covariance of field 'f' works properly.

Adding $ReadOnly helps. This is due to spread operator stripping all variance annotations


Add support for bezel compensation

Start off with consistent bezel widths between all displays. Allow for json and CLI config

Done! App accepts X and Y bezel amounts through both CLI and json.

Thanks @adielfernandez! Looking good


add CONTAINER_LABELS to journald

Please add labels to journald fields. imho CSV delimiter could be enough.

Hi!
Please read this important information about creating issues.
If you are reporting a new issue, make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead.
If you suspect your issue is a bug, please edit your issue description to include the BUG REPORT INFORMATION shown below. If you fail to provide this information within 7 days, we cannot debug your issue and will close it. We will, however, reopen it if you later provide the information.
This is an automated, informational response.
Thank you.
For more information about reporting issues, see https://github.com/docker/docker/blob/master/CONTRIBUTING.md#reporting-other-issues

BUG REPORT INFORMATION
Use the commands below to provide key information from your environment:
docker version:
docker info:
uname -a:
Provide additional environment details (AWS, VirtualBox, physical, etc.):
List the steps to reproduce the issue:
1.
2.
3.
Describe the results you received:
Describe the results you expected:
Provide additional info you think is important:
----------END REPORT ---------
#ENEEDMOREINFO

Hi @KostyaSha,
I think the feature you're looking for is implemented in #16961 and will be available with the 1.9 release of docker.
If you feel it's what your looking for, you can close the issue, otherwise, we can discuss on it :wink:

I used search, sems it was without closed issue. Closing this
@vdemeester maybe if you have time, could you debug log drivers for ram leaking? I think that log drivers should have configurable buffer either on huge stdout docker daemon dies.


[9.x] logoutOtherDevices for Sanctum SPA Authentication

I guess the feature I want to add here is to allow Auth::logoutOtherDevices($password) to be used on Sanctum's SPA Authentication since it looks like this feature is not available (unless you use Sanctum tokens).
After searching online I came to this youtube video. To summarize:

Create a new middleware (ie. AuthenticateSanctumSession.php)
Copy everything in AuthenticateSession.php middleware and paste in new middleware
Create a variable for sanctum driver protected $driver = 'sanctum';
Replace all instance of $this->auth->getDefaultDriver() with $this->driver, basically the sanctum driver is hardcoded.

And that's it, the features of AuthenticateSession is now available for Sanctum SPA Authentication.
I would like to hear other people's opinion especially if there is a right way of doing this since I basically just copy-pasted the AuthenticateSession middleware... The main goal is just to allow the use of logoutOtherDevices... I also tried to just directly use the AuthenticateSession in api middleware and it doesn't work..

Hi, I've fixed the tests on 9.x so please rebase your PR and mark your PR as ready when tests pass. Thanks

Thanks @driesvints

Thanks for your pull request to Laravel!
Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.
If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!
If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.


fix: cargo-shuttle panic on the login command

Description of change

Fixes #1300
Thought the unwrap was safe but this is safer and more correct :)
Also bumping to .1 for release
How has this been tested? (if applicable)

Tested locally, both forms of login command, and init command.

Hmm, I only see changes to feedback and complete, how does this fix login?


[FEATURE] Batch download items in web UI

Describe the bug
If a single item is selected in the web UI, the Download button is enabled and it can be downloaded. If two or more items are selected, the Download button is disabled and grayed out.
To reproduce

Select an item via its checkbox

Select another item

Related data
https://viame.kitware.com/#/folder/5e4c2817a0fc86aa0315b1a1
Expected behavior
Allow download when multiple items are selected.
Desktop (please complete the following information):

OS: Ubuntu 18.04
Browser: reproduced on Brave 1.25.72 (Chromium: 91.0.4472.101) and Chrome 91.0.4472.101

This does need to be added in, but a quick workaround for now is to use the girder interface:
https://viame.kitware.com/girder/#collection/5e4c256ca0fc86aa03120c34/folder/5e4c2817a0fc86aa0315b1a1
Click on the folder you want and then the options next to the top-level checkbox to download the checked resources.  This will grab the entire folder structure.  You probably don't want the zips sub folder.

Changed to a feature request.
The fix depends on what your goal is.  If you want the viame CSV, you should probably just write a python script to call the REST api directly.  If you just want the media, you can do what Bryon suggested.
Note that the workaround won't give you a detection CSV because it requires a special export procedure.  There's not really an easy way to do this, because generating the export in a request is expensive.
In general, I'd recommend scripting this rather than using the browser.
See https://viame.kitware.com/girder/api/v1#!/viame95detection/viame_detection_export_all

This feature request has been completed and will be deployed Thursday Feb 10 at 2AM est.


Lost internet connection stops automatic refresh

When the app loses internet connection, it throws an error and stops refreshing.
Maybe implement a wait until internet connection to fetch in refresh method?

696d90aaa756b135716387e9fcaf54c7dd751900


ScanUnsupportedCharles.ps1 surprises users with too many error

Users use a tool called ”ScanUnsupportedCharles” when troubleshooting synchronization according to this Docs.
azure-files-samples/ScanUnsupportedChars.ps1 at master · Azure-Samples/azure-files-samples · GitHub
This tool prints errors caused by nonrecommended characters other than those described in ”Handling unsupported characters”.
Please make improvements to add a description of the nonrecommended characters and notes about using the tool to Docs.
Specifically, it is the part described below.
// These are supported codepoints, but they might not work in combination of other chars
// The char combination that fails the REST call for the item could be anywhere in the path
In addition,
When this PS1 outputs an error, I would like you to add a function that does not include combination characters and detects only unsupported characters.

Document details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 7235bd07-1172-ac6a-3dab-0200fd73bd87
Version Independent ID: 9620b286-fe9e-0c56-c01f-ddf7c3c36ac0
Content: Troubleshoot Azure File Sync
Content Source: articles/storage/file-sync/file-sync-troubleshoot.md
Service: storage
Sub-service: files
GitHub Login: @khdownie
Microsoft Alias: kendownie

@Mayumi-A Thanks for the question! We are investigating and will update you shortly.

@Mayumi-A Apologies for the delay response! I have assigned this thread to content author for further review, Also if you have any issue with is not related to documents/articles. I would recommend to please reach us through this link, https://azure.microsoft.com/en-us/support/community/ We'll follow-up there

Thank you for your dedication to our documentation.
We sincerely apologize for the delayed response. After a careful review, we are closing this issue. If you feel that the problem persists, please respond to this issue with additional information.
Please continue to provide feedback about the documentation. We appreciate your contributions to our community.
#please-close


Predicted embds

Hi,
in predict_embs.py file, there are several unnecessary empty lines causing the indent error. They can be deleted as follows::
if name == 'main':
parser = argparse.ArgumentParser()
parser.add_argument('-pos_low_file', type=str, default=None, help='csv file with positive mode [M+H]+ low energy spectrum')
parser.add_argument('-pos_high_file', type=str, default=None, help='csv file with positive mode [M+H]+ high energy spectrum')
parser.add_argument('-neg_low_file', type=str, default=None, help='csv file with positive mode [M-H]+ low energy spectrum')
parser.add_argument('-neg_high_file', type=str, default=None, help='csv file with positive mode [M-H]- low energy spectrum')
args = parser.parse_args()
main(args)
In addition, a command for saving pre_emb is missing in predict_embs.py (e.g. torch.save(pred_emb, 'sample_my.pt')).
Finally, it would be very helpful to write a wrapper to couple the embs predictor with the decoder and to add an automatic setting of the unknown keys when processing the example input data.

I second @Alfa-1 comments about adding the torch.save(pred_emb, model_name_variable_here) as this would make the end-to-end predictor/decoder pipeline possible. I think having this would be a great addition and simplification to the end user's experience running your code.


编译失败

Could NOT find LibEventPthreads (missing:  LIBEVENT_PTHREADS_LIBRARY)
Could NOT find LibEventOpenssl (missing:  LIBEVENT_OPENSSL_LIBRARY)

详细日志：
 cd build/zimg; cmake -DCMAKE_BUILD_TYPE=Debug /opt/zimg/src; make; cp zimg      /opt/zimg/bin
-- The C compiler identification is GNU 4.4.7
-- The CXX compiler identification is GNU 4.4.7
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found LibEvent: /usr/lib64/libevent.so
-- Could NOT find LibEventPthreads (missing:  LIBEVENT_PTHREADS_LIBRARY)
-- Found LibEventCore: /usr/lib64/libevent_core.so
-- Found LibEventExtra: /usr/lib64/libevent_extra.so
-- Could NOT find LibEventOpenssl (missing:  LIBEVENT_OPENSSL_LIBRARY)
Diabling SSL
-- Found Libmemcached: /usr/lib64/libmemcached.so
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.3")
-- Found PNG: /usr/lib64/libpng.so (found version "1.2.49")
Build Type: Debug
Std CFLAGS:  -Wall -fno-strict-aliasing -DPROJECT_VERSION="3.2.0" -D_BSD_SOURCE       -D_POSIX_C_SOURCE=200112 -g -O0 -DDEBUG -std=c99 -Wno-unused-function -Wno-    deprecated -DMAGICKCORE_HDRI_ENABLE -DMAGICKCORE_QUANTUM_DEPTH=8
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LIBEVENT_PTHREADS_LIBRARY (ADVANCED)
linked by target "zimg" in directory /opt/zimg/src

-- Configuring incomplete, errors occurred!
See also "/opt/zimg/build/zimg/CMakeFiles/CMakeOutput.log".
make[1]: Entering directory `/opt/zimg/build/zimg'
make[1]: *** No targets specified and no makefile found.  Stop.
make[1]: Leaving directory `/opt/zimg/build/zimg'
cp: cannot stat `zimg': No such file or directory
make: *** [debug] Error 1

已解决：我是centos6系统
用官方安装文档中下面的指令安装是有问题的
 sudo yum install openssl-devel cmake libevent-devel libjpeg-devel giflib-devel libpng-devel libwebp-devel ImageMagick-devel libmemcached-devel

解决途径：
全部下载，用源码的方式进行编译安装，需要额外注意的事项：
1.个别包不能下载，去所在的官网下
2.libmemcached包make和make install 分别运行
3.安装libpng
以上亲测


Immutable compatibility

Reimplement the update function to check whether or not the state is an ImmutableJS object and handle accordingly.

A selector function might be better than a property mapping object, since the state object could have many possible APIs, depending on which immutability library the user chose.  Need to look into this more.


Android: add namespace for compat with AGP 8.0

Currently, this plugin fails to compile/gradle sync with AGP 8.0.
Add namespace to fix that issue.

why it's not being merge yet?


sysfs: support onewire (w1)

It looks like sysfs supports Onewire, https://www.kernel.org/doc/Documentation/w1/w1.generic, and https://www.kernel.org/doc/Documentation/w1/w1.netlink

Last time I looked, it looked like it required kernel mode drivers but the w1.netlink page seems to imply otherwise.

Here on Omega2 I do have do to:
insmod w1-gpio-custom bus0=0,2,0

to connect it to GPIO2, but after that it shows up in the filesystem and I can do:
$> ls /sys/devices/w1_bus_master1
$>cat /sys/devices/w1_bus_master1/xxxxxx
# cat 28-0317007219ff/w1_slave
9e 01 4b 46 7f ff 0c 10 8a : crc=8a YES
9e 01 4b 46 7f ff 0c 10 8a t=25875

@maruel I spent some time looking at the w1 sysfs and netlink interfaces and reading the corresponding kernel code. Unfortunately, neither interface seems to support requesting strong pull-ups after bus transactions; function w1_next_pullup in drivers/w1/w1_io.c  is not exposed to user space as far as I can tell. Because of that I don't think it is possible to implement periph's onewire API Tx(w, r []byte, power Pullup) error using the w1 module.
As an alternative, what do you think about adding a custom GPIO-based 1-wire master implementation to periph?

@mhabb, do you mean using the gpio driver to produce 1-wire transactions? I can say that I’ve worked with an implementarion like this on esp32 and even with freertos the timing was too far out of spec to work consistently. I’d be surprised if you could do it with Linux through the gpio driver from userspace. I can provide a link to a blog post with some scope captures of what I found if you are interested. The solution ended up being the use of hardware.
Now it may be possible to work around the communication failures with retries but that’s assuming a crc is in place when writing data to devices to ensure when timing issues occur that the transition can be aborted.

@mhabb if you are able to make something of value taking in accounts caveats noted by @chmorgan, I'm fine with a specific sysfs implementation.

Sorry for the delay! @chmorgan you are right, a bit banging implementation does not work well, at least not in Go. I did a few experiments but gave up because even simple commands like "read rom" failed with CRC errors at least half the time.
Instead I've been looking into using the w1 module via a netlink socket. Here's a PR: #406 @maruel I'll send a review request shortly. Please take a look and let me know what you think!

I hope it wasn’t too frustrating that it didn’t work. I felt a bit
frustrated when I spent a few days figuring out the software onewire issues
with an rtos and seeing one bit of error every few thousands of bits.
I’m using gobot.io for onewire support via the w1 module in my new Linux/go
configuration btw.
On Mon, Apr 8, 2019 at 1:08 AM mhabb<EMAIL_ADDRESS>wrote:

Sorry for the delay! @chmorgan https://github.com/chmorgan you are
right, a bit banging implementation does not work well, at least not in Go.
I did a few experiments but gave up because even simple commands like "read
rom" failed with CRC errors at least half the time.
Instead I've been looking into using the w1 module via a netlink socket.
Here's a PR: #406 https://github.com/google/periph/pull/406 @maruel
https://github.com/maruel I'll send a review request shortly. Please
take a look and let me know what you think!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/google/periph/issues/359#issuecomment-480685286, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABJ-ACf3xVhDnRm4pu3oG4h8xLLJRg_Fks5ves7WgaJpZM4ZcsOG
.

@chmorgan could you elaborate? I can't seem to find much about onewire / w1 on gobot.io.

Sorry about that, I’ve been using gobot.io for i2c and pwm control and was
confused. I used gobot.io because of a platform bug in periph that the
periph guys helpfully fixed (but after I wrapped up the code). When I get
back on that code I may switch over.
I have a simple ds18b20 implementation using sysfs directly. It’s not
really a driver as it uses the kernel ds18b20 driver. I can email it to you
if you are interested but it’s quite basic given that it opens a file and
converts the ascii values into a temperature.
On Mon, Apr 8, 2019 at 9:41 PM mhabb<EMAIL_ADDRESS>wrote:

@chmorgan https://github.com/chmorgan could you elaborate? I can't seem
to find much about onewire / w1 on gobot.io.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/google/periph/issues/359#issuecomment-481068683, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABJ-AI9zu1peNlNkZ9GsjITu59ii3za_ks5ve-_igaJpZM4ZcsOG
.


Jobs that run continuously while waiting for SQS events

As part of https://github.com/navapbc/template-infra/issues/522 we implemented jobs that get triggered when a file is uploaded to S3. That is only appropriate for low-latency / low-throughput jobs like hourly/daily/weekly ETL jobs that get triggered when a file from an external data source gets uploaded to a bucket.
For high frequency, low-latency event-based jobs like processing user uploads, or real-time asynchronous tasks like submitting a claim to a legacy system, we would want the ability to have a continuously running service that processes jobs from a job queue. This ticket is for implementing that.
Implementation notes

In following with the same design principles for the existing jobs, we want jobs to be configurable via the app-config module. We currently have a file_upload_jobs.tf file in env-config module, so we could have an analogous file continuous_jobs.tf or something (not sure what to name it) and include it as part the service config similar to what we did for file_upload_jobs.

For each job in the configuration, the service module would:

Create an additional ECS service and override the container command
Create an SQS queue
Create a policy that can access the SQS queue and add it to the service task role
Override environment variables to add JOB_QUEUE_NAME environment variable for the service tasks

For testing purposes we probably want to add some example use case to the example app that's provided in tempate-infra and used in platform-test
Deployment notes
Note that changes to the example app aren't propagated from template-infra to platform-test automatically. You'd have to make those changes to platform-test manually.

@lorenyu Could you refine this ticket some more?

Sorry forgot to refine on Wednesday, just added some notes


Support last  / first  subwords / characters

Eg "take air last three chars" or "take bat first two words"

Fwiw implementation would be entirely talon side


where can i find your pickle code ?

what is the expected content in the pickle file if I want to make detection for image .. the objects and their boundaries only or where can i find the class of pickle you used as i searched but couldn't find it .. thanks for your time

the same problem i got when i tried to open or read pvt_small.pth that has data.pkl file .. Does i read it correctly ?

https://github.com/whai362/PVT/blob/f257be19d10af27ac68df946da1e92722a63afe1/main.py#L363

excuse me i have the same issues i couldn't read .pkl files i got .. if you please how the pickle file was created? does the file include a load persistent ID instruction? or it contains references to data outside the pickle file ?
Thanks a lot for your time

exucse me i'm trying to open data.pkl in the pvt_small weights but got
    raise UnpicklingError("unsupported persistent id encountered") _pickle.UnpicklingError: unsupported persistent id encountered


Create afk-marks-canafis

This plugin allows the player to track the mark of grace cooldown on the canafis agility course.

Remove your empty config class


Support React Native templates

$ npx react-native init ProjectName --template https://github.com/tru-ID/sim-card-auth-react-native.git\#starter-files

Requires a template.config.js.

why are we doing this ? @leggetter especially because it seems like it'd be a template exclusively for this tutorial. can't they just clone ?


Proxmox LXC Container

Hi, I'm quite noob on this and didn't want to use docker but a LXC container.
Anyone could explain how, if possible, I could install wireguard-ui in a container?
I've deployed a TurnKeyLinux with WireGuard, and would like to understand how I could add this UI to it.
I really appreciate your help.

I don't know if it is the most performant way, but just install docker with compose plugin in your LXC, enable nesting and keyctl in proxmox for the lxc, if not already done, and run the ui over docker. That would be my way how I set It up running. But I don't know how to integrate the UI into TurnKeyLinux, if that was your question.
I hope this helps and I did not misunderstood your Issue.

Thanks @blockiyt
I ended deleting that TKL and creating a simple one with just wg-easy. It was really simple and works like a charm.


move unittest of QUIRE to a seperated class

The test case of QUIRE should not contained in unit test of uncertainty sampling.

Codecov Report

Merging #101 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #101   +/-   ##
=======================================
  Coverage   88.27%   88.27%
=======================================
  Files          33       33
  Lines        1185     1185
=======================================
  Hits         1046     1046
  Misses        139      139

Continue to review full report at Codecov.

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


Provide way to import projection trait

The current project/project_into methods are trait-methods, so it needs to use glob import to use it from other modules.
We could probably provide the following way:
#[pin_project]
struct Foo<T> {
    #[pin]
    field: T,
}
mod bar {
    #[project]
    use super::Foo;
    // convert to
    use super::__FooProjectionTrait;
}

Blocked on https://github.com/taiki-e/pin-project/issues/21#issuecomment-530206201

Didn't search very hard but: why do you need the trait? I thought we made pin #[fundamental]?

Closing this in favor of #89.


Various tiny fixes and improvements (see within)

SSM Lua had some updates that run too often so this helps that.
SSM Lua involving Tags updated twice as often as it should so now it doesn't.
Added the profiler to ms in sundries.
Fix the game start bug by removing the ability for it to happen, and also hid some other stuff we don't use.
Added GetTrueRotationZ for all Actors which we can use for button isOver later regardless of rotation.
Removed the top 4 things from the key config because it confuses people
Fix a Lua error that happens when you turn off Judgment text in Gameplay

Seems good :+1:

Not ready for merge until it is confirmed that these changes do not break the multiplayer ready button functionality.
To reproduce: Go into Multi on this build. Press Ready. Have anyone else in the lobby press ready or pick a song. The color of the button may change to the wrong status.

Fixed button issue.
Undid sync overlay change because this is handled by the gameplay rewrite.

This is blocked on https://github.com/etternagame/etterna/pull/597 to avoid conflicts on it


Restore statem

Restore statem logic used with previous Switch

@sarovin could you please check if it still works for you :)

LGTM


php-fpm.conf is missing

After install of any extension like "php7.1-pdo_pgsql", docker delete /etc/php/7.1/*.conf files, so fpm not work anymore.
Sample Dockerfile:
FROM phpearth/php:7.1-nginx
RUN apk add --no-cache php7.1-pdo_pgsql
Docker version: 18.03.1.ce-1.el7.centos
Linux: centos 7

Hello, thanks for reporting this issue.
I've just did the following and it seems to work ok:
mkdir test-project && cd test-project
echo "FROM phpearth/php:7.1-nginx\nRUN apk add --no-cache php7.1-pdo_pgsql" > Dockerfile
docker build -t test/project -f Dockerfile .
docker run -it --rm -p 8080:80 test/project
# in a new terminal
docker exec -it above_container_name sh
ls /etc/php/7.1

and everything is there. Yes?

Version of docker and host?
It's working for me on docker 17.09.0-ce too, maybe /var/lib/docker corrupted?

Docker version 18.05.0-ce, build f150324
Ubuntu 18.04 with 4.15.0-23-generic kernel

@sacesare I think that you have mounted directory /etc/php/7.1/ from your filesystem. double check this!
I made that same mistake some time before too

Interesting observation, if I run "apk add --no-cache php7.1-*" inside of running base image:
docker run  --rm -it --entrypoint=sh phpearth/php:7.1-nginx
everything is ok- /etc/php/7.1 stays intact.

@sacesare Weird, I'm using the apk repo on top of alpine and I haven't seen this issue, if I install something the files stay the same default, I can copy them out modify and add them again (switching FPM socket mode for example).


Receive emails over HTTP!

Parsers for Cloudmailin, Sendgrid (and possibly others)
Lots of tests
Documentation!

(Includes #117 so that the tests run - sorry!)

Closing this one in favour of a less clogged history. See #121


Automatically present outputs and diagnostics on representative examples

The ideal web page for this project will have a section of worked examples advertising the model's capabilities (not necessarily the same as a tutorial on getting started, which is presumably also example-oriented, but with different emphases).
I am envisioning examples up to the complexity, resolution, and duration of reproducing previously published research results, with

Graphics reproducing the published figures
Sanity checks with simulation-specific diagnostics
Sanity checks with generic diagnostics, like volume conservation
Reports on how long the runs take and how much memory they use
If feasible, measuring discrepancies against an equivalent setup in a different model, either MIM itself at a (perhaps slightly) different resolution, or a different model entirely
Feature (but not necessarily code) coverage

Perhaps also a dashboard summarizing all the examples, showing, e.g., aggregated information on volume conservation.  Perhaps also archives of the same across MIM versions.
Ideally, this display can be mechanically rebuilt for any desired version of MIM, and the project page features one for the current "stable release", and maybe one for the current "nightly build".
A display like this serves four purposes:

Advertising the model's scope, capabilities, and performance;
Validating the model's correctness;
Demonstrating to the models' users that the developers care about its correctness and performance; and
Teaching new users basic sanity checks they can use for their own work, including calibrating what they should expect to see on realistic cases.

Additionally, it effectively constitutes the results section of the MIM paper.
The down sides:

This sort of thing takes work to set up
Doing many realistically-sized MIM runs may be more computation than Travis-CI will be willing to just donate, so it may be necessary to either reduce the resolution of the examples or the frequency with which the report is built, and/or to find another source of cycles for producing it.

If we want this report to include simulations that recreate recently published results it will certainly take a fair amount of CPU time to produce - I'd be very surprised if Travis-CI let us get away with that.
Other than that concern, I'm onboard with all of this. I think we should also focus on making it as automatic as possible to reduce the maintenance burden in the future.

The expanding documentation (see e.g. #133, #155, #157)  is making progress on this issue.
As a larger library of images and animations becomes available, it would be good to place a curated selection on the landing page for the documentation (or the project's main webpage if it becomes large enough to deserve something separate from the docs).


Why does notify_one_slow return true even if threads were only requeued, and not unparked?

This is a conceptual question.
In notify_one_slow on Condvar, we have:
https://github.com/Amanieu/parking_lot/blob/4adcfdda3cfb4e70cfd876ccbeeb176cb2b88c5b/src/condvar.rs#L174
Suppose res.unparked_threads == 0, but res.requeued_threads > 0, then should notify_one_slow return true?

notify_one returns true if a thread was waiting on the condvar and has now been woken up. It doesn't matter whether this was done by waking it up directly or requeuing it to the mutex so that it will be woken up when the mutex is unlocked.

@Amanieu Thank you, that makes sense!


PR: Fix 3 bugs and add 4 improvements to Find in Files

Fixes #5306

[x] Fix issue reported in https://github.com/spyder-ide/spyder/issues/5306#issuecomment-354492631

[x] Fix issue reported in https://github.com/spyder-ide/spyder/issues/5306#issuecomment-354493874

[x] Fix issue reported in https://github.com/spyder-ide/spyder/issues/5306#issuecomment-354506402

[x] When populating the Search in QComboBox, do not add the paths that do not exists anymore.

[x] When hovering over an item of the QComboBox and pressing Del, remove the item from the list.

[x] Add a  Clear this list option below Select other directory.

[x] Show the full path when hovering over an item in the Search in QComboBox.

[x] Expand the tests for the FindInFiles Widget.

[x] Expand the tests for the FindInFiles Plugin.

[x]  Fix codecov to show failures only when coverage decreases in 1%

Mouse Over and Delete key press demo:

Select other directory and Clear this list demo:

Jean, could you also fix codecov to show failures only when coverage decreases in 1%? Thanks!

Hello @jnsebgosselin! Thanks for updating the PR.

In the file spyder/widgets/tests/test_findinfiles.py, following are the PEP8 issues :

Line 306:80: E501 line too long (87 > 79 characters)

@ccordoba12 While working on the tests for the FindInFiles plugin, I found out an additional bug.
The get_options method of the FindOptions widget is used for two things:

It is used to get the options when find is run. In this case, all=False and the options are defined here.
It is also used in the closing_plugin method of the FindInFiles plugin for saving the options to the config file. In this case, all=True and the options are defined here.

The problem is that there is safeguards within the get_options method to prevent the find method to be run if one of the parameters is not correct. However, these safeguards also prevent the find in files options to be saved to the config file when Spyder is closed.
For example, the options won't be saved to the config file if the Search pattern line edit is empty:

Go in the FindInFiles plugin and add an external path to the Search in combobox.
Leave the Search pattern line edit empty and close Spyder.
Restart Spyder: the external path that was added in 1 does not appear in the list of the  Search in combobox.  It was not saved to the config file due to the safeguard here.

I think this should be fixed in another PR. I will built my tests around this issue for the moment.

@ccordoba12 I think this is ready to be reviewed. I'll go over it again tomorrow just to be sure. There is a lot of stuff to review in this, so feel free to push it back to 3.2.7 if you do not have the time for 3.2.6. I'll try to document a little better the changes I've made later in the description of this PR.
Also, I'm not sure I understand well the use of to_text_string. It was used everywhere in findinfiles.py, so I did the same in the changes I've made.
More than 350 lines of tests added for a meager 0.3% increase in coverage... damn.

I like a lot the new SearchInComboBox class you added. It makes the code more modular and easier to understand. And, of course, I also like the new tests you added!
I left some minor comments, except for the use of to_unicode_from_fs in one place. Then I'd say this is ready.

Thank you very much Carlos for this quick review, this is very nice!
To do:

[ ] Assert non-ASCII path in the tests.
[ ] Do the requested style changes.
[ ] Fix the to_unicode_from_fs and to_text_string.

I added a non-ASCII path to the tests... and all hell breaks loose lol
The test is passing for Python3 in AppVeyor, but not for Python 2. I don't understand why the tests are failing on Travis though, I'm not sure it is related to this PR...

The "good news" is that I'm able to make the test crash locally with Python2, so I should be able to debug this... but probably not until next year XD


[MODEL EVALUATION REQUEST] intfloat/multilingual-e5-large-instruct

Model ID
intfloat/multilingual-e5-large-instruct
Model type
Encoder model (e.g., BERT)
Model languages

[X] Danish
[X] Swedish
[X] Norwegian (Bokmål or Nynorsk)
[X] Icelandic
[X] Faroese
[X] German
[X] Dutch
[X] English

Merged model
Not a merged model

This raises an scandeval.exceptions.InvalidBenchmark: NaN value detected in model outputs, even with mixed precision disabled. exception. Sometimes mixed precision isn't disabled correctly, so I will try benchmarking it in full fp32, which sometimes handles the NaNs. It's weird though, as the model is in fp16.

This still happens with fp32.

Created an issue for the bug: https://github.com/ScandEval/ScandEval/issues/389


BUG: multiscale_graphcorr random state seeding and parallel use

Test failure observed in gh-11095:
scipy.stats.multiscale_graphcorr
--------------------------------
File "build/testenv/lib/python3.6/site-packages/scipy/stats/stats.py", line 4612, in multiscale_graphcorr
Failed example:
    '%.3f, %.2f' % (mgc.stat, mgc.pvalue)
Expected:
    '0.033, 0.02'
Got:
    '0.033, 0.03'

The issue is in the _ParallelP class, it uses np.random.permutation without the option of providing a Generator or RandomState object or a seed. This should be possible for reproducibility. The design pattern to use is a random_state=None keyword I think, just like the rvs method of all distributions, or stats.rvs_ratio_uniforms.
There's actually more to it than that - for parallel usage it's not clear that _ParallelP does the right thing. Looks like it should be using one of the parallel rng methods: https://numpy.org/devdocs/reference/random/index.html#parallel-generation
Those are not available in NumPy < 1.17 though. In the absence of that, we are likely to get issues with non-independent streams: https://github.com/numpy/numpy/issues/9650. Should either at least generate different seeds before spawning new processes, or disable the feature.
@sampan501 @jovo thoughts?

@rgommers i don't know enough about it to have an informed opinion.
maybe @randalburns or @disa-mhembere can opine?

@rgommers Would it suffice doing something like this from scikit-learn's random forest:
seeds = [random_state.randint(MAX_INT, size=i) for i in n_trees]

where random_state is defined as
random_state : int, RandomState instance or None, optional (default=None)
        If int, random_state is the seed used by the random number generator;
        If RandomState instance, random_state is the random number generator;
        If None, the random number generator is the RandomState instance used
        by `np.random`.

and when random_state is passed it is checked via this function
def check_random_state(seed):
    """Turn seed into a np.random.RandomState instance
    If seed is None, return the RandomState singleton used by np.random.
    If seed is an int, return a new RandomState instance seeded with seed.
    If seed is already a RandomState instance, return it.
    Otherwise raise ValueError.
    """
    if seed is None or seed is np.random:
        return np.random.mtrand._rand
    if isinstance(seed, (numbers.Integral, np.integer)):
        return np.random.RandomState(seed)
    if isinstance(seed, np.random.RandomState):
        return seed
    raise ValueError('%r cannot be used to seed a numpy.random.RandomState'
                     ' instance' % seed)

@jovo, in the past as a quick and dirty way to deterministically obtain random numbers for a parallel workflow I have just pre-generated them as @rgommers suggested. It's a perfectly good solution especially if you know the # of variables required a priori and the generation is not the computational bottleneck. You can also seed a serial generator and serialize calls to it. If this isn't possible, there is a rich literature on DPRNGs -- some of which have packages.

I think the right API would be the  random_state keyword which depends on the number of workers. If workers=1, then it's a scalar which is passed through check_random_state.
If workers !=1, then it should be an iterable with len(random_state) == workers, where each element is a seed for the corresponding worker (i.e., each element goes through check_random_state). If the number of seeds is smaller than workers, it's a hard error. To be forward-compatible, we can allow parallel Generators from numpy, too.

I took a look at this locally---seems tricky. Is this really likely to be properly fixed with forward-compatibility for new random features in place in two days? Maybe a temporary disable of the feature is  in order, short term?

If we go the temporary disable route, probably best if someone more familiar with stats submodule tackles that.

I'll have a go at it on the weekend. Today is last day of Season of Docs, that has priority right now.

I think the right API would be the random_state keyword which depends on the number of workers. If workers=1, then it's a scalar which is passed through check_random_state.
If workers !=1, then it should be an iterable with len(random_state) == workers, where each element is a seed for the corresponding worker (i.e., each element goes through check_random_state). If the number of seeds is smaller than workers, it's a hard error. To be forward-compatible, we can allow parallel Generators from numpy, too.

This makes sense in the case the workers is an int, but not sure what to do when workers is a map-like callable.


Settings page restrictions and possible refactor.

The ability to change one's name on the settings page needs to be restricted so that users don't change their names to empty strings.
There should be some sort of success message on settings changes, potentially on the settings page itself, meaning the page may redirect back to settings instead of home on success.
Should look into how much more code it will be to move the option defaults to a JS file and have that file call the API for the settings.

The success message is a great idea and should definitely be implemented, but I recommend breaking this up into different issues @paytonshaltis


custom docker0 config example broken

File: engine/userguide/networking/default_network/custom-docker0.md
Using the example from the documentation:
{
  "bip": "<IP_ADDRESS>/24",
  "fixed-cidr": "<IP_ADDRESS>/25",
  "fixed-cidr-v6": "2001:db8::/64",
  "mtu": 1500,
  "default-gateway": "<IP_ADDRESS>",
  "default-gateway-v6": "2001:db8:abcd::89",
  "dns": ["<IP_ADDRESS>","<IP_ADDRESS>"]
}

which is inconsistent in itself and wouldn't work.
Error starting daemon: Error initializing network controller: Error creating default "bridge" network: auxilairy address: (DefaultGatewayIPv4:<IP_ADDRESS>) must belong to the master pool: <IP_ADDRESS>/24

Closing this ticket due to its age, and the impending refactor. If you think this is in error, feel free to reopen. Thanks!


Use schema validation in application.invoke

[x] tests and linter show no problems (npm t)
[x] tests are added/updated for bug fixes and new features
[x] code is properly formatted (npm run fmt)

Landed in https://github.com/metarhia/impress/commit/bdc33a36cee74e6c9da835c68387189784ec00d6


to_dataframe() excessive memory usage

Code Sample, a copy-pastable example if possible
import xarray as xr
from glob import glob

# This refers to a large multi-file NetCDF dataset
file_list = sorted(glob('~/Data/**/**/*.nc'))

dataset = xr.open_mfdataset(file_list,
                            decode_times=True,
                            autoclose=True,
                            decode_cf=True,
                            cache=False,
                            concat_dim='time')

# At this point, the total RAM used by the python process is ~1.4G

# Select a timeseries at a single point
# This is near instantaneous and uses no additional memory
ts = dataset.sel({'lat': 10, 'lon': 10}, method='nearest')

# Convert that timeseries to a pandas dataframe.
# This is where the actual data reading happens, and reads the data into memory
df = ts.to_dataframe()
# At this point, the total RAM used by the python process is ~10.5G

Problem description
Despite the fact that the resulting dataframe only has a single lat/lon point's worth of data, a huge amount of RAM is used.  I can get (what appears to be) an identical pandas DataFrame by changing the final line to:
df = (ts * 1.0).to_dataframe()

which reduces the total RAM to ~2.2G (i.e. 0.6G additional RAM for that single line vs 9G additional RAM).  No type conversion is taking place (i.e. ts and ts * 1.0 both have identical data types)
Expected Output
I would expect that to_dataframe() would require the same amount of memory whether or not it was multiplied by 1.0.  I'm aware there could be a good reason for this, but it took me by surprise somewhat.
Output of xr.show_versions()

commit: None
python: 3.5.2.final.0
python-bits: 64
OS: Linux
OS-release: 4.15.0-36-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_GB.UTF-8
LOCALE: en_GB.UTF-8
xarray: 0.10.7
pandas: 0.23.1
numpy: 1.13.3
scipy: 0.17.0
netCDF4: 1.4.1
h5netcdf: None
h5py: None
Nio: None
zarr: None
bottleneck: None
cyordereddict: None
dask: 0.19.0
distributed: None
matplotlib: 1.5.1
cartopy: None
seaborn: 0.8.1
setuptools: 20.7.0
pip: 18.0
conda: None
pytest: None
IPython: 2.4.1
sphinx: None

Here is another example:
import xarray as xr
ncdata = xr.open_dataset('https://thredds.ucar.edu/thredds/dodsC/nws/metar/ncdecoded/files/Surface_METAR_20200411_0000.nc')
df = ncdata.to_dataframe()

Output is:
Traceback (most recent call last):
  File "bug.py", line 4, in <module>
    df = ncdata.to_dataframe()
  File "/home/decker/miniconda3/envs/met212/lib/python3.8/site-packages/xarray/core/dataset.py", line 4399, in to_dataframe
    return self._to_dataframe(self.dims)
  File "/home/decker/miniconda3/envs/met212/lib/python3.8/site-packages/xarray/core/dataset.py", line 4385, in _to_dataframe
    data = [
  File "/home/decker/miniconda3/envs/met212/lib/python3.8/site-packages/xarray/core/dataset.py", line 4386, in <listcomp>
    self._variables[k].set_dims(ordered_dims).values.reshape(-1)
MemoryError: Unable to allocate array with shape (117819, 5021) and data type |S64

If I'm doing the math right, xarray is trying to allocate roughly 35 GB even though this NetCDF file is only on the order of 50 MB in size.
 It's possible that to_dataframe is doing some unstacking that's causing huge arrays to be allocated. I don't doubt these examples are real — though the * 1 example above is very surprising — but we do need reproducible examples to engage.
Please reopen or start a new issue with a reproducible example, thanks.


Explicitly declare app language and support per-app language preferences

Based #6567
It seems that CFBundleLocalizations is not the only factor affecting iOS when providing a localized text input context menu. According to this documentation, we also need to create a Localization.strings file to list the supported languages for the app.
On Android, the system language settings determine the localized text input context menu, not by app’s declaration. But creating a language list file can enable per-app language preferences on Android.
By introducing this react-native-localization-settings package, we can generate the language list files for both Android and iOS, while it also performing additional tasks to compatibility with system APIs.
In the Chinese section of the language list, following up on #6621, I used the RFC 4646 standard, as both iOS and Android prefer it, and it also complies with IETF BCP 47.
This should fix #6162 again.

Do we still need CFBundleLocalizations? It would be nice to reduce the duplication.

Do we still need CFBundleLocalizations? It would be nice to reduce the duplication.

We should no longer need to specify CFBundleLocalizations in app.config.js, as this package can handles language support lists for both Android and iOS.
If adding a new package is not desirable, I might need to update the current CFBundleLocalizations for Chinese, as iOS has stopped using the RFC 1766 standard since iOS 9.

We should no longer need to specify CFBundleLocalizations in app.config.js, as this package can handles language support lists for both Android and iOS.

Let's remove that config then.

We should no longer need to specify CFBundleLocalizations in app.config.js, as this package can handles language support lists for both Android and iOS.

Let's remove that config then.

Done.

seems like there are some bugs in that package https://github.com/jakex7/react-native-localization-settings/pull/10

seems like there are some bugs in that package jakex7/react-native-localization-settings#10

It seems we won’t encounter this issue. Earlier when I reviewing the deviceLocales.ts code, I noticed that we have our own preferred app language logic defined in src/state/persisted/schema.ts. We don’t directly use this package’s language preference handling, only rely on it to generate the necessary language list files.
The language list file told to system which languages our app supports, enabling per-app language preferences. This allows users to set a specific language for each app without changing the system language. When calling getLocales().languageTag, we always get the language the user wants to switch to, and then switch accordingly based on schema.ts.
It somewhat replaces the app’s built-in display language switching feature but provides a more native language-switching experience for users. I can’t say for sure what Bluesky’s future plans are, so per-app language preferences simply offer a possibility.
Here’s a demonstration of per-app language preferences on Android. iOS also provides per-app language preferences feature in the system settings, with behavior identical to that on Android.
https://github.com/user-attachments/assets/467dfe8d-0e03-4c80-97fd-4e4c55e38f82

Here in src/state/persisted/schema.ts, I think we always get the first language in the user’s language list, so we shouldn’t encounter that issue.

Here in src/state/persisted/schema.ts L148, I think we always get the first language in the user’s language list, so we shouldn’t encounter that issue.
Sorry about the incorrect line number earlier.

Just to clarify, with this PR, does this mean both the system per-app setting and the in-app setting work? Which one takes precedence? It would help to know specific before/after behaviors.

I did some cross-checking today and here’s what I observed:
A. When the user has never manually switched the display language within app, the system’s per-app language preferences always works.
B. When the user has manually changed the display language within the app, the system’s per-app language preferences no longer apply, and only the within app display language setting takes effect.
It seems to be related to src/locale/i18n.ts, after the user manually  changes the language within the app, a value appears to be written, and the app seems to prioritize reading that value. It only reads getLocales().languageTag when the value is empty (i.e., when the user has never manually changed the display language within app).

So it seems confusing to allow configuring in system preferences if those aren't always 1:1 in sync with the app, right? How do other apps solve this?

This is indeed confusing.
I looked into some other apps, and as you mentioned, apps typically only choose one method for language switching. For example, apps like X and Mastodon, which support the system’s per-app language preferences, they don’t include an in-app display language settings.
So yes, if the decision is to use the more native per-app language preferences, we should hide the in-app display language switch on native.
The pros and cons are quite clear, because the web still need display language settings, If we do this, we will be maintain two sets of app language lists. But it would provide a better experience for native users, such as enabling more refined language support.
Anyway, this is beyond the scope of this PR. I will close it and leave the idea here. Thank you so much for taking the time to work through this with me.


[5.2] In blade  generates an error

Laravel 5.2: In blade,

generates this error

ErrorException in 01d5dcbb5a884a5b6f849959fd4a800847bcc2fb.php line 36:
Object of class Illuminate\Routing\UrlGenerator could not be converted to string (View: .....\resources\views\base.blade.php) (View: ....\resources\views\base.blade.php)
in 01d5dcbb5a884a5b6f849959fd4a800847bcc2fb.php line 36
at CompilerEngine->handleViewException(object(ErrorException), '1') in PhpEngine.php line 44
at PhpEngine->evaluatePath('....\storage\framework\views/96e6fa1f9a0262f0f20c237d291132fbb29f4450.php', array('__env' => object(Factory), 'app' => object(Application))) in CompilerEngine.php line 59
at CompilerEngine->get('....\resources\views/pages/about.blade.php', array('__env' => object(Factory), 'app' => object(Application))) in View.php line 135
at View->getContents() in View.php line 106
at View->renderContents() in View.php line 80
at View->render() in Response.php line 52
at Response->setContent(object(View)) in Response.php line 197
at Response->__construct(object(View)) in Router.php line 1030
at Router->prepareResponse(object(Request), object(View)) in Router.php line 704
at Router->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 139
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
at Pipeline->then(object(Closure)) in Router.php line 705
at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 678
at Router->dispatchToRoute(object(Request)) in Router.php line 654
at Router->dispatch(object(Request)) in Kernel.php line 246
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 139
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Debugbar.php line 49
at Debugbar->handle(object(Request), object(Closure))
at call_user_func_array(array(object(Debugbar), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in CheckForMaintenanceMode.php line 44
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
at Pipeline->then(object(Closure)) in Kernel.php line 132
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 99
at Kernel->handle(object(Request)) in index.php line 53

The solution is to add "Request::"

Please add this to the migration 5.1 to 5.2 documentation.

Another solution is to change it to
<?php echo url('/'); ?>

Or, what if we add __toString() magic method for UrlGenerator?

For the first part of your answer,

Would not work for me because I want the current URL which is return by url() without parameter.

url() helper is not supposed to return current url.

rkgrep... I think that you are wrong.
Look at this in the doc:
http://laravel.com/docs/5.2/requests

@paceband So? There are docs about requests but not about url generator.


Memory leak in xgb.DMatrix [R]

There appears that repeatedly calling xgb.DMatrix causes R to use more and more memory as measured by top until R crashes.  This is despite the fact that when R reports it's own memory usage (say with pryr), it reports a constant memory usage.
Environment info
Operating System: Ubuntu 16.04.4 LTS
Compiler: gcc 5.4.0
Package used R:
xgboost version used: <IP_ADDRESS> (CRAN release), latest drat release, and commit with hash 4109818b3229f99e300a9da82b6326fa82e855fd.
R sessionInfo:
R version 3.4.3 (2017-11-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.4 LTS
Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0
locale:
[1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8       LC_NAME=C
[9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base
loaded via a namespace (and not attached):
[1] compiler_3.4.3
Installed with install.package("xgboost").
Also installed with
install.packages("drat", repos="https://cran.rstudio.com")
drat:::addRepo("dmlc")
install.packages("xgboost", repos="http://dmlc.ml/drat/", type = "source")

Also installed by cloning the github repo and running
git clone --recursive https://github.com/dmlc/xgboost
cd xgboost
git submodule init
git submodule update
cd R-package
R CMD INSTALL .

Steps to reproduce
The following code causes the R to use more and more memory until it crashes.  The growing memory usage can be observed by simultaneously running top or htop.
library(xgboost)

n = 10000
data = matrix(rnorm(n^2,0,1), n, n)
label = sample(c(0,1),n,replace = TRUE)

i = 0
while (TRUE) {
  message = paste0('round ', i)
  writeLines(message)
  i = i + 1

  train = xgb.DMatrix(data = data,
                      label = label)
}

What have you tried?
Nothing beyond identification of the bug.

To me, this looks like an example of the fragility of automatic garbage collection in R. With your example, I see the memory consumption raising and then hovering close to the top for a while (as if the garbage collector being able to do its janitor job for at least some time), and then a sudden crash happens (as if the GC has missed its opportunity to run, and R tips over the memory limit with the large allocations required to create a DMatrix with this data). However, the memory consumption stays low and constant if I force R to run gc() within the the while loop. I don't really see what could be done here on the xgboost's side.

You're right.  Thanks for the eyes.  I believe there's a more complex memory issue happening when you throw xgb.train into the mix.  I might try to write up a post about that soon.


MINOR: Update rocksDB dependency to 4.13.5

4.13.5 is not yet published on central maven repository.

We can only merge this once the jar hits Maven. Maybe you can ask the RocksDB team to publish it to Maven?

Can we retest it after it was pushed to centra repo?

@jozi-k, build is in progress. :)

test this please

test this please

@jozi-k It seems RocksDB's latest stable release is 5.0.1, and they have abandoned 4.13.x:
http://rocksdb.org/blog/

Jenkins, test this please.

Please update the PR title as well.

I'm happy to :) LGTM and merged to trunk.


Changed importing dev or prod config files #3

Solves a simple problem for it to work out of the box...

This still throws same error for me

Actually wait a sec it works perfectly!! :)

Merged. Thanks!


[BugFix] Application Analytics - Panels not displaying availability

Description
[Describe what this change achieves]
Fixed a bug where the availability was not being displayed in panels as well as the data configuration. This was due to metaData for the user config not being parsed correctly and always being empty.
Issues Resolved
[List any issues this PR will resolve]
Check List

[ ] New functionality includes testing.

[ ] All tests pass, including unit test, integration test and doctest

[ ] New functionality has been documented.

[ ] New functionality has javadoc added
[ ] New functionality has user manual doc added

[ ] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Can you backport to 2.x/2.9 if that's already created


Improve empty Tween error message

When a Tween starts without Tweeners, you get error saying
Tween started, but has no Tweeners.

without any context. It usually happens when you use Tweens in a wrong way, but sometimes may happen with correct use (due to oversight or whatever) and it's very difficult to find if you have many Tweens.
Most of the time, Tweens are associated with some Node, so printing the node's name alongside the Tween would make it much easier to find. This PR adds a custom to_string() to Tween and prints it in case of the above error. The error now looks like this:
Tween::step: Tween (bound to /root/Node2D): started with no Tweeners.

Ok changed it to include node path. Not sure if I should leave to_string() or not. Technically it's useful for printing 🤔

Thanks!


View/list uploaded media

Is there a way of storing/retrieving this from the server? e.g. a list to see what media there is on the server and then insert that into the editor

@see
http://imperavi.com/redactor/plugins/image-manager/
http://imperavi.com/redactor/plugins/file-manager/
what you're looking for Is this?


Solves merge conflicts. Closes #8

There are new merge conflicts. Could you update with the latest version from upstream?


LTSv2 Service Pack 1 WishList

Features that did not make it into LTSv2 that users would like to see in a service pack.
Propose SP1 be released on July 1.
This is something entirely outside of the scope of the regular release channel, and should really be considered a best-effort approach. Beyond CI and reported acceptance testing, there will be no promises made.
I am willing to merge changes into a branch off based on the v2.7.2 tag (pending) for this purpose.
This will likely involve some additional work by the community as well as maintainers and collaborators. Changes should be kept as minimal and atomic as possible. It may well be more bandwidth than collaborators and maintainers have, so external contributions are welcome. If anything, even just some high-level direction and / or notes from maintainers would be appreciated.

[ ] LVGLv8 cc @brgl

Notes here

Another changeset we'd be interested in getting into LTSv2 is the following PR: https://github.com/zephyrproject-rtos/zephyr/pull/43927 Fortunately this is straightforward.

WRT LVGL v8 in 2.7: the bit about the changes needing to be atomic and minimal is a no-go. While eventually we ended up moving almost of the lvgl code out of the zephyr tree for 3.1, the changes that stayed in-tree encompas many defconfigs, samples etc. I did a minimal, squashed port of the LVGL changes to 3.0 and it still amounts to 800 LOC changed. Is this still acceptable?

WRT LVGL v8 in 2.7: the bit about the changes needing to be atomic and minimal is a no-go. While eventually we ended up moving almost of the lvgl code out of the zephyr tree for 3.1, the changes that stayed in-tree encompas many defconfigs, samples etc. I did a minimal, squashed port of the LVGL changes to 3.0 and it still amounts to 800 LOC changed. Is this still acceptable?

I wonder if we could remove what is necessary to adopt the approach taken in 3.1 - a module sounds far more appealing. I would definitely consider it.
Minimal in this case should also mean "minimal effort", so if the work has been done and it's not too, too hard to apply to v2.7-branch, that would work too.

This is likely not going to happen - closing.


Pawn captures

We discussed this on IRC.

let's get those tests passing, then we can merge 😄

They're failing because of your castling code 😋


Blank screen after updating - OS X

OS:
OS X 10.11.6
Issue Description:
The app shows a blank screen on startup after the latest update (3.6.0), even after reinstalling. It's appears the same as https://github.com/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/issues/1037 except that it's on OS X.
Can still open settings.
EDIT: ALSO - there are no Audio Devices in the Audio Devices menu. Not sure if it's related.
Steps to Reproduce:

Start app
Wait for circle loader to spin a couple times
See blank screen

I've the same problem with version 3.6.0.

Windows 10 x64

Still haven't made to jump to the next Chromium version and there are known bugs RE GPU acceleration in this version.  This is pending the Electron 1.4.0 release

@MarshallOfSound Cool, is there something we can do to use the app in the meantime? I don't know how to turn off GPU acceleration on OS X.

Cool, is there something we can do to use the app in the meantime? I don't know how to turn off GPU acceleration on OS X.

@rameezv You should be able to get it to work by resetting the cache.  Open terminal and type in
m -rf ~/Library/Application\ Support/Google\ Play\ Music\ Desktop\ Player/

This will completely reset the application but it should make it work 👍

@MarshallOfSound fixed your command to be rm instead of just m :+1:


Extract Aggregate, Sort, and Join to struct from AggregatePlan

Which issue does this PR close?

Closes #1303
Closes https://github.com/apache/arrow-datafusion/issues/1228
Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

Thanks @matthewmturner !

I think this PR is now the last remaining in the set for https://github.com/apache/arrow-datafusion/issues/1228 -- we are close now. @matthewmturner  any chance you can rebase this PR and we can wrap up this item?

I think this PR is now the last remaining in the set for #1228 -- we are close now. @matthewmturner any chance you can rebase this PR and we can wrap up this item?

yes, sry for delay. i am working on it.
i am going to align to style recommended by @liukun4515

I think this PR is now the last remaining in the set for #1228 -- we are close now. @matthewmturner any chance you can rebase this PR and we can wrap up this item?

yes, sry for delay. i am working on it.
i am going to align to style recommended by @liukun4515

If your pull request is ready, I will review it.
@matthewmturner

@liukun4515 ready for review!

LGTM, thanks @matthewmturner. You are the terminator of #1228 ! 🎉


Luau support

Some conversations on https://github.com/natecraddock/ziglua/issues/19 show interest in Luau support.
It should be possible, though I haven't attempted yet. It is written in C++ which may cause issues.

I tried doing this and got it to work. I built Kusu using their cmake-based build and linked the output library with ziglua.
It'd be better if everything was built through build.zig but I didn't look into that part. It might be doable or it might get hairy.
I can share my notes if you want, although I didn't encounter any major problems.
There are some differences between Luau and other Lua implementations and Luau also uses a compiler and code is loaded as bytecode so it'll need some additional functions and tweaks. But the usual stuff like calling a Lua function uses the same Lua 5.1 API.

Thanks for taking a look into things! Feel free to share your notes here, that would likely be helpful.
I'm also interested in getting things to work with the build.zig. I'm planning on working on this over the next few days. I expect it should be possible because mlua seems to support Luau bindings for Rust

Here's the mods that I made to ziglua to compile against Luau.  I don't think there's anything that's directly useful but sharing here in case it's helpful:
diff --git a/build.zig b/build.zig
index ccb249e..8f1f867 100644
--- a/build.zig
+++ b/build.zig
@@ -8,6 +8,7 @@ pub const LuaVersion = enum {
     lua_53,
     lua_54,
     // lua_jit,
+    luau,
 };

 pub fn build(b: *Build) void {
@@ -27,6 +28,7 @@ pub fn build(b: *Build) void {
             .lua_52 => .{ .path = "src/ziglua-5.2/lib.zig" },
             .lua_53 => .{ .path = "src/ziglua-5.3/lib.zig" },
             .lua_54 => .{ .path = "src/ziglua-5.4/lib.zig" },
+            .luau => .{ .path = "src/zigluau/lib.zig" },
         },
     });

@@ -40,6 +42,7 @@ pub fn build(b: *Build) void {
             .lua_52 => std.SemanticVersion{ .major = 5, .minor = 2, .patch = 4 },
             .lua_53 => std.SemanticVersion{ .major = 5, .minor = 3, .patch = 6 },
             .lua_54 => std.SemanticVersion{ .major = 5, .minor = 4, .patch = 6 },
+            .luau => std.SemanticVersion{ .major = 1, .minor = 0, .patch = 0 },
         },
     };
     const lib = if (shared)
@@ -51,8 +54,10 @@ pub fn build(b: *Build) void {
         .lua_51 => "lib/lua-5.1/src",
         .lua_52 => "lib/lua-5.2/src",
         .lua_53 => "lib/lua-5.3/src",
-        .lua_54 => "lib/lua-5.4/src",
+        .lua_54 => "lib/lua5.4/src",
+        .luau => "../luau/VM/include",
     };
+
     lib.addIncludePath(.{ .path = lib_dir });

     const os_tag = target.os_tag orelse
@@ -79,16 +84,18 @@ pub fn build(b: *Build) void {
         .lua_52 => &lua_52_source_files,
         .lua_53 => &lua_53_source_files,
         .lua_54 => &lua_54_source_files,
+        .luau => &luau_source_files,
     };
     for (lua_source_files) |file| {
-        const path = std.fs.path.join(b.allocator, &.{ lib_dir, file }) catch unreachable;
+        const dummy_lib_dir = "lib/luau/src";
+        const path = std.fs.path.join(b.allocator, &.{ dummy_lib_dir, file }) catch unreachable;
         lib.addCSourceFile(.{ .file = .{ .path = path }, .flags = &flags });
     }
-    lib.linkLibC();
+    //lib.linkLibC();

     lib.installHeader(b.pathJoin(&.{ lib_dir, "lua.h" }), "lua/lua.h");
     lib.installHeader(b.pathJoin(&.{ lib_dir, "lualib.h" }), "lua/lualib.h");
-    lib.installHeader(b.pathJoin(&.{ lib_dir, "lauxlib.h" }), "lua/lauxlib.h");
+    //lib.installHeader(b.pathJoin(&.{ lib_dir, "lauxlib.h" }), "lua/lauxlib.h");
     lib.installHeader(b.pathJoin(&.{ lib_dir, "luaconf.h" }), "lua/luaconf.h");

     b.installArtifact(lib);
@@ -100,6 +107,7 @@ pub fn build(b: *Build) void {
             .lua_52 => .{ .path = "src/ziglua-5.2/tests.zig" },
             .lua_53 => .{ .path = "src/ziglua-5.3/tests.zig" },
             .lua_54 => .{ .path = "src/ziglua-5.4/tests.zig" },
+            .luau => .{ .path = "src/zigluau/tests.zig" },
         },
         .optimize = optimize,
     });
@@ -123,7 +131,13 @@ pub fn build(b: *Build) void {
             .optimize = optimize,
         });
         exe.addModule("ziglua", ziglua);
+
+        exe.addLibraryPath(.{ .path = "../luau/cmake/RelWithDebInfo/" });
+        exe.linkSystemLibraryName("Luau.VM");
+
         exe.linkLibrary(lib);
+        exe.linkLibC();
+        //exe.linkLibCpp();

         const artifact = b.addInstallArtifact(exe, .{});
         const exe_step = b.step(b.fmt("install-example-{s}", .{example[0]}), b.fmt("Install {s} example", .{example[0]}));
@@ -275,3 +289,5 @@ const lua_54_source_files = [_][]const u8{
     "lutf8lib.c",
     "linit.c",
 };
+
+const luau_source_files = [_][]const u8{"ldummy.c"};
diff --git a/examples/zig-fn.zig b/examples/zig-fn.zig
index 6674bb9..786f6ea 100644
--- a/examples/zig-fn.zig
+++ b/examples/zig-fn.zig
@@ -10,8 +10,8 @@ const Lua = ziglua.Lua;
 // A Zig function called by Lua must accept a single *Lua parameter and must return an i32.
 // This is the Zig equivalent of the lua_CFunction typedef int (*lua_CFunction) (lua_State *L) in the C API
 fn adder(lua: *Lua) i32 {
-    const a = lua.toInteger(1) catch 0;
-    const b = lua.toInteger(2) catch 0;
+    const a = lua.toInteger(1); // catch 0;
+    const b = lua.toInteger(2); // catch 0;
     lua.pushInteger(a + b);
     return 1;
 }
@@ -31,28 +31,28 @@ pub fn main() anyerror!void {
     // The call to ziglua.wrap() is slightly more verbose, but has the benefit of being more flexible.
     lua.pushFunction(ziglua.wrap(adder));

-    // Push the arguments onto the stack
+    // // Push the arguments onto the stack
     lua.pushInteger(10);
     lua.pushInteger(32);

-    // Call the function. It accepts 2 arguments and returns 1 value
+    // // Call the function. It accepts 2 arguments and returns 1 value
     // We use catch unreachable because we can verify this function call will not fail
     lua.protectedCall(2, 1, 0) catch unreachable;

-    // The result of the function call is on the stack.
-    // Use toInteger to read the integer at index 1
-    std.debug.print("the result: {}\n", .{lua.toInteger(1) catch unreachable});
+    // // The result of the function call is on the stack.
+    // // Use toInteger to read the integer at index 1
+    std.debug.print("the result: {}\n", .{lua.toInteger(1)});

-    // We can also register the function to a global and run from a Lua "program"
+    // // We can also register the function to a global and run from a Lua "program"
     lua.pushFunction(ziglua.wrap(adder));
     lua.setGlobal("add");

-    // We need to open the base library so the global print() is available
-    lua.open(.{ .base = true });
+    // // We need to open the base library so the global print() is available
+    // lua.open(.{ .base = true });

-    // Our "program" is an inline string
-    lua.doString(
-        \\local sum = add(10, 32)
-        \\print(sum)
-    ) catch unreachable;
+    // // Our "program" is an inline string
+    // lua.doString(
+    //     \\local sum = add(10, 32)
+    //     \\print(sum)
+    // ) catch unreachable;
 }

I had to use the following zig build -Dtarget=x86_64-windows-msvc --verbose -Dversion=luau --summary none run-example-zig-function to compile Ziglua on Windows to make it link against Luau.  Most likely this is not required if you use build.zig to build Luau.  I ran into some linker problems due to CRT mismatches.
Building Luau:
mkdir cmake && cd cmake
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLUAU_EXTERN_C=1
cmake --build . --target Luau.Repl.CLI --config RelWithDebInfo
cmake --build . --target Luau.Analyze.CLI --config RelWithDebInfo

I'm not sure how Ziglua should deal with the Luau command line tools.  Probably wouldn't be a bad idea to also package & build those through build.zig?  More work though.  The compiler is something that I believe is a must use with Luau, so perhaps building that along with everything else in Ziglua will be pretty convenient.

Hey! Sorry for the weeks of silence. I finally had a large block of time to work on this.
I have Luau building from source in the build.zig file now, and tests seem to be passing. I did have to comment out several tests in my rush to get things working. I'll take some time now to clean things up.

Really cool, thanks for the update, @natecraddock!  Looking forward to using it.

BTW fingers crossed that Zig dropping LLVM (and thus C++) won't make bundling C++ libs like Luau a tool configuration nightmare.

Missed this the first time. My understanding is that there would be some sort of optional llvm dependency still. It's a long ways out though, so only time will tell!
I just pushed to the luau branch (https://github.com/natecraddock/ziglua/tree/luau) all my changes. It is still a work in progress, but the basics should work now. Feel free to give it a try if you have time. I just tested using Luau with the build system and it seems to work great!
const ziglua = b.dependency("ziglua", .{
    .target = target,
    .optimize = optimize,
    .version = .luau,
});

This is the first time I have used Luau, so I'm unfamiliar with what is expected. If I have missed anything let me know!

Thanks, I'll give it a try over the holidays!  I actually haven't used Luau either, but I have a strong intuition that I'll have a better time with it than normal Lua.  Luau has some non-Roblox users too, such as Alan Wake 2 (https://www.remedygames.com/article/how-northlight-makes-alan-wake-2-shine)

I just finished fixing all of the tests for Luau. I copied the tests from Lua 5.1, so I may be missing some things that Luau includes from newer versions of Lua. But it should be mostly feature complete now!
https://github.com/natecraddock/ziglua/tree/luau
I'll be merging this in in the next few days after some more testing

I wonder if I'm running the tests correctly.  Here's what I get when running zig build test -Dversion=luau on Windows:
C:\Users\janne\dev\ziglua>zig build test -Dversion=luau
run test: error: while executing test 'test.executing string contents', the following command exited with code 116 (expected exited with code 0):
C:\Users\janne\dev\ziglua\zig-cache\o\627ce074ec51cf409fcabfed396ffc8f\test.exe --listen=-
Build Summary: 6/8 steps succeeded; 1 failed; 37/37 tests passed (disable with --summary none)
test transitive failure
└─ run test failure
error: the following build command failed with exit code 1:
C:\Users\janne\dev\ziglua\zig-cache\o\011c71f4d84e850171870573012f61d4\build.exe C:\Users\janne\scoop\apps\zig-dev\0.12.0-dev.1808\zig.exe C:\Users\janne\dev\ziglua C:\Users\janne\dev\ziglua\zig-cache C:\Users\janne\AppData\Local\zig --seed 0x7b77de03 test -Dversion=luau

(There's something to be said about the clarity if "zig test" output clarity.. like which actual test failed?)
I think it's failing on loadString:
    try lua.loadString("f = function(x) return x + 10 end");

I also didn't look very hard yet, but is there a Zig API for loading bytecode?  I think the common approach to using Luau is to compile luau code into bytecode and then load bytecode only.

OK, here's a patch that fixes the error on Windows.  AFAICT the problem is that it's not portable to assume that std.heap.c_allocator.free() is the same as C lib's free().
C:\Users\janne\dev\ziglua>git diff
diff --git a/lib/luau/Compiler/include/luacode.h b/lib/luau/Compiler/include/luacode.h
index 60cdeee..727d746 100644
--- a/lib/luau/Compiler/include/luacode.h
+++ b/lib/luau/Compiler/include/luacode.h
@@ -40,3 +40,4 @@ struct lua_CompileOptions

 // compile source to bytecode; when source compilation fails, the resulting bytecode contains the encoded error. use free() to destroy
 LUACODE_API char* luau_compile(const char* source, size_t size, lua_CompileOptions* options, size_t* outsize);
+LUACODE_API void luau_free(char* ptr);
diff --git a/lib/luau/Compiler/src/lcode.cpp b/lib/luau/Compiler/src/lcode.cpp
index ee150b1..4412b51 100644
--- a/lib/luau/Compiler/src/lcode.cpp
+++ b/lib/luau/Compiler/src/lcode.cpp
@@ -27,3 +27,8 @@ char* luau_compile(const char* source, size_t size, lua_CompileOptions* options,
     *outsize = result.size();
     return copy;
 }
+
+// free ptr returned by luau_compile
+void luau_free(char* ptr) {
+    free(ptr);
+}
diff --git a/src/zigluau/lib.zig b/src/zigluau/lib.zig
index 4c64f6a..40e7519 100644
--- a/src/zigluau/lib.zig
+++ b/src/zigluau/lib.zig
@@ -1139,7 +1139,8 @@ pub const Lua = struct {
         if (bytecode == null) return error.Memory;

         // luau_compile uses libc malloc to allocate the bytecode on the heap
-        defer std.heap.c_allocator.free(bytecode[0..size]);
+        //defer std.heap.c_allocator.free(bytecode[0..size]);
+        defer c.luau_free(bytecode);

         if (c.luau_load(lua.state, "...", bytecode, size, 0) != 0) return error.Fail;
     }

It makes sense looking at the implementation of the c_allocator in Zig: https://github.com/ziglang/zig/blob/4129996211edd30b25c23454520fd78b2a70394b/lib/std/heap.zig#L93
IMO adding a wrapper for free() to match exactly what the underlying Luau would do is a safe bet here.

I started working on an example that loads precompiled bytecode (e.g., use luau-compile --binary test.luau > test.bc, then luau_load that).  I think I can make a PR for an example and whatever APIs are needed for it.
However, a question on types.  To load bytecode, I'm planning to add something like this:
    /// Loads Luau bytecode
    /// See https://luau-lang.org/getting-started
    pub fn loadBytecode(lua: *Lua, chunkname: [:0]const u8, bytecode: []const u8) !void {
        if (c.luau_load(lua.state, chunkname.ptr, bytecode.ptr, bytecode.len, 0) != 0) return error.Fail;
    }

Does the use of non-sentinel bytecode slice raise eyebrows here?  IMO those are always a lot more convenient to use in Zig and there's no real reason not to use a normal slice here (since Luau accepts a ptr and length).  But it's not consistent with the rest of the Zig Lua API.
Otherwise, I have a small example that's able to load a bytecode file and execute the loaded module.  This stuff is exceptionally poorly documented in Luau, so I'll play with this a bit more to see that I did everything right.  For example, I have no idea what the above chunkname means -- it seems like I can give it any value and it still works.

OK, here's a patch that fixes the error on Windows. AFAICT the problem is that it's not portable to assume that std.heap.c_allocator.free() is the same as C lib's free(). It makes sense looking at the implementation of the c_allocator in Zig

Thanks for catching this! I did just assume that c_allocator was the same as free. I'll take a look into fixing this based on your patch. This is the first time something in Ziglua has differed on Windows. This is a good motivation to add Windows coverage in the automated tests.

I started working on an example that loads precompiled bytecode (e.g., use luau-compile --binary test.luau > test.bc, then luau_load that). I think I can make a PR for an example and whatever APIs are needed for it.
Does the use of non-sentinel bytecode slice raise eyebrows here? IMO those are always a lot more convenient to use in Zig and there's no real reason not to use a normal slice here (since Luau accepts a ptr and length). But it's not consistent with the rest of the Zig Lua API.

I very likely use sentinel slices way too much in Ziglua. For return types from Lua it makes more sense, but for passing data in to Lua I expect it is not needed as much as I have done it. Feel free to not use a sentinel in your PR.

This stuff is exceptionally poorly documented in Luau

I'm glad I'm not alone in feeling this 😂 I've had to read through the source code to determine how many of the API functions have changed.
I do actually know what chunkname is. Or at least a good guess. I think that is the name given to the loaded Lua chunk. So if the Lua vm ever needed to refer to the chunk (like reporting an error) that chunkname would be used. I haven't looked at the code in this case, but I'm pretty confident that is what it is.
Please feel free to give more suggestions on the Luau API. I know you said you aren't super familiar with it, but based on things you said (like "I think the common approach to using Luau is to compile luau code into bytecode and then load bytecode only.") you appear to be more familiar than me.
Thanks!

not portable to assume that std.heap.c_allocator.free() is the same as C lib's free().
This is the first time something in Ziglua has differed on Windows

Clarifying my earlier comment: I'd say it's not a portability assumption even, just that one shouldn't assume a particular implementation for the c_allocator.  Changes to c_allocator might well break code depending on c_allocator.free() == free() on Unix platforms too.
For pure malloc/free, there's also: https://ziglang.org/documentation/master/std/#A;std:heap.raw_c_allocator.  But I think it's better done as in my patch so that whatever gets allocated in C is also deallocated in C.

Please feel free to give more suggestions on the Luau API

Sure!  I'll need to use it for something real to see what's missing.
Chunkname: Yep, I think you're right.  I found out later that it's a concept in "core Lua" too, so pretty sure that's what it means here too.

sentinel slices way  [...] For return types from Lua it makes more sense

Yeah, it's easy to go from a sentinel slice to normal slice, so a sentinel return type is fine (and preferred if it means one less allocation) but the other direction is harder as it implies an allocation (need one more byte for the ending 0).  I thought there was a function for converting from slice to zero-terminated string but I can't even find it now in the std lib. :)

not portable to assume that std.heap.c_allocator.free() is the same as C lib's free().
This is the first time something in Ziglua has differed on Windows

Clarifying my earlier comment: I'd say it's not a portability assumption even, just that one shouldn't assume a particular implementation for the c_allocator.  Changes to c_allocator might well break code depending on c_allocator.free() == free() on Unix platforms too.
For pure malloc/free, there's also: https://ziglang.org/documentation/master/std/#A;std:heap.raw_c_allocator.  But I think it's better done as in my patch so that whatever gets allocated in C is also deallocated in C.

Please feel free to give more suggestions on the Luau API

Sure!  I'll need to use it for something real to see what's missing.
Chunkname: Yep, I think you're right.  I found out later that it's a concept in "core Lua" too, so pretty sure that's what it means here too.

sentinel slices way  [...] For return types from Lua it makes more sense

Yeah, it's easy to go from a sentinel slice to normal slice, so a sentinel return type is fine (and preferred if it means one less allocation) but the other direction is harder as it implies an allocation (need one more byte for the ending 0).  I thought there was a function for converting from slice to zero-terminated string but I can't even find it now in the std lib. :)

I pushed some fixes, added windows CI coverage, and made a PR (probably should have done that a while ago at this point). Looks like everything is good to go. I'll probably merge this PR within the next day because at this point any future fixes or additional features can be done later.
https://github.com/natecraddock/ziglua/pull/36

Yeah, I think it makes sense to merge.  Easier to add stuff on top of it then.


no-nonoctal-decimal-escape

Current dependencies on/for this PR:

main

PR #26   👈

This comment was auto-generated by Graphite.


In Karate 1.2.0.RC1, the karate property set in karate-config.js file is coming as null when fetched in a Java File

In Karate 1.2.0.RC1 ,karate-config.js has below property set.
karate.properties['Serviceurl'] = config.InfoUrl;
Now the value of Serviceurl is fetched in a Java file as below. But it is returning null.
String Serviceurl = System.getProperty("Serviceurl");
I was expecting the property value set in karate to be available in Java file.
karate-template.zip

we only support 1.4.1 or 1.5.0.RC4 so please update your example to reopen.
that said karate.properties is read-only so what you are trying to do is wrong and does not make sense.
please refer to the docs and there are plenty of examples of java interop. start reading here: https://github.com/karatelabs/karate#karate-configjs


Behavior difference for os.path.split

Describe the bug
On windows, the function python version of os.path.split does not convert path separators, while the pyfakefs version does. Is this intentional or is this a bug?
How To Reproduce
import os
import unittest
from pyfakefs.fake_filesystem_unittest import TestCase

class TestPathSplit(TestCase):

    def test_split(self):
        head_before, tail_before = os.path.split('/')
        self.setUpPyfakefs()
        head_after, tail_after = os.path.split('/')
        print("Before setUpPyfakefs head=%s, tail=%s" % (head_before, tail_before))
        print("After  setUpPyfakefs head=%s, tail=%s" % (head_after, tail_after))
        self.assertEqual(head_before, head_after)

if __name__ == '__main__':
    unittest.main()

>test.py
Before setUpPyfakefs head=/, tail=
After  setUpPyfakefs head=\, tail=
F
======================================================================
FAIL: test_split (__main__.TestPathSplit)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\Russ\Desktop\backup-tool\bug-report\test.py", line 14, in test_split
    self.assertEqual(head_before, head_after)
AssertionError: '/' != '\\'
- /
+ \

Your environment
>python -c "import platform; print(platform.platform())"
Windows-10-10.0.19041-SP0

>python -c "import sys; print('Python', sys.version)"
Python 3.9.1 (tags/v3.9.1:1e5d33e, Dec  7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)]

>python -c "from pyfakefs.fake_filesystem import __version__; print('pyfakefs', __version__)"
pyfakefs 4.5.0

Thanks - no, that is not intentional.

Shall be fixed in master now, please check!

@c1728p9 I gave this a try today with the tip of master (e06472b0671d2f077cc41e9ab9cf38893ef0c97f) and can confirm that this fixes the problem I was seeing. Thanks for the quick fix!


Behavior when the device token is changed during iOS application startup.

If the device token is changed while the iOS application is running for a long time, will the registration event be called again?

@nrikiji yes


double-beep: Watch firstclick.club

double-beep requests the watch of the watch_keyword firstclick\.club. See the MS search here and the Stack Exchange search here.

firstclick\.club has been seen in 1 true positive, 0 false positives, and 0 NAAs.

Approved by Zoe in Charcoal HQ


Improve README

Improve README intro.
Remove tag changing, Docker, & contributing.
Describe wrapping HTTP API a bit.
Improve language/links around implementations.
Move Running Specifict Tests section down.
Clarify how to setup public implementations.

@aljones15 @Wind4Greg would love your review on this one! I plan to roll out similar changes/clarifications to all the test suite repos.

please don't forget that in the implementations package issuer id is required for some issuer endpoints. the examples have empty strings for ids. The id probably should be a did:key that is the key the issuer is identified by / signs the VC with.

Where does that occasional requirement effect this PR? Should I change something?
If not, can you merge this one?
Thanks!


Improve chocolateyInstall

Delete MSI after installation and add software name

@RichiCoder1 In the Core Team Guidelines there are some further information about softwareName