text:
Arbitrary parameter passed over to DSBulk, cqlsh and the like

Is your feature request related to a problem? Please describe.
Apparently, it is not possible to pass every possible DSBulk command-line param when invoking through Astra CLI.
Describe the solution you'd like
A way to pass any parameter over to the invoked target utility (dsbulk, cqlsh) "as is".
Describe alternatives you've considered
Mapping all parameters, and their syntax and constraints, within astra-cli to later reconstruct the full command-line when invoking the target utility is a double effort and would require maintenance every time these tools evolve.
Disclaimer: I know this is not easy given the current tools to parse astra-cli's command line parameters.

DSBulk allows more than 100 parameters and some are overlapping each other.
Instead of mapping everything (and the burden to keep them updated), a subset is provided in the class. To get the list use astra help db load
For advanced configurations where the options are not provided in the command line us the DSBULK configuration file.:  --dsbulk-config <DSBULK_CONF_FILE>
NAME
        astra db load - Load data leveraging DSBulk

SYNOPSIS
        astra db load [ {-cf | --config-file} <CONFIG_FILE> ]
                [ {-conf | --config} <CONFIG_SECTION> ] [ -delim <delim> ]
                [ -dryRun ] [ --dsbulk-config <DSBULK_CONF_FILE> ]
                [ -encoding <ENCODING> ] [ -header <header> ]
                [ {-k | --keyspace} <KEYSPACE> ] [ -logDir <log directory> ]
                [ {-m | --schema.mapping} <mapping> ]
                [ -maxConcurrentQueries <maxConcurrentQueries> ]
                [ -maxErrors <maxErrors> ] [ --no-color ]
                [ {-o | --output} <FORMAT> ] [ --schema.query <QUERY> ]
                [ -skipRecords <skipRecords> ] [ {-t | --table} <TABLE> ]
                [ --token <AUTH_TOKEN> ] [ -url <url> ] [ {-v | --verbose} ]
                [--] <DB>

OPTIONS
        -cf <CONFIG_FILE>, --config-file <CONFIG_FILE>
            Configuration file (default = ~/.astrarc)

        -conf <CONFIG_SECTION>, --config <CONFIG_SECTION>
            Section in configuration file (default = ~/.astrarc)

        -delim <delim>
            The character(s) to use as field delimiter. Field delimiters
            containing more than one character are accepted.

        -dryRun
            Enable or disable dry-run mode, a test mode that runs the command
            but does not load data.

        --dsbulk-config <DSBULK_CONF_FILE>
            Not all options offered by the loader DSBulk are exposed in this
            CLI

        -encoding <ENCODING>
            The file name format to use when writing. This setting is ignored
            when reading and for non-file URLs.

        -header <header>
            Enable or disable whether the files to read or write begin with a
            header line.

        -k <KEYSPACE>, --keyspace <KEYSPACE>
            Keyspace used for loading or unloading data.

        -logDir <log directory>
            Optional filter

        -m <mapping>, --schema.mapping <mapping>
            The field-to-column mapping to use, that applies to both loading
            and unloading; ignored when counting.

        -maxConcurrentQueries <maxConcurrentQueries>
            The maximum number of concurrent queries that should be carried in
            parallel.

        -maxErrors <maxErrors>
            The maximum number of errors to tolerate before aborting the entire
            operation.

        --no-color
            Remove all colors in output

        -o <FORMAT>, --output <FORMAT>
            Output format, valid values are: human,json,csv

        --schema.query <QUERY>
            Optional to unload or count

        -skipRecords <skipRecords>
            The number of records to skip from each input file before the
            parser can begin to execute. Note that if the file contains a
            header line, that line is not counted as a valid record. This
            setting is ignored when writing.

        -t <TABLE>, --table <TABLE>
            Table used for loading or unloading data. Table names should not be
            quoted and are case-sensitive.

        --token <AUTH_TOKEN>
            Key to use authenticate each call.

        -url <url>
            The URL or path of the resource(s) to read from or write to.

        -v, --verbose
            Verbose mode with log in console

authors: clun hemidactylus

repo: datastax/astra-cli


text:
CDB-32 auth improvements trunk

Relevant commits start with the word PORT
Based on latest apache/cassandra/trunk
Contains Gradle-changes (for easier local testing)

porting changes LGTM on a high-level (a detailed review is impossible because of the amount of changes). Base branch should be updated from trunk to astra

source: gharchive/pull-request

authors: nastra snazy

repo: datastax/cassandra

license_type: permissive

license_source: github-api


text:
JAVA-961 Log a warning when an older version of guava (< 16.0.1) is found.

For JAVA-961.
Introduces a check on reference of CodecRegistry where is creating a TypeToken<Map<String,String>> improperly sets the type information for the value type (Object/V instead of String) a warning is logged.
I'm unsure if this is the best way of determining this, but it seems pretty reliable.
When running with Guava 15.0 to 16.01, the following will happen when attempting to resolve a codec with more than one parameterized type argument:
WARN  [2015-10-22 18:57:20,308] [main] - Detected Guava Issue #1635 which indicates that a version of Guava less than 16.01 is in use.  This may introduce codec resolution issues in the driver, please upgrade to Guava 16.01 or later.
INFO  [2015-10-22 18:57:20,406] [main] - Did not find Netty's native epoll transport in the classpath, defaulting to NIO.
INFO  [2015-10-22 18:57:20,912] [main] - Using data-center name 'datacenter1' for DCAwareRoundRobinPolicy (if this is incorrect, please provide the correct datacenter name with DCAwareRoundRobinPolicy constructor)
INFO  [2015-10-22 18:57:20,912] [main] - New Cassandra host /127.0.0.1:9042 added
INFO  [2015-10-22 18:57:20,913] [main] - New Cassandra host /127.0.0.2:9042 added
INFO  [2015-10-22 18:57:20,913] [main] - New Cassandra host /127.0.0.3:9042 added
Exception in thread "main" com.datastax.driver.core.exceptions.CodecNotFoundException: Codec not found for requested operation: [varchar <-> V]
	at com.datastax.driver.core.CodecRegistry.notFound(CodecRegistry.java:711)
	at com.datastax.driver.core.CodecRegistry.createCodec(CodecRegistry.java:558)
	at com.datastax.driver.core.CodecRegistry.findCodec(CodecRegistry.java:539)
	at com.datastax.driver.core.CodecRegistry.maybeCreateCodec(CodecRegistry.java:613)
	at com.datastax.driver.core.CodecRegistry.createCodec(CodecRegistry.java:556)
	at com.datastax.driver.core.CodecRegistry.findCodec(CodecRegistry.java:539)
	at com.datastax.driver.core.CodecRegistry.access$200(CodecRegistry.java:153)
	at com.datastax.driver.core.CodecRegistry$TypeCodecCacheLoader.load(CodecRegistry.java:246)
	at com.datastax.driver.core.CodecRegistry$TypeCodecCacheLoader.load(CodecRegistry.java:243)
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3522)
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2315)
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2278)
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2193)
	at com.google.common.cache.LocalCache.get(LocalCache.java:3932)
	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3936)
	at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4806)
	at com.datastax.driver.core.CodecRegistry.lookupCodec(CodecRegistry.java:516)
	at com.datastax.driver.core.CodecRegistry.codecFor(CodecRegistry.java:485)
	at com.datastax.driver.core.AbstractGettableByIndexData.codecFor(AbstractGettableByIndexData.java:81)
	at com.datastax.driver.core.AbstractGettableByIndexData.getMap(AbstractGettableByIndexData.java:346)
	at com.datastax.driver.core.AbstractGettableData.getMap(AbstractGettableData.java:26)
	at com.datastax.driver.core.AbstractGettableByIndexData.getMap(AbstractGettableByIndexData.java:335)
	at com.datastax.driver.core.AbstractGettableData.getMap(AbstractGettableData.java:26)
	at com.datastax.driver.core.AbstractGettableData.getMap(AbstractGettableData.java:233)

In this case the pre-emptive warning should give the user enough information to know that they need to upgrade guava.
In the case of using older versions of guava (<= 14.01) a NoSuchMethodError is raised while registering default codecs because TypeToken.isPrimitive is missing:
WARN  [2015-10-22 19:02:54,807] [main] - Detected Guava Issue #1635 which indicates that a version of Guava less than 16.01 is in use.  This may introduce codec resolution issues in the driver, please upgrade to Guava 16.01 or later.
Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.reflect.TypeToken.isPrimitive()Z
	at com.datastax.driver.core.TypeCodec.<init>(TypeCodec.java:406)
	at com.datastax.driver.core.TypeCodec.<init>(TypeCodec.java:400)
	at com.datastax.driver.core.TypeCodec$BlobCodec.<init>(TypeCodec.java:947)
	at com.datastax.driver.core.TypeCodec$BlobCodec.<clinit>(TypeCodec.java:944)
	at com.datastax.driver.core.TypeCodec.blob(TypeCodec.java:248)
	at com.datastax.driver.core.CodecRegistry.<clinit>(CodecRegistry.java:180)
	at com.datastax.driver.core.Configuration$Builder.build(Configuration.java:267)
	at com.datastax.driver.core.Cluster$Builder.getConfiguration(Cluster.java:1228)
	at com.datastax.driver.core.Cluster.<init>(Cluster.java:113)
	at com.datastax.driver.core.Cluster.buildFrom(Cluster.java:182)
	at com.datastax.driver.core.Cluster$Builder.build(Cluster.java:1249)

In this case I consider the warning adequate information to know that the user needs to upgrade as well.
Thoughts on this strategy/idea?   Is the error descriptive enough? I can add tests (can add an integration test to osgi-examples) if this sounds ok.

I agree with both of your comments :+1:

I wonder if WARN is enough; there is little chance that the driver could work properly with a bad Guava version.

Good point, I think it is possible things could work with an older version of C* that doesn't use map types in schema tables and if the user doesn't use them, but it definitely isn't something we should support so I agree that this should be raised to ERROR, will do!

Not sure that CodecRegistry is the right place for this check. What about a separate SanityChecks class whose static initialization could be triggered from the static initialization of some central class e.g. Cluster?

I think that is probably the right thing to do.  Are there any other sanity checks that you think would be worth adding?  I think this is also a good idea as we'd use a separate logger which would allow the user to configure visibility separate from the CodecRegistry logger.

Are there any other sanity checks that you think would be worth adding?

Maybe we can add there a check for the presence of native epoll transport. I think it's currently done when NettyOptions is instantiated.
It might also be a good place to print useful information about the driver (its version mostly). This is a feature that has been requested already in the mailing list, although I can't find a Jira ticket for it.

Updated based on suggestions.   I added a static block in Cluster that calls SanityChecks.check() so the check is done at most once and as soon as Cluster is referenced.  The new error message looks like such:
< 15.0:
ERROR [2015-10-23 10:45:36,885] [main] - Detected Guava issue #1635 which indicates that a version of Guava less than 16.01 is in use.  This may introduce codec resolution issues or other problems in the driver, please upgrade to Guava 16.01 or later.
Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.reflect.TypeToken.isPrimitive()Z
	at com.datastax.driver.core.TypeCodec.<init>(TypeCodec.java:406)
	at com.datastax.driver.core.TypeCodec.<init>(TypeCodec.java:400)
	at com.datastax.driver.core.TypeCodec$BlobCodec.<init>(TypeCodec.java:947)
	at com.datastax.driver.core.TypeCodec$BlobCodec.<clinit>(TypeCodec.java:944)
	at com.datastax.driver.core.TypeCodec.blob(TypeCodec.java:248)
	at com.datastax.driver.core.CodecRegistry.<clinit>(CodecRegistry.java:158)
	at com.datastax.driver.core.Configuration$Builder.build(Configuration.java:267)
	at com.datastax.driver.core.Cluster$Builder.getConfiguration(Cluster.java:1233)
	at com.datastax.driver.core.Cluster.<init>(Cluster.java:118)
	at com.datastax.driver.core.Cluster.buildFrom(Cluster.java:187)
	at com.datastax.driver.core.Cluster$Builder.build(Cluster.java:1254)

