text:
Spelling mistake in command line options?

Hello,
I was looking through main.rs and spotted this...
        Arg::with_name("EVIDENCES")
            .help("Additionally output list of all evidences in given file.")
            .short("e")
            .long("evicdenes") <<<<<<<<<<<<< spelling mistake?
            .takes_value(true)

Regards...
gary

Thanks, I already noticed that one too and fixed it locally. It will be part of the next release.

authors: DoctorGM jonasthewolf


text:
any get command is closing the terminal

Hello, I have Dart 2.10.4 (stable), flutter 1.22.5 (stable), get 1.3.15, windows 7.  Somehow any "get" command is closing the terminal it's launched in. Is it a default behavior or it can be changed anywhere?

duplicate: https://github.com/jonataslaw/get_cli/issues/27

source: gharchive/issue

license_type: permissive

license_source: github-api


text:
Get.to visitChildElements during build process problem

ATTENTION: DO NOT USE THIS FIELD TO ASK SUPPORT QUESTIONS. USE THE PLATFORM CHANNELS FOR THIS. THIS SPACE IS DEDICATED ONLY FOR BUGS DESCRIPTION.
Fill in the template. Issues that do not respect the model will be closed.
Describe the bug
I try to navigate to new screen, but when ListView.builder in build process that reach the error
Exception has occurred. FlutterError (visitChildElements() called during build.
The BuildContext.visitChildElements() method can't be called during build because the child list is still being updated at that point, so the children might not be constructed yet, or might be old children that are going to be replaced.)
I try to use
WidgetsBinding.instance.addPostFrameCallback((_) {
      Get.to(() => ChatScreen(
        userUid: uid,
        name: name,
      ));
the error still
I try also to use
Future.delayed(Duration.zero, () {
    Get.to(ChatScreen(
      userUid: requestCnt.requests[index].user.toString(),
      name: requestCnt.requests[index].patientName,
    ));
The erro Still !
What is the solution
**Reproduction code
example:
class _ReceivedRequestState extends State {
  RequestController requestController = Get.put(RequestController());

  @override
  void initState() {
    super.initState();
    requestController.getRequests();
  }

  void navigateToChat(String uid, String name) {
    WidgetsBinding.instance.addPostFrameCallback((_) {
      Get.to(() => ChatScreen(
        userUid: uid,
        name: name,
      ));
    });
  }

  @override
  Widget build(BuildContext context) {
    return GetBuilder(
        init: RequestController(),
        builder: (requestCnt) {
          return ListView.separated(
            itemBuilder: (context, index) => ReceivedCard(
                ...
                ...
                onPressedChat: () {
                  final userUid = requestCnt.requests[index].user.toString();
                  final name = requestCnt.requests[index].patientName;
                  navigateToChat(userUid, name);
                }),
            ...
            ...
          );
        });
  }
}

same here

Same here, Please provide a solution.

provide a solution

anyone has any solution?

anybody found solution for this?

got into same problem

authors: Sanika198 abhishek02032001 fadlurahmanf kasvith lakhanpal-mohit muhamedoufi neerajPortalwiz

repo: jonataslaw/getx

license: MIT


text:
The onReady and onInit are being called again by builders for put controllers

Describe the bug
The onReady and onInit are being called again by builders for put controllers
Note that it is different from https://github.com/jonataslaw/getx/issues/407 where it was just the builder
To Reproduce
Make a GetMaterialApp and a home widget and in the constructor of the home widget put a controller then have a builder build that widget in the build method of the home widget. The onReady / onInit are called once more for the builder.
Make sure you use smartManagement: SmartManagement.onlyBuilder.
I noticed that putting the builder to global:false has impact on the result. It will only print once when the builder is local. But this might be confusing behaviour.
Expected behavior
I think the onInit and onReady should only be called once for each controller.
Flutter Version:
1.20.3
Getx Version:
3.8.0
Describe on which device you found the bug:
Pixel 3a Emulator / Huawei p30 pro
Minimal reproduce code
void main() async {
  runApp(App());
}

class App extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return GetMaterialApp(home: HomePage(), smartManagement: SmartManagement.onlyBuilder,);
  }
}

class HomePage extends StatelessWidget {
  HomePage() {
    Get.put<SomeController>(SomeController());
  }

  @override
  Widget build(BuildContext context) {
    return GetBuilder<SomeController>(
      builder: (SomeController controller) => Text('some content'),
    );
  }
}

class SomeController extends GetxController {
  @override
  void onReady() {
    super.onReady();
    print('onReady');
  }
}

outputs
[GETX] "SomeController" has been initialized
[GETX] "GetMaterialController" has been initialized
I/flutter ( 7309): onReady
I/flutter ( 7309): onReady
Application finished.
Exited (sigterm)

the same problem :(

Fix on 3.13

problem still persists when ever you call get .put()

authors: jonataslaw michael-ottink norbertkross yousefak007


text:
Add exclude option

Add exclude option to avoid prefixing some selectors
Usage:
var css = '.a {} \nhtml{} \n.b{}'

var prefix = require('postcss-prefix-selector')

var out = postcss().use(prefix({
  prefix: '.some-selector ', // <--- notice the traililng space!
  exclude: ['html', '.b']
})).process(css).css

console.log(out) // only .a selector will be prefixed

Bump version to 1.2.0

Coverage remained the same at 100.0% when pulling 9d7f3fd5bb7fbd1fac69d981d12c263c899f19ef on Ndpnt:add-exclude-option into 20f4162a8bcbfb0f5552191c4ab99abfe39b3395 on jonathanong:master.

added you as a collab. what's your npm name?

Thanks. My npm name is ndpnt

added

Thank you for adding me as a collab :)

Hey !
Just to be sure, you added me as a collaborator to let me merge this PR and publish the new version on npm?
Do you have usual contributing conventions like code reviews, tests, semver, doc…?

Denver and update docs :)

:+1: on getting this merged

@jonathanong Can you add me on npm so I can publish the package? username is valentin-radulescu-hs

source: gharchive/pull-request

authors: Ndpnt coveralls jonathanong valentin-radulescu-hs

repo: jonathanong/postcss-prefix-selector

license: mit

license_source: bigquery


text:
I want a primitive reference validation

As an AaC user, I want a primitive validation for references, so that I can guarantee that references are valid.
References:
Example integer primitive validator: https://github.com/jondavid-black/AaC/blob/ebe8651472afa136a37994cdf728c2af53e9c34a/python/src/aac/plugins/first_party/primitive_type_check/validators/int_validator.py#L1-L49
AC:

[ ] There is a new primitive type validation for reference
[ ] The references primitive validation ensures that references are instances of definitions or primitive types.
[ ] If a user puts a non-valid value in a reference field, their validation fails with an appropriate error message.

Depending on how things shake out when looking at this and the impact of the reference type in some of JD's plugins, we may need to create an alternative reference type in the meantime until we can unify the two or give one of the references a more appropriate name.

repo: jondavid-black/AaC


text:
Have award overlay on project thumbnails too?

Maybe this puts too much focus on award projects... but I'd like to try this. Essentially, we would take the same approach as publications (except not trophy sign; just want the red 'Award' overlay on the project thumbnail).

Perhaps this would only show up on mouseover on project gallery?

Done. Though I still question whether this puts too much emphasis on projects with awards (all projects have merit!!!).

repo: jonfroehlich/makeabilitylabwebsite


text:
Video player had error

Please make sure you've tried the latest version of Fritter first, as the F-Droid version is sometimes out of date!

Describe the bug
A clear description of what the bug is.
Certain videos do not load and give error.
To Reproduce
Steps to reproduce the behavior:
Random
Context
If applicable, add screenshots to help explain your problem.
Example:
https://twitter.com/jacksfilms/status/1417178934479769603
Code:
Video player had error g.a.a.a.j0: MediaCodecVideoRenderer error, index=0, format=Format(2, null, null, video/avc, avc1.640020, 2176000, null, [1280, 720, -1.0], [-1, -1]), format_supported=YES
also please make errors copy-able
Device
Your device model, OS version and Fritter version.
Unrelated, Android 10, Lineage 17.1, v2.12.0+20210625

Same bug on version v2.13.0+20210716. Only the part that's in () different.

I think it's the same bug as #161 .
The same thing also happens for me (even in release 2.14.0). The first videos load correctly and then later in the feed (all or groups) the error happens for all the video media.
Device
Model SM-N986B/DS,
Android 11/One UI 3.1,
Fritter v2.14.0

I have same error
Android 10
Fritter 2.14.1

Thanks all for your reports - this should finally be fixed in the next (v2.15.0) version! The commit 595b565 details why this was happening.

@jonjomckay

authors: IHateTheProgrammingClass Screenshared WindHun7er jonjomckay

repo: jonjomckay/fritter


text:
Tabcontroller mount bug

Fixed Unhandled Exception: This widget has been unmounted, so the State no longer has a context.

check if widget is mounted before calling getCabcontroller

Thanks!

authors: johann-gambol jonjomckay


text:
I want the dismiss animation in front of the menu，but set dismissOnPresent = false and presentationStyle = menuSlideIn doesn't work

I have read the guidelines for contributing and I understand

[✔] My issue is happening in the latest version of SideMenu (older versions are no longer maintained).
[✔] My issue was not solved in the README.
[✔] My issue can not be answered on stackoverflow.com.
[✔] My issue is not a request for new functionality that I am unwilling to build and contribute with a pull request.
[✔] My issue is reproducible in the demo project.

Describe the bug
When I set dismissOnPresent = false and presentationStyle = menuSlideIn,  when the VC dismiss from the menu present，the dismiss animation from the back of the menu will appear, instead of the dismiss animation in front of the menu，how to fix this bug?
To Reproduce
Steps to reproduce the behavior:

write dismissOnPresent = false
write presentationStyle = .menuSlideIn
Click on Demo right menu
Click on Present View Controller 1
Click on dismiss

Expected behavior
I want the dismiss animation in front of the menu
Screenshots

Additional context
Add any other context about the problem here.

Were you ever able to sort this out? Seem the MenuSettings don't work at all or perhaps there's a counterintuitive way to apply them?

repo: jonkykong/SideMenu


text:
在线部署迁移到Cloudflare，弃用Deno deploy，同时支持Docker运行

[ ] 迁移到CF
[ ] 支持Docker

背景
Cloudflare与Deno deploy的免费及付费资源额度对比:

对比项
CF
Deno Deploy
CF 付费(5$/月)
Deno Deploy 付费(20$/月)

请求量/月
100k/天，约3M/月
1M/月
10M/月
5M + M/$2

CPU
10ms/req
50ms/req
30s/req
50ms/req

带宽/月

100GB

200GB + GB/$0.5

KV存储

1GB
1GB
5GB + GB/$0.75

KV/read
100K/天，3M/月
450K/月

1.3M + M/$1

KV/write
1K/天，30K/月
300K
读 10M/月写 1M/月删除 1M遍历 1M
900K + M/$2.5

综合算下来，还是CF更划算。

在Cloudflare是怎么部署的，搞了几天，没搞定，求教程。谢谢大佬

在Cloudflare是怎么部署的，搞了几天，没搞定，求教程。谢谢大佬

我还没开始迁移，不过项目使用nuxt开发的，你可以参考这个教程 https://nuxt.com/deploy/cloudflare

authors: jooooock leangjia

repo: jooooock/wechat-article-exporter


text:
OPTIONS mock type

Is there any reason for not having OPTIONS created with Mock endpoint? Is it on the RoadMap or there is technical issue with that?
Really sorry about asking it, I remember some discussions in gitter, but totally forgot the outcome of them.

I see type:           'MOCK' in the source code. That is strange then that all our OPTIONS have lambda integrated.

@Alua-Kinzhebayeva Thanks for reporting!
This actually was broken since the Serverless v0.4 update. Just implemented a workaround and released v0.3.1!

@joostfarla that is totally awesome! thanks for the release! It is such a huge relief.

authors: Alua-Kinzhebayeva joostfarla

repo: joostfarla/serverless-cors-plugin

license: isc


text:
Align SwiftUI ViewModel behavior to KMP ViewModel

from issue : https://github.com/joreilly/FantasyPremierLeague/issues/231
On Shared project :

Add an extension method ViewModel.cancelViewModelScope which cancel the viewModelScope
It will be called from SwiftUI when the deinit of the viewmodel is done

On iOS :

Wrapping a Kotlin viewmodel inside an ObservableObject on generic way
Now, the KMP viewModel lifecycle is mapped with the SwiftUI viewModel lifecycle

We're using a @StateObject and not a @State to hold the viewmodel as it's the best way to handle ObservableObject as intented by SwiftUI.
the issue https://github.com/joreilly/FantasyPremierLeague/issues/229 is now useless with this upgrade.

Looking at following approach as I think it makes things a bit cleaner https://github.com/joreilly/FantasyPremierLeague/pull/239

repo: joreilly/FantasyPremierLeague


text:
网页适配有问题

忽然这样了，适配有问题，看不到回答

提供一个 case: https://www.google.com/search?q=yieldmax 这样就会造成边栏位置漂移

authors: dengwanc shexiaobin

repo: josStorer/chatGPTBox


text:
knet-save keywords and genelist, use networkId, fix modal bugs

jBox popup used but lib moved outside knetmaps.js (knet-menu) to page.tag (in knetminer UI) instead,
(from Marco) FindBugs usage added in OndexServiceProvider,
general JS/api code refactoring & cleanup,
re-add missing networkId for knetmaps drawRaw and using preset layouts for saved knets (tested and works in UI, genepage API tests pending),
new knet-save.js utils developed - with a knetSave json btn (currently uses search btn css) added to content.tag and for genepage api too to initiate saving knets to knetspace (all outside knetmaps.js, so now a knetminer feature not a knetmaps feature),
jBox knetName and knetDesc null error (bug) fixed (tested and works) - user input each time or use default string,
minor UI header fixes,
release notes header html fix,
jBox profileModal/logout fix,
jBox duplication bug fixed - now we initialise/render jBox modal on btnClick and destroy when its tasks are done (tested and works locally),
knet-save.js - add gene list and keywords (non-null) in saved json POST request too,
fix knetspaceHost url (changed to http) in pom.

@josephhearnshaw pls pull ... I can then merge all with the main repo (sprint branch), thanks

thanks @josephhearnshaw

repo: josephhearnshaw/knetminer


text:
Ensure removal of browser umd support from all middlewares

    Could you make an issue so we don't forget to take it out of all middleware in future haha

Originally posted by @dan-online in https://github.com/josh-development/middlewares/pull/100#discussion_r1048070134

Fixed in #125

repo: josh-development/middlewares


text:
Fixes

I fixed a couple of issues:

The code querying Mashape API was returning the first movie with the same date (and the first movie when there was no date). Instead the code is now sending the date to the API and returning the first movie matching the name. This path of code would return another movie than the one expected in some cases, it's better to return nothing in this case.
OMBb API is already returning a JSON object so there is not need to parse it. This lead to an error and the code discarding the returned movies from the API.
Our code is not removing the list / recommend buttons on the popup anymore
Our CSS was modifying the details page of a movie (for the ratings), I created a new CSS class to prevent this.

Thanks again @gabrielweyer some fixes were needed for the css in the search pages (2dd1f49118f1c558c0c9e78a438119642470e5ce) but otherwise awesome jobs, this helps alot :)

authors: gabrielweyer joshblum

repo: joshblum/netflix-rate-chrome-ext


text:
GSD Request

--- GSD JSON ---
{
  "vendor_name": "Linux",
  "product_name": "Kernel",
  "product_version": "versions from v5.13 to before v5.15.25",
  "vulnerability_type": "unspecified",
  "affected_component": "unspecified",
  "attack_vector": "unspecified",
  "impact": "unspecified",
  "credit": "",
  "references": [
    "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=232f75d3b4b5456de6f0b671aa86345d62de1473",
    "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=74b426bea4f7e3b081add2b88d4fba16d3af7ab6"
  ],
  "extended_references": [
    {
      "type": "commit",
      "value": "232f75d3b4b5456de6f0b671aa86345d62de1473",
      "note": "introduced"
    },
    {
      "type": "commit",
      "value": "74b426bea4f7e3b081add2b88d4fba16d3af7ab6",
      "note": "fixed"
    }
  ],
  "reporter": "joshbressers",
  "reporter_id": 1692786,
  "notes": "",
  "description": "KVM: x86: nSVM: fix potential NULL derefernce on nested migration\n\nThis is an automated ID intended to aid in discovery of potential security vulnerabilities. The actual impact and attack plausibility have not yet been proven.\nThis ID is fixed in Linux Kernel version v5.15.25 by commit 74b426bea4f7e3b081add2b88d4fba16d3af7ab6, it was introduced in version v5.13 by commit 232f75d3b4b5456de6f0b671aa86345d62de1473. For more details please see the references link."
}
--- GSD JSON ---

This issue has been assigned GSD-2022-1000455

repo: joshbressers/gsd-database


text:
new group: Rhysida

host location
rhysidafohrhyy2aszi7bm32tnjat5xri65fopcxkdfxhi4tidsg7cad.onion
group name
Rhysida
group information
New ransomware group spotted in the Dark Web.
This group doesn't list their victims in their website.
host
v3 (onion)
parser
No response

The ransomware group is currently posting some victims and leaks.

Here is the url of leak : http://rhysidafohrhyy2aszi7bm32tnjat5xri65fopcxkdfxhi4tidsg7cad.onion/archive.php
and the parse :
grep "m-2 h4" source/rhysida-* | cut -d '>' -f 3 | cut -d '<' -f 1

This address is also to be considered among the additions: http://rhysidafohrhyy2aszi7bm32tnjat5xri65fopcxkdfxhi4tidsg7cad.onion/archive.php?auction
with the same parser

authors: JMousqueton nuke86 yoryio

repo: joshhighet/ransomwatch

license: Unlicense


text:
Add status indicator

There's no way to know whether DND is enabled or disabled.
This change would show an alert to indicate what the status is.
Note: there is a feature/bug in libnotify that prevents the timeout flag from working on Ubuntu, so the timeout of this alert can't be customized https://askubuntu.com/questions/110969/notify-send-ignores-timeout

Very nice, thanks again. Design decision/bug/feature, all pretty funny haha.

authors: josephdpurcell joshpetit


text:
underscores in events rust project maps it wrong in typings

If you have an event with a _ on the rust project type generation, it does not map it correctly.

https://github.com/joshstevens19/rindexer/commit/4c749e618127b8b53de20a200f9a6aee9eab95bb


text:
may miss some pages depending on xlog-mode

There are two regular expressions used to parse the output of either pg_xlogdump or https://github.com/snaga/xlogdump.
https://github.com/joyent/pg_prefaulter/blob/master/agent/walcache/cache.go#L50
and
https://github.com/joyent/pg_prefaulter/blob/master/agent/walcache/cache.go#L56
When operating in xlog-mode (ie using https://github.com/snaga/xlogdump), the output for different operations is different; and the regular expression may not match all operations.
HEAP_INSERT https://github.com/snaga/xlogdump/blob/master/xlogdump_rmgr.c#L726
HEAP_DELETE https://github.com/snaga/xlogdump/blob/master/xlogdump_rmgr.c#L769
pg_xlogdump-mode is the default; and that mode does not appear to have this problem.

So what is the point of this issue, if I may ask?

authors: MichaelDBA timkordas


text:
Port from container are not exposed by kubedock

Hello there,
when I'm running e.g. mongodb as a testcontainers image, port 27017 is not exposed by the kudedock, kubectl says that:
    Container ID:  containerd://f08607808925b030a57c604f02904ce8f74c02fd9fdf43fb317281c21f6f06e0
    Image:         mongo:4.4.10
    Image ID:      docker.io/library/mongo@sha256:2821997cba3c26465b59cc2e863b940d21a58732434462100af10659fc0d164f
    Port:          27017/TCP
    Host Port:     0/TCP
    Args:
      --replSet
      docker-rs

Testcontainers test suite reports log:
org.springframework.dao.DataAccessResourceFailureException: Timed out after 30000 ms while waiting for a server that matches WritableServerSelector. Client view of cluster state is {type=UNKNOWN, servers=[{address=docker:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused}}]; nested exception is com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting for a server that matches WritableServerSelector. Client view of cluster state is {type=UNKNOWN, servers=[{address=docker:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused}}]

docker is the container alias, port 2475 is exposed and docker API is available.
Ports of target containers are not accessible from the container which uses kubedock. Do anyone know the reason of this?
Cheers,
W

Did you run kubedock with port-forwarding --port-forward or --reverse-proxy? Port-forwarding is typical useful for running locally against a remote k8s cluster, while reverse-proxy is more stable/faster and can be used if the tests are run in the same cluster as kubedock.

Thanks for response. Yeah, it helps, but know I'm trying to figured out randomly testcontainer failures.
BTW. Is there any way to access private repos from kubedock container? Now it raises 403, looks like it doesn't honor DOCKER_AUTH_CONFIG env variable.
Kubedocs seems to fill the gap between dind requirements and k8s env but so far it's so painful...

@joyrex2001 Looks that I have stable env. Many thanks for help. 👍
One issue is still open, as mentioned in previous post, is there any way to inject/honor DOCKER_AUTH_CONFIG which provides credential for private registries with images created via kubedock?

Awesome :-)
Since kubedock is orchestrating the containers in kubernetes, the docker_auth_config should be configured there as well. This is done with image pull secrets. See also: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/

I'm aware of it, but pod has to be known which kubernetes secret objects should use in order to make auth (snippet below).
apiVersion: v1
kind: Pod
metadata:
  name: private-reg
spec:
  containers:
  - name: private-reg-container
    image: <your-private-image>
  imagePullSecrets:
  - name: regcred

For now, images created by kubedock does not use imagePullSecrets at all, but has to in order access images from private repo.

@joyrex2001  One more think I found, when I have k8s cluster with two nodes, and scenario when kubedock is running on node A and testcontainers containers ware scheduled  on nodeB, sometimes there are a lot of communication issues between the containers - tests fails randomly.
How it could be handled? Do you know the possible reasons?

For now, containers created by kubedock does not use imagePullSecrets at all, but has to in order access images from private repo.

Configuring specific pull secrets is not yet supported, this doesn't look like a huge implementation effort though.

@joyrex2001 One more think I found, when I have k8s cluster with two nodes, and scenario when kubedock is running on node A and testcontainers containers ware scheduled on nodeB, sometimes there are a lot of communication issues between the containers - tests fail randomly.

My guess is that you use port-forwarding, which is not that stable as this tunnels over the k8s api. If both kubedock and the tests using testcontainers are running in the same cluster, reverse-proxy is recommended (like done in the tekton example).

I'll stay tuned waiting for support private repos 👍 and I'm going to try to handle random fails.
Thanks you, cheers!

@joyrex2001
I also observe from time to time testcontainers starts running the tests when mongo containers are not started already - it fails at the beginning of the test run. Is it possible that K8S API is called with no blocking manner like fire-and-forget? In opposite to Docker API it could be the difference.

I also observe from time to time testcontainers starts running the tests when mongo containers are not started already - it fails at the beginning of the test run. Is it possible that K8S API is called with no blocking manner like fire-and-forget? In opposite to Docker API it could be the difference.

This is similar to docker; the container is started, but it might not be ready yet. In the testcontainers framework this is usually managed by 'waitingFor' expressions, to make sure the test code is not executed before a certain (ready) state has been met.

Configuring pull-secrets has been released in 0.8.0. The --image-pull-secrets argument has been added, which takes a comma-separated list of pull-secrets.

Thanks! I’ll upgrade my env soon, cheers! 👍


text:
Idea: Gift Everyone A USS Hood Welcome Badge

When users join the server they could receive a special commemorative USS Hood badge (or something similar) for their badge inventory at Level 1. We'd also globally grant all users this badge (silently probably to not spam everyone).
Trading won't be an issue since everyone will already have it, so you can't accidentally trade yours away.

Completed in #237


text:
Use token properties in Ember client

Hello! We are looking for a way hide/show certain features in our Ember app based on the user's role at the company. Currently, we are using ember-simple-auth-token and our API server will validate the login (via Google Auth) and then respond back with a JWT token. I am curious, would it be a wise practice to include the role of the user within the JWT token? Is it possible for the Ember client to access properties within the JWT token? If not, how would you recommend we tell the client what the user's role is?

For anyone looking to decode tokens client side in the future, it's super easy to do:
let [header, payload] = token.split('.');

header = JSON.parse(atob(header));
payload = JSON.parse(atob(payload));

authors: charlesfries objectiveSee

repo: jpadilla/ember-simple-auth-token


text:
Import hooks not working with .egg distribution

We are using the import hooks to import our capnp schema files. This works fine for most installation/distribution methods, including editable/developer installs and wheel files. But eggs fail to import the capnp file. I am suspicious that it is because .egg files have a SOURCES.txt that lists all of the source files in the package and the import (blah_capnp) doesn't match the filename (blah.capnp).
Is this a limitation of the import hook or do we have our egg files set up incorrectly?

Can you point me to an example .egg and I'll take a look. I'm not sure what's causing the problem here.

One of the 0.2.5 eggs here:
https://pypi.python.org/pypi/nupic
I tried switching to the explicit capnp.load call and using pkg_resources.resource_filename to find the file path and that works but then I get an error when a schema attempts to import another schema. I printed out the pkg_resources path and it was something like this:
/Users/me/.python-eggs/package.egg-tmp/path/to/file.capnp
And when I look in that path, there are only a few files present. So I think since a .egg file is really a zip archive that it unpacks the files that need to be directly accessed.
I am sure there is a idiomatic way to make this work but I can't figure out what it is. I will keep digging around now that I understand what is going on a little better.

I think I found the issue here:
http://stackoverflow.com/questions/2798451/python-why-do-some-packages-get-installed-as-eggs-and-some-as-egg-folders
Let me confirm and I will follow up.

Yes, it looks like regardless of the import mechanism, pycapnp requires the .egg archive be made with the "zip_safe" options set to False in the setup() function.

Cool, thanks for tracking it down :)
As long as we rely on the C++ Cap'n Proto library for importing, it will never be zip .egg aware. If we ever move to a pure python implementation or we pre-generate the python schemas, then we can revisit this.

