Adding the capability of parsing negative integers (configurable option) to the ASN.1 parser

Description
To help make the ASN.1 parser in mbedTLS generic (as suggested by config.h), I propose to add the capability of parsing negative integers to the said parser (the inability to handle negative integers is also not mentioned clearly in the API doc).
From a modular design perspective, a parser should be more about dealing with input at a syntactic level (e.g. handling ASN.1 data type INTEGER) and not enforcing semantic correctness (e.g rejecting negative integers).
At the cost of an extra pointer, 2 ifs and some maths, this implements a simple 2's compliment. MBEDTLS_ASN1_PARSE_NEGINT is the option that can be used in config.h to turn on/off the negative integer parsing.
Also changed the return value for the case when MBEDTLS_ASN1_PARSE_NEGINT is off but negative integers are encountered. Instead of MBEDTLS_ERR_ASN1_INVALID_LENGTH, the parser returns MBEDTLS_ERR_ASN1_INVALID_DATA to better match the semantic meaning of the error codes.
Status
READY/IN DEVELOPMENT/HOLD
Requires Backporting
NO
(This PR is a new feature\enhancement)
Migrations
If there is any API change, what's the incentive and logic for it.
YES | NO
Additional comments
Any additional information that could be of interest
Todos

[ ] Tests
[ ] Documentation
[ ] Changelog updated
[ ] Backported

Notes:

Pull requests cannot be accepted until:

The submitter has accepted the online agreement here with a click through
or for companies or those that do not wish to create an mbed account, a slightly different agreement can be found here
The PR follows the mbed TLS coding standards

This is just a template, so feel free to use/remove the unnecessary things

Hi @1one-w01f ,
Just a reminder - without a signed CLA, we cannot accept your code contribution. As @RonEld describes above this can be done by a simple click through agreement, or alternatively, by contract.

@sbutcher-arm Thanks for your reminder. I have accepted the Contributor Agreement on Wed 17 Jan 2018.

Thanks @1one-w01f! Could you please confirm that your mbed account is 1onew01f?

I noticed that we don't have a test suite for ASN.1 parsing functions. I suggest to track and fix this all-at-once in a separate issue. @mpg @gilles-peskine-arm Comments?

@hanno-arm That's weird, I seem to remember opening an issue about that years ago, but I can't find it, so I assumed my memories are not reliable and I only thought of doing it. I fully approve of creating an new issue about the absence of test_suite_asn1parse.

@sbutcher-arm Yes, 1onew01f is my mbed account.

@hanno-arm Pushed a new commit based on your suggestions. Please feel free to review.