15.0-16.0:
ERROR [2015-10-23 10:47:15,851] [main] - Detected Guava issue #1635 which indicates that a version of Guava less than 16.01 is in use.  This may introduce codec resolution issues or other problems in the driver, please upgrade to Guava 16.01 or later.
INFO  [2015-10-23 10:47:16,002] [main] - Did not find Netty's native epoll transport in the classpath, defaulting to NIO.
WARN  [2015-10-23 10:47:16,422] [main] - Error while computing token map for datacenter DC1: could not achieve replication factor 1 (found 0 replicas only), check your keyspace replication settings.
INFO  [2015-10-23 10:47:16,422] [main] - Using data-center name 'datacenter1' for DCAwareRoundRobinPolicy (if this is incorrect, please provide the correct datacenter name with DCAwareRoundRobinPolicy constructor)
INFO  [2015-10-23 10:47:16,423] [main] - New Cassandra host /127.0.0.1:9042 added
INFO  [2015-10-23 10:47:16,423] [main] - New Cassandra host /127.0.0.2:9042 added
INFO  [2015-10-23 10:47:16,423] [main] - New Cassandra host /127.0.0.3:9042 added
Exception in thread "main" com.datastax.driver.core.exceptions.CodecNotFoundException: Codec not found for requested operation: [varchar <-> V]
	at com.datastax.driver.core.CodecRegistry.notFound(CodecRegistry.java:689)
	at com.datastax.driver.core.CodecRegistry.createCodec(CodecRegistry.java:536)
	at com.datastax.driver.core.CodecRegistry.findCodec(CodecRegistry.java:517)
	at com.datastax.driver.core.CodecRegistry.maybeCreateCodec(CodecRegistry.java:591)
	at com.datastax.driver.core.CodecRegistry.createCodec(CodecRegistry.java:534)
	at com.datastax.driver.core.CodecRegistry.findCodec(CodecRegistry.java:517)
	at com.datastax.driver.core.CodecRegistry.access$200(CodecRegistry.java:153)
	at com.datastax.driver.core.CodecRegistry$TypeCodecCacheLoader.load(CodecRegistry.java:224)
	at com.datastax.driver.core.CodecRegistry$TypeCodecCacheLoader.load(CodecRegistry.java:221)
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3524)
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2317)
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2280)
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2195)
	at com.google.common.cache.LocalCache.get(LocalCache.java:3934)
	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3938)
	at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4821)
	at com.datastax.driver.core.CodecRegistry.lookupCodec(CodecRegistry.java:494)
	at com.datastax.driver.core.CodecRegistry.codecFor(CodecRegistry.java:463)
	at com.datastax.driver.core.AbstractGettableByIndexData.codecFor(AbstractGettableByIndexData.java:81)
	at com.datastax.driver.core.AbstractGettableByIndexData.getMap(AbstractGettableByIndexData.java:346)
	at com.datastax.driver.core.AbstractGettableData.getMap(AbstractGettableData.java:26)
	at com.datastax.driver.core.AbstractGettableByIndexData.getMap(AbstractGettableByIndexData.java:335)
	at com.datastax.driver.core.AbstractGettableData.getMap(AbstractGettableData.java:26)
	at com.datastax.driver.core.AbstractGettableData.getMap(AbstractGettableData.java:233)

Maybe we can add there a check for the presence of native epoll transport. I think it's currently done when NettyOptions is instantiated.

I think it is ok to leave that as is because I don't think in the general use case that using epoll is going to help for the most part unless you have a lot of socket connections (over a thousand).

It might also be a good place to print useful information about the driver (its version mostly). This is a feature that has been requested already in the mailing list, although I can't find a Jira ticket for it.

Big :+1: on exposing the driver version somehow.  If guava had something like that checking the version would be much easier than what is being done here.   I think it would be good to expose that as a static value on Cluster or somewhere else and then to also log it at some level as you suggest.  I'll open up another ticket if there isn't one already.

lgtm :+1:

re: exposing driver version: I was thinking we could expose something like the JVM properties and thus include more information (driver version, protocol version, jdk required, etc.). Part of these should also be logged when initializing.

@tolbertam #494 is now merged.

@adutra Thanks! Will update this shortly.

Rebased and added tests to the osgi-examples project.  This should be good to go, let me know if there are any issues.  If merging feel free to squash before merge.

Sorry to be late to the party, but is it enough to log an error? Since we're sure the driver won't work with that version, it would make sense to throw an unchecked exception like IllegalStateException.

Hmm, I think I agree with you.  There is a small chance of things working on an older version of C* and not using Maps, but I think it might be wrong to give the user the illusion that things would work just fine, even with logging that error as future minor releases may break a user if we utilize features in guava 16.01 that aren't in older versions.  I'll change this to throw an ISE unless anyone strongly disagrees.

Updated.  An IllegalStateException is now thrown.  I also updated the message to use stronger language.  Because SanityChecks.check() is done at static initialization of Cluster an ExceptionInIniitializer exception is thrown with IllegalStateException as the cause.

lgtm, are you ok for merging?

I didn't have any pending changes so it's good with me if @olim7t is ok with it.

Yeah, I'm ok with it too.

Cool, I'll rebase and merge it, thanks!

repo: datastax/java-driver

license_source: bigquery


text:
Unable to specify loadBalancerIP on Services

I'd like to set an internal static IP to a service with type LoadBalancer, but there is no configuration available to define this.
Could we get a service.loadBalancerIP option for pulsar services so this could be set via helm?

@liamgib - thanks for identifying this issue. #141 should resolve the issue. Please let me know if there is a service you think I missed.

source: gharchive/issue

authors: liamgib michaeljmarshall

repo: datastax/pulsar-helm-chart


text:
Added error checking when copying the public key from the certificate.

Fixes #251

Hi, thanks for the fix!
Is there any chance this will be merged soon?

Thanks!

repo: datatheorem/TrustKit

license: mit


text:
ambassador throw "Service token file does not exists"

hi,
i use ambassador-no-rbac.yaml to start ambassador:
ambassador-no-rbac.yaml:
---
apiVersion: v1
kind: Service
metadata:
  labels:
    service: ambassador-admin
  name: ambassador-admin
spec:
  type: NodePort
  ports:
  - name: ambassador-admin
    port: 8877
    targetPort: 8877
  selector:
    service: ambassador
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: ambassador
spec:
  replicas: 3
  template:
    metadata:
      annotations:
        sidecar.istio.io/inject: "false"
        "consul.hashicorp.com/connect-inject": "false"
      labels:
        service: ambassador
    spec:
      containers:
      - name: ambassador
        image: quay.io/datawire/ambassador:0.50.2
        resources:
          limits:
            cpu: 4
            memory: 7Gi
          requests:
            cpu: 3
            memory: 5Gi
        env:
        - name: AMBASSADOR_VERIFY_SSL_FALSE
          value: "true"
        - name: AMBASSADOR_NO_KUBEWATCH
          value: "true"
        - name: AMBASSADOR_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        ports:
        - name: http
          containerPort: 80
        - name: https
          containerPort: 443
        - name: admin
          containerPort: 8877
        livenessProbe:
          httpGet:
            path: /ambassador/v0/check_alive
            port: 8877
          initialDelaySeconds: 30
          periodSeconds: 3
        readinessProbe:
          httpGet:
            path: /ambassador/v0/check_ready
            port: 8877
          initialDelaySeconds: 30
          periodSeconds: 3
      nodeSelector:
        LB: ambassador
      hostNetwork: true
      restartPolicy: Always

$ kubectl  get all
NAME                                        READY   STATUS             RESTARTS   AGE
pod/ambassador-cc99cc497-64bcd              0/1     CrashLoopBackOff   7          15m
pod/ambassador-cc99cc497-h5j6v              0/1     CrashLoopBackOff   7          15m
pod/ambassador-cc99cc497-hcmbr              0/1     Error              7          12m
pod/kubernetes-dashboard-7b45bf8696-cmtpv   1/1     Running            0          4h46m
pod/nginx-deployment-77657b454b-bffrn       1/1     Running            0          31h
pod/nginx-deployment-77657b454b-wpblh       1/1     Running            0          31h

NAME                           TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)       AGE
service/kubernetes             ClusterIP   10.96.0.1        <none>        443/TCP       5d9h
service/kubernetes-dashboard   ClusterIP   10.102.208.251   <none>        80/TCP        4h46m
service/my-nginx               NodePort    10.107.216.68    <none>        80:8080/TCP   30h

NAME                                   READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/ambassador             0/3     3            0           15m
deployment.apps/kubernetes-dashboard   1/1     1            1           4h46m
deployment.apps/nginx-deployment       2/2     2            2           31h

NAME                                              DESIRED   CURRENT   READY   AGE
replicaset.apps/ambassador-cc99cc497              3         3         0       15m
replicaset.apps/kubernetes-dashboard-7b45bf8696   1         1         1       4h46m
replicaset.apps/nginx-deployment-77657b454b       2         2         2       31h

$ kubectl  logs pod/ambassador-cc99cc497-64bcd
2019-04-17 12:19:59 kubewatch [24 TMainThread] 0.50.2 INFO: kubewatch starting: mode 'cluster-id' ambassador_config_dir '/no/such/path' envoy_config_file '/dev/null' debug 'False' delay '1.0' pid 'None'
2019-04-17 12:19:59 kubewatch [24 TMainThread] 0.50.2 INFO: namespace default, watching all namespaces
2019-04-17 12:19:59 kubewatch [24 TMainThread] 0.50.2 WARNING: kubewatch failed!
Traceback (most recent call last):
  File "/ambassador/kubewatch.py", line 527, in <module>
    main()
  File "/usr/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/ambassador/kubewatch.py", line 518, in main
    watcher.run(id_only=True)
  File "/ambassador/kubewatch.py", line 334, in run
    v1 = kube_v1()
  File "/usr/lib/python3.6/site-packages/ambassador-0.0.0.dev0-py3.6.egg/ambassador/utils.py", line 432, in kube_v1
  File "/usr/lib/python3.6/site-packages/kubernetes/config/incluster_config.py", line 93, in load_incluster_config
    cert_filename=SERVICE_CERT_FILENAME).load_and_set()
  File "/usr/lib/python3.6/site-packages/kubernetes/config/incluster_config.py", line 45, in load_and_set
    self._load_config()
  File "/usr/lib/python3.6/site-packages/kubernetes/config/incluster_config.py", line 62, in _load_config
    raise ConfigException("Service token file does not exists.")
kubernetes.config.config_exception.ConfigException: Service token file does not exists.
AMBASSADOR: kubewatch cluster-id exited with status 1
AMBASSADOR: shutting down (1)