@jparyani - Yes, I looked if there was a way to pregenerate the Python schema but didn't see anything. Does this exist somewhere or is it planned? Not a big deal as I think the zip_safe=False solution is totally fine for us but it might speed up initial start up a little.

I once had plans to write a capnp cython code generator (see https://github.com/jparyani/pycapnp/blob/develop/capnp/_gen.py), but it languished. It's main purpose was to speed up field access, but it could also be useful for binary distributions.
It's only semi-functional at this point, and doesn't handle cross .capnp file imports.

authors: jparyani scottpurdy

repo: jparyani/pycapnp


text:
🛑 Carolina Heart Center is down

In bf62258, Carolina Heart Center (https://carolinaheartcenter.com) was down:

HTTP code: 500
Response time: 1673 ms

Resolved: Carolina Heart Center is back up in deb41ff after 15 minutes.


text:
🛑 Benson Chiropractic is down

In 44afe33, Benson Chiropractic (https://benchiropractic.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Benson Chiropractic is back up in 1588545 after 48 minutes.


text:
🛑 NC Spices is down

In 2da0809, NC Spices (https://ncspices.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: NC Spices is back up in 2f227b0.


text:
🛑 March to The Polls is down

In c3720a5, March to The Polls (https://marchtothepolls.org) was down:

HTTP code: 0
Response time: 0 ms

Resolved: March to The Polls is back up in ac257d9 after 12 minutes.


text:
Scenes and automations do not work properly

Current behavior
Currently, a scene or an automation which would result in the same state of the player (i.e. player is paused and scene says "pause"), will toggle the state.
Expected behavior
If the scene or an automation do not change the state of the speaker, it should not be toggled.

Most relevant commit is https://github.com/jptaranto/homebridge-roon-outputs/pull/7/commits/7694b8dc0a6b590c6108ce205584aa1f0ad2deb2

repo: jptaranto/homebridge-roon-outputs


text:
Body could contain a specific resource type

Add support for SpecificResource type within body as seen here https://iiif.io/api/cookbook/recipe/0022-linking-with-a-hotspot/

fix 1.1.1

repo: jptmoore/maniiifest


text:
能更新一下文档不

虽然你们是官方维护的jpush，但是文档跟 reactnativecn的那个比真的差挺远的。不过貌似你们用的API比较新。
用react native的大部分都是前端程序员（说的就是我），一些涉及到原生应用的配置，看着都很头疼，有时候会被一些原生应用的基本概念挡在门外。
能花点时间整理一下文档不，尽可能写详细一点。

@charleyw 文档更新了，可以用脚本来进行配置了，具体看 ReadMe

repo: jpush/jpush-react-plugin


text:
Calendar initialization fails on Safar due to RangeError

Do you want to request a feature or report a bug?
Bug report
What's the current behavior?
Calendar initialization fails in Safari due to RangeError: Array size is not a small enough positive integer.

Reproducible on Safari, at version 0.22.1, 0.21.0, and 0.19.1
Works fine on Chrome at all the above versions.

What's the expected behavior?
The calendar inits without this error.

Long story short, the issue was caused by Safari and Chrome parsing Date objects different, Safari was considering my Date objects for the min and max props to be invalid, and prop type validation didn't catch it because they were both still instances of Date.

Happens when invalid date is passed in min or max prop. Safari considers dates as invalid in different manner than Chrome, so error occurs more often in Safari.
E.g. those dates are invalid in Safari but not in Chrome
<Calendar
            min={new Date('2020, 1, 1, 07:00')}
            max={new Date('2020, 1, 1, 23:00')}
          />

repo: jquense/react-big-calendar


text:
Update library/1.2.3

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.
The best way to propose a feature is to open an issue first and discuss your ideas there before implementing them.
Always follow the contribution guidelines when submitting a pull request.

Redundant


text:
Fix typo in log level documentation

There was a small typo I noticed in the commands.md descriptions of log-level. It suggests WARNING is a valid option but it is actually WARN. https://github.com/jrasell/levant/blob/fc29298e3019a04750c3c51ae9484becdcd3f586/logging/logging.go#L16

thanks @EvanErcolano!!

authors: EvanErcolano jrasell

repo: jrasell/levant


text:
Add synthetic parameterr to distinguish okReplay requests

Adds extra parameter to requests with same url to make the unique

This PR was released with 0.22.1

repo: jraska/github-client


text:
[template] Add an option for assembler templates

Similarly as it's done for announcers and packagers, assemblers (such as java-archive and jlink) require templates.
Use -s to be consistent with assemble.

Released in v1.4.0 -> https://github.com/jreleaser/jreleaser/releases/tag/v1.4.0

repo: jreleaser/jreleaser


text:
Support JIRA as issue tracker

Documentation:

https://docs.atlassian.com/software/jira/docs/api/REST/9.6.0/#api/2/
https://www.atlassian.com/blog/jira-software/jql-the-most-flexible-way-to-search-jira-14
https://www.atlassian.com/software/jira/guides/expand-jira/jql
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/#api-rest-api-3-issue-picker-get

JqL query to find issues for a given version:
https://github.com/spring-projects/spring-data-dev-tools/blob/61e5805d060299e1003dca9b855ffc4c6ebb10bb/release-tools/src/main/java/org/springframework/data/release/issues/jira/Jira.java#L116

Would this only add a comment to an issue, in which version it was released or would it also mark the version in Jira as released?

Hopefully both

Hi @aalmiray, I want to implement this. Is this still needed?

This is still needed. However, I believe this is a major undertaking as the crux is not just supporting one additional service, but also keeping backward compatibility and the option to have more than one active issue tracker, which affects changelog generation.

I understand, Do you have a bigger PRD/plan regarding "Issue trackers" ? Or do you want them to be extendable?

Issue trackers should support generic properties (such as host, url, credentials, timeouts) as well as unique properties (github specific, jira specific, etc).
There could be 0 to multiple issue trackers explicitly defined. When there's no explicit tracker defined then the native tracker for the chosen releaser (github, gitlab, etc) will be used with default configuration. Have to think what to do with changelog related behavior (the issues block) as it should be handled by a tracker, and not the changelog.
When there's more than 1 tracker configured I wonder if one of them must be configured as primary (for changelog purposes). Or how multiple trackers would work as inputs for the changelog? Only the primary? Filters? Conditionals?

authors: aalmiray anujmax mszalbach


text:
WebkitTransform capitalization

I have a fleeting glance at your interesting code.  I'm no expert but I see you use WebkitTransform (captial W) - I thought it should be webkitTransform:
https://developer.apple.com/library/safari/documentation/InternetWeb/Conceptual/SafariVisualEffectsProgGuide/Using2Dand3DTransforms/Using2Dand3DTransforms.html#//apple_ref/doc/uid/TP40008032-CH15-SW16
though I suspect I'm misunderstanding how your code works.

@fergusg normally you are correct, but not within React. See the docs here: https://facebook.github.io/react/tips/inline-styles.html

authors: fergusg jrowny

repo: jrowny/react-absolute-grid


text:
Create a resource with a many-to-one User-subclass that is identical to the logged-in user and SQLAlchemy breaks

InvalidRequestError: Can't attach instance <User at 0x105776950>; another instance with key (<class 'onlinelinguisticdatabase.model.user.User'>, (1L,)) is already present in this session.

See https://groups.google.com/forum/#!topic/sqlalchemy/viF4msJeqaU

I "solved" this by setting the enterer(/modifier) to an already-present elicitor/verifier, if there is one with the correct id.

repo: jrwdunham/old


text:
🛑 Nextcloud is down

In 76eefed, Nextcloud ($SERVER_BASE/nextcloud/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Nextcloud is back up in 0f08e4f after 541 days, 22 hours, 30 minutes.

repo: jscmidt/upptime


text:
🛑 Piwigo is down

In 8ba91b3, Piwigo ($SERVER_BASE/piwigo/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Piwigo is back up in 39f324e after 9 minutes.


text:
🛑 Linus-Wordpress is down

In a8135bc, Linus-Wordpress ($SERVER_BASE/wordpress/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Linus-Wordpress is back up in 203b024 after 10 minutes.


text:
🛑 Piwigo is down

In 5ad539e, Piwigo ($SERVER_BASE/piwigo/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Piwigo is back up in 591f96c after 45 minutes.


text:
🛑 Nextcloud is down

In b8f834d, Nextcloud ($SERVER_BASE/nextcloud/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Nextcloud is back up in 6b05846 after 1 hour, 59 minutes.


text:
🛑 Tandoor is down

In 984f6c6, Tandoor ($SERVER_BASE/recipes/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Tandoor is back up in ebfc52a after 46 minutes.


text:
🛑 Piwigo is down

In 50a7d3e, Piwigo ($SERVER_BASE/piwigo/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Piwigo is back up in bf8b359 after 10 minutes.


text:
Exception with combination rules

If run jscs with the config:
{
	"requirePaddingNewLineAfterVariableDeclaration": true,
	"requireSpaceAfterKeywords": [
		"function"
	],
	"requireSpaceBeforeBinaryOperators": [
		"!=="
	]
}

then throw excaption:
TypeError: Cannot read property 'replace' of undefined
    at renderLine (/usr/lib/node_modules/jscs/lib/errors.js:266:16)
    at Object.Errors.explainError (/usr/lib/node_modules/jscs/lib/errors.js:197:13)
    at /usr/lib/node_modules/jscs/lib/reporters/console.js:16:36
    at Array.forEach (native)
    at /usr/lib/node_modules/jscs/lib/reporters/console.js:14:35
    at Array.forEach (native)
    at Object.module.exports [as writer] (/usr/lib/node_modules/jscs/lib/reporters/console.js:9:22)
    at /usr/lib/node_modules/jscs/lib/cli.js:149:18
    at Array.<anonymous> (/usr/lib/node_modules/jscs/node_modules/vow/lib/vow.js:712:56)
    at Immediate.callFns [as _onImmediate] (/usr/lib/node_modules/jscs/node_modules/vow/lib/vow.js:23:35)

If add "," to "requireSpaceBeforeBinaryOperators" - not exception;
if remove "requireSpaceAfterKeywords" - not exception,
if remove "requirePaddingNewLineAfterVariableDeclaration" - not exception.
Run jscs: jscs src -c config/.jscsrc
node --version     v4.3.1

Need a code example

authors: burashka markelog

repo: jscs-dev/node-jscs


text:
Add requireSpaceBetweenArguments rule to relevant presets

Would like to add it to a couple of them, including to "wikimedia"
/cc @Krinkle

Want to back this issue? Place a bounty on it! We accept bounties via Bountysource.

ping @markelog can you open a PR for this?

Yep, will do that today

authors: markelog mikesherov


text:
Remove whitespace and newlines before closing parentheses

Fixes #47.

Still testing. Meant to create pull request on my forked version. Sorry.

repo: jsdf/coffee-react-transform


text:
enum by default should include values in the description

Expected behavior
using the @enum tag implies an object where key values represent basic value types - number, string, boolean, or something of the sort.    The value associated with the key should be listed out in the description by default to be more useful.
/**
* @enum {number}
* /
const myEnum = {
   FIRST_ITEM: 2,
   SECOND_ITEM: 4,
   THIRD_ITEM: 6
}

should automatically identify the value and result in documentation that lists out, in a table,

FIRST ITEM        |  number  |  2
SECOND_ITEM  |  number  |  4
THIRD_ITEM      |  number  |  6

Current behavior
Presently, to get the above effect, you have to explicitly document each item which is redundant:
/**
* @enum {number}
* /
const myEnum = {
   /** 2 */
   FIRST_ITEM: 2,
   /** 4 */
   SECOND_ITEM: 4,
   /** 6 */
   THIRD_ITEM: 6
}

Currently, i'm doing it like this :
/**
 * @readonly
 * @enum {number}
 */
const AssessmentFieldType = {
    /** @type {16} */
    ASSMT_REPORT: 16,
    /** @type {12} */
    ASSMT_STATEMENT: 12,
    /** @type {3} */
    ASSMT_QUESTION: 3,
    /** @type {3} */
    QUIZ_STATEMENT: 3,
    /** @type {12} */
    QUIZ_ANSWER: 12,
};

And I agree it's redundant !
Current jsdoc behavior does not allow strict checks on number enums

Since Typescript 4.5, you can do this :
const myEnum = /** @type {const} */ ({
   FIRST_ITEM: 2,
   SECOND_ITEM: 4,
   THIRD_ITEM: 6
});

const myEnum2 = Object.freeze({
   FIRST_ITEM: 2,
   SECOND_ITEM: 4,
   THIRD_ITEM: 6
});

See https://stackoverflow.com/a/79042517/7864246
In case you don't have the latest version of Typescript, you can do it like this :
/**
 * @readonly
 * @enum {number}
 */
const myEnum = {
   /** @type {2} */
   FIRST_ITEM: 2,
   /** @type {2} */
   SECOND_ITEM: 4,
   /** @type {2} */
   THIRD_ITEM: 6
}

authors: DaveTorrey LoganTann

repo: jsdoc/jsdoc


text:
Link to external using a quoted value doesn't resolve correctly

I define:
/**
 * @external "bar('Connect')"
 */

/**
 * @function external:"bar('Connect')".callNative
 */

/**
 * Please see {@link external:"bar('Connect')".callNative}
 * @public
 * @function foo
 */

Good News: Externals will show a member "bar('Connect')" that will show a member method "callNative()".
Bad News: As shown below, the link in Foo to bar's callNative method will not create a HREF.

Please see external:bar('Connect').callNative

One solution I tried was:
/**
 * @external bar('Connect')
 */

/**
 * @function external:bar('Connect').callNative
 */

/**
 * Please see {@link external:bar('Connect').callNative}
 * @public
 * @function foo
 */

In other words, just omit the quotes.
Bad News: Instead of bar('Connect') being listed in externals on the home page, only bar is listed. If you click on the bar link it won't show callNative. If you click on the foo link the good news is that there is a HREF there! The bad news is, the HREF is broken, clicking on it brings up a File not found error. See below.
Please see external:bar('Connect').callNative

How do I fix it so that I can both see bar('Connect') fully listed out as in the first example and be able to link to the callNative method?
Thanks!

Note that I am using the markdown plugin, I wonder if #1035 is relevant here?

After doing a quick test, I'm pretty confident that this is a duplicate of #1035.

authors: hegemonic yaronyg


text:
MetaData API

In the create function of the meta data api there is no description of the options to create custom fields on Standard Objects like Contacts. The first parameter which takes a string says CustomObject but should that change with a standard object?
The code is the example below. Is there a way change this code to work on standard objects?
// creating metadata in array var metadata = [{   fullName: 'TestObject1__c',   label: 'Test Object 1',   pluralLabel: 'Test Object 1',   nameField: {     type: 'Text',     label: 'Test Object Name'   },   deploymentStatus: 'Deployed',   sharingModel: 'ReadWrite' }]; conn.metadata.create('CustomObject', metadata, function(err, results) {   if (err) { console.err(err); }   for (var i=0; i < results.length; i++) {     var result = results[i];     console.log('success ? : ' + result.success);     console.log('fullName : ' + result.fullName);   } });

I have tried and failed to write it this way
var metadata = [{   fullName: 'Contact',   konnectid__MindBodyID__c: {     type: 'Text',     label: 'MindBody ID'   },   deploymentStatus: 'Deployed',   sharingModel: 'ReadWrite' }]; conn.metadata.create('CustomObject', metadata, function(err, results) {   if (err) { console.err(err); }   for (var i=0; i < results.length; i++) {     var result = results[i];     console.log('success ? : ' + result.success);     console.log('fullName : ' + result.fullName);   } });

Did you find a way to create a field on standard objects?

Even though Salesforce named the metadata type "CustomObject" it works identical for both custom and standard objects.
The users of my application have created hundreds of fields using this API.

Make sure you are always passing an array to the metadata
Make sure the fullname is accurate objectName.FieldName
Make sure the data format is correct

You can use the describeSObject API to get examples
OR you can use the tooling query API to query existing CustomField's to get examples (e.x. SELECT Id, Metadata, DeveloperName, ManageableState, FullName, NamespacePrefix FROM CustomField LIMIT 1)

Here is a basic example (using upsert, but it is an identical process):

const fieldMetadata = [
    {
      "fullName": "Account.test_field_for_jsforce_example__c",
      "caseSensitive": false,
      "externalId": true,
      "inlineHelpText": "External ID for migration purposes",
      "label": "test field for jsforce example",
      "length": 255,
      "required": false,
      "trackHistory": false,
      "type": "Text",
      "unique": false
    }
]

conn.metadata.upsert('CustomField', metadata, (err, results) => {
      if (err) {
        console.log(err);
      }
        console.log(results);
    });

Hello Marc, I have to stop, I have toddlers in my home now and I am unable
To finish what I started. This disappoints me and I have to help someone in my family
Mamie
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10

From: Marc Höffl notifications@github.com
Sent: Saturday, April 27, 2019 12:45:33 PM
To: jsforce/jsforce
Cc: Subscribed
Subject: Re: [jsforce/jsforce] MetaData API (#819)
Did you find a way to create a field on standard objects?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com/jsforce/jsforce/issues/819#issuecomment-487306178, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKCLYOQUJPAJTR7RLO2BQQLPSSGL3ANCNFSM4FZQF4YA.

No Marc, I have been caring for small children and I have to stop here until I can
Return so sorry and thanks for all the help and assistance.
Mamie
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10

From: Marc Höffl notifications@github.com
Sent: Saturday, April 27, 2019 12:45:33 PM
To: jsforce/jsforce
Cc: Subscribed
Subject: Re: [jsforce/jsforce] MetaData API (#819)
Did you find a way to create a field on standard objects?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com/jsforce/jsforce/issues/819#issuecomment-487306178, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKCLYOQUJPAJTR7RLO2BQQLPSSGL3ANCNFSM4FZQF4YA.

Thanks,
I got it working with the CustomField. Just confusingly documented API :)

Hello Marc thank you for your help, sorry I was not able to respond in
Timely manner.
Mamie
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10

From: Marc Höffl notifications@github.com
Sent: Wednesday, May 8, 2019 3:23:21 PM
To: jsforce/jsforce
Cc: Mamie Sharrieff; Comment
Subject: Re: [jsforce/jsforce] MetaData API (#819)
Thanks,
I got it working with the CustomField. Just confusingly documented API :)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/jsforce/jsforce/issues/819#issuecomment-490636997, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKCLYOUMRVBPD6KD2GSX3CLPUMZDTANCNFSM4FZQF4YA.

repo: jsforce/jsforce


text:
npm script not working with wild cards

I am using windows 10.  standard command prompt.  tried jshint *.js  also tried writing a script "lint": "jshint .js **/.js"   and both just say they cannot open file .js or **/.js  any way to to get this to work in cmd?
c:\Users\Jason.Armstrong\Desktop\TestProjects\npmBuildProcess>npm run lint

npmbuildprocess@1.0.0 lint c:\Users\Jason.Armstrong\Desktop\TestProjects\npmBuildProcess
jshint *.js

ERROR: Can't open *.js
c:\Users\Jason.Armstrong\Desktop\TestProjects\npmBuildProcess>

JSHint's CLI accepts paths to directories and files. If the path is a directory, it will recursively lint all the files with a .js extension contained within (although the extension can be modified with the --extra-ext option). For for your NPM script, can you try:
   "lint": "jshint ./"

In lieu of further information, I'm going to consider this resolved. If the above command doesn't suite your needs for whatever reason, please don't hesitate to re-open!

authors: TokenElt jugglinmike

repo: jshint/jshint


text:
Documentation refer to JSCS project, which is deprecated

Hello!
Problem
I was reading the documentation, and each time an option is related to code formatting, description says it's deprecated and we need to check out the JSCS project.
Unfortunately, this project is deprecated:

JavaScript Code Style checker (deprecated)
-- https://github.com/jscs-dev/node-jscs

JSCS has merged with ESLint!
-- http://jscs.info/

JSCS — end of the line
JSCS 3.0 is finally out, and we are both very excited and a little sad. Excited because this new version is something that we’ve worked very hard on, and sad because this will be the last version of JSCS.
-- https://medium.com/@markelog/jscs-end-of-the-line-bc9bf0b3fdb2

Question
Do you think update the documentation to make it point on the ESLint project is a good idea?

The term "deprecated" is somewhat of a misnomer in this context because it
indicates intent of future removal. Thankfully, that's not the case here, as
noted in the blog post you referenced:

The JSCS repository will be left in place, so you are free to fork it and
otherwise use the code.

In releasing version 3.0, the original JSCS left us with a powerful, stable
piece of software. Even today, it holds up as a code style enforcement utility,
which is exactly what JSHint users are looking for. ESLint has a much larger
scope and isn't always appropriate for use alongside JSHint.
It might be nice to update JSCS's documentation instead--to clearly indicate
that it is not actively maintained, and ideally to offer maintenance privileges
to folks who might be interested. @hzoo do you have any thoughts about that?

The term "deprecated" is somewhat of a misnomer in this context because it
indicates intent of future removal. Thankfully, that's not the case here, as
noted in the blog post you referenced:

The JSCS repository will be left in place, so you are free to fork it and
otherwise use the code.

In releasing version 3.0, the original JSCS left us with a powerful, stable
piece of software. Even today, it holds up as a code style enforcement utility,
which is exactly what JSHint users are looking for. ESLint has a much larger
scope and isn't always appropriate for use alongside JSHint.
It might be nice to update JSCS's documentation instead--to clearly indicate
that it is not actively maintained, and ideally to offer maintenance privileges
to folks who might be interested. @hzoo do you have any thoughts about that?

The jshint documentation on the "indent" option tells us to us JSCS. Then the JSCS ReadMe.md tells us to us JSHint... which one is it?
From what I gather you are saying the JSCS readme is incorrect and you should not use JSHint for code style and instead use the deprecated JSCS?
https://github.com/jscs-dev/node-jscs

The jshint documentation on the "indent" option tells us to us JSCS. Then the JSCS ReadMe.md tells us to use JSHint... which one is it?

JSCS (JavaScript Code Style checker) was created solely for code style so you can use it in addition to JSHint (focused on errors, etc and was doing style checks earlier). That's why the projects partnered together to focus on different things. JSCS "merged" in terms of moving the teams over to ESLint since the JSCS wanted to join forces with ESLint instead. Deprecated might not be the best word, it's just unmaintained at the moment but it works fine.

I'l change the wording in the repo to say "unmaintained"

Thanks, Henry!

authors: hzoo jugglinmike lucile-sticky rayfoss


text:
added Codacy to the list of companies using JSHint

Codacy uses and integrates JSHint (docs.codacy.com/v1.5/docs/engines; it's used not just on development but integrated within Codacy to bring it to more developers).

Superseded by gh-3061.

authors: cog jugglinmike


text:
More smart type generation in auto generation

I've tried parol with auto-generation and am very pleased with its functionality, and it meets most requirements for creating my Desk-lang parser.
I'd like to suggest some trivial improvements to auto-generation in this issue.
Current behavior
Given expanded grammar:
Expr: Comment Expr;
Expr: Let;
Comment: ...
Let: ...

Now, parol generates something like this:
enum Expr {
    Expr0(Expr0),
    Expr1(Expr1),
}

struct Expr0 {
    pub comment: Box<Comment>,
    pub expr: Box<Expr>,
}

struct Expr1 {
    pub r#let: Box<Let>,
}

struct Comment { ... }
struct Let { ... }

Suggested behavior
I'd like to suggest these two.

Deduce the variant name from its right-hand side.
Omit struct generation for a variant if its right-hand side is a single item.
Use Box as little as possible, like:

At the moment when recursion occurs.
If the type size is large. (We may don't need this behavior, and it would be a too-early optimization)

So the generated code for the above example will be like this:
enum Expr {
    CommentExpr(CommentExpr),
    Let(Let),
}

// Former Expr0
struct CommentExpr {
    pub comment: Comment,
    pub expr: Box<Expr>,
}

// Expr1 is not generated

struct Comment { ... }
struct Let { ... }

@ryo33
Great suggestions!
I was never really satisfied with the current way to deduce the variant names of an Enum. The only thing that I wanted was, that they should be as stable as possible when the user changes his grammar description. This is also guaranteed by your proposal with the benefit of gaining more readability.
Also, the second proposal is useful, and I will try to find a solution for it.
The third one may involve some deeper analyses but is really worth to strive for.

@ryo33
I have a partly solution here c8140d4 on branch enhancement/smart-type-generation
(1. Deduce the variant name from its right-hand side.)
If you have time, I would like you to have a look at it.
I decided to deviate from the original proposal in a single part.
Because the struct types for all productions and all non-terminals share the same namespace the result was not always better readable.
So, the names of production types are built by a concatenation of non-terminal (LHS) and the right-hand side (RHS) which you suggested.
enum Expr {
    CommentExpr(ExprCommentExpr),
    Let(ExprLet),
}

struct ExprCommentExpr { ... }
struct ExprLet { ... }

If I hadn't done this, I would regularly end up with results like this:
enum Expr {
    CommentExpr(CommentExpr),
    Let(Let0),
}

// Type derived for production x
// Expr: Let;
struct Let0 { ... }

// Type derived for non-terminal Let
struct Let { ... }

The first variant produces a bit more clutter and the second is disambiguated by adding numbers to the type names.
I would also be interested in your opinion about this decision. It would be easy to change this decision.
Thanks in advance
Jörg

@jsinger67
Prefixing production types with LHS seems nice. I came up with the following example:
Expr: Variable
    | ...
    ;
Type: Variable
    | ...
    ;

It generates:
 enum Expr {
    Variable(ExprVariable),
    ...
}
struct ExprVariable {...}
enum Type {
    Variable(TypeVariable),
    ...
}
struct TypeVariable {...}

I would like to split this issue into three separate ones.

Deduce the variant name from its right-hand side.
Omit struct generation for a variant if its right-hand side is a single item.
Use Box as little as possible, like:

At the moment when recursion occurs.
If the type size is large. (We may don't need this behavior, and it would be a too-early optimization)

I added two new issues:
#37 and #38

Closed with c8140d4

This feature has created a wonderful, inspiring experience. Thanks a lot!

I'm happy to improve the overall usability.
And it' was your proposal and I owe you that ☺
Part 2 is on a good way in the meantime 💪


text:
Building an object from a heterogeneous collection

So "data" can be a heterogeneous collection. Our clientside guys ask us for an ability to map that collection to definite fields by type.
Example
{
  "data": [
    {
      "id": 1,
      "type": "a",
      "attributes": {"k":10}
    },
    {
      "id": 2,
      "type": "a",
      "attributes": {"k":42}
    },
    {
      "id": 1,
      "type": "b",
      "attributes": {"m":"n", "s":100}
    },
  ]
}

We need to convert it to
{
  "field_a": [
    {
      "id": 1,
      "type": "a",
      "attributes": {"k":10}
    },
    {
      "id": 2,
      "type": "a",
      "attributes": {"k":42}
    },
  ],
  "field_b": [
    {
      "id": 1,
      "type": "b",
      "attributes": {"m":"n", "s":100}
    },
  ]
}

and later to
{
  "field_a": [
    {
      "k":10
    },
    {
      "k":42
    },
  ],
  "field_b": [
    {
      "m":"n",
      "s":100
    },
  ]
}

It's needed in order to use straight mapping to templates: we have to know how to address to a collection of "a" type and of "b" type.
So we decided to use "meta"
{
  "meta": {
    "schema": [
      {"name":"field_a", "type":"a"},
      {"name":"field_b", "type":"b"},
    ]
  }
}

Are we doing something wrong? Are there any best practices for handling heterogeneous collections in "data"? Any advice is appreciated.

This question should be asked on http://discuss.jsonapi.org/.
Could you do something along these lines before sending it to the template?
const data = [
  { id: "1", type: "a", attributes: { field: "1a" } },
  { id: "1", type: "b", attributes: { field: "1b" } }
];
const namespacedData = data.reduce(function (result, item) {
  const type = item.type;
  if (!result[type]) {
    result[type] = [];
  }
  result[type].push(item);
  return result;
}, {});

Sorry, moving to http://discuss.jsonapi.org/t/building-an-object-from-a-heterogeneous-collection/47 .

authors: ksimka tkellen

repo: json-api/json-api


text:
only top-level member may be defined by extension

An extension may introduce it's own top-level member. E.g. the atomic operations extension defines the additional top-level members atomic:operations and atomic:results.
So far the specification enforced that a JSON:API document has either data, errors or meta top-level member. Even if there is another top-level member introduced by an applied extension.
This is not desirable. And it was not intended. It is likely that some implementations would ignore that requirement. Even the examples given in official atomic operations extension are ignoring it:

POST /operations HTTP/1.1
Host: example.org
Content-Type: application/vnd.api+json;ext="https://jsonapi.org/ext/atomic"
Accept: application/vnd.api+json;ext="https://jsonapi.org/ext/atomic"

{
  "atomic:operations": [{
    "op": "add",
    "href": "/blogPosts",
    "data": {
      "type": "articles",
      "attributes": {
        "title": "JSON API paints my bikeshed!"
      }
    }
  }]
}

A meta top-level member with an empty object could be added to fulfill that requirement. The example payload from atomic operations extensions would be changed like the following:

  POST /operations HTTP/1.1
  Host: example.org
  Content-Type: application/vnd.api+json;ext="https://jsonapi.org/ext/atomic"
  Accept: application/vnd.api+json;ext="https://jsonapi.org/ext/atomic"

  {
    "atomic:operations": [{
      "op": "add",
      "href": "/blogPosts",
      "data": {
        "type": "articles",
        "attributes": {
          "title": "JSON API paints my bikeshed!"
        }
      }
-   }]
+   }],
+   "meta": {}
  }

But there doesn't seem to be any value in doing so. Instead we should relax the constraint of the base spec to better support this use case of extensions.
I see two potential options to address the issue:

We could relax the base spec to not enforce any top-level member. To do so, we would replace MUST with MAY in the sentence.- A document **MUST** contain at least one of the following top-level members:
+ A document **MAY** contain at least one of the following top-level members:

We could keep the requirement but add top-level members defined by an applied extension as a forth option.  A document **MUST** contain at least one of the following top-level members:

  * `data`: the document's "primary data".
  * `errors`: an array of [error objects](#errors).
  * `meta`: a [meta object][meta] that contains non-standard meta-information.
+ * a member defined by an applied extension.

I tend toward the second approach:

A JSON:API document without any top-level member would not have any value. I think we should disallow this case in the base spec.
Allowing a JSON:API document without data, errors or meta top-level member even if no extension is applied, could be considered a breaking change.
As extension did not exist in v1.0 changing semantics only in case an extension is applied, is not a breaking change.

@jelhan I'm sorry for not following this topic earlier, but allowing extensions to define the only member in top-level document is a breaking change.

Allowing a JSON:API document without data, errors or meta top-level member even if no extension is applied, could be considered a breaking change.

This is really the case here: A 1.0 parser ignores the atomic:operations member and is left with a top-level member without any member at all, which is invalid.
1.0 requires at least data, links or meta as a top-level member, so your example with an empty meta member is a valid workaround.
  POST /operations HTTP/1.1
  Host: example.org
  Content-Type: application/vnd.api+json;ext="https://jsonapi.org/ext/atomic"
  Accept: application/vnd.api+json;ext="https://jsonapi.org/ext/atomic"

  {
    "atomic:operations": [{
      "op": "add",
      "href": "/blogPosts",
      "data": {
        "type": "articles",
        "attributes": {
          "title": "JSON API paints my bikeshed!"
        }
      }
-   }]
+   }],
+   "meta": {}
  }

Sure, this workaround is a bit annoying, but would keep BC with 1.0. The same goes for relationship objects, see #1644.
The changes in this PR should be part of 2.0 instead of 1.1. And the examples in the atomic extension should mention this temporary workaround until 2.0 is released.

@Art4 Content negotiation between client and server prevents that issue. A client requests that a server applies an extension via Accept request header. If the server does not support v1.1 (or if it does not support that specific extension), the server must reject the request with a 406 Not Acceptable response.

@jelhan Good point, thank you very much. Sadly this way version 1.0 is not forward compatible with 1.1, but at least 1.1 is backward compatible to 1.0.
My mistake was that after reading e.g. this comment I assumed that JSON:API would be forward compatible.
I will adjust my parser with this in mind. Thank you for your patient.

It's forward compatible. A server implementing v1.0 handles every request to apply an extension as not supporting that specific extension.
But I see that it gets problematic if a library only implements parts of the processing rules. In your case the library seems to be limited to parsing a JSON:API document. But not implementing the content negotiation. I would recommend to document in that case that it only supports JSON:API documents without any extension applied. As extensions can define additional processing rules, a JSON:API document cannot be parsed ignoring applied extensions.


text:
A possible improvement for htmlSafeSet

ROUTINE ======================== k8s.io/kubernetes/vendor/github.com/json-iterator/go.(*Stream).WriteStringWithHTMLEscaped in /Users/gaopeng/Workplace/GOPATH/src/k8s.io/kubernetes/vendor/github.com/json-iterator/go/feature_stream_string.go
     2.94s      4.46s (flat, cum)  6.67% of Total
         .          .    216:}
         .          .    217:
         .          .    218:var hex = "0123456789abcdef"
         .          .    219:
         .          .    220:// WriteStringWithHTMLEscaped write string to stream with html special characters escaped
      20ms       20ms    221:func (stream *Stream) WriteStringWithHTMLEscaped(s string) {
      30ms      470ms    222:	stream.ensure(32)
         .          .    223:	valLen := len(s)
         .          .    224:	toWriteLen := valLen
         .          .    225:	bufLengthMinusTwo := len(stream.buf) - 2 // make room for the quotes
      20ms       20ms    226:	if stream.n+toWriteLen > bufLengthMinusTwo {
         .          .    227:		toWriteLen = bufLengthMinusTwo - stream.n
         .          .    228:	}
         .          .    229:	n := stream.n
      10ms       10ms    230:	stream.buf[n] = '"'
         .          .    231:	n++
         .          .    232:	// write string, the fast path, without utf8 and escape support
         .          .    233:	i := 0
     510ms      510ms    234:	for ; i < toWriteLen; i++ {
     300ms      300ms    235:		c := s[i]
     1.31s      1.31s    236:		if c < utf8.RuneSelf && htmlSafeSet[c] {
     470ms      470ms    237:			stream.buf[n] = c
      70ms       70ms    238:			n++
         .          .    239:		} else {
         .          .    240:			break
         .          .    241:		}
         .          .    242:	}
      60ms       60ms    243:	if i == valLen {
      60ms       60ms    244:		stream.buf[n] = '"'
      60ms       60ms    245:		n++
         .          .    246:		stream.n = n
      20ms       20ms    247:		return
         .          .    248:	}
         .          .    249:	stream.n = n
         .      1.08s    250:	writeStringSlowPathWithHTMLEscaped(stream, i, s, valLen)
         .          .    251:}
         .          .    252:
         .          .    253:func writeStringSlowPathWithHTMLEscaped(stream *Stream, i int, s string, valLen int) {
         .          .    254:	start := i
         .          .    255:	// for the remaining parts, we process them char by char

This is the time cost from my profiling, I guess htmlSafeSet looking up key by map costs much time, what if it uses array structure and let ASCII key as index of array?

can you propose a pull request?

Sorry..., it's already an array, if I can reduce the time cost, I will propose another request:)

authors: ggaaooppeenngg taowen

repo: json-iterator/go


text:
Q : Is there any way to write JSON Path to get value of next element in an array based on previous element ?

JSON :
[
[
"value11",
"text1",
"value12"
],
[
"value21",
"text2",
"value22"
],
[
"value31",
"text3",
"value32"
],
[
"value41",
"text4",
"value42"
]
]
Expected :
Path :  #$[if matches "searchtext"] next|previous
Searchtext : text1 output (get next value) : value12 output (get previous value) : value11
Searchtext : text2 output (get next value) : value22 output (get previous value) : value21
Thanks in advance.

Never mind got json path : $[?(@[1] == "text1")].[0]

Is it possible to use wildcard * inside expression [?([*] == "text1")] ?
@valery1707 @kysnm

repo: json-path/JsonPath


text:
incompatiable tests when both contentEncoding and contentMediaType specified

consider the following test from the testsuite:
    {
        "description": "validation of binary-encoded media type documents",
        "schema": {
            "contentMediaType": "application/json",
            "contentEncoding": "base64"
        },
        "tests": [
            {
                "description": "an invalid base64 string that is valid JSON; validates true",
                "data": "{}",
                "valid": true
            }
        ]
    }

as per the test suite, the same test in:

draft7 says valid: false
but in draft2019-09 it says valid: true

I checked Incompatible Changes section in website, but did not find anything related.
can someone explain this behaviour, and what is the change in specification that changed this behaviour

As of 2019-09 these keywords are purely annotative by default.
This was noted in https://json-schema.org/draft/2019-09/release-notes.html#content-vocabulary.

If i understand correctly now they are just annotations similar to title, description.
By default they do not get validated.
To validate them, user has to explicitly tell the validator to do so.

authors: karenetheridge santhosh-tekuri

repo: json-schema-org/JSON-Schema-Test-Suite


text:
test: percent-encoded char in json-pointer

from https://www.rfc-editor.org/rfc/rfc6901#section-6:
   A JSON Pointer can be represented in a URI fragment identifier by
   encoding it into octets using UTF-8 [[RFC3629](https://www.rfc-editor.org/rfc/rfc3629)], while percent-encoding
   those characters not allowed by the fragment rule in [[RFC3986](https://www.rfc-editor.org/rfc/rfc3986)].

test passed with impl https://github.com/santhosh-tekuri/boon
if test is ok, will add to remaining drafts

This looks fine to me.  My only question is whether the JSON Schema Test Suite should test JSON Pointer things.

whether the JSON Schema Test Suite should test JSON Pointer things

Testing that the URI fragment is properly parsed into the underlying json pointer seems a very relevant thing to me.
[Tests pass over here; thanks!]

There's a bunch of similar tests here of various characters that are encoded in json pointers and in URIs (or both); these could be adapted to the form used by the test suite, but some are more suited to testing result output, as there's only so much you can test with just an expected valid/invalid response.
https://github.com/karenetheridge/JSON-Schema-Modern/blob/v0.564/t/errors.t#L1012-L1142

my intentioned is not have a test for each reserved char. I just want to test that an implementation percent-decodes the raw fragment before using

This case is already tested here (see "percent%field"). I'm going to close this as a duplicate.

authors: gregsdennis jdesrosiers karenetheridge santhosh-tekuri


text:
File Upload Type?

Does this library support normal File Upload type?

Yes there is a file type
https://github.com/jsonform/jsonform/blob/master/lib/jsonform.js#L463

authors: nextgensolutionsusa tchapi

repo: jsonform/jsonform


text:
RTHack attendee pack

This should contain all the info that people need to get started with hacking.
credentials / details

[ ] pusher credentials *
[ ] pubnub credentials *
[ ] peerjs details
[ ] firebase details
[ ] google apps / chromecast login (?)
[ ] pusher feed - twitter
[ ] pusher feed - JSOxford replies
[ ] pusher feed - train data

per person

example api apps

[ ] pusher tweets
[ ] pusher train data
[ ] pubnub drawing
[ ] peerjs video call
[ ] peerjs datachannel

example library apps

[ ] socket.io
[ ] faye
[ ] scuttlebutt (?)

We could drop these into a private gist (1 per attendee)?
Also for the group docs we could add:

[ ] Getting started (pointers to good walkthroughs, tutorials and docs)
[ ] Project ideas (people can PR any suggestions prior to the event and it saves getting stuck with the blank page)

How much rail data would you like? I can setup a subscription to the global country wide channel but it depends on pusher/pubnub limits.
It can get pretty busy

Would just the Oxfordshire area be enough?

Planning to set up a RTHack GitHub org?

@AverageMarcus that seems like a bit of overkill. I'd suggest we just fork the repos into JSOxford:

Each group creates a GH repo for the day
We collect those repo URLs at the end of the day & create JSOxford forks

That way updates can be merged in with a PR, or ( possibly more likely) the repo can stagnate.
Another option would be to create the appropriate GH repos during the day under JSOxford, and just add the members to each repo, but that seems like an administrative burden.

Seems reasonable.

I think the second option is best - it worked pretty well as sushack, means everything is in the one place.
I've added you both to the owners group which will allow you to create repos and admin teams

Ooooo the power! :smiling_imp:

:fire:

Might be worth mentioning if we use PubNub:
http://www2.pubnub.com/training-webinars
How to use the PubNub JavaScript API
April 14, 2015 / 9:00am - 11:00am PT

Hey @benfoxall, how's this coming along? Do we have the content and just need to make up the pack? I've got a little time this evening I could help with that.

I could also help if needed too.

authors: AverageMarcus benfoxall spikeheap tomlane


text:
Remove timeout for loading jsapi

As discussed in #364

Note that public/_js/test.js is autogenerated/overwritten after running npm run build. Could you update gulpfile.js as described here please?
Then, once https://github.com/bestiejs/benchmark.js/pull/188 is merged, this PR can be merged too, and this change can be deployed. 👍

Yes sorry, I slowly start to understand how jsperf is build :)
I changed the PR.

Thank you so much for looking into this and fixing this long-standing issue 👍 You’re a hero!

Okay, so here’s what needs to happen before this can be merged:

https://github.com/bestiejs/benchmark.js/pull/188 is merged
Benchmark.js tags a new release that contains the abovementioned changes
Our package.json updates the devDependency to point to this new release. See https://github.com/jsperf/jsperf.com/blob/master/CONTRIBUTING.md#adding-new-dependencies

Would you be up for tackling item 3 (as part of this PR) when the time comes?

Of course.

Ok I updated benchmark and regenerated the shrinkwrap by doing:
rm -rf node_modules/ npm-shrinkwrap.json
npm i
npm shrinkwrap

One last thing before we merge this: could you run npm run build and commit the changes?

Done

authors: danez mathiasbynens


text:
Documentation

Is there any documentation that list for example, all the functions and variables in jspreadsheet-ce? This is a really great project, having this would be very helpful

https://bossanova.uk/jspreadsheet/v4/docs/quick-reference

authors: WalterOkumu hodeware

repo: jspreadsheet/ce


text:
fix: allow all github flavor markdown codeblock styles for examples

This PR adds additional checks for tilde fenced code blocks and indented code blocks when scoring a package on readme examples. Both fenced and indented codeblocks are checked for in the readme, whereas the @module JSDoc is only checked for fenced code blocks.
Closes #449

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

authors: CLAassistant katlyn

repo: jsr-io/jsr


text:
support darwin all architectures

fixes #19

the failure is due to some GH permissions in CI script that I haven't sorted out yet.  this change should not affect the image

authors: jsturtevant mweibel

repo: jsturtevant/windows-debug


text:
Use setuptools when available.

This PR makes use of setuptools, when available, allowing for easy windows build via
Microsoft Visual C++ Compiler for Python 2.7 as requested by @rsignell-usgs.

I verified that this works.  Super cool.   Finally, a lightweight way to build python binaries on windows, and from Microsoft!    Setuptools >6.0 can figure out where the compiler is, but distutils cannot.

@jswhit  poke?

@jswhit Let me know if you want me to close this or re-write in a clearer way.

Closing this...

authors: ocefpaf rsignell-usgs

repo: jswhit/pyproj


text:
Prevent error when the node-sass error does not contain a file

Fixes #156

Makes sense. Thx for pointing it out!

authors: jhnns jorrit

repo: jtangelder/sass-loader


text:
Update README.md

Add a link to the Helium instructions for setting up CubeCell and PlatformIO

Hello Mr. Hiller, thanks to your video and the additional information, I have now implemented this hack and my IKEA sensor is now running successfully in my weather station.
I would now like to integrate a sensor for the wind speed. I already have an anemometer, but I don't have the technology to couple it to helium using a CubeCell Board. Do you maybe have a sketch and decoder I can use? I'd appreciate some help as I'm still a beginner and not a programmer.
Thank you Ulli


text:
tests: Use pytest-tap

This will make Meson aware of the individual tests.
Depends on https://github.com/NixOS/nixpkgs/pull/185668
Unfortunately, pytest-tap obscures errors during test collection: https://github.com/python-tap/pytest-tap/issues/30

Looks like the only thing it gains us is returning the number of passed tests:
[1/2] Running all tests.
1/2 Validate desktop file        OK              0.01s
2/2 Unit tests                   OK              0.90s   5 subtests passed

Ok:                 2
Expected Fail:      0
Fail:               0
Unexpected Pass:    0
Skipped:            0
Timeout:            0

The failure state is much less informative (meson test --print-errorlogs does not seem to have an effect and we need to check the log file):
1/2 Validate desktop file        OK              0.01s
▶ 2/2 tests/test_autosquashing.py::test_autosquashing_amend_after_squash FAIL
2/2 Unit tests                   ERROR           0.69s   exit status 1
>>> MALLOC_PERTURB_=163 /nix/store/xz8645jq7fkz3d7hrxd80854iscj6d8a-python3.10-pytest-7.1.2/bin/py.test --tap-stream
――――――――――――――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――――――――――――――
stderr:

(test program exited with status code 1)
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

Summary of Failures:

2/2 Unit tests            ERROR           0.69s   exit status 1

Ok:                 1
Expected Fail:      0
Fail:               1
Unexpected Pass:    0
Skipped:            0
Timeout:            0

Compared to the current and default errorcode “test protocol”:
1/2 Validate desktop file        OK              0.01s
2/2 Unit tests                   OK              0.71s

Ok:                 2
Expected Fail:      0
Fail:               0
Unexpected Pass:    0
Skipped:            0
Timeout:            0

[1/2] Running all tests.
1/2 Validate desktop file        OK              0.01s
2/2 Unit tests                   FAIL            0.73s   exit status 1
>>> MALLOC_PERTURB_=177 /nix/store/xz8645jq7fkz3d7hrxd80854iscj6d8a-python3.10-pytest-7.1.2/bin/py.test
――――――――――――――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――――――――――――――
============================= test session starts ==============================
platform linux -- Python 3.10.5, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/jtojnar/Projects/nonemast
plugins: tap-3.3
collected 5 items

tests/test_autosquashing.py ....F                                        [100%]

=================================== FAILURES ===================================
____________________ test_autosquashing_amend_after_squash _____________________

    def test_autosquashing_amend_after_squash():
>       check_autosquashing(
            [
                "Hello",
                "squash! Hello\n\nfoo",
                "amend! Hello\n\nbar",
            ]
        )

tests/test_autosquashing.py:124:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

commit_messages = ['Hello', 'squash! Hello\n\nfoo', 'amend! Hello\n\nbar']

    def check_autosquashing(commit_messages: List[str]) -> None:
        commits = [
            FakeCommit(
                message=message,
            )
            for message in commit_messages
        ]
        update = PackageUpdate(
            subject="Foo",
            commits=commits,
        )

        expected = autosquash_commits_with_git(commit_messages)
        # Git forces two line breaks at the end.
        expected = [message.rstrip("\n") for message in expected]
>       assert [update.props.final_commit_message] == expected
E       AssertionError: assert ['bar'] == ['Hello\n\nfoo\n\nbar']
E         At index 0 diff: 'bar' != 'Hello\n\nfoo\n\nbar'
E         Use -v to get more diff

tests/test_autosquashing.py:80: AssertionError
----------------------------- Captured stderr call -----------------------------
Successfully rebased and updated refs/heads/main.
=========================== short test summary info ============================
FAILED tests/test_autosquashing.py::test_autosquashing_amend_after_squash - A...
========================= 1 failed, 4 passed in 0.44s ==========================
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

Summary of Failures:

2/2 Unit tests            FAIL            0.73s   exit status 1

Ok:                 1
Expected Fail:      0
Fail:               1
Unexpected Pass:    0
Skipped:            0
Timeout:            0

repo: jtojnar/nonemast


text:
Does sequencing summary file created by Guppy could work for nanopolish index ?

Hi ,
So sequencing summary file created by any base calling software can be used to accelate the process of nanopolish index ? Whatever it is Albacore, Guppy, or Flappie？Is there any requirement for the sequencing summary file that put into nanopolish index?
Best wishes,
David

Closing as this is a duplicate of a comment made in a different issue.
Jared

Thank you very much for your help!
Best wishes,
David.

repo: jts/nanopolish


text:
🛑 EDGAR is down

In 06a7983, EDGAR (https://www.edgar.com.ar/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: EDGAR is back up in fa51a3e after 10 minutes.

repo: juanLabonia/uptime


text:
Tagged devices should not have access permissions of their owning user

Bug description
I want to allow my personal devices to ssh into my servers but not allow my servers to ssh between each other. All devices belong to the same headscale user. My servers are tagged ssh, my personal devices are untagged and my user is in the sshuser group.
The Tailscale documentation states (https://tailscale.com/kb/1068/acl-tags/#authentication-and-authorization):

Once a device has been tagged, it loses the access permissions of the human user who tagged it, and acquires any access permissions granted to its tags. In other words, if you log into a device as dave@tailscale.com and then tag it with tag:server, the device no longer has any of the network permissions granted to dave@tailscale.com, and instead is subject to the access rules for tag:server. If the user who added the device is deleted, the device will remain.

According to the Tailscale documentation, I would expect a ACL allowing ssh from group:sshuser to tag:ssh to produce the described behaviour. All my untagged devices should be able to ssh into the tagged servers (which they do) but my servers are also able to ssh between each other.
To Reproduce
{
    "groups":{
        "group:sshuser":[
            "me"
        ]
    },
    "tagOwners": {
        "tag:ssh": ["me"]
    },
    "ssh": [
        {
            "action": "accept",
            "src": ["group:sshuser"],
            "dst": ["tag:ssh"],
            "users": ["allowlisted-user"]
        }
    ]
}

Context info

Headscale: v0.22.1

This seems like a security bug to me, since it does not match the behavior of tailscale. Can anyone with more in-depth knowledge comment on this?

Yes, you are right, they should be "detached" from the user when they are tagged. Right now we dont have the code necessary to handle this. I have removed the stale tag for further tracking.
Per now I would classify it as "ACLs are not fully implemented" rather than a security bug as we do not support all features.

Since there are various places in the headscale documentation, that link to https://tailscale.com/kb/1068/acl-tags, where the "detaching" behavior is described, I would still consider this a security bug. As a user reading the documentation, it is not clear, where and how headscale diverges from tailscale. This seems dangerous to me...

I don't think this should be marked as stale and forgotten...

I agree, removed the mark, we just have not had capacity to get to it.

I made a PR doing some of the untangeling work to make this possible, removing the username from magicdns names. Which should make this a tiny bit easier.

... removing the username from magicdns names.

Are there any suggested strategies for maintaining hostname continuity in the face of this change? This seems like a more-significant-than-usual breaking change in that it's likely to require changes not just to the headscale config but to potentially all services and clients on the tailnet that know each other by their MagicDNS name.
I see in https://github.com/juanfont/headscale/releases/tag/v0.23.0-beta1 that it suggests a temporary workaround:

use_username_in_magic_dns can be used to turn this behaviour on again, but note that this option will be removed when tags are fixed.

Does extra_records provide a path to maintain the existing MagicDNS entries? https://github.com/juanfont/headscale/blob/main/docs/dns-records.md discusses the config-format but is silent on whether the relationship between extra_records, base_domain, and auto-assigned MagicDNS entries. Is using extra_records to emulate the old username-style subdomains valid?
If one only cares about dns name continuity for the nodes registered to a single user, is modifying the base_domain of an existing tailscale instance a valid migration strategy? For example, chaging the base_domain from example.com to myuser.example.com such that all nodes now appear at the FQDN previously reserved for nodes registered to myuser.
I feel like this change in particular is likely to generate migration/support questions due to the very disruptive nature of changing existing names, some amount of migration guidance would be quite helpful as the release nears.

@kradalby do you consider the above approach as recommended, long-term "workaround" once dns.use_username_in_magic_dns is completely removed? If so, I'm going to follow-up with a PR for the DNS docs where this approach is documented for users.

I suppose it is a fair workaround, I would recommend not relying on the username based dns names as it will be hard to keep up to date for individuals, but if they are up for it, I suppose it doesnt hurt to call out that this is possible.

Just as a side-note, the IPv6 address used in the example is the same for both nodes: fd7a:115c:a1e0::2
server.bob is probably fd7a:115c:a1e0::3 instead.

server.bob is probably fd7a:115c:a1e0::3 instead.

Fixed, thx!

authors: almereyda kradalby mikelococo nblock vbrandl

repo: juanfont/headscale


text:
Add markdown.pandoc support.

Just a small edge case, I would be glad if you added it.

Thank you!

authors: jubnzv seiyagit


text:
chunking

Have you considered reinventing the sockproc protocol to serve data in chunks? Say for example
for generating an archive dynamically, seems to me you need to allocate the size of the output, then
write everything to the socket?

That is a good idea. You could redirect archive generation into a file, and then read from there directly, not via sockproc. However, i agree that it would be nice to have support for chunking in the protocol. Perhaps, it would be v1.1, for example, similar to how chunking works in http.

authors: bjne juce

repo: juce/sockproc


text:
Fix typo

stdout was missing the s

Ops, thanks :)


text:
Update README.md :

In the predict_config.json explanatory file, in the "overwrite" line: False, a few " " around False were missing.

Hi @TomCrey
Thank you for opening this PR. I just looked into the json documentation and figured out that it should be:
"overwrite": false

Could you test if false works for you?
Best wishes

This also means that the predict_config.json file is wrong, where it is currently "overwrite": "False".

With us, when we use :
"overwrite: false
the program refuses to run, displaying the following series of errors:
(cryocare_11) tcrey@GRE070809:~/Data/CryoCARE_test$ cryoCARE_predict.py --conf predict_config.json
2024-04-02 09:56:14.369308: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
Traceback (most recent call last):
  File "/home/tcrey/miniconda3/envs/cryocare_11/bin/cryoCARE_predict.py", line 175, in <module>
    main()
  File "/home/tcrey/miniconda3/envs/cryocare_11/bin/cryoCARE_predict.py", line 114, in main
    config = json.load(f)
  File "/home/tcrey/miniconda3/envs/cryocare_11/lib/python3.8/json/__init__.py", line 293, in load
    return loads(fp.read(),
  File "/home/tcrey/miniconda3/envs/cryocare_11/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/home/tcrey/miniconda3/envs/cryocare_11/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/home/tcrey/miniconda3/envs/cryocare_11/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 7 column 16 (char 188)

but when we use :
"overwrite": "false"
everything works.

ok I've just read the documentation and it must be used as a boolean, so write "overwrite": false and not "overwrite": False as written in the README.
my PR would be to change this in the README

And the predict_config.json should be updated accordingly.
I am trying to reproduce your error.

Can you provide a copy of the config file which fails for you? I am not able to reproduce the issue with the following code:
import json
with open('predict_config.json', 'r') as f:
    config = json.load(f)

sure, here's the version of predict_config.json that doesn't work for us:
{   "path": "./output_model/model_test.tar.gz",   "even": "rec_l11_ts_008_half1.rec",   "odd": "rec_l11_ts_008_half2.rec",   "n_tiles": [4,4,4],   "output": "denoised.rec",   "overwrite": False,   "gpu_id": 0 }

I see, but changing it to:
{
    "path": "./output_model/model_test.tar.gz",
    "even": "rec_l11_ts_008_half1.rec",
    "odd": "rec_l11_ts_008_half2.rec",
    "n_tiles": [4,4,4],
    "output": "denoised.rec",
    "overwrite": false,
    "gpu_id": 0
}

works for you?

I've just seen on this link: "https://github.com/juglab/cryoCARE_pip/commit/a3eb51c3d2ab7c1bc52067315774dab6e4e86576" that the error had already been reported but that overwrite had therefore been declared as a string and not as a boolean... I think it's a boolean, isn't it?

I see, but changing it to:
{
    "path": "./output_model/model_test.tar.gz",
    "even": "rec_l11_ts_008_half1.rec",
    "odd": "rec_l11_ts_008_half2.rec",
    "n_tiles": [4,4,4],
    "output": "denoised.rec",
    "overwrite": false,
    "gpu_id": 0
}

works for you?

yes I think

so you'd have to change both the README and this commit: "https://github.com/juglab/cryoCARE_pip/commit/a3eb51c3d2ab7c1bc52067315774dab6e4e86576"

As far as I can tell it must be a boolean:  https://github.com/juglab/cryoCARE_pip/blob/master/cryocare/scripts/cryoCARE_predict.py#L119
As far as I know
if "False":
   do-someting

will always evaluate to true, because "any-text" is evaluated to true.

I see, but changing it to:
{
    "path": "./output_model/model_test.tar.gz",
    "even": "rec_l11_ts_008_half1.rec",
    "odd": "rec_l11_ts_008_half2.rec",
    "n_tiles": [4,4,4],
    "output": "denoised.rec",
    "overwrite": false,
    "gpu_id": 0
}

works for you?

yes I think

Can you update the README.md and prediction_config.json to reflect this change?
As far as I can tell this must be the correct implementation.
Thank you and best wishes!

yes of course!

I think all is good!

Thank you very much!

authors: TomCrey tibuch


text:
global testsetup

It would be nice to have a global testsetup, which applies to all test items and replaced the default global setup (for instance, that optionally does not bring all package exported names into scope, by import MyPkg instead of using MyPkg.)
Please let me know if I can do anything to help.

I believe that we can workaround this issue with @testsnippet nowadays, but the snippet is run every time on every @testitem if I understand it correctly.

authors: juliohm lmiq


text:
Best way to completely destroy an animation?

With a reference to an animation, is calling animation.pause() the best way to destroy it? The name might imply things are left around for a possible animation.play() later.

Pausing the animation will remove it from the main loop, so it should be enough.
An other way to remove an animation is by balling anime.remove(target), where target is the element(s) you want to stop animating, it's useful when you want to animate some elements that are supposedly still animated somewhere else.

Thank you!

Hello, I would like to get a more complete answer, I understand how js will work as a collector, I would like to clarify whether something like this should be done for security reasons?
<script setup lang="ts">
import { onBeforeUnmount } from "vue";
import anime from "animejs/lib/anime.es";

let animeInstance: ReturnType<typeof anime> | null | undefined = null

function onLeave(el: Element | null | undefined, done: () => any) {
  if (el) {
    animeInstance = anime({
      targets: el,
      width: [`${el.scrollWidth}px`, `0px`],
      opacity: [1, 0],
      duration: 200,
      easing: 'easeOutExpo',
      complete: () => {
        done()
      },
    });
  }
}

function onEnter(el: Element | null | undefined, done: () => any) {
  if(el) {
    animeInstance = anime({
      targets: el,
      width: ['0px', `${el.scrollWidth}px`],
      opacity: [0, 1],
      duration: 200,
      easing: 'easeInExpo',
      begin: () => {
      },
      complete: () => {
        done()
      },
    });
  }
}

onBeforeUnmount(() => {
  if(animeInstance) {
    animeInstance.pause()
    animeInstance = undefined
  }
})
</script>

<template>
  <transition
    @enter="onEnter"
    @leave="onLeave"
    :css="false"
  >
    <slot name="default"></slot>
  </transition>
</template>

<script setup lang="ts">
import anime from "animejs/lib/anime.es.js"
import {onBeforeUnmount, onMounted, ref} from "vue";

const element = ref<HTMLElement | null>(null)
let animeInstance: ReturnType<typeof anime> | null | undefined = null

onMounted(() => {
  if(element.value) {
    animeInstance = anime({
      targets: element.value,
      rotate: '1turn',
      duration: 2600,
      easing: 'linear',
      loop: true
    });
  }
});

onBeforeUnmount(() => {
  if(animeInstance) {
    animeInstance.pause()
    animeInstance = undefined

    element.value = null
  }
})
</script>

<template>
  <div class="ui-icon-loading" ref="element">
    <svg width="800" height="800" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
      <path fill="currentColor" d="M512 1024c-69.1 0-136.2-13.5-199.3-40.2C251.7 958 197 921 150 874c-47-47-84-101.7-109.8-162.7C13.5 648.2 0 581.1 0 512c0-19.9 16.1-36 36-36s36 16.1 36 36c0 59.4 11.6 117 34.6 171.3 22.2 52.4 53.9 99.5 94.3 139.9 40.4 40.4 87.5 72.2 139.9 94.3C395 940.4 452.6 952 512 952c59.4 0 117-11.6 171.3-34.6 52.4-22.2 99.5-53.9 139.9-94.3 40.4-40.4 72.2-87.5 94.3-139.9C940.4 629 952 571.4 952 512c0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 0 0-94.3-139.9 437.71 437.71 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.2C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3s-13.5 136.2-40.2 199.3C958 772.3 921 827 874 874c-47 47-101.8 83.9-162.7 109.7-63.1 26.8-130.2 40.3-199.3 40.3z"/>
    </svg>
  </div>
</template>

<style lang="scss">
.ui-icon-loading > svg {
  display: block;
  width: 100%;
  height: auto;
}
</style>

Thank you!

authors: GurovDmitriy juliangarnier kellyselden

repo: juliangarnier/anime


text:
reset method in animations with duration 0

Describe the bug
reset() method seems not to work when the animation has been initialised with duration: 0
I'm not sure about if the problem is a bug or a misunderstanding from the documentation.
To Reproduce
Steps to reproduce the behavior:

Go to https://codepen.io/rraya/pen/PozzKqW
Move the cursor inside the red box
Move the cursor outside the red box

Expected behavior
The red box has been restored to its original position after step 3.
Additional context
Don't pay attention to the example and its functionality. It's very silly and its goal is only to show the problem.

animejs use Promise to resolve complete animation
when there is no duration "It can't start, or it can't even end or complete"

authors: rraya sadeghbarati


text:
Survey: Who is self-hosting Circular?

Hello all,
I'm currently considering a backend rewrite for Circular, switching from PHP and maybe using a different DB engine.
Who is currently self-hosting Circular, so that I can assess how much of an impact that would represent on the community?
Best,
Julien

I will put some work into an API rewrite in the coming days. Still undecided between Node and Go. Anyone interested in helping out?

I vote for node!

I'd like to help if you decide to make it in go.

Guys – I actually have a branch sitting on my work computer with a few days' worth of work into rewriting Circular in Node. I need to get my shit together and actually push the branch now :)
If anyone wants to help: I'm using http://passportjs.org/ for social authentication, mongojs as my Mongo wrapper, and node-twitter.
Pretty swamped by work right now, but I'll try and put some work into finishing this at the end of the month (25/26).
Commenting here will help me keep it up, cheers!

I'm disappointed by your choice, but thanks for all the work you've done so far.

Hi Julien, are you currently still working on Circular? I've been busy building a docker image from the current source and would love to help.

@danielpalstra is it possible to share your docker image?

Hi @patbaumgartner I would love to share it, but unfortunately I don't have it anymore since I stopped using circular. I was using the composer https://hub.docker.com/r/composer/composer/ docker image in combination with the standard Mongo image.

authors: cabbeer danielpalstra julien-c patbaumgartner potomak

repo: julien-c/Circular


text:
Update to Cats 1.1.0

Tests passed for me locally, but with dependency version issues that seem to be isolated to newts. I suspect the relevant issue there is: https://github.com/julien-truffaut/newts/issues/22

Thanks @pettyjamesm, it might be better to bump newts first

@julien-truffaut I'm not familiar with the newts at all, is that likely as simple as just editing the build.sbt in that repo too? Do you want me to submit a separate PR there?

yes it should be as straightforward as that, it is supposed to be a minor cats upgrade. If you have time, it would be great.

Newts PR: https://github.com/julien-truffaut/newts/pull/27

I released newts 0.3.1 with your PR.

Updated the PR to use newts 0.3.1

Thanks @pettyjamesm

Any idea when this will land in a new release version?

@pettyjamesm 1.5.1-cats is released

authors: julien-truffaut pettyjamesm

repo: julien-truffaut/Monocle