I fully agree with @gilles-peskine-arm that I would prefer a new function (perhaps mbedtls_asn1_get_sint() as we can't change the name of the existing one now) so that calling code can choose what it wants to parse.
Also, regarding mbedtls_asn1_write_int(), let's remember there are two problems to fix (1) writing negative values, (2) writing values that don't fit in a byte. If we're going to fix one, let's fix the other an the same time. (But I agree now would be a good time to fix it and make sure in the test suite that he write and get functions are indeed inverses of each other.)

@gilles-peskine-arm Thanks for bringing this up. I support the proposal of keeping mbedtls_asn1_get_int as-is and -- if this design change gets approved -- to add new functions for signed integers instead. I also like the names suggested by @mpg.

Hi @1one-w01f ,
We've discussed this PR internally and confirm that the ASN.1 part of the library is primarily for cryptography and X.509, which do not use negative integers. From this, we concluded that:

We won't change the behavior of the existing functions, since there would be a risk of introducing security holes or incompatibilities.
Support for negative integers is not a priority for us. We currently have no plans to actively work on it.
That being said, we would welcome a community contribution that meets our requirements: it must not affect the behavior of existing functions, and it needs to be tested (since unlike the rest of ASN.1 it wouldn't be indirectly tested through the X.509 code). If you'd like to rework this and want to sound us on the design before coding, feel free to comment on this PR.

Thank you for your interest and contribution!

Closing - see @gilles-peskine-arm comment above.


how to disable mouse_follows_focus?

steps I used:

I installed chunkwm via brew
I copied the sample chunkwmrc to my home folder
I an chunkwm for the first time using "brew services start chunkwm". After enabling the Accessibility setting, chunkwm started to do its thing.
I changed the setting for "chunkc set mouse_follows_focus". I was initially set to "intrinsic". I change that to "off".
I restarted chunkwm via "brew services stop chunkwm" and then "brew services start chunkwm".

The window focus still follows the mouse pointer.
Any ideas what I could be doing wrong? Thank you.

You can disable the follow focus mode by commenting out or deleting chunkc core::load ffm.so

You can disable the follow focus mode by commenting out or deleting chunkc core::load ffm.so

Thanks for the suggestion. It worked!

@mrjayviper you should close the issue. @joshvasquez thanks, i needed that too!


Timed Actions: _rpg_process(delta)

Build some artificial process loop that operates in game time. This allows different actions to take different amounts of time, making game play more dynamic overall.
For 0.2?

Actually got it working with little sweat!  For now, all actions pass DATA.DEFAULT_ACTION_TIME as delta (5s)
Give it some more testing before calling it done...


numberFilter unnecessary string to number to string conversion => precision issue

I'm submitting a ...

[x] bug report
[ ] feature request
[ ] other (Please do not submit support requests here (see above))

Current behavior:
'9999999999999999' | number:0 => 10,000,000,000,000,000
9999999999999999 | number:0 => 10,000,000,000,000,000
Expected / new behavior:
'9999999999999999' | number:0 => 9,999,999,999,999,999
9999999999999999 | number:0 => 10,000,000,000,000,000
Minimal reproduction of the problem with instructions:
see plnkr
AngularJS version:
all
Browser:
all
Anything else:
the problem stems from an - in my opinion - unnecessary conversion from string to number to string in the formatNumber function. basically just to remove the sign from the string with Math.abs().
doing something like the snipped below would allow to correctly format string number presentation - without limits of number precision (up to the limits defined by the rest of the code).
in some cases this is enough and one does not have to go for a big(int|number) implementation with corresponding localised formatters.
var numStr =  isString(number) ? (number.startsWith('-') || number.startsWith('+') ? number.substring(1): number) : Math.abs(number) + ''

Hi, thanks for the report. The number conversion continues to be a neverending source of joy ...
The best way to test your observation is to make the change in the code, add a test, and see if it makes any other tests fail, then open a PR.

Converting a numeric string to a number and back to string is necessary to ensure that it is a valid number representation (e.g. no locale-specific separators etc). If we omit that step, we need extra logic to ensure that (and it might be non-trivial; but happy to be proven wrong).
Floating Point Arithmetic is what it is - embrace it, don't try to fight it - just my 2 cents :smiley:

Unfortunately, Math.abs(...) does more than what people expect. Math.abs('5e5') == 500000 and Math.abs('0x55') == 85. Fortunately, in modern browsers Math.abs('033') == 33 /* != 033 */ (and do not get me started with handling of extra spaces). Any change in this line should take all these things into consideration :(


Unable to access services after upgrading to 1.6.0 on Docker Swarm

Do you want to request a feature or report a bug?
bug
What did you do?
Upgraded from 1.5.4 to 1.6.0
What did you expect to see?
Be able to access services proxied by Traefik
What did you see instead?
404 error pages on every single service (but the traefik one)
Output of traefik version:
Version:      v1.6.0
Codename:     tetedemoine
Go version:   go1.10.1
Built:        2018-04-30_09:28:44PM
OS/Arch:      linux/amd64

What is your environment & configuration (arguments, toml, provider, platform, ...)?

Bare metal docker swarm.
Docker CE v18.03
docker-compose.yml for traefik

# Stack name: watch
version: "3.6"
networks:
  the-force:
    external: true
  monitoring:
    external: true
configs:
  traefik_config:
    file: ./traefik/data/traefik.toml
volumes:
  traefik-acme:
    driver: nfs
    driver_opts:
      share: "<IP_ADDRESS>:/traefik/acme"
  traefik-logs:
    driver: nfs
    driver_opts:
      share: "<IP_ADDRESS>:/traefik/log"
services:
  traefik:
    image: traefik:1.6.0
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - traefik-acme:/acme
      - traefik-logs:/log
    command: -c /config/traefik.toml
    configs:
      - source: traefik_config
        target: /config/traefik.toml
    environment:
      - DNSIMPLE_EMAIL=[MAIL]
      - DNSIMPLE_OAUTH_TOKEN=[REDACTED]
    ports:
      - target: 80
        published: 80
        protocol: tcp
        mode: ingress
      - target: 443
        published: 443
        protocol: tcp
        mode: ingress
    networks:
      - the-force
      - monitoring
    deploy:
      labels:
        - "traefik.backend.loadbalancer.stickiness=true"
        - "traefik.backend.loadbalancer.swarm=true"
        - "traefik.backend=proxy"
        - "traefik.docker.network=the-force"
        - "traefik.entrypoints=https"
        - "traefik.frontend.passHostHeader=true"
        - "traefik.frontend.rule=Host:b.innersea.xyz"
        - "traefik.port=8080"
      resources:
        limits:
          cpus: '0.5'
          memory: 512M
        reservations:
          cpus: '0.25'
          memory: 128M
      placement:
        constraints:
          - node.role == manager
      restart_policy:
        condition: any
      update_config:
        parallelism: 1
        delay: 10s
        failure_action: rollback
        order: start-first

config.toml for traefik

logLevel = "DEBUG"
debug = true
checkNewVersion = true
ProvidersThrottleDuration = "5s"
MaxIdleConnsPerHost = 200
defaultEntryPoints = ["http", "https"]
[lifeCycle]
requestAcceptGraceTimeout = "10s"
graceTimeOut = "10s"
[traefikLog]
filePath = "log/traefik.log"
format = "json"
[accessLog]
filePath = "log/access.log"
format = "json"
[retry]
attempts = 3
[healthcheck]
interval = "30s"
[entryPoints]
  [entryPoints.http]
  address = ":80"
  compress = true
    [entryPoints.http.redirect]
    entryPoint = "https"
  [entryPoints.https]
  address = ":443"
    [entryPoints.https.tls]
  [entryPoints.api]
    address=":8080"
    [entryPoints.api.auth]
      [entryPoints.api.auth.basic]
      users = ["USER:REDACTED"]
[api]
  entryPoint = "api"
  dashboard = true
  debug = true
[api.statistics]
  RecentErrors = 10
[metrics]
  [metrics.statistics]
    recentErrors = 10
  [metrics.prometheus]
    entryPoint = "api"
    buckets = [0.1,0.3,1.2,5.0]
[rest]
  entryPoint = "api"
[ping]
  entryPoint = "api"
[acme]
email = "[MAIL]"
storage = "acme/acme.json"
entryPoint = "https"
OnHostRule = true
acmeLogging = true
  [acme.dnsChallenge]
  provider = "dnsimple"
  delayDontCheckDNS = 0
  [acme.httpChallenge]
  entryPoint = "http"
[docker]
endpoint = "unix:///var/run/docker.sock"
domain = "b.innersea.xyz"
watch = true
swarmmode = true

After upgrading one more acme file appeared

$ sudo ls -lsh traefik/acme
total 184K
88K -rw------- 1 root root 88K may  6 00:32 acme.json
96K -rw------- 1 root root 94K may  6 00:32 acme.json.bak

As you can see, I've exposed my traefik dashboard so i can access it from the outside world, but for some reason this is the only service i can access (e.g: when trying to access my minio instance i get a 404 error page)

Yet it shows up in my traefik dashboard

minio compose file

# Stack name: minio
version: "3.6"
networks:
  the-force:
    external: true
volumes:
  minio-data:
    driver: nfs
    driver_opts:
      share: "<IP_ADDRESS>:/minio/data"
  minio-config:
    driver: nfs
    driver_opts:
      share: "<IP_ADDRESS>:/minio/config"
secrets:
  minio_access_key:
    external: true
  minio_secret_key:
    external: true
services:
  storage:
    image: minio/minio:RELEASE.2018-05-04T23-13-12Z
    networks:
      - the-force
    volumes:
      - minio-data:/data
      - minio-config:/root/.minio
    secrets:
      - minio_access_key
      - minio_secret_key
    command: server /data
    environment:
      - "MINIO_ACCESS_KEY_FILE=minio_access_key"
      - "MINIO_SECRET_KEY_FILE=minio_secret_key"
    deploy:
      labels:
        - "traefik.backend.loadbalancer.stickiness=true"
        - "traefik.backend.loadbalancer.swarm=true"
        - "traefik.backend=minio"
        - "traefik.docker.network=the-force"
        - "traefik.entrypoints=https"
        - "traefik.frontend.headers.SSLProxyHeaders=X-Forwarded-For:https"
        - "traefik.frontend.headers.STSSeconds=315360000"
        - "traefik.frontend.headers.browserXSSFilter=true"
        - "traefik.frontend.headers.contentTypeNosniff=true"
        - "traefik.frontend.headers.customrequestheaders=X-Forwarded-Ssl:on"
        - "traefik.frontend.passHostHeader=true"
        - "traefik.frontend.passTLSCert=true"
        - "traefik.frontend.rule=Host:s.ulm0.xyz"
        - "traefik.port=9000"
      placement:
        constraints:
          - node.labels.arch == amd64
      restart_policy:
        condition: any
      update_config:
        parallelism: 1
        delay: 10s
        failure_action: rollback
        order: start-first

Funny thing: flushed my log files and got the new UI dashboard, but still no access to my services other than traefik

Alright, everything's working normally, so sorry for the noise.


Swipe not smooth to move next and previous month

When i swipe to go next month or previous month. I need drag to the end .

Thats because your onMonthScroll() -method. Can you post your code?

I have an asyncTask calling webservice to get the eventList for every month

Hi, can you post some sample code of you onMonthScroll listener? Is there actuall lag when scrolling or is the scrolling to rigid?

I think he means that the scrolling is too rigid. I've the same user experience, I am used to the ViewPager swiping (a fast swipe is sufficient, I don't have to dag from start to end for example)

Thanks that makes sense, will look at OverScroller documentation and see what I can find.

I think we'll need VelocityTracker for this. Take a look at this: http://www.devexchanges.info/2015/03/create-snapping-horizontal-scroll-view.html

If any one is interested there is some code changes in a branch. It would be good t get some feedback on how it feels. It should work very simialr to the one Google calendar. Simply checkout the project, run the sample and have a play around witht the scrolling.

I've tested and I can confirm that it feels just like the Google Calendar (or any ViewPager). Only the onDayClick is broken now (I've tested it in the toolbar).
If you need more feedback I've a list:

Lowering  the minSdkVersion to 14. (My project depends on minSdkVersion 14)
compileSdkVersion can be 23, buildToolsVersion can be 23.0.2 and targetSdkVersion can be 23
If the above is done then it's possible to compile 'com.android.support:appcompat-v7:23.1.1'
Week numbers before the week (just like Google Calendar) if the screen width is
wide enough:

Make a option to auto re-size (onMeasure) when a month is scrolled so that the height of the calendar view equals the current month (for example the height of February 2016 can be smaller by one row)
Show only a range of dates (https://github.com/SundeepK/CompactCalendarView/pull/37) and use use the springBack() method in OverScroller, which returns the previous month to the normal coordinate range in case it went out of bounds.

Thanks for the great library!

Only the onDayClick is broken now (I've tested it in the toolbar).

Yep will have a look, I wanted to make sure people are happy with the scrolling now.

Lowering the minSdkVersion to 14. (My project depends on minSdkVersion 14)
compileSdkVersion can be 23, buildToolsVersion can be 23.0.2 and targetSdkVersion can be 23

Should be easy enough.

Week numbers before the week (just like Google Calendar) if the screen width is wide enough:

Interesting, I havn't seen this on my phone. And im using a phone with a high res, is that using a tablet or something?

Make a option to auto re-size (onMeasure) when a month is scrolled so that the height of the calendar view equals the current month (for example the height of February 2016 can be smaller by one row)

Never been a fan of that. So I never added it, but if enough people want it. I can do it.

Show only a range of dates (#37) and use use the springBack() method in OverScroller, which returns the previous month to the normal coordinate range in case it went out of bounds.

Will have a look at that as well since people seem to want ti.
So theres a few issues that need to be raised as a result I think. Will do so when I get time.

Interesting, I havn't seen this on my phone. And im using a phone with a high res, is that using a tablet or something?

I'm using a Nexus 5 with Android 6.0.1 (maybe it's only on Marshmallow but I'm not sure). My Google Calendar version is: 5.3-108865406-release

Never been a fan of that. So I never added it, but if enough people want it. I can do it.

I'm also not a fan of it, but I think some people want the same behavior as the Google Calendar.
Take your time!

I discovered some bugs:
With the latest version:

onDayClick is working but the snapping is broken if we do a 'long' duration swipe.

With the previous version:

If we doing a 'long' duration swipe from the end to start (so that the next month is visble) it snaps still on the previous month.

On all versions:

If we are setting the current date (setCurrentDate(new Date()); the current date is also visible in the same month on the year 2014, 2016 etc. (it looks like the Calendar.YEAR is not checked or forgotten)

With the latest version:
onDayClick is working but the snapping is broken if we do a 'long' duration swipe.
With the previous version:
If we doing a 'long' duration swipe from the end to start (so that the next month is visible) it snaps still on the previous month.

These should now be fixed. I've made some changes that seem good to me in my initial testing. Have a go and let me know your thoughts. Thanks for the feedback so far.

On all versions:
If we are setting the current date (setCurrentDate(new Date()); the current date is also visible in the same month on the year 2014, 2016 etc. (it looks like the Calendar.YEAR is not checked or forgotten)

This is actually a feature of Google calendars, so I did the same thing.

Scrolling is completely broken now, I implemented the test branch and also tried your sample code and have confirmed you can't scroll.

Sorry about that, I had made some slight re-factoring and didn't run the sample before assuming it would work :weary:. Try again now, I've run the sample and tested it.
As far as I can see, the only thing that needs to be changed is that if the user has scrolled slowly to the end of the current calendar, it snaps back rather than scroll to the next. However, this shouldn't be too difficult to fix I don't think.

Awesome, It's working great now thanks! I'll investigate the snap back when slowly scrolling and I'll keep you updated.

This is actually a feature of Google calendars, so I did the same thing.

My Google Calendar doesn't show this 'feature' see this:

I discovered some bugs with the latest version:
If we press on day, it first selects the first day of the month and then the day we clicked on (I don't know if this was also in the previous version, I just discovered this while testing the onDayClick, it looks like the onMonthScroll gets first called if we touch something):

And the bug that has been discussed here before (scroll slowly to the end of the current calendar, it snaps back rather than scroll to the next):

(Sorry for the many animated gifs, I thought that this would help to clarify)

Thanks for the gifs, very helpful.

This is actually a feature of Google calendars, so I did the same thing.
My Google Calendar doesn't show this 'feature' see this:

Interesting, when I was developing the initial calendar, it was how it worked. I guess maybe they changed it or I may have been mistaken. Either way, we need to also check the year before drawing the indicator which should fix the problem.

If we press on day, it first selects the first day of the month and then the day we clicked on (I don't know if this was also in the previous version, I just discovered this while testing the onDayClick, it looks like the onMonthScroll gets first called if we touch something):

Nice catch there, looks like a bug. The onMonthScroll should not be called. I'll update the unit tests to verify its not called on when a day is selected and fix the bug. Looks like I didn't notice it on my device maybe because it renders things too fast.

And the bug that has been discussed here before (scroll slowly to the end of the current calendar, it snaps back rather than scroll to the next):

Thanks, for clarifying with a gif :).

If we press on day, it first selects the first day of the month and then the day we clicked on (I don't know if this was also in the previous version, I just discovered this while testing the onDayClick, it looks like the onMonthScroll gets first called if we touch something):

I've updated the code to fix this problem and added some android instrumentation tests for this case (along side the unit tests).

And the bug that has been discussed here before (scroll slowly to the end of the current calendar, it snaps back rather than scroll to the next):

Will look into this over the next day or so.

And the bug that has been discussed here before (scroll slowly to the end of the current calendar, it snaps back rather than scroll to the next):

I added some code to handle this case also now, I've tested on a phone and it seems to be ok. Might need a bit more tweaking though if it doesn't feel right.

I've tested the scrolling on 2 different devices and it seems good. I couldn't get it to break or do anything odd. Would be good to get a final bit of feedback on this. Alternatively I could release it under a beta release so people can start using it.

Sorry I've taken so long to reply. I've tested and it seems to be good. But it feels somewhat weird because there is no 'switch transition' when we scroll slowly to the end of the current calendar.
At first look into the code it seems that (int) (Math.abs((int) ( remainingScrollAfterFingerLifted))  / (float) width * ANIMATION_SCREEN_SET_DURATION_MILLIS) on line 425 returns 0 when we call it in scrollNextMonth. (I'm not sure, but it seems the most logical)
A beta (or a snapshot using Sonatype's snapshots repository) would be nice.

Would you mind uploading a gif of what you mean? It should smooth scroll  to next month for example if you slowly scroll 75% of the width of the current calendar. Regardless of velocity.

This is what I mean (instead of a smooth transition it goes directly to the next month):

That's weird. That's exactly what I fixed. Maybe I made a mistakes with some commits will check when I get time today.

I've debugged the sample app on my phone and uploaded the gif. It does give a transition from what I could see. I could increase the animation duration a bit though to make it more noticeable.
I'm not sure why you are not seeing the transition to the prev/next month though.

Sorry it was my fault. I had this in my onMonthScroll:
@Override
public void onMonthScroll(Date firstDayOfNewMonth) {
    if (mCalendarView != null) {
        mCalendarView.setCurrentDate(firstDayOfNewMonth);
    }
}

That was causing that there was no transition. It's working fine when I delete that code.
Maybe it should wait for the OverScroller to be finished before calling performMonthScrollCallback() (don't know how to accomplish this, could not find any callback we can override in OverScroller)

Ok will look through OverScroller code for this to understand it a little better.
On a side note, you do not need to call mCalendarView.setCurrentDate(firstDayOfNewMonth);  because the calendar will automtically be set to the firstDayOfNewMonth for you.

dependencies {
    compile 'com.github.sundeepk:compact-calendar-view:1.8.2-beta-smooth-scrolling'
}

New  beta smooth scrolling version. I plan to make another version available that allows people to make various things a bit more configurable.

works pretty good.
Great Work.Thanks

Merged changes to master. Will release soon and update as a comment, closing this issue now.

dependencies {
    compile 'com.github.sundeepk:compact-calendar-view:1.8.3'
}


Memory leak in enhanced mode

APNs objects are not garbage collected in ehnaced mode. You can reproduce this by creating and disconnecting a new APNs object in a loop multiple times, sending notifications and disconnecting and see memory growing. Easy to check using a package like pympler.
APNs has a reference to GatewayConnection(APNsConnection).
GatewayConnection(APNsConnection) and ErrorResponseHandlerWorker(threading.Thread) have a circular reference to each other. In addition, python does not garbage collect circular references where a class has __del__ defines (APNsConnection in this case) which causes those object to remain in memory.
Removing __del__ from APNsConnection seems to fix memory issue but I am not sure if it introduces other side effects like not cleaning connections properly.
Hope I was clear.

Should be resolved with the above.


kanboard: 1.2.12 -> 1.2.13

Motivation for this change
New upstream release
I'll also add a module for it, hence WIP.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[x] Fits CONTRIBUTING.md.

module can be done separately


Add a programmatic API (fixes #86)

This is a prototype of api.js as discussed in #86. Here's what I think it should do:

[x] Export a function that takes options and directory as arguments
[x] Start a server based on those
[x] Print the server info nicely, with colours and stuff (tested on Linux)
[x] Take stdin, such as ^C and behave accordingly
[x] Return something to the caller (what?)
[x] Write docs

Do you think this list is comprehensive? I'm still trying to figure out 4. Any hints on 5?

@dar5hak Please return an object with a .stop() method. This will solve both 4 and 5 as it allows people to stop the server programmatically. 🙏

I think it covers everything now.
@leo Could you have a final look?

I'll push the docs tomorrow. Added that to the checklist.

Added docs. Please have a look at readme.md.

Also, a small problem. I couldn't get the ignore argument to work. How do you invoke it on the CLI?
serve --ignore readme.md package.json ./

This fails with the statement: Specified directory doesn't exist!

@dar5hak `serve --ignore "readme.md,package.json"

@leo @dar5hak why use comma-separated values? Why not just accept a glob patterns and pass them to some fast matcher like nanomatch or micromatch. Nanomatch has strict support for only globs, without exglobs and etc. And it is Bash spec compliant.

@tunnckoCore

Not accepting comma-separated values and accepting glob values are two completely different things and aren't mutually exclusive.

If we're going to support glob values, you'll still need to support normal strings as well. Otherwise it won't be possible to ignore a single file.

If we're going to support glob values, we'll still use comma-separated values for that. Otherwise minimist will treat one glob value as the directory to serve. This means that we can just go on with this PR like I said here.

😊

@leo There. Everything works now. :tada:

@dar5hak Thanks a lot! 😊


Improve docstring in IEC 61853 module temperature model

[x] Closes #750
[x] I am familiar with the contributing guidelines
[ ] Tests added
[ ] Updates entries to docs/sphinx/source/api.rst for API changes.
[ ] Adds description and name entries in the appropriate "what's new" file in docs/sphinx/source/whatsnew for all changes. Includes link to the GitHub Issue with :issue:`num` or this Pull Request with :pull:`num`. Includes contributor name and/or GitHub username (link with :ghuser:`user`).
[ ] New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.
[x] Pull request is nearly complete and ready for detailed review.
[x] Maintainer: Appropriate GitHub Labels and Milestone are assigned to the Pull Request and linked Issue.

@cwhanse Could you check this?

Just to confirm... Are you happy with the way the docstring is rendered? See the continuous-documentation/read-the-docs link in the checks. It's not what I'd choose to do but I'm ok merging.

Sorry I don't see that link and I don't know how the doc string looks.

Thanks, yes, not nice.  I would remove the three underscores tomorrow unless Cliff objects.
Also, the units for u1  and u_v in pvsyst_cell look suspicious...

@adriesse ...in equation 5 of [1]_... is rendering the underscore because the citation it references isn't formatted in a way that numpydoc recognizes.  Here's an example of compatible reference formatting (see the leading two dots) example.
You might also want to use sphinx's :math: notation to interpret U’_0 and U’_1 as Latex code instead of plaintext: example

Thanks, yes, not nice.  I would remove the three underscores tomorrow unless Cliff objects.

I don't object to dropping the first two, which would format as subscripts if we added the math keyword but I don't think that's needed.
The third underscore needs to stay and the references need an adjusted format #833

I understand, and I appreciate the hints all around, but this simple clarification is again turning into way more than I bargained for.


[Opinionated] Add alt attribute & remove container

I've added an alt attribute, because "Placeholder" and "Worker" as alt is not really nice.
Second thing I've done is remove the container, because if you're using <ImageWorker> as replacement for <img> it should not become a <div>.

So i converted it to a div incase someone wants to wrap their image around a block element. Also provided a containerClass Prop incase they want to do
display: inline-block

Looks Good
@nitish24p I think we can merge it :)

can you run npm run eslint to see the lint errors and fix those

Fixed!
But I think it should be added to the readme, because as I said I'd expect an <img> replacement to be inline too.


Augment guide

Adding examples for augment_fourier()

Hi @mdancho84. You'll notice I commented out the "Basic Example" for augment_fourier() for some reason that code block was erroring out in the .qmd file I tested, but worked fine in a .py file.

Thanks for this. We are still working on the augment_fourier() function, but this will be a big help.


big january update w/ tons of TES changes

alright this is finally addressing #101 and bringing us up to matching with a ton of tiny TES changes i didn't notice in previous instances of comparing base tourguide to his repo. changes are well tracked in the billion commits in the branch, but in essence, this captures the big block of new things TES had versus the bundled/released tourguide version. here are some things missing that i would like to do before i merge this:

add a tile for rock garden, add oliver's tavern, add the new freekill thing into freekill tile
re-order the free fights in the free fight tile. machine elf first is super annoying.
resource reminder for the 12 drunk pygmy fights (and glarks, probably)
adding an x/12 progress tracker for Cubeling, w/ a note if you have a skelly key or a PYEC
weird kramco issue where it's taking you to invsearch instead of grind.php; cannot figure this one out
LT&T supernag is not present; there are some issues w/ the LT&T tiles, they are duplicated in our repo for some reason, we need to solve that and fix the lack of nags for it
push version # upward, this is a lot of little but substantial changes

here are some things that were in TES' that i think i am not going to add but would like thoughts

boombox is in resources instead of tasks, blocking its supernag at 1 fight remaining (reason to not add: we have a ton of supernags and this one is extraordinarily low priority, active management of boombox around the 11 changepoints is the kind of "stab yourself in the face to not even save a turn" thing i think just adds a lil bloat. if we add this i kind of want this to be pref-enabled, this is a weird enough use case to be not strictly desired default behavior imo)
the orb is a resource instead of task, blocking its supernag (reason to not add: similar to above, but much more important... it's just weird to think about it as a supernag, since this very literally will be on -every turn- you have the thing equipped, which doesn't seem like a supernag, just seems like something we need to figure out a better way to handle? maybe adding a row to the bottom w/ the impending orb prediction? this one i think is needed somehow, so i am OK to potentially add it, but want to talk through alternate routes first.)
missing olfaction+turtlesex tile (see issue #112 -- there's a ton of backend cruft around olfaction and i think we should add this tile in a similar form as TES' tile, but i do think we should incorporate/fix the Olfaction.ash logic so that it uses the ezan stuff)
cookbookbat recipe reminder (i added the cooking reminders but the recipes are now like 500 meat in the mall, so not worth adding, especially not with colored text lol)

Skimmed through the commits and they looked okay to me. Agree with the changes you're leaving out as well.
Any reason to hold off until some of those other things in your first chunk of bullets get done? I prefer the strategy of lots of small changes instead of big batches, so I'd move to get this merged and do the others separately 🤷

sure, i guess that's fine. i ran it for a bit and fixed a few glitches that were screwing with it, i think it's fine to merge in now.


infinite open time (enhancement request)

Please add an option for keeping extension open until browser shut down- in other words, infinite.  40 minutes is rather short for me, and I hope you give me ability to shoot myself in foot however I want.
Thanks very much for working on this!  It is a great thing, just what I want for migrating to chrome os.  I do run chroot linux, but I find that chrome browser is very slow in chroot, so I want to just run simple things like editor and command line in chroot, and leave Chrome Browser to chrome os.

I second this. Although CKP's On disk caching of open database is a clever idea, I can't help but feel it amounts to a hack to workaround the design decision to use a event page instead of a background page, when background pages were really designed for this type of application.
Some points of note:

Not even 40 minutes is guaranteed. sometimes it's shorter.
Extension memory is sandboxed by Chromium, making it the best opportunity in a desktop OS to keep a key in memory. It's much safer than keeping the official KeePass app open, for example (see KeeFarce and KeeTheif).
In the Wiki article, what is meant by 'it is important to me that the extension not use resources when it is not active'? Is this just about RAM usage? Couldn't CKP just unload most of its variables to minimise this?

Infinite open time is now supported, via the "remember password" option when unlocking a database.
@solikeumyeah , regarding the last bullet, yes it is about RAM usage.  Unloading variables would have minimum effect - all the code would still be in place and memory set aside for the extension to use.

Infinite open time is now supported, via the "remember password" option when unlocking a database.

Oh yeah, about that....
The most exciting thing (and I mean that - it's a really nice piece of software and I appreciate your efforts) about CKP over KeePass + KeePassHttp + chromeIPass is it runs entirely in Chrome's sandbox, and therefore is not easily susceptible to attack techniques like KeeFarce/KeeThief use, nor clipboard/autotype sniffing, when using AutoFill. It's probably the most malware resilient KeePass compatible app for any desktop environment.
Putting the master key on the disk is very different to the OP's "until browser shut down" (i.e. in memory). It would completely defeat any security advantage of CKP over other KeePass compatible apps, or any security advantage over storing passwords in a .txt file instead of a password manager, for that matter.
That's why KeePass doesn't support saving the master password. Honestly, I think the feature should just be removed. Nobody security conscious (i.e. people who use a password manager) wants their database effectively unlocked while their PC isn't even powered on. Your own documentation advises against using this feature. Besides, if anyone wants their database permanently unlocked, they can simply use a keyfile only.
I'm struggling to understand why memory usage is more important than security. It would amount to the equivalent memory usage of having one extra browser tab open. I guess CKP for you is just for some underpowered Chromebook or something, not mainstream use?


Ability to specify name on the report [multiple html reports]

Hi, it would be really useful to add a parameter to this extension in order to be able to name the report tab rather than the hardcoded Published HTML which would allow multiple uses of this task in the same pipeline.
Many pipelines have multiple html reports to publish, and they way it is done right now overrides the previous ones always
 i.e.
1.  Html unit test report
2. Html ktlint report
3. Html lint report

Thanks.

Having developed my own set of tabs, the tab display name is part of the extension contribution json file so configuring it via Task options may not be possible. That said, I believe the old SDK (non-react based, which this extension uses) had ways to hook into the UI components and modify them at runtime. I don't remember if this was possible with build tabs however, and much of that has changed (became no-ops) with the more recent UI overhaul of ADO.
But...to even do that you'd need to associate that extra info with the attachment. Instead of using the hard-coded "content" as the attachment name, you could instead make it dynamic, pulled from the task and use that for a title (see below). The attachment type already identifies all of the files of interest so this could "just work".
That said, the extension as it stands only appears to handle one report per pipeline. I think multiple attachments with the same name and type are disallowed (or they overwrite each other). Even if they were allowed, the logic in the tab only displays the last one.
What might be better is if the tab kept its generic name but then used an embedded iframe approach (similar to what the Stryker report display extension does). One frame lists all the reports and their names/titles dynamically at load time. The extension then adds some JS to create and load iframes from the array buffer of the content. Then you can navigate through them. The tab itself would still have a generic name, but I think that's acceptable.


[FLINK-21911][table] Add built-in greatest/least functions support

What is the purpose of the change
The PR implements three functions from the list mentioned in FLINK-21911 : GREATEST, LEAST
Brief change log
Implementation, tests and docs for GREATEST, LEAST
Verifying this change

MiscFunctionsITCase

Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): no
The public API, i.e., is any changed class annotated with @Public(Evolving): yes
The serializers: no
The runtime per-record code paths (performance sensitive): no
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: no
The S3 file system connector: no

Documentation

Does this pull request introduce a new feature? yes
If yes, how is the feature documented? docs / JavaDocs

Hi @snuyanzin , do you have time to update the  PR? Otherwise, we can pick it up and help to polish it.

Hi @wuchong , unfortunately the nearest date when I can have a look here is second part of June...
So feel free to continue in case you can not wait

@snuyanzin I'll take over this one and keep your contribution.

Merged in #16020.


Version update found. Please start the launcher to download the latest version. Log in after the completion of this update to immediately obtain 300 Primogems

I've been using FPS unlocker successfully for a long time, but today for some reason it stopped working. It gives the error message: "Version update found. Please start the launcher to download the latest version. Log in after the completion of this update to immediately obtain 300 Primogems" once I click confirm, the game just crashes.
My game is up to date and working normally without using FPS unlocker.

You need to open the official launcher to update the game, then use unlocker.

@AquaSimulacra thanks. It's updated via launcher. I just double checked for game updates now, and it's the latest version

The issue was resolved. For some reason, I had 2 folders with different installations, I don't know how. Once I found it and updated the other version, it worked fine.


Implement tags managed resource

What problem are you facing?
There is currently no managing of ec2 tags as crossplane objects, which would allow to set tags on aws resources.
This would come in handy with the recent change in EKS, where AWS doesn't tag the respective subnets automatically.
How could Crossplane help solve your problem?
Implement CreateTags, DeleteTags via ACK code generation

Hi, just one question. Can you describe what the use case for subnet tagging is? What tag(s) are you setting dynamically that you don't set via the subnet resource?

Since subnet tags are not needed anymore for load balancers this issue is obsolete and can be closed.


[feature request] Yamux support

Since there is no placeholder repository and no corresponding issue in this repo yet, I decided to create one here.
There is Yamux implementation in TypeScript at https://github.com/th-ch/yamux-js, it must be possible to create js-libp2p-yamux on top of it and make Yamux the go to implementation across Go/Rust/JS.
I don't have time and experience to do it right now, but if no one takes it, I might eventually write js-libp2p-yamux myself.

@lidel I would love to take this if we make it priority^^

Maintainer of go-libp2p here 👋
This would be super valuable for the entire libp2p ecosystem. mplex is a terrible muxer, yet we've been keeping support for it, just because JS didn't have support for any other muxer.
Do we have any data on how spec-compliant / reliable https://github.com/th-ch/yamux-js is? The repo doesn't have many stars or users, so there might be some bugs lurking in the code. We might need to be prepared to submit a few fixes to that repo.

I think  https://github.com/th-ch/yamux-js is a good start, but honestly, I would rather fork it, convert it to use Uint8Array (instead of Buffer) to be in line with the rest of js-libp2p (and for the smaller bundle in browser) and export js-libp2p compliant muxer interface.
@BigLep Since there is quite some work on #1166 should I pause this and focus on this issue instead? Seems like this is a lot more straightforward and higher priority.

@mpetrunic : thanks for raising.  I started a public Discord thread on priorities here with my thoughts: https://discord.com/channels/806902334369824788/949091153247084605/949091166694027294 .  We can also discuss more tomorrow during js-libp2p triage.

Triage note:

done: researched https://github.com/th-ch/yamux-js - identified gaps around working with streams
next: implementing gaps + migrating forked yamux-js to async/iter

This work is happening in https://github.com/ChainSafe/js-libp2p-yamux

2022-05-03 conversation: for testing this work against a go-libp2p implementation, it would be easiest if https://github.com/libp2p/go-libp2p-daemon/issues/266 was handled.

@wemeetagain : I know it's been discussed at js-libp2p triage, but since various folks are watching this issue, can you provide an update on how this is going?  Is there any milestones or checkpoints here or a sense of timing?  Thanks.

I've been busy with many competing priorities, I'm sorry.
I've pushed the latest progress here: https://github.com/ChainSafe/js-libp2p-yamux
I'd estimate its ~30% complete. The following is implemented:

basic scaffolding of the muxer, management of streams
frame decoding pipeline
frame type handling
stream closing / reseting

I'm working towards passing compliance tests, which would be a minimally working muxer that allows creation/deletion of streams and sending/receiving data within them. Then after, adding handling of window updates.
I'll continue to work on this, I should have 8+hrs to contribute this week.
But if this becomes a critical blocker, feel free to PR to the repo or fork and continue forward.
I'll happily merge additions and merge forks back into this repo and continue from there.

It's now passing the js-libp2p stream-muxer compliance tests.
I'll now be working on handling of window updates and additional features for parity with go-libp2p's implementation.


GS review and help material

[x]  Merge without conflicts the modifications for help material links (issue #44)
[x]  Add help Rmd files (issue #43)
[x]  Add test for GS
[x] Add function to verify genotype file issue #32
[x]  Review GS code

functions for the GSAcc tab is at GS_functions.R


Basic Trading Strategy Buy/Sell at a specific price

Good Morning,
I discovered Gekko the last days. The problem is, I do not have any knowledge with Java. The point is, I need a very basic trading strategy. In the documentation is already an example for a strategy like described in the title. But you still need to add some code.
Would you help me with the code? I just need it very basic. No analysis just buy/sell at a specific price?
Is it possible to use the custom strategy in the UI?
Thank you

Note that if you want to buy at a price higher than the market price you can simply use limit orders directly at the exchange (I want to buy when the price hits 15,000). However if you want to buy after the price goes down that's another story (some exchanges support stop limit orders), you can use this strategy that buys once the price goes below 5,000.
var strat = {};

// don't need those:
strat.init = function() {}
strat.update = function(candle) {}

strat.check = function(candle) {
  if(candle.close < 5000) {
    this.advice('long');
  }
}

module.exports = strat;

In this case it will keep advising to go long every candle (every 10 minute if you configured Gekko to use 10 minute candles). But Gekko won't act on any advice after the first one (until your strategy advices to go short, which the one above will never do). Unfortunately this is a technical issue tracker, not the best place to ask basic programming questions :(


Migrate to Serverpod 1.2 on Windows

Discussed in https://github.com/serverpod/serverpod/discussions/1765

Originally posted by PhilipNell-258 January 16, 2024
Hi
I have followed the migration process on the wiki page to preserve data.
I am running Serverpod on a Windows machine with Docker
Commands serverpod generate and serverpod create-migration is working 100%
When running the 3rd command: serverpod create-repair-migration the following error is received.
⠧ Creating repair migration... (2.1s)Failed call: insights.getLiveDatabaseDefinition
SocketException: The remote computer refused the network connection.
 (OS Error: The remote computer refused the network connection.
, errno = 1225), address = localhost, port = 56650

Unable to fetch live database schema from server. Make sure the server is running and is connected to the database.
SocketException: The remote computer refused the network connection.
 (OS Error: The remote computer refused the network connection.
, errno = 1225), address = localhost, port = 56650
✗ Creating repair migration (2.1s)

How do I solve this, because running the server normally using dart run bin/main.dart gives the following error:
SERVERPOD version: 1.2.0, dart: 3.2.4 (stable) (Thu Dec 21 19:13:53 2023 +0000) on "windows_x64", time: 2024-01-16 14:21:03.210838Z
mode: development, role: monolith, logging: normal, serverId: default
Failed to apply database migrations. PostgreSQLSeverity.error 42P01: relation "serverpod_migrations" does not exist
Insights listening on port 8081
Server default listening on port 8080
Webserver listening on port 8082
CPU and memory usage metrics are not supported on this platform.

Thanks

Perhaps you could create the missing table manually:
--
-- Class DatabaseMigrationVersion as table serverpod_migrations
CREATE TABLE "serverpod_migrations" (
"id" serial PRIMARY KEY,
"module" text NOT NULL,
"version" text NOT NULL,
"timestamp" timestamp without time zone
);
-- Indexes
CREATE UNIQUE INDEX "serverpod_migrations_ids" ON "serverpod_migrations" USING btree ("module");

Creating the table manually did the trick, thanks @rodjordan. When running the serverpod create-repair-migration command gives the following warning which then aborts
 serverpod create-repair-migration
⠸ Creating repair migration... (0.2s)
Migration Warnings:
 • Unique index "serverpod_google_refresh_token_userId_idx" is added to table "serverpod_google_refresh_token". If
there are existing rows with duplicate values, this migration will fail.
Migration aborted. Use --force to ignore warnings.

I am going to force it since I am not using google auth.


Announcement

Hi guys,
Unfortunately I've stuck on my work. Again :( I will return to gridstack as soon as I can.
Sorry for that.

Hey mate,
Just wanted to drop you some mad props for this library. I have made a few apps in the past and the second thing the boss asks for is always a 'user customizable dashboard'. So I have implemented a few from scratch and using plugins like gridster but, gridstack is by far the most complete of all these grid layout type plugins and the easiest to get a great result out of with minimal manual customization. I especially like the knockout integration! :)
So thanks heaps!
Cheers
Chris

PS. I'll try help out with the issues if I can.

Wish you good luck with your work. Your library is really awesome, keep up your good work. Come back, when you have the time again ;). I use gridstack since the first release ;)

:) Great work man! Ping me if you need dev help ;)


Issue with velero-notifications

Hi!
First of all, thanks for the release!
I have a issue, when i run a manual backup it seems to be working. But my scheduled backups are not generating any notifications.
Any idea why?
Thanks!

Hi, unfortunately I haven't really used this tool myself for a while now, as I switched to monitoring and alerts with Grafana. I am not sure what the problem could be. I will set the project as archived since it's no longer maintained. Sorry!

@vitobotta and if you're not using this anymore as you've mentioned, you're using Grafana. How you're using Grafana to detect velero-notification successes or failures?

Hi @jkanczler - actually I am maintaining this project again and I updated it 4 days ago. I am still using Grafana but I just prefer what I did with this project (straight notifications to slack/email/webhook), so I picked it up again :)


cigien: Watch techriki.tech

cigien requests the watch of the watch_keyword techriki\.tech. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

techriki\.tech has been seen in 0 true positives, 0 false positives, and 0 NAAs.

techriki\.tech has been seen in 0 true positives, 0 false positives, and 0 NAAs.

Approved by rene in Charcoal HQ

Approved by rene in Charcoal HQ


Added Sparta Science.

Please review our Contribution Guidelines to ensure your changes abides by it.
Review your changes and complete the checklist below.

[ ] Company name
[ ] Company description
[ ] Company location
[ ] GitHub link
[ ] How Elixir is used

Whoa!  @gregwoodward thanks for the addition, what an awesome idea!


Add continus batch size benchmark to LLM guide

This is a draft until decisions are made on the Triton+vLLM tutorial regarding how to specify max tokens and ignore eos to model.

Do not merge until infinite loop bug has been resolved.

Do not merge until infinite loop bug has been resolved.

Infinite loop bug resolved by https://github.com/triton-inference-server/client/pull/410


The resolution of T2V

Hello.
I want to generate 256x256 videos by using T2V model.
So, I change the hyperparmeter image_size in t2v_sample.yaml.
However, I got strange videos.
How can I get 256x256 videos?
Thanks

The Latte T2V model is trained directly on 512*512. If you want to generate other resolutions of video, please watch our next post Latte-2.


Slight README.md typo fix: appear(s)

Coverage remained the same at 98.393% when pulling c175954a38b59128e28465f04e09c2ba0408f762 on JoshuaKGoldberg:patch-1 into 3f7f113ac67638d8e4b4956f770446b1d727c4df on paulmillr:master.

Thanks!


Fixing functional test random failure

This code is waiting 1 second before requesting the same view/cached tag helper:
<cache expires-after="TimeSpan.FromSeconds(1)" priority="CacheItemPriority.Low">
Cached content for @ViewBag.ProductId
</cache>

which expires after 1 second itself. Sometimes is returns the cached value where it expects a new value. I am proposing to wait for 2 seconds instead.

:shipit:

:shipit:

Should this fix be merged to dev too?

Done


Allow date validation for MM/YYYY

What is the context of this PR?
We want to be able to validate a period between 2 month/year dates in a date range.
We also want to be able to say on a single date whether the month/year date to be post/pre a certain date

Test schema test_date_validation_mm_yyyy_combined.json

@dwyeradam quick question about when an answer_id is used in the single date validation. Can it be mm-yyyy type answer?

@shahi645 I think I may write another schema that mixes and matches different date types. They should all work together as when they come to be used they should all have a day component.

Good to approve once extra tests and test schema introduced. Like what you have done with date_form also. Much clearer

@shahi645, Reviewing the code again I don't really see the benefit of all the extra tests. Now that I have removed the duplication of code within date_form.py early on both date types go through the rules.py method convert_to_datetime. This means that from that point on both date types are the same as far as the code goes. Therefore my tests would be pretty much identical.


Use geopy to calculate the distance between two points[Duplicate of #5339]

Article checklist
Attention
Our Peer Reviewer and Content Moderator teams do NOT provide any revisions services. All revisions and edits should be completed on your own forked repo (as to not take up room in the queue) in order for our team to review them all in a timely manner.
ANY ARTICLE SUBMITTED WITH GLARING ERRORS WILL BE IMMEDIATELY CLOSED.

As a rule of thumb - please be sure to only submit articles (pull requests) that are fully polished and ready to be published. Be sure to go through our resources documents for extra and 3rd party (vetted) resources to help improve overall technical writing.

Pre-submission checks

Please ensure that you have only one open topic suggestion (issue) + in-review article (linked pull request) at a time. This will ensure that we complete the review process in a timely manner from inception to publishing

If you have not already, please go over our Resources Page for more tips and tricks on how to improve your overall technical writing so reviews are swifter, increase the chance of a payout and provide more value to our readers.

For first-time contributors and for more details on our submission guidelines, see our Contributing Guidelines.

Formatting and structure checks

[x] Have you used the correct folder and file structure? - see Contribution Guidelines

[x] Is your article properly formatted in Markdown? - see Github Markdown guide

[x] Have you used our preferred heading structure? - H3 (###) and up

[x] Does your article follow any of the suggested structure formats? - see example formats

[x] Is your article over 750 words? - Tool: Wordcounter.net

[x] Is the article you are submitting an in-depth and unique article? Does it go beyond what is in the official docs and what is covered in other blog sites. See these articles as examples.

[x] Does your article provide enough value and detail about your topic? - Articles should be clear, accurate, and fully explained.

[x] Can your article be understood by beginners? - Assume the audience is smart but has no prior exposure to the common terminology in your article.

[x] Have you included a hero image that is 600x400 pixels, under 300KB in size, and have the copyright to use it? - Tools: Pixlr Image Editor for resizing and Unsplash for Creative Commons images

Grammar & plagiarism checks

[x] Have you spellchecked and grammar checked your article? - Tools: Write&Improve - ProWritingAid - Grammarly
[x] Please place your article through a 3rd party plagiarism checker. We suggest using Quetext, this tool is free and has a daily limit. We typically accept articles with 10% or less.
[x] Have you checked your article for readability? - Tool: Hemmingway
[ ] Have you added sources for quotes and images that aren't yours?

Technical checks

[x] Are your code snippets properly formatted for syntax highlighting - see Syntax guide
[x] Have you checked your code runs correctly and you've highlighted all necessary dependencies for installation?
[x] Are the software programs and packages you're highlighting in your article up to date, using current versions and not deprecated?

Topic suggestion this closes

Remove the backticks and add the issue number below to link and close your Topic Suggestion (issue) when your article has been published (PR has been merged). See this video for more details.

This closes #issue-number
This closes #5339

Finally, delete the article checklist notes in blockquotes and submit your PR. We look forward to reviewing your article.

@WanjaMIKE  I have corrected

@WanjaMIKE  I made the corrections and created this PR. You can please have a check on it.

@section-engineering-education/peer-reviewers
Is anyone available to pick up this PR?

Its a duplicate @geoffrey45 I will finish it up. Thanks

Remove the full stop in your main folder name. Its located at the end. It is preventing the article from rendering.

@WanjaMIKE , I have done the requested changes. You can have a look at it.

Great work team. @Joshuathuo @WanjaMIKE


Move agent to .NET Core 3.1

Currently we're on 2.1, need to move to 3.1. ARM64 support is gated behind this.

Released as part of agent 2.165.0


error when installing

hello!! i know NOTHING about how 2 install these type of apps so id appreciate a bit of help,,, do you maybe have a tutorial or a solution to my problem?

"C:\Program Files" requires higher permission to read confoguration file, try to open in administrator or reinstall into your user directory.

this fixed it! thank you ^^


Go dependency updates

Damn, builds are failing. I ran it locally and it worked. Ill have to see what is the difference.


Error when creating pendingIntent for setupEsim

I'm on Android 14 with a Xiaomi 12T Pro.
When trying to add an eSIM with the setupEsim method, I'm getting the following error :

Targeting U+ (version 34 and above) disallows creating or retrieving a PendingIntent with FLAG_MUTABLE, an implicit Intent within and without FLAG_NO_CREATE and FLAG_ALLOW_UNSAFE_IMPLICIT_INTENT for security reasons. To retrieve an already existing PendingIntent, use FLAG_NO_CREATE, however, to create a new PendingIntent with an implicit Intent use FLAG_IMMUTABLE.

In SimCardsManagerModule.java, I indeed see that the intent is created in the following way :
    PendingIntent callbackIntent = PendingIntent.getBroadcast(
        mReactContext,
        0,
        new Intent(ACTION_DOWNLOAD_SUBSCRIPTION),
        PendingIntent.FLAG_UPDATE_CURRENT |
            PendingIntent.FLAG_MUTABLE);

Is there a reason it is created with FLAG_MUTABLE ? Can we change it to FLAG_IMMUTABLE ?

Hey @chougron. I have seen your #74  but its closed now. Any reason? Not working/required?

I created it by error, I wanted to make it on my fork repo.
I tried setting the flag to IMMUTABLE on my side, and I don't get an error anymore, but then nothing is happening, so I'm not sure if I'm missing something.

Merged. will be included in the next release. thank you @chougron !


Cannot parse nested table arrays

Hi, using
[services]
modules = [
    "mdns",
]

    [services.trigger]
    # Possible options: "udp", "flic"
    mode = "udp"

        [services.trigger.udp]
        port = 8875

        [services.trigger.flic]
        latency = "NormalLatency"
        uuids = [
            "aa:bb:cc:dd:ee:ff",
            "11:22:33:44:55:66",
        ]

// Works:
auto services_t = file_conf->get_table("services");
for (const auto &val : *services_t->get_array_of<std::string>("modules")) {
    services.modules.emplace_back(val); // works
}

// auto trigger_t = services_t->get_table("trigger");
// auto flic_t = trigger_t->get_table("flic");

// Doesn't work:
auto flic_t = file_conf->get_table_qualified("services.trigger.flic");
for (const auto &val : *flic_t->get_array_of<std::string>("uuids")) {
    services.trigger.flic.uuids.emplace_back(val); // Cannot access memory at address 0x29
}

Am I missing something?

OK, it's not related to nesting level – it works in the first level only because there is only one value – it crashes only with multiple values – in first iteration.
[services_trigger_flic]
latency = "NormalLatency"
uuids = ["a", "b", "c", "d"]

auto flic_t = file_conf->get_table("services_trigger_flic");

int i = 0;
for (const auto &val : *flic_t->get_array_of<std::string>("uuids")) {
    if (i > 0)
        services.trigger.flic.uuids.emplace_back(val);
    i++;
}

// Will print out b c d
for (auto v : services.trigger.flic.uuids) {
    std::cout << v << std::endl;
}

Also it spews out malformed data with "aa:bb:c:dd:ee:ff" string. I don't know the ins-and-outs of cpptoml, but could it be that it tries to parse it as a date?

Ok, if I extract declaration out of for loop then it works:
const auto values = *flic_t->get_array_of<std::string>("uuids");
for (auto val : values) {
    std::cout << val << std::endl;
}

I think you're being bit by the fact that range-for does not extend the lifetime of all but the last temporary. So in this case it's extending the lifetime of the const std::vector<std::string>& that is returned from option<std::vector<std::string>>::operator*, but not the actual option<std::vector<string>> itself. The underlying vector, therefore, is destroyed and the range-for loop accesses freed memory.
Hoisting the option<std::vector<std::string>> outside of the loop is the best thing to do here, I think. I would typically write something like this as
auto uuids = flic_t->get_array_of<std::string>("uuids");
if (!uuids)
{
    // do something if "uuids" key is not present, maybe error out?
}
for (const auto& val : *uuids)
{
    // do something with val
}


Update CI: test on LTS and pre-release build

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 36.71%. Comparing base (65a52ad) to head (187bbf9).

:exclamation:  There is a different number of reports uploaded between BASE (65a52ad) and HEAD (187bbf9). Click for more details.
HEAD has 1 upload less than BASE

Flag
BASE (65a52ad)
HEAD (187bbf9)

2
1

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #199       +/-   ##
===========================================
- Coverage   89.45%   36.71%   -52.74%
===========================================
  Files          48       47        -1
  Lines        2057     1806      -251
===========================================
- Hits         1840      663     -1177
- Misses        217     1143      +926

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


List Metastore Assignments does not work

The metastore_assignments.list(metastore_id) method of the account client does not work. It fails with an exception trying to process the response JSON because the response does not match the format expected. The SDK attempts to build an array of MetastoreAssignment objects but the response JSON from the Databricks API is just an array of workspace_ids.

I don't have a code sample but I can tell you we are using the 'list' method of the metastore_assignements API of the AccountClient. We've worked around the problem for now by creating our own method which uses the _api.do method of the metastore_assignements API:
def list_metastore_assignments(account_client: AccountClient, metastore_id: str) -> Iterator[int]:
    headers = {'Accept': 'application/json', }
    res = account_client.metastore_assignments._api.do('GET',
                        f'/api/2.0/accounts/{account_client.metastore_assignments._api.account_id}/metastores/{metastore_id}/workspaces',
                        headers=headers)
    return [v for v in res.get('workspace_ids', [])]

@andy-potter-evotix This is fixed as of version 0.10.0. https://github.com/databricks/databricks-sdk-py/commit/bbe81c13c4a0275020d241b78f61cdddf349adc2#diff-c218f52b5f12f62b62eec865d36889e5d7cc7beb63122e8026658093de3283d0R1532
Thank you for reporting this!


Make use of id types consistent

Less visual noise without the ["id"] and makes it all consistent

ignore the git log I branched off an already merged pr


Remove blob contents from snapshot in rehydrate container, loader changes

Refer: #4746
This is third part of above issue and part of draft PR: #6608
We removed usage of readAndParseFromBlobContents here: https://github.com/microsoft/FluidFramework/pull/6816
1.) This Pr achieves removing blobId -> blob Contents mapping from the snapshot taken in detached container
(serialize) for draft mode. However it does not actually remove it for now due to back compat but lay down work so that we can remove it in future.

Ping


How display post in other language?

Hi guys,
Voyager is super and easy to use!
Please advice how to display Post in multilingual project in different language?
My route -----
Route::get('post/{slug}', function($slug){ 	$post = App\Post::where('slug', '=', $slug)->firstOrFail(); 	return view('post', compact('post')); });
post.blade ------
<title>{{ $post->title }}</title>
How to display post in other languages?
Thank you very much.

Don't bother with it just yet: there is no multi-language functionality in Voyager so far, see here: https://github.com/the-control-group/voyager/issues/1676
Nobody seems to bother, so for now Voyager is OK package for single-language content (with possible menus display in several languages).

you could add another column for another language on post table and use laravels inbuilt language feature to display right language post

@AndCymru, why do you say "nobody seems to bother"...? We definitely do have multi-lingual functionality, though there are definitely some limitations with it.

yes, you definitely have SOME multi-language functionality, namely l13n. you don't have i18n though - looks like you lost the ball somewhere in the middle of the game without knowing, whatever the reason.
there are 2 sides of the multi-lingual medal: localisation (AKA l13n) and internationalisation (AKA i18n).
with voyager, you can localise it, and have it in your own language.
but you can not have site in multiple languages. period.
it's a pity, this is a great package, i just love it. but i have to go with something else because of these "some limitations". more of it, because it has everything needed in the code, and partly (menu system) still works, and - presumably - would be relatively easy to fix. to me, it's how voyager saves translatables, somewhere in java core. whoever programmed it could probably spend couple of hours at most and fix it. but so far vayger stays unusable. :(

@AndCymru, I'm more than familiar with l13n vs i18n.  You haven't given any examples of things you can't do with Voyager. Instead, you've used hyperbole saying

but you can not have site in multiple languages. period.

Perhaps it's just a language barrier, but your comments read with a tone of arrogant discontent.  Please list specific examples identifying the distinction between l13n and i18n, and what Voyager does not allow you to do.

hi, fletch3555, i'll skip over your reading between the lines for tones, spychology, etc. OK?
we are not for flames here, are we?
the best thing to see what i mean is to setup a multilingual site. everything will be clearly visible.
i reaised this on several ocasions both here and on devdojo, and the link with_explanations remains the same as 5 posts above: https://github.com/the-control-group/voyager/issues/1676
i can see you are a member of the core team, so hopefully this issue will get attention and fill finally be resolved. please feel free to ask for any additional info/testing/whatever.

@AndCymru

but you can not have site in multiple languages. period.
That is implemented, you are facing some bug. You are free to dive into the code, fix it, and share with us!!

Happy coding guys

@AndCymru for instance, have you updated assets? Update the JS...
Please return... I'm curious.

@AndCymru I have already two websites with 2 languages. Everything is working fine and i didn't met any limitations at all. I think the point here to help @laraketai . Voyager is referencing to admin side. You can use an another package if you want for your front side like https://github.com/mcamara/laravel-localization
And return from your controllers the translated attributes as described here in issue #561 .

Closing issue now. Multilingual is fully working.

Thanks a lot!!! Working fine

Glad i helped @laraketai

hi, guys.
at some point it was eventually fixed.
after doing composer update - almost - everything works fine.
"almost" is because something weird happens to tinymce, which doesn't display html tags.
sure, i'm talking about admin part of the site all the time here, as voayger has nothing to do with frontend.
in the backend (i.e. voyager), if you go editing posts in several languages, post editor will show you body without any tags, both in reach-text view, and source code view.
BUT! all the tags are saved into database, tinymce just won't show them.
this is already something, at least i can live with it, maybe change tinymce for something else.. i don't know yet, didn't look into it yet.
thank you everyone for assisting, and good coding!

@AndCymru I think this was happening from a helper function which stripped out the html tags on translation

How can I get the content in other language? there is nothing in the documentation?

How I translate a new table ? I try put the translate code in the right folder, but it didn´t work.

https://github.com/the-control-group/voyager/pull/561
You can translate all model like: $post = $post->translate('locale', 'fallbackLocale');
After that $post->title gonna be at your 'locale'
If you need to translate specific model value - $post->getTranslatedAttribute('title', 'locale', 'fallbackLocale');
If you need to get current locale use - app()->getLocale()
GL :)

This has been closed for nearly 18 months and has gone untouched for ~9... please don't add comments to such old issues


googleSignIn.signIn() crash on IOS after Flutter upgrade

using this line of code:
final GoogleSignInAccount account = await googleSignIn.signIn();
my app crash and i am getting the following console output:
flutter: onTransition: Transition { currentState: AuthStarted, event: ClickedGoogleSignIn, nextState: AuthInProgress }
flutter: BlocBuilder: AuthInProgress
flutter: #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7)
#1      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:321:33)
<asynchronous suspension>
#2      MethodChannel.invokeMapMethod (package:flutter/src/services/platform_channel.dart:349:48)
#3      MethodChannelGoogleSignIn.signIn (package:google_sign_in_platform_interface/src/method_channel_google_sign_in.dart:43:10)
#4      GoogleSignIn._callMethod (package:google_sign_in/google_sign_in.dart:212:42)
<asynchronous suspension>
#5      GoogleSignIn._addMethodCall (package:google_sign_in/google_sign_in.dart:266:18)
#6      GoogleSignIn.signIn (package:google_sign_in/google_sign_in.dart:336:9)
#7      AuthenticationProvider.signInWithGoogle (package:jobs_on_the_go/providers/AuthenticationProvider.dart:60:60)
#8      AuthenticationRepository.signInWithGoogle (package:jobs_on_the_go/repositories/AuthenticationRepository.dart:16:77)
#9      AuthenticationBloc.mapCl<…>
flutter: onTransition: Transition { currentState: AuthInProgress, event: ClickedGoogleSignIn, nextState: UnAuthenticated }
Lost connection to device.

flutter: BlocBuilder: UnAuthenticated

*** First throw call stack:
(
	0   CoreFoundation                      0x00000001103aa02e __exceptionPreprocess + 350
	1   libobjc.A.dylib                     0x000000010fd7bb20 objc_exception_throw + 48
	2   CoreFoundation                      0x00000001103a9e6c +[NSException raise:format:] + 188
	3   Runner                              0x0000000109b11321 -[GIDSignIn signInWithOptions:] + 276
	4   Runner                              0x0000000109b10c56 -[GIDSignIn signIn] + 64
	5   Runner                              0x000000010964a40a -[FLTGoogleSignInPlugin handleMethodCall:result:] + 2410
	6   Flutter                             0x000000010cce3f95 __45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke + 104
	7   Flutter                             0x000000010cc77d80 _ZNK7flu<…>

this is working OK on Android
Flutter doctor output:
[✓] Flutter (Channel beta, v1.12.13+hotfix.1, on Mac OS X 10.15.1 19B88, locale en-CA)
    • Flutter version 1.12.13+hotfix.1 at /Users/pazhutmann/Work/flutter
    • Framework revision 5b07015393 (3 days ago), 2019-12-03 00:12:02 -0800
    • Engine revision c1e322b685
    • Dart version 2.7.0

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/pazhutmann/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.2.1, Build version 11B500
    • CocoaPods version 1.8.3

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 41.1.2
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] Connected device (1 available)
    • iPhone 8 • 69D1F18B-87C4-45A6-9722-4B0580828A17 • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-2 (simulator)

• No issues found!

i am using latest plugin version (google_sign_in: ^4.0.14)

Hi @pazhut
can you please provide your  your flutter run --verbose?
Also, to better address the issue, would be helpful
if you could post  a minimal code sample
or the steps to reproduce the problem.
Thank you

Hi
the steps to reproduce are simple, just call the API i mentioned, i would like to add that this used to work until a day ago, i would be happy to provide you with the log you are asking for, as i am running inside Android studio can you please provide me instructions on how to produce it?
Thanks much

issues solved, turned out that integrating both Google signin and Facebook one required some careful editing of the plist.info file to have both URL bundles
Thanks much

@pazhut Thank you so much, this was driving me insane. My issue came when I swapped firebase projects and was using a new GoogleInfo.plist. The url bundle did not get transferred correctly over to the plist.info and I had to do this manually


ModuleNotFoundError: No module named 'simple_parsing'

npall@Nathan MINGW64 ~
$ cd documents

npall@Nathan MINGW64 ~/documents
$ cd swe-agent

npall@Nathan MINGW64 ~/documents/swe-agent (main)
$ ./setup.sh
Setting up docker image for swe-agent...
Building the x86 Docker image
2024/04/06 10:26:11 http2: server: error reading preface from client //./pipe/docker_engine: file has already been closed
[+] Building 1.9s (18/18) FINISHED                                                                       docker:default
 => [internal] load build definition from swe.Dockerfile                                                           0.0s
 => => transferring dockerfile: 1.15kB                                                                             0.0s
 => [internal] load metadata for docker.io/library/ubuntu:jammy                                                    1.8s
 => [auth] library/ubuntu:pull token for registry-1.docker.io                                                      0.0s
 => [internal] load .dockerignore                                                                                0.0s
 => => transferring context: 2B                                                                                0.0s
 => [ 1/13] FROM docker.io/library/ubuntu:jammy@sha256:77906da86b60585ce12215807090eb327e7386c8fafb5402369e421f44  0.0s
 => [internal] load build context                                                                                0.0s
 => => transferring context: 105B                                                                                0.0s
 => CACHED [ 2/13] RUN apt-get update &&     apt-get install -y bash gcc git jq wget g++ make &&     apt-get clea  0.0s
 => CACHED [ 3/13] RUN git config --global user.email<EMAIL_ADDRESS>                                        0.0s
 => CACHED [ 4/13] RUN git config --global user.name "sweagent"                                                    0.0s
 => CACHED [ 5/13] RUN prompt() { echo " > "; };                                                                   0.0s
 => CACHED [ 6/13] RUN touch /root/files_to_edit.txt                                                               0.0s
 => CACHED [ 7/13] RUN touch /root/test.patch                                                                      0.0s
 => CACHED [ 8/13] RUN echo "alias ls='ls -F'" >> /root/.bashrc                                                    0.0s
 => CACHED [ 9/13] RUN wget https://repo.anaconda.com/miniconda/Miniconda3-py39_23.11.0-1-Linux-x86_64.sh -O mini  0.0s
 => CACHED [10/13] RUN conda --version     && conda init bash     && conda config --append channels conda-forge    0.0s
 => CACHED [11/13] COPY docker/requirements.txt /root/requirements.txt                                             0.0s
 => CACHED [12/13] RUN pip install -r /root/requirements.txt                                                       0.0s
 => exporting to image                                                                                0.0s
 => => exporting layers                                                                                0.0s
 => => writing image sha256:f3e95f3f313c45afd4a59889c3e51ab32ba71db8dd1adf70acb9b4b13d1501c7                       0.0s
 => => naming to docker.io/library/swe-agent                                                                       0.0s

View build details: docker-desktop://dashboard/build/default/default/dhv0k3g83hgdgde12kpz2gjwn

What's Next?
  View a summary of image vulnerabilities and recommendations → docker scout quickview
Setting up docker image for evaluation...
2024/04/06 10:26:14 http2: server: error reading preface from client //./pipe/docker_engine: file has already been closed
[+] Building 0.1s (9/9) FINISHED                                                                         docker:default
 => [internal] load build definition from eval.Dockerfile                                                          0.0s
 => => transferring dockerfile: 238B                                                                               0.0s
 => [internal] load metadata for docker.io/library/swe-agent:latest                                                0.0s
 => [internal] load .dockerignore                                                                                0.0s
 => => transferring context: 2B                                                                                0.0s
 => [internal] load build context                                                                                0.0s
 => => transferring context: 10.28kB                                                                               0.0s
 => [1/4] FROM docker.io/library/swe-agent:latest                                                                  0.0s
 => CACHED [2/4] COPY ../evaluation/evaluation.py /evaluation.py                                                   0.0s
 => CACHED [3/4] RUN pip install git+https://github.com/princeton-nlp/SWE-bench.git                                0.0s
 => CACHED [4/4] RUN pip install unidiff                                                                           0.0s
 => exporting to image                                                                                0.0s
 => => exporting layers                                                                                0.0s
 => => writing image sha256:1ed08877bde203c7997e59f977bc7d39604dbf017dd6b414f918c4b7c8250de7                       0.0s
 => => naming to docker.io/library/swe-eval                                                                        0.0s

View build details: docker-desktop://dashboard/build/default/default/0800pnq5thztnswk8qhps4o3y

What's Next?
  View a summary of image vulnerabilities and recommendations → docker scout quickview
Done with setup!

npall@Nathan MINGW64 ~/documents/swe-agent (main)
$ python run.py --model_name gpt4 \
  --data_path https://github.com/pdovhomilja/nextcrm-app/issues/30 \
  --config_file config/default_from_url.yaml
Traceback (most recent call last):
  File "C:\Users\npall\documents\swe-agent\run.py", line 13, in <module>
    from simple_parsing import parse
ModuleNotFoundError: No module named 'simple_parsing'

npall@Nathan MINGW64 ~/documents/swe-agent (main)
$ python run.py --model_name gpt4   --data_path https://github.com/pdovhomilja/nextcrm-app/issues/30   --config_file config/default_from_url.yaml
Traceback (most recent call last):
  File "C:\Users\npall\documents\swe-agent\run.py", line 13, in <module>
    from simple_parsing import parse
ModuleNotFoundError: No module named 'simple_parsing'

npall@Nathan MINGW64 ~/documents/swe-agent (main)

Windows 11
Anaconda
Python 3.10
Docker Desktop

You forgot the conda step. The dependencies are listed in environment.yml


Added custreamz notebooks for word count and HAProxy log parsing

@randerzander Just saw the existing notebook. My notebook intends to do a completely different thing — it calculates the latest accumulated word count (could you refer to the output of my notebook) every time a batch/line is processed, which is the case for most streaming data operations, since we don't want to lose the information being processed in every batch. cudf integration for Streamz DataFrames is meant to do these "cumulative" streaming operations. The existing notebook just calculates word count for every batch being processed.

Makes sense, Chinmay. However, I still don't think maintaining count/state between batched warrants it's an entirely separate notebook.
Can you either add new cells to the existing notebook, or update the existing cells to maintain state across batches? It's worth noting in comments, or in the surrounding markdown cells that you don't have to maintain state if your use-case doesn't call for it.

Yes, the HAProxy notebook does exactly that — it just processes each batch, and does not care about aggregations across batches.
It’s just that streaming word count is the easiest way to represent where and how SDFs can be used. Also, I guess streaming word count should intuitively mean ‘cumulative word count’ in a streaming fashion.

Moreover, I think all streaming systems like Spark, Storm, Flink, etc. use the classic streaming word count example to perform cumulative aggregations. We need to conform to that.
The existing notebook would kind of be a batch-like job.

Sure, that's fine. Can you update the existing notebook to follow that pattern then?
I just don't think we want multiple word count notebooks.

In that case, can't we just keep the new notebook(s) instead and remove the old one? Because there's a couple of notebooks I'm adding — to test both the textfile and Kafka sources for the streaming word count use-case.
I can add comments for how to install streamz using conda like the existing notebook (and any other comments to the code if you like).

The big picture looks good to me. I pointed out a few little things that would make the life of someone trying to use the notebook much easier and should likely be changed however to avoid confusion for someone who is not a Kafka expert. After those changes looks good to me.

Makes sense, thanks a ton for reviewing this @jdye64!
Just made the changes, do give them a look.

Hey @jdye64 or @chinmaychandak can you please do the following:

add each notebook to the README file, with a description, and add it to the PR
Let the user know that they have pip install confluent_kafka in random_haproxy_data_generator.  They'll figure it out, but we should warn them

I'll merge right after.  thanks!


attempt to first uninstall the old service on silent upgrade as well

Scope & Purpose
this fixes the NSIS installer upgrade scenario for silent / ci mode
Backports:

[x] Backports required for: (Please specify versions and link PRs)

Related Information

[x] Jira ticket number: BTS-575

Testing & Verification

[x] This change is already covered by existing tests, such as: RTA upgrade
[x] There are tests in an external testing repository: RTA upgrade

https://jenkins.arangodb.biz/job/arangodb-ANY-windows-packages/1958/

https://jenkins.arangodb.biz/job/arangodb-ANY-windows-packages/1959/

https://jenkins.arangodb.biz/job/arangodb-ANY-windows-packages/2029/

[ ] https://jenkins.arangodb.biz/job/arangodb-ANY-windows-packages/2032/


[v8] Type Error in ColumnDef

Describe the bug
ColumnDef typing is not working correctly, when a type is passed as a parameter it doesn't show me the correct typing
Your minimal, reproducible example
https://codesandbox.io/s/react-typescript-forked-gr4xw1?file=/src/App.tsx
Steps to reproduce
when you fill in the accessorKey you will see that its typing is string, and it should be keyof Person
Expected behavior
should return the typing as: accessorKey: firstName | lastName | age | visits | status | progress and any other value that is entered should be returned typing error
How often does this bug happen?
Every time
Screenshots or Videos

Platform

OS: windows
Browser: any browser

react-table version
v8.5.11
TypeScript version
v4.6.3
Additional context
No response
Terms & Code of Conduct

[x] I agree to follow this project's Code of Conduct
[X] I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Please use the createColumnHelper().accessor(options) API
Tanner Linsley
On Aug 14, 2022, 5:32 PM -0600, Celso Dias @.***>, wrote:

Describe the bug
ColumnDef typing is not working correctly, when a type is passed as a parameter it doesn't show me the correct typing
Your minimal, reproducible example
https://codesandbox.io/s/react-typescript-forked-gr4xw1?file=/src/App.tsx
Steps to reproduce
when you fill in the accessorKey you will see that its typing is string, and it should be keyof Person
Expected behavior
should return the typing as: accessorKey: firstName | lastName | age | visits | status | progress and any other value that is entered should be returned typing error
How often does this bug happen?
Every time
Screenshots or Videos
Platform
• OS: windows
• Browser: any browser
react-table version
v8.5.11
TypeScript version
v4.6.3
Additional context
No response
Terms & Code of Conduct
• I agree to follow this project's Code of Conduct
• I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: @.***>

That did work for me - columnHelper returns a type for a specific field of the column and not the entire column type.
Example:
type Person = {
  name: string;
  age: number;
};

const columnHelper = createColumnHelper<Person>();

// Type of nameColumn = ColumnDef<Person, string>;
const nameColumn = columnHelper('name', {
  header: `Name`,
  cell: info => info.getValue(),
});

// Type of ageColumn = ColumnDef<Person, number>;
const ageColumn = columnHelper('age', {
  header: `Age`,
  cell: info => info.getValue(),
});

// This will not work:
const columns: ColumnDef<Person> = [nameColumn, ageColumn];

i'm working around this by using
const columns: ColumnDef<Person, any>[] = [nameColumn, ageColumn];

thanks @utkuturunc but we use @typescript-eslint/no-explicit-any rule which doesn't allow me to use any

@iblecher in that case
const nameColumn = columnHelper('name', {
  header: `Name`,
  cell: info => info.getValue(),
}) as ColumnDef<Person, unknown>;

should work

I think accessorKey should show only possible keys from ColumnDef generic. What is point of defining it anyways, when basic type propagation doesn't work as expected? Is there any blocker to fix this behavior instead of using these helper functions? 🤔

Yes. Typescript limitations. We’ll be able to get around these with time.

We have a similar problem in our code.
  const columns = useMemo<ColumnDef<Shipment>[]>(     () => [       columnHelper.accessor("name", {         cell: (info) => info.getValue(),         header: "Name",       }),       columnHelper.accessor("totalUnits", {         cell: (info) => info.getValue(),         header: "Total Units",       }),     ],     [],   )
Give me this typescript error

i'm working around this by using
const columns: ColumnDef<Person, any>[] = [nameColumn, ageColumn];

@utkuturunc this seems like the only viable option for now, but I still didn't manage to make it work unfortunately
For instance this
const columnHelper = createColumnHelper<Person>();

const firstNameColumn = columnHelper.accessor("firstName",{
   header: "firstName",
   cell: info => info.getValue(),
});

Will give the following error on "firstName":
Argument of type 'string' is not assignable to parameter of type 'AccessorFn<Person>

For me the main goal is to not lose the type information about cell values. To achieve this goal I found two workarounds:

is to provide as much type information as possible.
is to allow the type checker to infer types.
In both cases types of cell values are preserved.

First workaround:
type Person = {
  name: string;
  age: number;
};

const columnHelper = createColumnHelper<Person>();

const columns: ColumnDef<Person>[] = [
  columnHelper.accessor<"name", string>("name", {
    cell: props => props.getValue() // getValue() will return value of type string
  }),
  columnHelper.accessor<"age", number>("age", {
    cell: props => props.getValue() // getValue() will return value of type number
  }),
] as ColumnDef<Person>[]; // this typecast solely to avoid `any` as a value for `TValue` parameter

Second workaround:
type Person = {
  name: string;
  age: number;
};

const columnHelper = createColumnHelper<Person>();

const columns = [
  columnHelper.accessor("name", {
    cell: props => props.getValue() // getValue() will return value of type string
  }),
  columnHelper.accessor("age", {
    cell: props => props.getValue() // getValue() will return value of type number
  }),
];

Probably at some point you will have to type cast columns to ColumnDef<Person>[], but for me this isn't an issue.

This should be fixed in the latest v8.5.30 release https://github.com/TanStack/table/pull/4513

It is not working for me when I use string literal types in my interface that I pass to the helper function:
createColumnHelper<Example>()
type AnotherValueType: "Test" | "Test2"
export interface Example {
    id: string;
    anotherValue: AnotherValueType
}

Type 'ColumnDefBase<Example, AnotherValueType> & StringHeaderIdentifier' is not assignable to type 'ColumnDef<Example, string>'.
Type 'ColumnDefBase<Example, AnotherValueType> & StringHeaderIdentifier' is not assignable to type 'AccessorFnColumnDefBase<Example, string> & IdIdentifier<Example, string>'.

@mnlfischer Did you find a solution for the column typing issues you experience? I am having the exact same issues...

@mnlfischer Did you find a solution for the column typing issues you experience? I am having the exact same issues...

sadly I disabled the ts error for now.

Thanks for your response!
I managed to avoid the ts errors by casting the column definition arrays as follows:
interface MyAwesomeType {
    name: string;
    value: number;
}

const columnHelper = createColumnHelper<MyAwesomeType>();

const columns = [
      columnHelper.accessor('name', {
        header: 'Name',
        cell: props => props.getValue()
      }),
      columnHelper.accessor('value', {
        header: 'Value',
        cell: props => props.getValue()
      }),
] as Array<ColumnDef<AwesomeType, unknown>>;

This works well with my generic Table component for which I have typed the columns and data properties as follows:
export interface TableProps<T> {
  data: Array<T>;
  columns: Array<ColumnDef<T, unknown>>;
}

The Table component has the following signature:
export const Table = <T extends object>({
  data,
  columns
}: TableProps<T>) => {
    /**
    * Table render logic
    */
}

This is a very basic snapshot of how I have chosen to solve this but this works pretty well and still provides me with the required strongly typed implementation I wanted.

@mnlfischer Thanks for your response! I managed to avoid the ts errors by casting the column definition arrays as follows:
interface MyAwesomeType {
    name: string;
    value: number;
}

const columnHelper = createColumnHelper<MyAwesomeType>();

const columns = [
      columnHelper.accessor('name', {
        header: 'Name',
        cell: props => props.getValue()
      }),
      columnHelper.accessor('value', {
        header: 'Value',
        cell: props => props.getValue()
      }),
] as Array<ColumnDef<MyAwesomeType, unknown>>;

This works well with my generic Table component for which I have typed the columns and data properties as follows:
export interface TableProps<T> {
  data: Array<T>;
  columns: Array<ColumnDef<T, unknown>>;
}

The Table component has the following signature:
export const Table = <T extends object>({
  data,
  columns
}: TableProps<T>) => {
    /**
    * Table render logic
    */
}

This is a very basic snapshot of how I have chosen to solve this but this works pretty well and still provides me with the required strongly typed implementation I wanted.

Works well for this case but when I have custom functionFn that returns boolean I get error: TS2322: Type  "isWithinRange"  is not assignable to type  FilterFnOption | undefined

Hi! I'm still getting this error :(
"@tanstack/react-table": "8.12.0", "typescript": "5.2.2"

What fixed the issue for me was to not export the columns from another file but use them directly there , the export keyword seems to be the culprit for me.

is there a benefit to doing:
as ColumnDef<Payment, unknown>[

over
as ColumnDef<Payment>[

I'm still facing the error:
Type 'AccessorKeyColumnDef<MyType, string>' is not assignable to type 'ColumnDef<MyType>'.
  Type 'AccessorKeyColumnDefBase<MyType, string> & Partial<StringHeaderIdentifier>' is not assignable to type 'ColumnDef<MyType>'.

The solution proposed by @TheOftedal to cast the TValue to unknown:

as Array<ColumnDef<MyAwesomeType, unknown>>;

doesn't fix the problem, it just hides it by disabling types validation on the array. In fact, if I add a random element (e.g. a completely different object or even a primitive like a string) to the columns array, the TypeScript compiler still considers this valid, which is not the behavior we want.
The only solution that I've found so far is to cast the column type to any as @utkuturunc proposed:

const columns: ColumnDef<Person, any>[] = [nameColumn, ageColumn];

In particular, I've created a shared type helper that I can use in all the tables of my application:
// eslint-disable-next-line @typescript-eslint/no-explicit-any
type GenericColumnDef<T> = ColumnDef<T, any>;

so that I have to disable the no-explicit-any eslint rule only once.
I hope this helps, but I really hope that this gets fixed or we get better guidance on how to implement types inference properly from the maintainers.


bump go to 1.19 in go.mod

bump go version in go.mod to 1.19
Co-authored-by: Jhonathan Aristizabal<EMAIL_ADDRESS>

Closing for staleness


Feature/sweep and prune optimization

refacto + architecture to update

Need tests and time measurement after to compare gain.