why i use no-rbac.yaml,but still thorw “Service token file does not exists” error？
thank you for your answer～～～

who can help me?thank you great god～～～～！

I am also facing the same error for kube podOperator, is this fixed..? or any solution??
[2020-03-04 14:50:22,276] {taskinstance.py:887} INFO - Executing <Task(KubernetesPodOperator): passing-task> on 2020-03-04T14:49:21.640386+00:00
[2020-03-04 14:50:22,280] {standard_task_runner.py:53} INFO - Started process 11 to run task
[2020-03-04 14:50:22,337] {logging_mixin.py:112} INFO - Running %s on host %s <TaskInstance: kubernetes_sample.passing-task 2020-03-04T14:49:21.640386+00:00 [running]> kubernetessamplepassingtask-15170bcf93ae48c9bc273b146fc9bbd3
[2020-03-04 14:50:22,357] {taskinstance.py:1128} ERROR - Service token file does not exists.
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/airflow/models/taskinstance.py", line 966, in _run_raw_task
    result = task_copy.execute(context=context)
  File "/usr/local/lib/python3.7/site-packages/airflow/contrib/operators/kubernetes_pod_operator.py", line 200, in execute
    config_file=self.config_file)
  File "/usr/local/lib/python3.7/site-packages/airflow/contrib/kubernetes/kube_client.py", line 103, in get_kube_client
    client_conf = _get_kube_config(in_cluster, cluster_context, config_file)
  File "/usr/local/lib/python3.7/site-packages/airflow/contrib/kubernetes/kube_client.py", line 41, in _get_kube_config
    config.load_incluster_config()
  File "/usr/local/lib/python3.7/site-packages/kubernetes/config/incluster_config.py", line 94, in load_incluster_config
    cert_filename=SERVICE_CERT_FILENAME).load_and_set()
  File "/usr/local/lib/python3.7/site-packages/kubernetes/config/incluster_config.py", line 45, in load_and_set
    self._load_config()
  File "/usr/local/lib/python3.7/site-packages/kubernetes/config/incluster_config.py", line 62, in _load_config
    raise ConfigException("Service token file does not exists.")
kubernetes.config.config_exception.ConfigException: Service token file does not exists.
[2020-03-04 14:50:22,358] {taskinstance.py:1151} INFO - Marking task as UP_FOR_RETRY

Even I am facing same issue
Traceback (most recent call last):
File "main.py", line 10, in
config.load_incluster_config()
File "/home/ec2-user/eks-lambda/lib/python3.8/site-packages/kubernetes/config/incluster_config.py", line 118, in load_incluster_config
InClusterConfigLoader(
File "/home/ec2-user/eks-lambda/lib/python3.8/site-packages/kubernetes/config/incluster_config.py", line 54, in load_and_set
self._load_config()
File "/home/ec2-user/eks-lambda/lib/python3.8/site-packages/kubernetes/config/incluster_config.py", line 73, in _load_config
raise ConfigException("Service token file does not exists.")
kubernetes.config.config_exception.ConfigException: Service token file does not exists.

authors: btrx-rkazi jinyuchen724 micemuni

repo: datawire/ambassador


text:
kubernaut claim should print a reminder to set the KUBECONFIG env var

Rather than just telling you where the configuration was written, it should remind you to set KUBECONFIG. Something like
$ kubernaut claim
Warning: Kubernaut does not currently support LoadBalancer services!
Wrote kubernetes config to /home/ark3/.kube/kubernaut
Reminder: export KUBECONFIG=/home/ark3/.kube/kubernaut

This will be in 0.2. It supports detection and assistance for Bash, Fish and Zsh.

repo: datawire/kubernaut


text:
Update instructions incorrect

Hi @datlechin,
In your readme and on discuss you mention for updating:
composer update datlechin/flarum-simple-tour-guide:"*"

The composer update command does not take a constraint though and this command will error when executed. If you want to guarantee people keep upgrading to the latest version, use the require command - identical to the install instructions you gave.
composer require datlechin/flarum-simple-tour-guide:"*"

🙏 keep up the good work!
Daniël.

Hi thanks, I've updated the update instructions

authors: datlechin luceos

repo: datlechin/flarum-simple-tour-guide

license: MIT


text:
Generated migrations do not run deletions first

I recently ran into an issue where generated migrations wouldn't run because the delete operations ran after updates and creation actions.
Unless I am missing some detail, I think it's safe to assume that all delete operations should happen at the start of a generated migration. It would be great to have this implemented as an improvement to the generated migration files.
This issue occurred to us when we replaced a modular content field with a links field on a model that had the same name - the script didn't create the delete action for the modular content field before the create action of the links field with the same name, causing the migration to fail and manual debugging was required alongside adjusting the generated migration file.
Hope this ticket helps, really appreciate all the tooling around this and it helps us recommend and evangelise DatoCMS as the platform to use. Many thanks 🙌

Hi @Loque-, thanks for the report! It would really help us if you could send us a reproducible case:

Project ID
Names of the environments involved
Generated script
Modified script

If you're not comfortable sharing these info here, please send us a message at support@datocms.com referencing this issue. We'll take a quick snapshot of your project, so that we'll have the exact setup of yours, and fix the issue.

Hey sure thing - it will be really easy for me to make a reproducible case, but I have a client demo this week, will hopefully be able to spin something up soon. Cheers 🙌

authors: Loque- stefanoverna

repo: datocms/cli


text:
Post-fix cleanup for #149

#149 introduced a series of fixes for our modules. This issue is here to track the cleanup we need to do now that it's merged, as we're currently running a bunch of forks.

[x] Formalize the bindings-browserify fork. It's currently used through aliasify; we should probably find a way to either contribute this back to browserify or have exist as a separate module.
[x] Merge substack/insert-module-globals#66 into browserify; we're currently running a fork

I think those are the steps so far; if we need more we should update this issue. cc/ @juliangruber does this cover the topics alright? Anything I missed?

This has been resolved; bankai can support electron now https://github.com/yoshuawuyts/bankai/pull/125

repo: datproject/dat-desktop


text:
Container Detail Modal

I'd like to:

add / move "remove" to this
add "pull container"
add "restart"?
make the image link to the image location if it looks like a url (eg: ghcr.io/... will take you do a page about the release)
include N lines of logs?

Maybe opening the modal should request even more detail from the api, and then we can easily prototype what we want in here.

there's now an endpoint
/api/containers/detail/:id
which will return everything from docker inspect, so we can mine that for info in the modal.

repo: davedean/tdcm


text:
Offer/answer exchanged on 200OK + ACK seem not supported

Hello Dave! We have scenarios that our SIP servers send offerless INVITES, expecting the SDPs to be exchanged ahead at 200OK and ACK. I tried to use Drachtio in this case, but it seems it is not supported (maybe it is but not explicitly documented?).
Currently I am using createUAC() and createUAS() for handling it at both sides. I can indeed send offerless INVITEs from my UAC Drachtio and have them received at the UAS Drachtio and also  can answer the 200OK with the offer SDP. But it happens something strange in the UAC Drachtio, it answers back with the same SDP in the ACK with is the same received but with zeroed IPs in the o= line and in the t= line. What is need is to fully control the SDPs being generated at all places (INVITE, SDP and also ACK), not only during initial handling, but also during re-INVITES. It seems nowadays I do not have a way to handle SDPs for the ACK, not only at the sending side (UAC role) but also in the receiving one (UAS role).
Do you think we could have that implemented?
Thanks a lot and have a great weekend.

some of this may work, but it is not well documented.
On the UAC side, try setting opts.noAck to true, ie.
srf.createUAC(uri, {noAck: true, ...}, ..

This is going to cause the method to resolve not with a SipDialog, but with an object containing the remote SDP offered in the 200 OK by the remote side, and an 'ack' function that you must call, passing your own SDP.  And that function, when called, then resolves into your dialog.
Whew...that's a bit complicated!  (sorry).
So then, something like this:
const {sdp, ack}= await createUAC(uri, {noAck: true});
// sdp = the remote sdp; ack is a function..

// now allocate your local sdp, by whatever means..
const uac = await ack(localSdp);

were you able to try this out?
https://drachtio.org/docs#sending-a-3pcc-invite

Hi Dave. Yes, that worked fine to me, thanks!

authors: CelsoGalo davehorton

repo: davehorton/drachtio-server


text:
E/Genrate: Attempt to invoke virtual method 'void com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView.setImage(com.davemorrissey.labs.subscaleview.ImageSource)' on a null object reference

Please provide as much of the following information as possible. Please do not raise issues to ask for help developing your app.
Expected behaviour
Actual behaviour
Steps to reproduce
(Include your setup code, and where relevant, your layout XML)
Affected devices
(Specific devices, screen densities, SDK versions)
Affected images
(Attach images you have problems with)

pod_imageview.setImage(ImageSource.bitmap(bitmap));

Closing because the issue template has been left blank, and no layout XML or view init code was provided. Your view is null when you try to set the image.

authors: anujkv davemorrissey


text:
Move this project's directories into a single one

Just a proposal to help keep repo structure clean:

(a) consolidate everything (bin, lib, .docker) into a single .bowline or .docker directory
(b) keep bin but move lib into .docker

I like this. Having everything in .bowline (one place) and using source .bowline/activate to (among other things) add .bowline/bin to $PATH would simplify upgrading bowline and keep the repository clean. And there would be just one place for all bowline files.

I like this too. Going with .bowline for example, it would also be a good spot for storing config as mentioned on another issue. (https://github.com/davenuman/bowline/issues/30#issuecomment-189955530)  Perhaps .bowline/config/env for setting environment veriables used by bowline.

authors: davenuman kostajh openprivacy

repo: davenuman/bowline


text:
Update refined to 0.9.25

Updates eu.timepit:refined from 0.9.20 to 0.9.25.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "eu.timepit", artifactId = "refined" } ]

labels: library-update, semver-patch

Superseded by #460.

repo: davenverse/cormorant


text:
Grafana was not linked in traefik anymore

This pull request fixes https://github.com/davestephens/ansible-nas/issues/437. Guess the stats should be migrated to a role as well, but didn't want to mix fixing a bug and changing from task to a role in the same commit.

Good spot, thank you! 👍

authors: davestephens delgurth

repo: davestephens/ansible-nas


text:
Component for nested route is not rendering

Hi,
For some reason, my child route aren't rendering, throwing error 36.
/src/routes/Admin/index.js
import { injectReducer } from '../../store/reducers'

export default (store) => ({
  path : 'admin',
  childRoutes: [
    require('./routes/Users').default(store)
  ],
  /*  Async getComponent is only invoked when route matches   */
  getComponent (nextState, cb) {
    /*  Webpack - use 'require.ensure' to create a split point
     and embed an async module loader (jsonp) when bundling   */
    console.log('/admin/ get component');
    require.ensure([], (require) => {
      /*  Webpack - use require callback to define
       dependencies for bundling   */
      const Admin = require('./containers/AdminContainer').default;
      const reducer = require('./modules/admin').default;

      /*  Add the reducer to the store on key 'main'  */
      injectReducer(store, { key: 'cache', reducer });

      /*  Return getComponent   */
      cb(null, Admin)

      /* Webpack named bundle   */
    }, 'admin')
  }
})

/src/routes/Admin/components/Admin.js
...
  render() {
    {this.props.children ||

}
  }
...

/src/routes/Admin/routes/Users/index.js
import { injectReducer } from '../../../../store/reducers'

export default (store) => ({
  path : 'users',
  /*  Async getComponent is only invoked when route matches   */
  getComponent (nextState, cb) {
    /*  Webpack - use 'require.ensure' to create a split point
     and embed an async module loader (jsonp) when bundling   */
    console.log('/admin/user/ get component');
    require.ensure([], (require) => {
      /*  Webpack - use require callback to define
       dependencies for bundling   */
      console.log('/admin/user/ require called')
      const Users = require('./containers/UsersContainer').default
      const reducer = require('./modules/users').default

      /*  Add the reducer to the store on key 'main'  */
      injectReducer(store, { key: 'users', reducer })

      /*  Return getComponent   */
      cb(null, Users)

      /* Webpack named bundle   */
    }, 'admin_users')
  }
})

console:
index.js:12/admin/ get component
index.js:9/admin/user/ get component
index.js:13/admin/user/ require called

Any help would be greatly, greatly appreciated!

Turns out it's because my Users component has errors. Closing!

repo: davezuko/react-redux-starter-kit


text:
Express middleware that takes in object as input variable breaks automatic parameter detection

Description
Using a middleware that has an object input field in a route breaks the auto-detection of the body parameter in the route. I tried removing this input field and saw that the body parameter was detected.
Example code
// Middleware definition in its own file. e.g. middlewares/middleware.js
module.exports.doSomething = ({propertyOne, propertyTwo}) => {
  return (req, res, next) => {
    next()
  }
}

// Called from route in another file. e.g. routes/index.js
router.post(
  "/",
  doSomething({ propertyOne: "abc", propertyTwo: "abc" }),
  (req, res, next) => {
    // THIS IS NOT DETECTED AUTOMATICALLY
    const sampleBodyParam = req.body.sampleBodyParam;

    res.send()
  }
)

Hi @aiavci. Thank you for opening the issue.
I'll check this and handle as soon as possible.

The version 2.7.6 has fixed this. But if the problem persists, let me know.

authors: aiavci davibaltar

repo: davibaltar/swagger-autogen


text:
Access pagination details in json

While its great to have the pagination inside the headers, is it possible to render out these details such as next_page_url, total_items in the json view?
I tried using kaminari's page local var but it wasnt available.

Hey @samjbmason. This currently isn't supported by the api-pagination gem, and I'm unlikely to add support for it in the future. The purpose of the api-pagination gem is stated in the README:

Paginate in your headers, not in your response body. This follows the proposed RFC-5988 standard for Web linking.

For now, I'll be continuing to designate this gem as a solution solely to paginate in the headers and not the response body.

authors: davidcelis samjbmason

repo: davidcelis/api-pagination


text:
Update check for "No Results" when searching by name

This should fix issue #93 that I opened. I check now for the div that encapsulates the full sized image (which is only found on the page when a single card is returned).
Also, sorry for the 2nd pull request. Messed up my first attempt at fixing it. Tested it extensively in my bot this time.

Just realized my mistake here, So the cardImage div won't work, looking to see if there's a better thing to use to fix this.

So the cardImage div won't work, looking to see if there's a better thing to use to fix this.

Okay. Let me know if you discover a solution. :)

There we go, I got it figured out and I also wrote a test around it (haven't used coffeescript or mocha, so it took me a bit to figure out).
The issue ended up being that if you use a fun word like "test" as the name, then it would return multiple cards back (like here http://gatherer.wizards.com/Pages/Search/Default.aspx?name=+[test]). I decided to also check for the "Additional Sort:" text that appears on these pages to weed them out from providing false positives.

It look like my machine did some edits to the gatherer.js file when I was setting up my machine, do you want me to revert that file and then add in the changes that actually matter?

You should run make setup to install dependencies, then make fixtures to generate the fixtures, then make test to run the unit tests.
You should update the CoffeeScript files rather than the JavaScript files (see #92, for example). You shouldn't use your globally installed coffee to generate the JavaScript files – simply run make.
All this talk of Make assumes you're on OS X or some flavour of Linux. Is this the case?

Yeah, I'm running ubuntu of some variant on my laptop, I'll give that a shot, thanks :)

Fixed the coffeescript file and all the tests passed, and make setup made life about 10 times easier. Are there any other finer details I may be missing?

This is looking good. Please remove the lib changes from the pull request. The generated files are automatically updated as part of the release process, so needn't be updated with each commit.
Also, please squash the commits. :)

somehow I just blew those up, let me fix whatever I have going on...

Somehow when I attempted to squash, I blew up everything in my branch and then some, I'm going to start fresh taking the notes that we have here and fixing this real quick. If I make another pull request for that I apologize in advance, first time contributing outside of team assignments at school.

Looks like it didn't want to update when I purged and redid this, So I'll have to move this into a new request, apologies for my Version Control mishap!

authors: CBXZero davidchambers

repo: davidchambers/tutor

license: WTFPL


text:
Possibility to unswipe an item

Unless I'm wrong, there's currently no easy way to unswipe an item after is has been swiped. This limits usages to swipe to dismiss only. There should be a method to reset the item to initial poisition.
Meanwhile, can you indicate me a way to achive this?

@christophehenry, this is a know limitation of the Android classes in use, I can't do anything.

I don't get it. It is possible to manually unswipe the item with the gesture. So it may be possible to control the animate the item, right?

Ok, I looked at the code. I get where the problem lies. I also found this solution, which looks like a hack but does the trick. Would you consider this solution as a temporary patch?

@christophehenry, do you mean adapter.notifyItemChanged(viewHolder.getAdapterPosition()); ?
I think I've tried, but I do not remember well if the solution was acceptable.
However, yes, you can.

Yes. I mean that exactly. Even though it feels hacky, it solves my problem. Ok if I add it as a solution to the documentation until that part is rewritten using another class?

@christophehenry, no problem, go ahead.

Done.

authors: christophehenry davideas

repo: davideas/FlexibleAdapter


text:
Event Stats

Could you add the option fo stats from events like Archive Missions, Junkenstein's Revenge, etc?

Unfortunately neither the API nor the official website doesn't provide that type of data by far, so i can't add that, I'm sorry

repo: davidetacchini/OverBot


text:
I love me some salt on my hash

Please salt the hashes of the passwords. Thanks!

Fixed in bd3002f

authors: Haacked kiliman

repo: davidfowl/JabbR


text:
Add IMD image reader

Hello David,
Because i wanted to write imd files natively from fluxengine, i added a IMD image reader.
After reading the IMD image the reader presents what it has read to assist with determining the writer settings and options.
Greetings Wybren

Looks good --- I left a couple of comments, and there's the build failure to fix.
Also, could you add a paragraph describing the .imd format in doc/using.md, please? Under 'Input and output specifiers'.

Learning a lot about github and C++. I think i managed to get everything in order. Please let me know if you miss anything. The format is described in detail in the enclosed
imd.pdf
pdf

No, thank you for creating this. I'm just happy I can help with small things. One thing in the documentation of imd you write that the geometry in the imd file will be used. That's what I would like, but I didn't know how to code it. So now it just displays the geometry and you have to give a new write command with the appropriate geometry... Something to improve...

repo: davidgiven/fluxengine


text:
Continuously running carousel (ticker, marquee, ..)

Hello everybody
I'm using Embla already in a project and it's great. Thank you for the amazing work!
Now I have the use case to build a carousel which runs continuously like a "stock market" ticker. So no speed up and slow down. Do you think it's easy to build something like that with Embla? Where would be a good starting point?

Hello Robin (@openscript),
Thank you for your question.
Is this CodeSandbox what you’re looking for?
Let me know if I understod you correctly and it did help.
Best,
David

Hello David (@davidcetinkaya)
Thank you for the very quick response.
The CodeSandbox shows exactly what I want, except that it doesn't start running after it has been dragged, but I think it's not to hard to implement this for the settle hook? :)

Hi again Robin (@openscript),
Yes I think the settle hook is appropriate for what you want to achieve. So something along those lines:
embla.on('settle', () => {
  /*
    Run the same code that scrolls the carousel slowly.
    You probably want to extract it into a reusable function
  */
})

Please let me know if you have other requirements or questions.
Kindly,
David

Thank you for taking the time and helping me out.
I've tried to implement it for a while, but I get very strange side-effects. I thought a video of the screen would be the easiest to show it:
https://drive.google.com/file/d/1rBKMEgZJFVjHT49NW9YL5_2PpxtwU3BJ/view
My code looks like this:
import styled from '@emotion/styled';
import { useEmblaCarousel } from 'embla-carousel/react';
import { EmblaCarousel } from 'embla-carousel/vanilla';
import { Engine } from 'embla-carousel/vanilla/components/engine';
import React, { useEffect } from 'react';

const Viewport = styled.section`
  overflow: hidden;
`;

const Container = styled.div`
  display: flex;
`;

const Slide = styled.div`
  position: relative;
  min-width: 100%;
`;

export type TickerProps = {};

export function Ticker() {
  const [tickerRef, ticker] = useEmblaCarousel({ loop: true, dragFree: true, containScroll: 'trimSnaps' });

  const startScrolling = (engine: Engine, ticker: EmblaCarousel) => {
    engine.scrollBody.useSpeed(0.01);
    engine.scrollTo.index((ticker.scrollSnapList().length || 0) - 1, -10);
  };

  useEffect(() => {
    const engine = ticker?.dangerouslyGetEngine();

    if (engine && ticker) {
      ticker?.on('settle', () => startScrolling(engine, ticker));

      startScrolling(engine, ticker);
    }
  }, [ticker]);

  return (
    <Viewport ref={tickerRef}>
      <Container>
        <Slide>111111111111</Slide>
        <Slide>222222222222</Slide>
        <Slide>333333333333</Slide>
      </Container>
    </Viewport>
  );
}

Would it help you if I set up a CodesandBox? Do you have a Embla TypeScript React sandbox I could use?

Hello Robin (@openscript),
Thank you for the additional information. Seems like I might have misunderstood your requirements.

It seems like the original has the same problem without my modifications. If you wait until it comes to the end, it is also getting slower and slower.

This is intentional. The requirements mentioned in issue #105 was to show users that the content is scrollable. So the idea was to start scrolling from the beginning and stop scrolling at the end of the content. The easing at the beginning and the end was not an issue there.
So let's go through your use case and requirements. Is this what you're looking for:

The content should scroll automatically without any easing whatsoever as long as the carousel isn't dragged.
It should scroll and loop endlessly.
It should stop when the user drags the carousel and start over when the carousel has settled

?
Kindly,
David

Hello David (@davidcetinkaya)
It made me happy to see your kind reply. Thank you!
Yes, I think we are talking about the same use cases. Easing is not required, but it would maybe be nice for the speed up at the beginning and after dragging. Easing at the end doesn't make sense to me, if it's an endless loop.
I want to achieve something like on the https://www.gatsbyjs.com/ website, but with dragging:

Have a great day,
Robin

Hi Robin (@openscript),
Thanks for the example link. That helps 🙂. I'll see if I can create a CodeSandbox for you. I'll let you know how it goes when I've had the chance to do so.
Best,
David

Hello again Robin (@openscript),
I've created a CodeSandbox for you. This sandbox basically re-creates the internal Embla animation loop without the easing.
Please let me know if it meets your requirements.
Kindly,
David

Hi David (@davidcetinkaya)
Thank you so much! This is exactly what I wanted to achieve :)
Have a great day
Robin

Hi Robin (@openscript),
Just realized that you should probably stop the auto scrolling and start it again by hooking on to the Embla resize hook.
embla.on('resize', () => {
  stopAutoScroll();
  startAutoScroll();
});

I will update the CodeSandbox when I get the chance, but feel free to implement it yourself until then.
Have a nice week!
David

Hello, this solution isn't working since version 4.4.0. Loop does not working properly. Is here any solution for 4.5.3 please? To reproduce it you can only swap version in your CodeSandobox or my modified version with 4.5.3 and faster scroll.

Hi @filiptvarek,
Thanks for noticing this. It stopped working because I refactored some internal methods in later versions. I've updated the original CodeSandbox in this comment and it should work as expected now.
Cheers,
David

I works. Thank you very much

How can i make the carousel have 3 images per page. Rather than one big one?

@davidjerleke thanks! Ran into another issue though... When i set the slide size to 10%, slidesToScroll: 5, there's a huge gap on the left side, and slides start to disappear.  How do i fix this issue?

@Github010101011 I have no idea what your setup looks like so I don't know why you have a huge gap.

hey @davidjerleke thank you for creating this example! is there a way to control the speed of the carousel when implementing it like this?

Curious on how to do this with Vanilla JS?

@ameliagroen @samdhoffman As for VanillaJS, I am fiddling around with this myself. And this seems to be working for me.
But tbh I am not very familiar with the requestAnimationFrame API. So I don't know if this might lead to any drawbacks.

let rafId = 0;

const animate = () => {
  if(!embla) return
  const engine = embla.dangerouslyGetEngine();
  engine.location.add(-0.025); // controls the speed
  engine.target.set(engine.location);
  engine.scrollLooper.loop(-1);
  engine.slideLooper.loop();
  engine.translate.to(engine.location);
  rafId = requestAnimationFrame(animate)
}
const startAutoScroll = () => {
 rafId = requestAnimationFrame(animate)
}
const stopAutoScroll = () => {
  rafId = cancelAnimationFrame(rafId) || 0;
}
embla.on("settle", startAutoScroll);
embla.on("pointerDown", stopAutoScroll);
startAutoScroll();

Hope this helps :)

Hey guys,
Thank you very much for sharing the snippets of ticker functionality.
I'm currently using it with variable width but for some reason it doesn't loop back when its on ticker mode.
If I'm using drag, looping is working as intended.
I think I'm missing something with internalEngine method. I tried looking in docs but can't find any reference for this.
Here is a CodeSandbox for your reference.
Thank you so much guys!

Hey everyone 👋  Super cool example! Can anyone tell me how to control the speed of the ticker animation?

@abdulrauf11 just change the number here
    engine.location.add(-1);
    engine.scrollLooper.loop(-1);

I'm using 0.3 which is a slower speed

Hey guys,
Thank you very much for sharing the snippets of ticker functionality.
I'm currently using it with variable width but for some reason it doesn't loop back when its on ticker mode.
If I'm using drag, looping is working as intended.
I think I'm missing something with internalEngine method. I tried looking in docs but can't find any reference for this.
Here is a CodeSandbox for your reference.
Thank you so much guys!

Same here :(

@ameliagroen @samdhoffman As for VanillaJS, I am fiddling around with this myself. Adapting the sandbox above, this seems to be working for me. But tbh I am not very familiar with the requestAnimationFrame API. So I don't know if this might lead to any drawbacks.
let rafId = 0;

const animate = () => {
  const engine = embla.dangerouslyGetEngine();
  engine.location.add(-0.025); // controls the speed
  engine.target.set(engine.location);
  engine.scrollLooper.loop(-1);
  engine.slideLooper.loop();
  engine.translate.to(engine.location);
  rafId = requestAnimationFrame(animate)
}
const startAutoScroll = () => {
 rafId = requestAnimationFrame(animate)
}
const stopAutoScroll = () => {
  rafId = cancelAnimationFrame(rafId) || 0;
}
embla.on("settle", startAutoScroll);
embla.on("pointerDown", stopAutoScroll);
startAutoScroll();

Hope this helps :)

Unfortunately this doesn't work from v8 onwards :/

It is a pity that there is no official example that would be supported when the next update version is released.

Hi @7iomka,
I don't doubt that you mean well, but I don't think it's helping. I'm the sole maintainer of this project and always have an insane backlog. This is what's been done for the upcoming v8.
If devs really want me to add more features/plugins, and if I'm to spend even more of my unpaid spare time than I already do, I have to be motivated by something. I want this comment to be constructive so here are ways to not just say I want this an that, but also actually support this project:

⭐ Star it if you already haven't, and you find yourself using it in multiple projects and you're overall satisfied with it.
📣 Share it in social media like Reddit or similar.
💰 Donate to this project.

More support means better chances for me to add more examples, more features and plugins.
Best,
David

Hello,
For this sandbox that was shared earlier by @davidjerleke:
https://codesandbox.io/s/embla-carousel-react-github-issue-114-3jf38?file=/src/js/EmblaCarousel.js:1275-1289
I have noticed a bug where when you right click on the carousel slides the carousel starts to move faster, as you keep right clicking it goes on faster and faster.
What could be causing this?

in version  "embla-carousel-react": "^8.0.0-rc14", this example not work anymore

[https://codesandbox.io/s/embla-carousel-react-github-issue-114-forked-9wm39t?file=/package.json:198-237](i fork codesandbox with new version)

@Poylar there is a plugin being developed for this purpose which will be named embla-carousel-auto-scroll which is 80% complete at the time of writing.

Hi @Poylar, @dash-james, @AmeerSapadmi, @7iomka, @pedrobernardina, @abdulrauf11, @ameliagroen, @ruie, @samdhoffman,
I'm very close to wrapping up this plugin. If anyone would like to help out and test it out before the release, I would very much appreciate that. Maybe we can catch one or two bugs before the release.
If you're interested, I'm going to create CodeSandboxes that I will share with you here so let me know what setup you prefer:

Vanilla
Vanilla + TypeScript
React
React + Typescript
etc.

Thanks in advance!

Hey @davidjerleke I would prefer React + Typescript. Also may I know what test scenarios you want me to cover? I have never done this before 😅  but I would love to do it 😬 . Please guide me. TIA.

hi, i would prefer react + js

@Poylar and @mdrahiem thank you for considering testing this plugin. CodeSandboxes here:
React + JavaScript

Code view
App view

React + TypeScript

Code view
App view

Also may I know what test scenarios you want me to cover?

Please feel free to test it anyway you want. For example, you can read what the different options do below and test and see if they behave as expected. I will temporarily just dump the documentation page for the AutoScroll plugin below:

Documentation
Options
Below follows an exhaustive list of all Auto Scroll options and their default values.
speed
Type: number
Default: 2
Number of pixels auto scroll should advance per frame.

startDelay
Type: number
Default: 1000
Number of milliseconds auto scroll should wait before it starts. This also applies when user interactions end and stopOnInteraction is false.

direction
Type: string
Default: forward
This option is used to set the auto scroll direction. Set it to backward if you want it to scroll in the opposite direction.

playOnInit
Type: boolean
Default: true
If set to false, you'll have to start auto scroll yourself by calling the play method.

stopOnInteraction
Type: boolean
Default: true
If set to false, auto scroll will not be disabled after drag interactions, and it will restart every time after an interaction.

stopOnMouseEnter
Type: boolean
Default: false
When enabled, auto scroll will stop when a mouse pointer enters the Embla Carousel container. If stopOnInteraction is also false, auto scroll will resume when the mouse leaves the carousel container.

stopOnFocusIn
Type: boolean
Default: true
When enabled, auto scroll will stop when a focusable element inside the carousel recieves focus. If stopOnInteraction is false, auto scroll will resume when the user leaves focus.

rootNode
Type: (emblaRoot: HTMLElement) => HTMLElement | null
Default: null
The node that should respond to user interactions like stopOnMouseEnter and stopOnInteraction. If this is omitted, the node that wraps the Embla Carousel will be used as default.

Methods
Below follows an exhaustive list of all Auto Scroll methods with their respective parameters and return values.

play
Parameters: startDelayOverride?: number
Returns: void
Start auto scroll. Pass a startDelayOverride if you want to change the startDelay option after the plugin has been initialized.

stop
Parameters: none
Returns: void
Stops auto scroll.

reset
Parameters: none
Returns: void
Stops auto scroll and starts over. This will only take effect if auto scroll is playing. If auto scroll is stopped, this method won't trigger anything.

isPlaying
Parameters: none
Returns: boolean
Returns a boolean whether the carousel is auto scrolling or not.

Events
Below follows an exhaustive list of all Auto Scroll events together with information about how they work.

autoScroll:play
Once: no
Fires when auto scroll starts playing.

autoScroll:stop
Once: no
Fires when auto scroll stops scrolling.

@davidjerleke hi, should I create a new bug issue or reply to you here?

@Poylar since this isn’t released yet, you can reply to me in the PR here:

#634

Thanks!

Hello @davidjerleke I did test options and methods and below are the results.
Options:
✅ speed
✅ startDelay
✅ direction
✅ playOnInit
✅ stopOnInteraction
✅ stopOnMouseEnter
✅ stopOnFocusIn
❓ rootNode
Methods:
❌ play
✅ stop
❌ reset
❌ isPlaying
Events:
❓autoScroll:play
❓autoScroll:stop
✅ - Success  ❓- Not sure how to test    ❌ - Not working (I think)
For isPlaying I tried the below code.
     <div>
        status:{' '}
        {emblaApi?.plugins().autoScroll?.isPlaying()
          ? 'playing'
          : 'not playing'}
      </div>

For play, reset I tried with below code.
  const stopPlay = useCallback(
    (index) => {
      if (!emblaApi) return
      emblaApi.plugins().autoScroll?.stop()
      emblaApi.scrollTo(index)
    },
    [emblaApi]
  )

  const resumePlay = useCallback(
    (index) => {
      if (!emblaApi) return
      emblaApi.plugins().autoScroll?.play()
      emblaApi.scrollTo(index)
    },
    [emblaApi]
  )

  const resetPlay = useCallback(
    (index) => {
      if (!emblaApi) return
      emblaApi.plugins().autoScroll?.reset()
      emblaApi.scrollTo(index)
    },
    [emblaApi]
  )

      <button onClick={stopPlay}>Stop</button>
      <button onClick={resumePlay}>Resume</button>
      <button onClick={resetPlay}>Reset</button>

Please correct me if my above implementation is wrong for play, reset, isPlaying and I would be glad to test Events if I find some example. Thanks!

Thanks a lot for testing @mdrahiem!
I will update the CodeSandbox with the playing state, events and demonstrate how to do it. Stay tuned 👍.

Also an update on browsers.
✅ - Chromium Engine Version 120
✅ - Firefox 121.0
✅ - Safari Version 17.2.1

@mdrahiem please check the CodeSandbox again, I've added the features you weren't sure about so you can see how it's intended to work.
Best,
David

Thanks for updating the code @davidjerleke Below is the update on testing.
Methods:
✅ play
✅ stop
✅ isPlaying
Events:
✅ autoScroll:play
✅ autoScroll:stop
❌ reset - I was expecting the slider to be reset (start from slide 1) but what I see is, it stops for a while (because of startDelay) and then it plays from the same position. Please correct if my expectation is wrong.
❓ rootNode - I still couldn't find any implementation for this. I see the implementation in javascript version though. 😄

@mdrahiem thank you for testing again 🙂!

❌ reset - I was expecting the slider to be reset (start from slide 1) but what I see is, it stops for a while (because of startDelay) and then it plays from the same position. Please correct if my expectation is wrong.

I think I need to update the description of what this does. That's valuable input, thanks 👍. The reset method does the following:

If auto scroll is scrolling, it stops.
When the carousel settles, the timer restarts using the startDelay option value.

It's useful when you're using previous/next buttons and want the carousel to continue after the user has navigated with the buttons and the carousel has settled. See here and here.

❓ rootNode - I still couldn't find any implementation for this. I see the implementation in javascript version though. 😄
This allows you to select a custom element that should listen for mouseenter and mouseleave, if you don't want the default Embla root node (which is the element you attach emblaRef to). It's used when stopOnMouseEnter is true.

Did these explanations make sense?
Best,
David

Thank you so much for taking time and explaining these. They makes sense now 🙂

@mdrahiem thanks for testing ⭐! The plugin will be released soon.

Thanks that's very kind of you @mdrahiem. @mdrahiem and anyone else reading this for that matter:
If you want to make contributions you can browse discussions with the label help wanted. We are happy to accept contributions from our users. For more details see the contributing guidelines.
After your pull request have been merged, you will automatically be added as a contributor here and here.
Best,
David

Sorry guys, was just about to publish this package but someone has taken a too similar name so I've asked them to unpublish their package before I can release the official package: https://github.com/nwidynski/embla-carousel-autoplay/issues/1.

Sorry guys, was just about to publish this package (embla-carousel-auto-scroll), but someone has taken a too similar name so I've asked them to unpublish their package before I can release the official package:

Package name confilct nwidynski/embla-carousel-autoplay#1.

Update 2024-01-29
The person in question unpublished their package but the NPM registry threw errors when I tried to publish embla-carousel-auto-scroll. I've contacted NPM support and they said that the package wasn't properly unpublished so they did that for me. Unfortunately, NPM say that I have to wait 24h before I can try publishing embla-carousel-auto-scroll again.

any updates or again you are waiting 24 hours ?

@dcapinator waiting additional 24 hours. Next publish attempt can be made in 6 hours.

Update 2024-01-30
embla-carousel-auto-scroll has been released to the NPM registry.
Update 2024-01-29
The person in question unpublished their package but the NPM registry threw errors when I tried to publish embla-carousel-auto-scroll. I've contacted NPM support and they said that the package wasn't properly unpublished so they did that for me. Unfortunately, NPM say that I have to wait 24h before I can try publishing embla-carousel-auto-scroll again.
Update 2024-01-26
Sorry guys, was just about to publish this package (embla-carousel-auto-scroll), but someone has taken a too similar name so I've asked them to unpublish their package before I can release the official package:

https://github.com/nwidynski/embla-carousel-autoplay/issues/1.

authors: 7iomka AmeerSapadmi Github010101011 Poylar abdulrauf11 ameliagroen dan-wu-open dash-james davidcetinkaya davidjerleke dcapinator easydrops filiptvarek mdrahiem openscript pedrobernardina ruie samdhoffman

repo: davidjerleke/embla-carousel


text:
trigger entry and onEntry on every event

Bug or feature request?
Bug report and a bunch of questions, sorry.
Description:
Given TodoMVC when a "global" event handler (i.e. NEWTODO.CHANGE) is triggered, the state is changed to all, and also entry or onEntry are fired (from initializing and all states descriptions) every time. This brings me some questions:
i'm going to use Entry as initializing.entry, initializing.onEntry, all.onEntry and all.entry in that order

Is triggering Entry when NEWTODO.CHANGE is triggered expected?
what's the target of NEWTODO.CHANGE? (or a global event handler to generalize)
how to avoid triggering Entry on NEWTODO.CHANGE?
how could I change the behaviour of NEWTODO.CHANGE depending on the state, ie: if I do states: { all: { on: { NEWTODO.CHANGE: {..} } } }, on: { NEWTODO.CHANGE: {..} } then when on.NEWTODO.CHANGE is trigger it triggers all.entry, in favor of all.NEWTODO.CHANGE. (this is a needed real use case, I suppose i could not have a "global" NEWTODO.CHANGE and just "local" declarations per state, but the dynamics of having both is not clear to me, as this behavior blocks me to see beyond)
what's the correct term for "event handler" ({on: eventHandler})? is it transition configuration looks like from the types but i'm not sure ? in the docs seems a bit vague term transition but is used broadly, seems to express many things.
what is the correct term for: "global" "event handler" (machine({on: eventHandler}))? global transition configuration or global transition?
what is the correct term for: "local" "event handler" (states:{all:{on:{eventHandler:}}})?

Observations:

The behaviour of changing the state (typing the name of a new task and changing to all state) happens in xstate@4.6.3 but not in xstate@^4.7.0-rc3. 1⃣
However the behaviour of triggering Entry when NEWTODO.CHANGE part happens in both versions. 2⃣
Both behaviours happen with any of the "global" event handlers (NEWTODO.CHANGE, NEWTODO.COMMIT, etc).
The constant triggering onEntry and entry is limited to initializing and all states 🤔 3⃣
the order this happens is : global event handler actions, initializing.entry, all.entry.

(Bug) Expected result:

1⃣ shouldn't happen, global event handlers should stay in their state unless specified something like { on: NEWTODO.CHANGE: {target: '.', actions}}
2⃣ just looks like a bug entirely, Entry should be triggered from a global event handler
local event handler should override global event handler or work in an explicit lifecycle to global event cycles (in certain expected order) as stated here only more specific transitions should run.

it is defined on a state node that matches the current state value
the transition guard (cond property) is satisfied (evaluates to true)
it is not superseded by a more specific transition. <--- 🐛

Link to reproduction or proof-of-concept:
https://codesandbox.io/s/xstate-todomvc-onentry-entry-rg0v9

export const todosMachine = Machine({
  id: "todos",
  context: {
    todo: "", // new todo
    todos: []
  },
  initial: "initializing",
  states: {
    initializing: {
      entry: assign({
        todos: (ctx, e) => {
          console.log("initializing entry");
          return ctx.todos.map(todo => ({
            ...todo,
            ref: spawn(todoMachine.withContext(todo))
          }));
        }
      }),
      on: {
        "": "all"
      }
    },
    all: {
      entry: () => {
        console.log("all");
      }
    },
    active: {
      entry: () => {
        console.log("active");
      }
    },
    completed: {
      entry: () => {
        console.log("completed");
      }
    }
  },
  on: {
    "NEWTODO.CHANGE": {
      actions: assign({
        todo: (ctx, e) => e.value
      })
    },
    "NEWTODO.COMMIT": {
      actions: [
        assign({
          todo: "", // clear todo
          todos: (ctx, e) => {
            const newTodo = createTodo(e.value.trim());
            return ctx.todos.concat({
              ...newTodo,
              ref: spawn(todoMachine.withContext(newTodo))
            });
          }
        }),
        "persist"
      ],
      cond: (ctx, e) => e.value.trim().length
    },
    "TODO.COMMIT": {
      actions: [
        assign({
          todos: (ctx, e) =>
            ctx.todos.map(todo => {
              return todo.id === e.todo.id
                ? { ...todo, ...e.todo, ref: todo.ref }
                : todo;
            })
        }),
        "persist"
      ]
    },
    "TODO.DELETE": {
      actions: [
        assign({
          todos: (ctx, e) => ctx.todos.filter(todo => todo.id !== e.id)
        }),
        "persist"
      ]
    },
    "SHOW.all": ".all",
    "SHOW.active": ".active",
    "SHOW.completed": ".completed",
    "MARK.completed": {
      actions: ctx => {
        ctx.todos.forEach(todo => todo.ref.send("SET_COMPLETED"));
      }
    },
    "MARK.active": {
      actions: ctx => {
        ctx.todos.forEach(todo => todo.ref.send("SET_ACTIVE"));
      }
    },
    CLEAR_COMPLETED: {
      actions: assign({
        todos: ctx => ctx.todos.filter(todo => !todo.completed)
      })
    }
  }
});

Well, hard to answer all questions at once - especially because of the fact that many might depend on previous ones. I've recognized a small problem with current @xstate/react implementation and gonna fix it in a moment. Reading .initialState is causing initializing to be read and that assign to be executed~, it doesn't mean that it's actually entering anything or that some side effects happen, but this is certainly confusing.

what's the target of NEWTODO.CHANGE? (or a global event handler to generalize)

If a transition has no target specified then the target is, well, undefined. Such transition can serve 2 purposes:

execute some actions without transitioning to some other state
prevent an event from "bubbling" up to the parent states (where it could cause a transition)

what's the correct term for "event handler" ({on: eventHandler})? is it transition configuration looks like from the types but i'm not sure ? in the docs seems a bit vague term transition but is used broadly, seems to express many things.

Technically this is still a transition, just targetless. It's mentioned as such e.g. here - https://www.w3.org/TR/scxml/#PrelimaryDefinitions

Well, hard to answer all questions at once - especially because of the fact that many might depend on previous ones.

Sorry about that 🙏

it doesn't mean that it's actually entering anything or that some side effects happen, but this is certainly confusing

In the case of initializing it just invoking entry but not doing anything else, thats right, however in the case of all.entry it does changes the state from completed -> all when typing as its visible in the gif.

Technically this is still a transition, just targetless. It's mentioned as such e.g. here - https://www.w3.org/TR/scxml/#PrelimaryDefinitions

Thanks for the resource and clarification 👍

Sorry about that 🙏

Don't worry - not your fault, those are reasonable questions. I just didn't want to answer them one by one, because they are interconnected and also your observations were slightly off (because of confusing @xstate/react behavior).

In the case of initializing it just invoking entry but not doing anything else, thats right, however in the case of all.entry it does changes the state from completed -> all when typing as its visible in the gif.

Can't observe it in here - https://codesandbox.io/s/xstate-todomvc-onentry-entry-tcj2j . This is your sandbox forked + upgraded to the newest XState (rc) + @xstate/react "inlined" after my "fix"

This is your sandbox forked + upgraded to the newest XState (rc) + @xstate/react "inlined" after my "fix"

This works great, also fixes:

it is not superseded by a more specific transition. <--- ✅

currentState.entry and currentState.entry happens, makes more sense not sure if aligned with self-transition docs

An internal transition will not exit nor re-enter itself, but may enter different child states.

Do you have any more questions regarding this? Is still something unclear?

currentState.entry and currentState.onEntry happens, makes more sense not sure if aligned with self-transition docs

Just this one, should i spect currentState.entry to be triggered with every transaction? I had the idea that tagless transaction behaved like internal transactions (not triggering entry)

Could u list steps needed for the observed effect to happen? I’d like to make sure that we are both on the same page

Could u list steps needed for the observed effect to happen? I’d like to make sure that we are both on the same page

open the sandbox
open the console

could:

writte a title
see how all is printed every time

or:

change from All to active
see how active is printed
writte a title
se how active is printed every time

in general any action triggers the entry description in the current state. (it used to trigger just the first two states entry after your changes its the current state entry`)

This log was not coming from entry action execution - but rather from render. You were logging current state.value coming from the useMachine hook. See https://codesandbox.io/s/xstate-todomvc-onentry-entry-1b895

🤦♂  thank you for the spot 😅 , then the fix is 100% 🎯 .

authors: Andarist edgarjrg

repo: davidkpiano/xstate


text:
Unable to set URI or port for Chroma( )

Feature request
There are many cases in which people are running ChromaDB somewhere other than localhost 8000, especially if 8000 is already taken by other things. I, for one, run my databases on a different machine in my LAN and change the port from 8000. Currently, the constructor looks like this:
Chroma({
    this.collectionName = 'langchain',
    this.collectionMetadata,
    required super.embeddings,
    final String tenant = 'default_tenant',
    final String database = 'default_database',
    final String baseUrl = 'http://localhost:8000',
    final Map<String, String> headers = const {},
    final http.Client? client,
  }) : _client = ChromaClient(
          tenant: tenant,
          database: database,
          baseUrl: baseUrl,
          headers: headers,
          client: client,
        );

In order to allow the dev to set the URI and port, what we need is this:
CustomChroma({
    this.collectionName = 'langchain',
    this.collectionMetadata,
    this.baseUrl  = 'http://localhost:8000',
    required super.embeddings,
    final String tenant = 'default_tenant',
    final String database = 'default_database',
    final Map<String, String> headers = const {},
    final http.Client? client,
  }) : _client = ChromaClient(
    tenant: tenant,
    database: database,
    baseUrl: baseUrl,
    headers: headers,
    client: client,
  );

  /// Optional base URI.
  String baseUrl;

Motivation
I need to assign the db URI and port to something other than localhost:8000
Your contribution
Forking and submitting a PR.

Needs to be posted in langchain_chroma

PR #472 submitted to resolve this issue.

Hello @ScottS2017,
That functionality is already supported by the current constructor.
final vectorStore = Chroma(
  embeddings: OpenAIEmbeddings(apiKey: openaiApiKey),
  baseUrl: 'http://localhost:8888',
);

It is also explained in the documentation:

Isn't this what you need?

I'll close the issue and the PR as this functionality is already supported.
If you are missing something with the current API, please feel free to reopen the issue.


text:
add pagesPerCanvas option

generating canvas per page was pretty slow, this gives an option to generate multiple pages per canvas.

Great job, we need this now


text:
Sequence number of a sent message cannot have value

https://github.com/davidrevoledo/ServiceBus.LogginPlugin/blob/def057b3647e67d9edd9cbf6d72e750876b363cf/src/ServiceBus.LogginPlugin/Infraestructure/MessageExtensions.cs#L56

@SeanFeldman this is a workaround to Serialize the message, I read that this property is server based so will be overwritten.
Am I wrong ?

If you're logging a message going out, there should be fidelity to what's been sent out.
Since the property cannot be set on the client, as a user of the plugin I'd expect to see no value set.
By modifying it, you're making a value up that was not there. A logger should not do that 🙂

Enqueued time of a sent message cannot have a value #6

authors: SeanFeldman davidrevoledo


text:
barcode is not show in https

barcode is not show in https

Yo can check this repo https://packagist.org/packages/elminson/barcode
with UnitTest and new features as Set text color an background color. I hope you like it.

same issue barcode is not showing in https .

authors: aniruddhporwal elminson hninoo

repo: davidscotttufts/php-barcode


text:
Segfault when looking up IPs

Hi there:
I was creating a benchmark script to run your library and compare it to others I was considering, and I just wanted to let you know that, for whatever reason, this was causing a SEGFAULT.
It could be in its use of the premium MMDB files.
Let me know if I can provide any further information to help.
/* jshint ignore:start */
'use strict';

const path = require('path');
const fs = require('fs');
const os = require('os');
const gz = require('zlib');

const geoip2 = require('geoip2');
const request = require('request');
const tar = require('tar-fs')
const glob = require('glob');
const faker = require('faker');

const databases = [
  'GeoIP2-Connection-Type',
  'GeoIP2-Domain',
  'GeoIP2-Country',
  'GeoIP2-City',
  'GeoIP2-ISP'
];

const fakeIps = [];

for (let i = 0; i < 1000000; i++) {
  fakeIps.push(faker.fake('{{internet.ip}}'));
}

function getFilePath(database) {
  return path.join(__dirname, 'databases', database + '.mmdb');
}

const numDBs = databases.length;

function downloadMMDBs(cb) {

  const license = 'your license here';
  function downloadLink(edition) {
    return `http://www.maxmind.com/app/download_new?edition_id=${edition}&suffix=tar.gz&license_key=${license}`;
  }

  fs.mkdtemp(path.join(os.tmpdir(), 'geoip'), function(err, folder) {
    if (err) {
      throw err;
    }

    let processedDBs = 0;

    databases.forEach(function(db) {
      let link = downloadLink(db);

      // let writeStream = fs.createWriteStream();
      let newFolder = path.join(__dirname, 'databases');

      request(link)
        .pipe(gz.createUnzip())
        .pipe(tar.extract(folder))
        .on('finish', function() {
          processedDBs++;
          if (processedDBs === numDBs) {
            let globString = path.join(folder, '**', '*.mmdb');
            glob(globString, function(err, files) {
              if (err) {
                throw err;
              }
              let processedFiles = 0;
              files.forEach(function(file) {
                let newPath = path.join(__dirname, 'databases', path.basename(file));
                fs.createReadStream(file)
                  .pipe(fs.createWriteStream(newPath))
                  .on('finish', function() {
                    processedFiles++;
                    if (processedFiles === numDBs) {
                      cb();
                    }
                  })
              })
            });
          }
        });

    });

  });

}

function start() {
  console.log('Done downloading mmdb definitions. Beginning benchmarks');

  startGeoIP2();
}

function startGeoIP2() {
  databases.forEach(function(database) {
    console.log(`[geoip2] Getting results for: ${database}`);

    // Start test

    let path = getFilePath(database);

    // Initialization
    let startInit = Date.now();
    geoip2.init(path);
    let doneInit = Date.now();

    let initElapsed = doneInit - startInit;

    console.log(`[geoip2] Initialization for ${database} took: ${initElapsed}ms`);
    // record lookup
    let numIp = 0;
    let total = fakeIps.length;
    let startLookup = Date.now();

    fakeIps.forEach(function(ip) {
      let result = geoip2.lookupSimple(ip, function(err, result) {
        if (err) {
          throw err;
        }

        numIp++;

        if (numIp === total) {
          let doneLookup = Date.now();
          let lookupElapsed = doneInit - startInit;
          console.log(`[geoip2] Lookup results for: ${database}: lookup took: ${lookupElapsed}ms`);
        }

      });
    });

  });
}

// Check if we need to download the definitions
if (fs.existsSync(getFilePath(databases[0]))) {
  setImmediate(start);
} else {
  downloadMMDBs(start);
}

Does it segfault on the first lookup or only under load?

The script below ran fine on my machine using node 5.9.1 on OS X:
'use strict';

const faker = require('faker');
const geoip2 = require('./node-geoip2');

console.log("Generating fake ips...");

const fakeIps = [];
for (let i = 0; i < 1000000; i++) {
  fakeIps.push(faker.fake('{{internet.ip}}'));
}

function startGeoIP2() {
  // Initialization
  let startInit = Date.now();
  geoip2.init();
  let doneInit = Date.now();

  let initElapsed = doneInit - startInit;

  console.log(`[geoip2] Initialization of database took: ${initElapsed}ms`);
  // record lookup
  let numIp = 0;
  let total = fakeIps.length;
  let startLookup = Date.now();

  fakeIps.forEach(function(ip) {
    let result = geoip2.lookupSimple(ip, function(err, result) {
      if (err) {
        throw err;
      }

      numIp++;

      if (numIp === total) {
        let doneLookup = Date.now();
        let lookupElapsed = doneLookup - doneInit;
        console.log(`[geoip2] Lookup results took: ${lookupElapsed}ms`);
      }
    });
  });
}

startGeoIP2();

Produces:
Generating fake ips...
[geoip2] Initialization of database took: 1ms
[geoip2] Lookup results took: 50010ms

Which database does your test fail on?
What OS and Node version are you using?

authors: davidtsai webmakersteve


text:
Javascript Bug Report

Describe the bug
Upon loading the URL, no javascript loads. The expected behavior is that javascript loads, including allowing a user to scroll to the next/previous slides of the quiz.
To Reproduce
Steps to reproduce the behavior:

Go to 'https://davidyueone.github.io/code201project/'
See error, where no javascript loads and the page only shows html.

Desktop (please complete the following information):

OS: Linux Mint 20.3
Browser: Firefox
Version: 113.0.1

Smartphone:
This bug was no tested on a smartphone device.

This bug was solved by the following method:
Edited the index.html file. Placed the javascript tag after the last  and before the  tag:
"
"
After this latest edit, javascript now loads in the expected way.

This bug was solved by the following method:
Edited the index.html file. Placed the javascript tag after the last and before the tag:
""
After this latest edit, javascript now loads in the expected way.


text:
Events Cannot Be Deleted

I have tried the following:

Opening the modal does not provide the option to delete an event.
Deleting the event in the "events" folder does not remove the entry in the FC view.
Right-click does not offer the option to delete the event. In fact, the right-click is currently not supported.

It would be fantastic if you could implement all three options.

I've implemented the first two suggestions as part of the fix. I'll open an issue for creating a right-click menu to add options to in general, since that'll require some more work beyond a quick fix.

Parts 1 and 2 have been released in 0.1.1.

Thank you so much!

authors: StefanoRausch davish

repo: davish/obsidian-full-calendar


text:
How does dlib face aligment works?

After get 5 face landmarks then use it to do face alignment.I have see a example from:
http://dlib.net/face_alignment.py.html  and face_landmark_detection_ex.cpp in the dlib examples directory.
My question is:

How does this work (align face by 5 points)?

Is there any reference ?

And I use MTCNN to do face detection and landmark(also five points),  I have do face alignment by opencv warpAffine, but it does't work well. And want to ues dlib's method(it works well), But I don't know how to realize it ?
Can you give any suggest?

It just warps the image so the 5 points are in some canonical upright and
centered pose.  There isn't a reference, it's just doing the simple thing
that everyone does for this kind of thing.  Why do you have to call some
function in opencv?  Just call the dlib function.

Thank you for reply, I have solved it by https://stackoverflow.com/questions/26279853/how-to-store-all-the-pixels-within-a-rotatedrect-to-another-matrix/26284491#26284491 this method.
The reason for why I use opencv, because I use MTCNN caffe to do face detection and landmark, so I can't introduce dlib.
The method MTCNN detect face much more accurate the dlib's method.
Does you have any plan to realize MTCNN by dlib for face detection?

Have you tried the CNN face detector in dlib?  It's much more accurate than dlib.get_frontal_face_detector().

Yes, I have tried it, but it is less accurate than MTCNN a good caffe implement can be found here

I am sorry for writing in the closed issue, but was just curious.
When we are doing alignment we are not actually running any face detector? We are just doing the extraction of 5 feature points on the face which will be aligned?
Because you mentioned the CNN face detector, so I am wondering.

You are finding a face, determining its orientation, and then cropping out an appropriately rotated image.

authors: Jayhello Jendker davisking

repo: davisking/dlib


text:
DNN does only use 1 CPU

Hi,
in my tests when i want to execute  dlib programm (for example imagenet) without gpu support.
The whole calculation only uses 1 processor (intel system).
Is it possible to use more the 1 processor ? And if so how ?
As always thanks a lot

If you install a multithreaded BLAS like the Intel MKL it will use multiple cores.

I installed
Intel MKL (https://github.com/01org/MKL-DNN)
(and rebuild the dlib programm)
still the example imagenet programm uses only 1 core out of 4.
Do i have to link it somehow or use a specific cmake option?

That isn't the Intel-MKL.  MKL-DNN is something else.

thanks, as always you solved the problem!


text:
Post to tweet about new task when it was approved.

SHOULD NOT be merged until sidekiq jobs are fixed (see #44).
This PR relates to #54 "Post approved tasks in twitter account" and adds:

New sidekiq worker for twetting about new tasks
Creates a sidekiq job after task was approved
Adds env variables required by twitter gem to .env files.

Also I haven't been able to test actual posting, 'cause twitter requires to attach phone number before you can register app, and somehow I don't receive twitter sms messages :/
Keys required by gem:
TWITTER_CONSUMER_KEY=
TWITTER_CONSUMER_SECRET=
TWITTER_ACCESS_TOKEN=
TWITTER_ACCESS_SECRET=

@davydovanton Done! You can merge it when sidekiq is fixed

repo: davydovanton/ossboard


text:
Fix null pointer exception in tilemap mode + duplicate row in dropdown

Thanks for the fork, I've been using this over vanilla for some time. Here are 2 candidate changes I've encountered:

In the tilemap mode null pointer exceptions are being thrown @Level.hx line 100 when trying to use CTRL+Z and other such features because sheet.sheet is coming null (sheet.columns has a getter referencing sheet.sheet).

Added a "Duplicate" option to the row dropdown which adds a copy of the selected row. Vanilla does have copy-paste functionality but it is per-cell, not per-row, and is pretty janky.

Hi there! Thanks for the PR! Glad you like it.
I havent touched the Level editor part so any fixes there are super welcomed.
Both changes look fine. Merging! :D

authors: c-g-dev dazKind

repo: dazKind/castle

license: ISC


text:
Invalid styling only applied when placeholder is not shown

We're not sure if this is the intended behavior: an input with label and placeholder that is marked as required and empty will never be styled as invalid because the invalid rule is restricted to :not(:placeholder-shown). We would argue that placeholders are intended to indicate what should be entered into a field and not that the field is optional.

You're right – it's a bad workaround until we get :user-invalid soon. At least the error message would still get displayed, but not the color for this constellation. I'll keep this ticket open so that we could use it as a reminder for :user-invalid.

See #226

authors: d-koppenhagen juthilo mfranzke

repo: db-ui/core


text:
Snowflake is basically unusable when DBeaver runs with Java 17

When DBeaver runs with Java 17, it's pretty much impossible to read any result set returned by the Snowflake driver. This means that most queries in SQL Editor don't work, the navigator doesn't show objects such as tables, views, etc. I'm aware of only one query that successfully runs: SHOW TABLES.
The exceptions thrown when trying to use DBeaver for Snowflake access indicate that this is caused by the fact that the current Snowflake driver we use (3.13.6) is not compatible with Java 17.
We need to wait for Snowflake to update their driver. We need to keep in mind though that we use the aforementioned version because the latest one (3.13.10) doesn't work with authentication via an external browser.

Not sure if it is related or separate issue, but after upgrading to 21.3.0 DBeaver won't connect to snowflake. It doesn't seem to trying. Error message is !390400!. I have authentication in external browser, but nothing happens at all, except for the error message that comes instantly when trying to connect to the database.

Hello @deep750. This is a related issue (see the last paragraph in my OP). But that's really odd considering that we didn't change our preferred driver version for Snowflake. Could you please tell me what driver version do you use?

@akilovich I'm currently using snowflake-jdbc-3.6.12 - at least that's the one in my personal folder.dbeaver-drivers-folder

@deep750 Please change to 3.13.6. To do that, select your Snowflake connection in the navigator -> F4 -> Edit driver settings -> Libraries -> Download/Update, then follow the instructions from the gif below.

Also, when doing that, what version of the driver is displayed before changing it to 3.13.6? Have you changed the version of your driver manually before?

@akilovich will updating the driver solve anything with latest version of DBeaver? Understood the initial comment that 3.13.6 doesn't work with the latest version of DBeaver, as it is using Java 17 (?)
According to Snowflake's driver page, latest version is 3.13.11 - maybe that fixes it? I haven't tried it yet.

upgrading to 3.13.11 didn't solve anything-

3.13.6 works just fine with the latest version of DBeaver if DBeaver runs on Java 11. Most of the distributions of DBeaver run on that version, this should work for you.

It will be fixed alongside #17303

Nevermind, we'll do that independently.

With Java 17 and 3.13.6 driver, if you open a connection to Snowflake, the default database and schema aren't highlighted in the navigator. In the logs we see
2022-10-25 13:11:27.390 - Exception caught when refreshing defaults for Snowflake execution context
net.snowflake.client.jdbc.SnowflakeSQLLoggedException: JDBC driver internal error: Fail to retrieve row count for first arrow chunk: null.
	at net.snowflake.client.jdbc.SnowflakeResultSetSerializableV1.setFirstChunkRowCountForArrow(SnowflakeResultSetSerializableV1.java:1061)
	at net.snowflake.client.jdbc.SnowflakeResultSetSerializableV1.create(SnowflakeResultSetSerializableV1.java:550)
	at net.snowflake.client.jdbc.SnowflakeResultSetSerializableV1.create(SnowflakeResultSetSerializableV1.java:467)
	at net.snowflake.client.core.SFResultSetFactory.getResultSet(SFResultSetFactory.java:29)
	at net.snowflake.client.core.SFStatement.executeQueryInternal(SFStatement.java:219)
	at net.snowflake.client.core.SFStatement.executeQuery(SFStatement.java:134)
	at net.snowflake.client.core.SFStatement.execute(SFStatement.java:743)
	at net.snowflake.client.core.SFStatement.execute(SFStatement.java:639)
	at net.snowflake.client.jdbc.SnowflakeStatementV1.executeQueryInternal(SnowflakeStatementV1.java:238)
	at net.snowflake.client.jdbc.SnowflakeStatementV1.executeQuery(SnowflakeStatementV1.java:133)
	at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeQuery(JDBCStatementImpl.java:345)
	at org.jkiss.dbeaver.ext.snowflake.model.SnowflakeExecutionContext.refreshDefaults(SnowflakeExecutionContext.java:144)
	at org.jkiss.dbeaver.ext.snowflake.model.SnowflakeDataSource.initializeContextState(SnowflakeDataSource.java:76)
	at org.jkiss.dbeaver.model.impl.jdbc.JDBCExecutionContext.connect(JDBCExecutionContext.java:162)
	at org.jkiss.dbeaver.model.impl.jdbc.JDBCRemoteInstance.initializeMainContext(JDBCRemoteInstance.java:102)
	at org.jkiss.dbeaver.model.impl.jdbc.JDBCRemoteInstance.<init>(JDBCRemoteInstance.java:61)
	at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.initializeRemoteInstance(JDBCDataSource.java:128)
	at org.jkiss.dbeaver.ext.generic.model.GenericDataSource.<init>(GenericDataSource.java:109)
	at org.jkiss.dbeaver.ext.snowflake.model.SnowflakeDataSource.<init>(SnowflakeDataSource.java:43)
	at org.jkiss.dbeaver.ext.snowflake.SnowflakeDataSourceProvider.openDataSource(SnowflakeDataSourceProvider.java:97)
	at org.jkiss.dbeaver.registry.DataSourceDescriptor.openDataSource(DataSourceDescriptor.java:1108)
	at org.jkiss.dbeaver.registry.DataSourceDescriptor.connect(DataSourceDescriptor.java:988)
	at org.jkiss.dbeaver.runtime.jobs.ConnectJob.run(ConnectJob.java:70)
	at org.jkiss.dbeaver.runtime.jobs.ConnectJob.runSync(ConnectJob.java:98)
	at org.jkiss.dbeaver.ui.actions.datasource.DataSourceHandler.connectToDataSource(DataSourceHandler.java:113)
	at org.jkiss.dbeaver.ui.actions.datasource.UIServiceConnectionsImpl.initConnection(UIServiceConnectionsImpl.java:87)
	at org.jkiss.dbeaver.model.navigator.DBNDataSource.initializeNode(DBNDataSource.java:158)
	at org.jkiss.dbeaver.model.navigator.DBNDatabaseNode.getChildren(DBNDatabaseNode.java:225)
	at org.jkiss.dbeaver.model.navigator.DBNDatabaseNode.getChildren(DBNDatabaseNode.java:1)
	at org.jkiss.dbeaver.model.navigator.DBNUtils.getNodeChildrenFiltered(DBNUtils.java:77)
	at org.jkiss.dbeaver.ui.navigator.database.load.TreeLoadService.evaluate(TreeLoadService.java:49)
	at org.jkiss.dbeaver.ui.navigator.database.load.TreeLoadService.evaluate(TreeLoadService.java:1)
	at org.jkiss.dbeaver.ui.LoadingJob.run(LoadingJob.java:88)
	at org.jkiss.dbeaver.ui.LoadingJob.run(LoadingJob.java:72)
	at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:105)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

The same exception appears when we open a data editor.
It's a Snowflake JDBC driver issue, which is in turn an issue of Apache Arrow. Unfortunately, they haven't migrated to Java 9 modules.

repo: dbeaver/dbeaver


text:
To use DBeaver in Oracle compatibility mode in Db2

Description
I have Db2 set to Oracle compatibility mode. In this case, I need to set "set sqlcompat plsql" to the procedure in order to execute the Oracle PL/SQL in Db2. However, SQL editor in DBeaver does not seem to recognize "set.." syntax. How can I run "set sqlcompat plsql" in DBeaver without error?
DBeaver Version
Community Edition 22.2.0.202209051344
Operating System
Windows 10 Enterprise
Database and driver

Database name and version : Db2 v11.5.7.0
Driver name and version : IBM Data Server Driver for JDBC and SQLJ 11.5.0.0

Steps to reproduce

I try to connect to database Db2 v11.5.7.
This database is set to Oracle compatibility mode.

$ db2set
DB2_COMPATIBILITY_VECTOR=800

I executed the following PL/SQL procedure in DBeaver: To execute Oracle PL/SQL procedure in Db2, I need to set "set sqlcompat plsql;" in the procedure.
test.txt
Then the following error is output. : An unexpected token "db2" was found following "set sqlcompat ".  Expected tokens may include:  "=".. SQLCODE=-104, SQLSTATE=42601, DRIVER=4.26.14

It seems that 'set sqlcompat plsql;' is not recognized by DBeaver.
This procedure can be executed without error via Db2 CLP, how can I execute it from DBeaver?

Additional context
No response

Probably related to the old driver, we need to look if it will reproduce after https://github.com/dbeaver/dbeaver/issues/17427 will be completed.

There have been no updates for a long time.
If the issue is still actual - feel free to reopen it.

authors: Destrolaric Tomoko0930 uslss