[W08H01] Add test for usage of values() in getValues()

This test validates if you are using the .values() method your source code. Exceptions are when your using the method in main(), toString(), toIntArray(), specialSort() and intersection().
The code is copied from the LoopTest.java from the W06H01 tests. However, this version now supports single line and block comments. So you could have .values() in your comments and the test would still pass 👍

Proposal: You could do this so much easier by using a HashMap that overrides .values() and throws an exception.

Proposal: You could do this so much easier by using a HashMap that overrides .values() and throws an exception.

Oh, yeah great proposal. You mean something like this, right?
package pgdp;

import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;

import java.util.Collection;
import java.util.HashMap;

import org.junit.jupiter.api.Test;

public class TempTest {
    @Test
    void testNoUsageOfValuesMethod() {
        MyHashSet<String, String> myMap = new MyHashSet<String, String>();
        assertDoesNotThrow(() -> SimpleGenerics.getValues(myMap), "You should not use .values()");
    }
}

// Overrides values() method in HashMap and throw an exception
class MyHashSet<K, V> extends HashMap<K, V> {
    @Override
    public Collection<V> values() {
        throw new RuntimeException("values() method is not allowed");
    }
}

If yes: This much cleaner. However, this test would not cover if you use .values() in a copied map, like:
public static <K, V> Set<V> getValues(Map<K, V> map) {
    Map<K, V> map2 = new HashMap<K, V>(map);
    // continue with map2.values()...
}

Or do you mean a different solution?

No that's correct, I would even consider using an anonymous implementation:
HashMap<K, V> map = HashMap<>() {     @Override     public Collection<V> values() {         throw new RuntimeException("values() method is not allowed");     } };

Ok, thanks 🙏 Even when this solution is much cleaner (I really like this solution more) and has no false positive anymore (the current solution of the PR has thousands of false positives), it has some false negatives (like copying the map and then use values()). In our context, I would prefer a solution false positive (the current PR solution) over having a solution with false negatives (override the values() method) because in a false positive case you can easily evaluate that it was a wrong alarm. However, in a false negative you just pass the test and you don't notice.

Other than the bracket issue, it looks good to me, you can merge it. ❤


Python 3.12 AttributeError: module 'ssl' has no attribute 'wrap_socket'

Hi,
When I attempt to use the library on Python 3.12 I receive the following error:
Enter server IP address or hostname:<IP_ADDRESS>
Enter username: admin
Enter password:
Traceback (most recent call last):
  File "c:\Users\brad\Documents\GitHub\nvdlib\nvdlib\nvdlib\tests\testapi.py", line 67, in <module>
    main()
  File "c:\Users\brad\Documents\GitHub\nvdlib\nvdlib\nvdlib\tests\testapi.py", line 41, in main
    login_res = client.login(username, password)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                       n
  File "C:\Program Files\Python312\Lib\site-packages\cpapi\mgmt_api.py", line 324, in api_ payload)call                                                                                ^^^^^^^^^
    conn = self.get_https_connection()                                                    mon_login_logic
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python312\Lib\site-packages\cpapi\mgmt_api.py", line 771, in get_https_connection                                                                          call
    self.conn = self.create_https_connection()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python312\Lib\site-packages\cpapi\mgmt_api.py", line 765, in creahttps_connectionte_https_connection
    conn.connect()
  File "C:\Program Files\Python312\Lib\site-packages\cpapi\mgmt_api.py", line 787, in connte_https_connectionect
    self.sock = ssl.wrap_socket(self.sock, self.key_file, self.cert_file, cert_reqs=ssl.CEectRT_NONE)                                                                                RT_NONE)
                ^^^^^^^^^^^^^^^
AttributeError: module 'ssl' has no attribute 'wrap_socket'

I believe this is due to ssl.wrap_socket being deprecated in favor of  ssl.SSLContext.wrap_socket as stated in the What's New for Python 3.12: https://docs.python.org/3.12/whatsnew/3.12.html#ssl

Remove the ssl.wrap_socket() function, deprecated in Python 3.7: instead, create a ssl.SSLContext object and call its ssl.SSLContext.wrap_socket method. Any package that still uses ssl.wrap_socket() is broken and insecure. The function neither sends a SNI TLS extension nor validates server hostname. Code is subject to CWE-295: Improper Certificate Validation. (Contributed by Victor Stinner in gh-94199.)

I think this can be worked around by editing mgmt_api.py line 787 of the library. I am not familiar with the inner workings of this library or the SSL module to know if this is an appropriate change.
https://github.com/CheckPointSW/cp_mgmt_api_python_sdk/blob/325c7a724a3f8edd0e0ad1bba8b05c7bd2da5a76/cpapi/mgmt_api.py#L787
To the following:
context = ssl.SSLContext()
self.sock = context.wrap_socket(self.sock)

Hi @vehemont,
Thanks for notifying us, we'll look into it, and update you.
Regards,
Eden

Hi @vehemont ,
We've added a fix available in the new released version v1.8.0
Thanks,
Eden


Added a help target in Makefile

The Makefile is already more than 300 LoC and that makes it difficult to check for the various available targets. Consequently, I created a help target to display a list of all the available targets. I used most of the current comments in the Makefile. The comments could be improved, but this can happen in another iteration.
Example output:
$ make help

Usage:
  make <target>
  help             Display this help
  check-aws-account-id-env  Check if AWS Account Env vars are set
  check-ou-mapping-configmap-env  Check if OU mapping ConfigMap Env vars are set
  create-account   Create account
  delete-account   Delete account
  test-account-creation  Test Account creation
  create-accountclaim-namespace  Create account claim namespace
  delete-accountclaim-namespace  Delete account claim namespace
  create-accountclaim  Create AccountClaim
  delete-accountclaim  Delete AccountClaim
  create-awsfederatedrole  Create awsFederatedRole "Read Only"
  delete-awsfederatedrole  Delete awsFederatedRole "Read Only"
  create-awsfederatedaccountaccess  Create awsFederatedAccountAccess - This uses a AWS Account ID from your environment
  delete-awsfederatedaccountaccess  Delete awsFederatedAccountAccess - This uses a AWS Account ID from your environment
  test-awsfederatedrole  Test Federated Access Roles
  test-switch-role  Test switch role
  test-awsfederatedaccountaccess  Test awsFederatedAccountAccess
  create-ccs-namespace  Create CCS (BYOC) namespace
  create-ccs-2-namespace  Create CCS (BYOC) namespace
  delete-ccs-namespace  Delete CCS (BYOC) namespace
  delete-ccs-2-namespace  Delete CCS (BYOC) namespace
  create-ccs-secret  Create CCS (BYOC) Secret
  create-ccs-2-secret  Create CCS (BYOC) Secret
  delete-ccs-2-secret  Delete CCS (BYOC) Secret
  create-ccs-accountclaim  Create CSS AccountClaim
  create-ccs-2-accountclaim  Create CSS AccountClaim
  delete-ccs-accountclaim  Delete CCS AccountClaim
  delete-ccs-2-accountclaim  Delete CSS AccountClaim
  test-ccs         Test CCS
  create-ccs       Deploy a test CCS account
  delete-ccs       Teardown the test CCS account
  create-s3-bucket  Create S3 bucket
  list-s3-bucket   List S3 bucket
  test-reuse       Test reuse
  test-secrets     Test secrets are what we expect them to be
  deploy-aws-account-operator-credentials  Deploy the operator secrets, CRDs and namesapce.
  predeploy-aws-account-operator  Predeploy AWS Account Operator
  predeploy        Predeploy Operator
  deploy-local     Deploy Operator locally
  deploy-cluster   Deploy to cluster
  check-aws-credentials  Check AWS Credentials
  create-ou-map    Test apply OU map CR
  delete-ou-map    Test delete OU map CR
  test-aws-ou-logic  Test AWS OU logic
  test-all         Test all
  clean-operator   Clean Operator
  go-check         Golang linting and other static analysis
  go-build         Build binary

PTAL

/test coverage

Codecov Report

Merging #525 (59854ec) into master (f244076) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #525      +/-   ##
==========================================
- Coverage   14.14%   14.10%   -0.04%
==========================================
  Files          44       44
  Lines        3591     3601      +10
==========================================
  Hits          508      508
- Misses       3061     3071      +10
  Partials       22       22

Impacted Files
Coverage Δ

pkg/awsclient/client.go
0.00% <0.00%> (ø)

pkg/controller/account/byoc.go
39.83% <0.00%> (-0.87%)
:arrow_down:

/lgtm

codecov bot what are you even looking at?!?! haha
This looks great, however I'm going to hold this due to the change freeze.
/hold
/lgtm

/hold cancel


Failed to execute 'postMessage' on 'DOMWindow': The target origin (https://....) provided does not match the recipient window's origin ('https://...')

Hi David, I face an issue when using your scripts in sharepoint sites.
Failed to execute 'postMessage' on 'DOMWindow': The target origin (https://....) provided does not match the recipient window's origin ('https://...')
IFrame is in ADFS ( e.g : https://appdev.com/..)
Source one is share point site collection. (e.g. https://spde.com/...)
When I tried with two asp.net application it works great but fails in sharepoint site.
Thanks in advance

You get that error if the iFrame has not loaded, you can ignore it if everything still works, as it makes more than one attempt to communicate

I have similar issue, and body of iframe content become empty.

First page load everything work fine, then after clicking on some link, body become empty and that error is generated, any idea how to fix?
thanks

I expect the issue is you need to change the x-Frame-Options http header on wordpress.org, as currently it is set to block iframes.

Just an additional note for anyone else that comes across this... it can also happen if the target site has forgotten to include the content window script file.

I was having the same error logged to the console, but David's message was clear about what was going on.
Before I had:

Now I have:

So I'm running iFrameResize() when the iframe loads and the error is gone.

Confirmed - the suggestion by @rafaelbiten is working for me too.

Same, with a slow to load embedded website, I had to use @rafaelbiten solution.

That error is because  you need to execute into domain configure your Gmail credentials, in my case I executed outside the domain  http://localhost

Using onload was not enough for me. I had to add a setTimeout wrapper around my resize call and wait a while before attempting the resize.

I was facing the same issue, but my issue was caused by redirect from http to https, I was providing in the target iframe the http address of my website URL by providing the URL in https in the iframe resolved the issue.


Unable to install chalice==0.5.1 (0.5.0 works well)

I am unable to install the latest version (0.5.1) of chalice:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.2 LTS
Release:        16.04
Codename:       xenial

$ python --version
Python 2.7.12

The python is run from virtualenv.
Trying to install latest version of chalice fails:
$ pip install chalice==0.5.1
Collecting chalice==0.5.1
  Using cached chalice-0.5.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-VIqz1s/chalice/setup.py", line 43, in <module>
        'Programming Language :: Python :: 2.7',
      File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
        _setup_distribution = dist = klass(attrs)
      File "/home/javl/sandbox/playwith_chalice/.tox/py27/local/lib/python2.7/site-packages/setuptools/dist.py", line 320, in __init__
        _Distribution.__init__(self, attrs)
      File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
        self.finalize_options()
      File "/home/javl/sandbox/playwith_chalice/.tox/py27/local/lib/python2.7/site-packages/setuptools/dist.py", line 387, in finalize_options
        ep.load()(self, ep.name, value)
      File "/home/javl/sandbox/playwith_chalice/.tox/py27/local/lib/python2.7/site-packages/setuptools/dist.py", line 166, in check_specifier
        except packaging.specifiers.InvalidSpecifier as error:
    AttributeError: 'module' object has no attribute 'specifiers'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-VIqz1s/chalice/

Installing version 0.5.0 works well:
$ pip install chalice==0.5.0
Collecting chalice==0.5.0
Requirement already satisfied: typing==<IP_ADDRESS> in ./.tox/py27/lib/python2.7/site-packages (from chalice==0.5.0)
Requirement already satisfied: click==6.2 in ./.tox/py27/lib/python2.7/site-packages (from chalice==0.5.0)
Requirement already satisfied: botocore<2.0.0,>=1.4.8 in ./.tox/py27/lib/python2.7/site-packages (from chalice==0.5.0)
Requirement already satisfied: virtualenv<16.0.0,>=15.0.0 in ./.tox/py27/lib/python2.7/site-packages (from chalice==0.5.0)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in ./.tox/py27/lib/python2.7/site-packages (from botocore<2.0.0,>=1.4.8->chalice==0.5.0)
Requirement already satisfied: docutils>=0.10 in ./.tox/py27/lib/python2.7/site-packages (from botocore<2.0.0,>=1.4.8->chalice==0.5.0)
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in ./.tox/py27/lib/python2.7/site-packages (from botocore<2.0.0,>=1.4.8->chalice==0.5.0)
Requirement already satisfied: six>=1.5 in ./.tox/py27/lib/python2.7/site-packages (from python-dateutil<3.0.0,>=2.1->botocore<2.0.0,>=1.4.8->chalice==0.5.0)
Installing collected packages: chalice
Successfully installed chalice-0.5.0

Interesting.  There was a change to the setup.py in 0.5.1 (https://github.com/awslabs/chalice/commit/61a534b72d835a4e5a8d5dd58c0025a7fcabb69e), but other than that I'm not sure what would be causing this.   Couple of questions:

Can you try upgrading to 0.6.0?  Do you still have this issue?
What's your pip --version?
What's your setuptools version ($ python -c "import setuptools; print setuptools.__version__" 23.1.0)?

I have exactly the same problem, just I'm trying to upgrade from 0.5.1 to 0.6.
pip Version is 9.0.1, setuptools is 34.0.1(Python version is 2.7.12 on Ubuntu 16.4.2 - just in case it matters),

@jamesls
My environment is:

Ubuntu 16.04.2 LTS
Python 2.7.11
using virtualenv created by tox==2.3.1 run by Python 3.5.2
pip 9.0.1
setuptools 34.3.0

Similarly as @noisefloor reported, trying to upgrade from 0.5.0 (@noisefloor reported from 0.5.1) it fails, this time somehow related to click:
Exception:
Traceback (most recent call last):
  File "/home/javl/.local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/home/javl/.local/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/home/javl/.local/lib/python2.7/site-packages/pip/req/req_set.py", line 784, in install
    **kwargs
  File "/home/javl/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/home/javl/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "/home/javl/.local/lib/python2.7/site-packages/pip/wheel.py", line 345, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/home/javl/.local/lib/python2.7/site-packages/pip/wheel.py", line 316, in clobber
    ensure_dir(destdir)
  File "/home/javl/.local/lib/python2.7/site-packages/pip/utils/__init__.py", line 83, in ensure_dir
    os.makedirs(path)
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Operace zamítnuta: '/usr/local/lib/python2.7/dist-packages/click'

With clean install I manage to get chalice 0.6 installed without problems.

I have the same problem (not the click error, the original one in this issue) when trying a clean install of chalice-0.6.0 into a brand new virtual environment.
My environment:

Python 2.7.12
packaging-16.8
pkg-resources-0.0.0
pip-9.0.1
setuptools-34.3.0

@vlcinsky did you do any special to get it working?

@jordal as I use tox for automating creation of virtualenv, there are two methods which worked for me:
Ask tox to recreate the environment:
$ tox -r

or manually removing the .tox environment and creating it again:
$ rm -rf .tox
$ tox

Tested it today and it still works. If you feel I closed the issue prematurely, reopen it.

For your information, this is the tox.ini file I use for testing:
[tox]
envlist = py27
skipsdist = True

[testenv]
commands = chalice --version
deps = chalice


higlass shows unbalanced data

The title says it all... If I simply ingest a balanced cooler the heatmap in higlass is not balanced - quite obvious buy just looking at it, and also if comparing to cooler show. Is there a way to switch balanced vs non-balanced view? I can't find it anywhere, at least.

Normally you can select balancing using the transforms configuration option:

If the cooler is balanced, that should be the default option though. If you don't see an option in the menu, do you think you could share the file? I can send you my email if you don't want to make it public.

OK, I only have "Default" and "None" options there, and neither of them is balanced. The file is huge, would be difficult to share... I'll try to reproduce this with a small file.

While you're reproducing it with a smaller file, could you paste the command that you used to make it multires here?

cooler zoomify -p 4 --balance file.cool

That looks right. Let me know when you have a smaller file and I'll take a look to see what's happening.

OK, I tried to zoomify a small file but then it didn't converge at the highest resolution... So screw it, here is a link to the huge dataset I was working with. (This is ES cell data from Bonev et al 2017)
https://datasync.ed.ac.uk/index.php/s/1DsY6gG9QiDHL11
Password ILoveHi-C
A related question - what happens if the base cooler file I use is balanced, but I don't use the --balance option during zoomifying? Will it use the balanced values for aggregation?

I have to say, I tried with the same small file, but starting at low resolution, and then it was ICEd in higlass! So there is something weird going on for me.

Aggregation is always at the level of raw counts. Balancing is done on each zoom level after aggregation is done. If the base zoom level was already balanced, then the existing weights are used instead.
I suspect what's happening is that is that if balancing weights are missing from any zoom level, then HiGlass won't provide it as a transform option. The plan was to change this behavior in HiGlass, but I don't think it has been rolled out yet.
More importantly, the fact that the zoomify process aborts as soon as balancing fails is not good; it's been on my todo list to fix.  We're also considering different policies for what to do on failed convergence, e.g. store NaNs, store the final result, etc. instead of not storing anything.
An easy workaround for now is to separately balance any zoom levels that failed to converge with a higher tolerance or other parameter tweaks, e.g. cooler balance -p 4 --tol 0.001 mycooler.cool::12. You can check if a zoom level is balanced with cooler balance --check <file>::<zoom>.

Thank you Nezar! That was my suspicion too... But the file in question should have all the levels balanced since it was aggregated with the --balance option on, and I can do cooler show -b on all levels (well, I haven't tried all, but both the first and the last, and a couple in the middle...). I can check this more thoroughly tomorrow to be sure.
Good idea about balancing individual levels that didn't converge, thanks!
About aggregating balanced data - wouldn't it make sense to aggregate the weights too? Then they either can be used directly (but NaNs might be a bit difficult to work around), or re-balancing higher levels will be much quicker, since weights are already close to optimal?

So, I have no idea what went wrong before, I re-ingested the file and it now shows ICEd data! However another file, the NPC data from the same paper, is not working after repeating the ingestion... But again, definitely all levels are balanced! Something weird is going on here...

Assuming this has been addressed. Please reopen if that isn't the case.


failOnInvalidActiveRecipes is not documented

What problem are you trying to solve?
The failOnInvalidActiveRecipes option is not documented (maven and gradle).
Fro example I'm referring to this line in the gradle plugin: https://github.com/openrewrite/rewrite-gradle-plugin/blob/main/plugin/src/main/java/org/openrewrite/gradle/RewriteExtension.java#L72
gradle.properties
systemProp.rewrite.failOnInvalidActiveRecipes=true

build.gradle:
dependencies {
        // missing dependency
	// rewrite("org.openrewrite.recipe:rewrite-spring:5.21.0")
}

---
type: specs.openrewrite.org/v1beta/recipe
name: my.Migration
displayName: Upgrade code and dependencies
recipeList:
  - org.openrewrite.java.migrate.UpgradeToJava17
  - org.openrewrite.java.spring.boot3.SpringBoot3BestPractices

gradlew rewriteRun
...
> Task :rewriteRun
Validating active recipes
Recipe validation error in initialization: DeclarativeRecipe must not contain uninitialized recipes. Be sure to call .initialize() on DeclarativeRecipe.
Recipe validation error in my.Migration.recipeList[2] (in file:/.../rewrite.yml): recipe 'org.openrewrite.java.spring.boot3.SpringBoot3BestPractices' does
not exist.

mvn -U -ntp org.openrewrite.maven:rewrite-maven-plugin:run \
-Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-migrate-java:RELEASE,org.openrewrite.recipe:rewrite-testing-frameworks:RELEASE,org.openrewrite.recipe:rewrite-spring:RELEASE,org.openrewrite.recipe:rewrite-logging-frameworks:RELEASE \
-Drewrite.failOnInvalidActiveRecipes=true

Describe the solution you'd like
I think updating this 2 pages should be enough:
https://docs.openrewrite.org/reference/gradle-plugin-configuration
https://docs.openrewrite.org/reference/rewrite-maven-plugin
along with other available options
Have you considered any alternatives or workarounds?
I looked into source code but not many people will do it ;)
Additional context
None
Are you interested in contributing this feature to OpenRewrite?
Not for the moment

Thanks for pointing this out! Indeed it's hard to keep the plugin documentation updated when it's not automatically generated; for the Maven plugin we have an alternative in the form of: https://openrewrite.github.io/rewrite-maven-plugin/run-mojo.html#failOnInvalidActiveRecipes
For the Gradle plugin I'm not aware of any plugin to generate plugin documentation, but perhaps I'm just not fully caught up there; any pointers appreciated!


Time Tracker Plug-IN

Hey guys I wanted to make a suggestion on the Time-Tracker 'Farming' Plugin
Is there a way we can choose specific patches into specific categories and delete some others? (Obviously being able to 'undelete' them in the settings).
It's so clumped and scattered where everything is and it's combined with other patches that I don't use. I would love the idea if we can make the whole thing customizable and making farm runs easier.
Thank you for reading my post

Duplicate of #3056


Monitoring NetworkManager 1.0

I am trying to switch from the libdbus based node-dbus over to dbus-native and am having some problems with getting signals from NetworManager.  If I run dbus-monitor with the parameters in this script I see all the messages come across.  My script runs and connects to the system bus but I get no signals emitted.
var bus = require('dbus-native').systemBus();
var signame = 'StateChanged';
bus.addMatch('type=\'signal\',member=\'' + signame + '\'',
             function(err, value) {
                 if (err) throw new Error(err);
});
var signalFullName = bus.mangle('/org/freedesktop/NetworkManager',
                                'org.freedesktop.NetworkManager',
                                signame);

bus.signals.on(signalFullName, function(messageBody) {
    console.log(messageBody);
});

try to log all incoming messages with
bus.connection.on('message', function(msg) {
   console.log(msg);
});

Nothing from NetworkManager.   I get the initialization messages from
org.freedesktop.DBus but after unplugging and plugging in an ethernet cable
I see nothing.
{ serial: 1,
destination: ':1.98',
replySerial: 1,
signature: 's',
sender: 'org.freedesktop.DBus',
type: 2,
flags: 1,
body: [ ':1.98' ] }
{ serial: 2,
path: '/org/freedesktop/DBus',
interface: 'org.freedesktop.DBus',
member: 'NameAcquired',
destination: ':1.98',
signature: 's',
sender: 'org.freedesktop.DBus',
type: 4,
flags: 1,
body: [ ':1.98' ] }
On Sat, Apr 11, 2015 at 12:04 PM, Andrey Sidorov<EMAIL_ADDRESS>wrote:

try to log all incoming messages with
bus.connection.on('message', function(msg) {
console.log(msg);
});
—
Reply to this email directly or view it on GitHub
https://github.com/sidorares/node-dbus/issues/71#issuecomment-91816825.

Can you put your dbus-monitor command here, I'll try to reproduce

Sure. Thanks for taking a look at this.
dbus-monitor --system
"type='signal',sender='org.freedesktop.NetworkManager',interface='org.freedesktop.NetworkManager',member='StateChanged'"
Then unplugged the network cable, or turning off your wifi should cause a
bunch of uint32's to be returned.
On Sat, Apr 11, 2015 at 1:25 PM, Andrey Sidorov<EMAIL_ADDRESS>wrote:

Can you put your dbus-monitor command here, I'll try to reproduce
—
Reply to this email directly or view it on GitHub
https://github.com/sidorares/node-dbus/issues/71#issuecomment-91829116.

I have encountered the same problem.

@linux4kix your code works for me
Note that bus.signals is not intended for external usage, it's private to code implementing signal routing
also dbus-monitor adds "eavesdrop=true", but it does not make difference in my setup
You can watch what messages dbus-monitor is sending by using https://github.com/sidorares/node-dbus/blob/master/bin/dbus-dissect.js script:
Start node dbus-dissect.js --system in one window and then  DBUS_SESSION_BUS_ADDRESS=tcp:host=<IP_ADDRESS>,port=3334 dbus-monitor "type='signal',senr='org.freedesktop.NetworkManager',interface='org.freedesktop.NetworkManager',member='StateChanged'" in another

Thanks for following up.  For now I have changed my code to use the getInterface method to provide an interface I can listen to for changes.  That is working for me.

there is also a script to generate client from introspection ahead of time instead of doing it dynamically, check out https://github.com/sidorares/node-dbus/blob/master/bin/dbus2js.js

Yes I have tested that and even adapted it to xml2js v2 and greater.  Those
bindings are what were failing and originally started this discussions.
Doing it statically would help because right now the instantiation is quite
slow and lends itself to race conditions on initialization that I have to
code around.  Basically the addListener function that is generated was the
basis for the original test code I posted.
On Thu, Apr 16, 2015 at 8:53 AM, Andrey Sidorov<EMAIL_ADDRESS>wrote:

there is also a script to generate client from introspection ahead of time
instead of doing it dynamically, check out
https://github.com/sidorares/node-dbus/blob/master/bin/dbus2js.js
—
Reply to this email directly or view it on GitHub
https://github.com/sidorares/node-dbus/issues/71#issuecomment-93659095.

Actually I have finally realized what the problem is.  When trying to setup
the addMatch rule for the listener we are racing and hitting this check.
if(!self.name) return callback(null, null);  This is why the check for err
is failing we are bailing out but not returning an error!  Because of this
addMatch is never sent over the bus and the reason I don't get any signals.
It seems we should be emitting a ready signal once the initial 'Hello'
message returns.
On Thu, Apr 16, 2015 at 8:57 AM, Jon Nettleton<EMAIL_ADDRESS>wrote:

Yes I have tested that and even adapted it to xml2js v2 and greater.
Those bindings are what were failing and originally started this
discussions.  Doing it statically would help because right now the
instantiation is quite slow and lends itself to race conditions on
initialization that I have to code around.  Basically the addListener
function that is generated was the basis for the original test code I
posted.
On Thu, Apr 16, 2015 at 8:53 AM, Andrey Sidorov<EMAIL_ADDRESS>wrote:

there is also a script to generate client from introspection ahead of
time instead of doing it dynamically, check out
https://github.com/sidorares/node-dbus/blob/master/bin/dbus2js.js
—
Reply to this email directly or view it on GitHub
https://github.com/sidorares/node-dbus/issues/71#issuecomment-93659095.

what callback are you talking about?

The return callback in this block.  Why is this not returning an error?
// bus meta functions
this.addMatch = function(match, callback) {
    if(!self.name) return callback(null, null);
    this.invokeDbus({ 'member': 'AddMatch', signature: 's', body:

[match] }, callback);
};
On Fri, Apr 17, 2015 at 9:00 AM, Andrey Sidorov<EMAIL_ADDRESS>wrote:

what callback are you talking about?
—
Reply to this email directly or view it on GitHub
https://github.com/sidorares/node-dbus/issues/71#issuecomment-93920539.

So for testing.  I have added a patch here.
diff --git a/lib/bus.js b/lib/bus.js
index cc8f482..00797b5 100644
--- a/lib/bus.js
+++ b/lib/bus.js
@@ -241,6 +241,7 @@ module.exports = function bus(conn, opts) {
this.invokeDbus({ member: 'Hello' }, function(err, name) {
if (err) throw new Error(err);
self.name = name;

       self.signals.emit('ready');
   });

} else {
self.name = null;

Then in my test code waiting for that signal before setting up my signal
handlers.
var bus = require('../index.js').systemBus();
var interface = require('./nm.js');
nm = new interface'org.freedesktop.NetworkManager';
bus.signals.on('ready', function() {
nm.on('PropertiesChanged', function(properties) {
console.log('PropertiesChanged', properties);
});
});
That allows me to catch the signals and get back the structure.
libphy: 2188000.ethernet:00 - Link is Down
PropertiesChanged [ [ 'State', [ [Object], [Object] ] ],
[ 'PrimaryConnection', [ [Object], [Object] ] ],
[ 'ActiveConnections', [ [Object], [Object] ] ],
[ 'Connectivity', [ [Object], [Object] ] ] ]
On Fri, Apr 17, 2015 at 9:04 AM, Jon Nettleton<EMAIL_ADDRESS>wrote:

The return callback in this block.  Why is this not returning an error?
// bus meta functions
this.addMatch = function(match, callback) {
    if(!self.name) return callback(null, null);
    this.invokeDbus({ 'member': 'AddMatch', signature: 's', body:

[match] }, callback);
};
On Fri, Apr 17, 2015 at 9:00 AM, Andrey Sidorov<EMAIL_ADDRESS>wrote:

what callback are you talking about?
—
Reply to this email directly or view it on GitHub
https://github.com/sidorares/node-dbus/issues/71#issuecomment-93920539.

hm, not sure. Looks like a bug

there is "connect" event at the end of initial handshake and response to "Hello" message - https://github.com/sidorares/node-dbus/blob/master/index.js#L96

actually, it's emitted before 'Hello'
Hello is sent from here - https://github.com/sidorares/node-dbus/blob/master/index.js#L96

ok, the code is related to "direct" mode - see https://github.com/sidorares/node-dbus/commit/90593b751d1d4168fe636b7799c3ccc2ca8fc514 and #47

Yep that is exactly it.  Any ideas what the best fix is?
On Fri, Apr 17, 2015 at 9:35 AM, Andrey Sidorov<EMAIL_ADDRESS>wrote:

ok, the code is related to "direct" mode - see 90593b7
https://github.com/sidorares/node-dbus/commit/90593b751d1d4168fe636b7799c3ccc2ca8fc514
and #47 https://github.com/sidorares/node-dbus/pull/47
—
Reply to this email directly or view it on GitHub
https://github.com/sidorares/node-dbus/issues/71#issuecomment-93935080.


Bug in SMS OTP page

Describe the issue:

Configure SMS OTP federated authenticator and add as the second step for an application. Getting following error page when try to access SMS OTP page.

How to reproduce:

Expected behavior:

Environment information (Please complete the following information; remove  any unnecessary fields) :

Product Version: [e.g., IS 5.10.0, IS 5.9.0]
OS: [e.g., Windows, Linux, Mac]
Database: [e.g., MySQL, H2]
Userstore: [e.g., LDAP, JDBC]

Optional Fields
Related issues:

Suggested labels:

With the unification effort, an invalid of block has been introduced to the SMS OTP JSP. This should be commented-out and moved to the TODO for future improvement reference.

Closing as this is fixed.


Module not found: Error: Can't resolve 'react-leaflet-waypoints'

https://prnt.sc/1KDiFkGHipoF

Hi @p-butovets , thanks for your interest. It was long time without doing anything in this project. Im taking a look at it right now, will give you a better answer on the weekend as I will have more time to work on it. Meanwhile I suggest you to try the version 0.1.7 as it was the last one I tried in the test project https://github.com/ozaytsev86/react-leaflet-waypoints-test. Let me know if you need a hand with it.

I've fixed it in the v0.1.15. Cheers.


mistserver on archlinux arm

Hi thanks for your software in the first place.
I have build the server on archlinux arm (armv7h RaspberryPi2) , with a home brew PKGBUILD
It gives me a warning about a unsigned intger in timings.cpp
src/mistserver-git/lib/timing.cpp:68:3: warning: this decimal constant is unsigned only in ISO C90    return ((((long long int)t.tv_sec) +<PHONE_NUMBER>) << 32) + (t.tv_nsec * 4.2949);
I patched with --- See next post
diff -aur mistserver-git.a/lib/timing.cpp mistserver-git.b/lib/timing.cpp
--- mistserver-git.a/lib/timing.cpp    2016-01-29 16:33:35.306150858 +0100
+++ mistserver-git.b/lib/timing.cpp    2016-01-29 16:35:49.725261635 +0100
@@ -65,7 +65,7 @@
long long Util::getNTP() {
struct timespec t;
clock_gettime(CLOCK_REALTIME, &t);
-  return ((((long long int)t.tv_sec) +<PHONE_NUMBER>) << 32) + (t.tv_nsec * 4.2949);
+  return ((((long long int)t.tv_sec) +<PHONE_NUMBER>U) << 32) + (t.tv_nsec * 4.2949);
}
/// Gets the current time in millisecon
Now it builds without issues. Thought you would like to know , thanks qinohe

Dove a little bit deeper into the number '2208988800', and what it represents, and it's about the epoch on a 32 bit system. This machine is a RaspberryPi 2, and it honers the 32bit epoch fail after<PHONE_NUMBER> which will be 'Tue Jan 19 04:14:07 CET 2038' (local Netherlands).<PHONE_NUMBER> will fail.The next patch builds without problems, and is better than the former.
diff -aur mistserver-git.a/lib/timing.cpp mistserver-git.b/lib/timing.cpp
--- mistserver-git.a/lib/timing.cpp	2016-01-29 19:20:44.204785618 +0100
+++ mistserver-git.b/lib/timing.cpp	2016-01-29 19:24:30.763429287 +0100
@@ -65,7 +65,7 @@
 long long Util::getNTP() {
   struct timespec t;
   clock_gettime(CLOCK_REALTIME, &t);
-  return ((((long long int)t.tv_sec) +<PHONE_NUMBER>) << 32) + (t.tv_nsec * 4.2949);
+  return ((((long long int)t.tv_sec) +<PHONE_NUMBER>) << 32) + (t.tv_nsec * 4.2949);
 }
 /// Gets the current time in milliseconds.

Thanks! We're actually working on a long overdue change to the source that will make it fully compatible with other processor types, and will make sure to pick this up during that!

By the way, for those willing to try a binary ARMHF build I have put mine on:
https://dl.bintray.com/gdm85/ubuntu14-bin/
(latest master) It was not possible to build with make -j because of memory limitations of my device, but in the end it finished successfully (albeit the warnings). Now I am going to give this a try :)

ARMv7 and ARMv8-64 builds are now officially supported (and available on the website).
Should there still be any problems with compiling on ARM, feel free to re-open this issue.


Should Sol work with Luau?

I was wondering if Sol would be expected to work with Luau as well as it does with "pure" Lua. I expect to try it out in a test application at some point (and can report back here), but am wondering if anyone else has already had experience trying it?
Luau is apparently "syntactically backwards-compatible with Lua 5.1," but has some extensions with new syntax and nice things like type annotations and checking, compound assignments and more literals. It is an open-source project developed by the folks at Roblox.

If Luau has a C API, sure.
If it doesn't have a C API, then probably not!

Doesn't appear to work so easily. I just tried to quickly compile them and got this error:
sol2\include\sol/compatibility/lua_version.hpp(40): fatal error C1083: Cannot open include file: 'lauxlib.h': No such file or directory```

It appears that Luau has changed some of the API of Lua as well. I attempted to readd the lauxlib.h to Luau just to get it to compile but a ton of errors start popping up from Sol's compatibility layer.

Luau does not define any `LUA_VERSION_NUM`, and setting it to 5.1 causes a ton of issues still.

There's actually a whole list of changes in the Luau repo here: https://github.com/Roblox/luau/issues/251

Does look like someone has managed to replace their Lua 5.1 version with Luau:
https://github.com/Roblox/luau/discussions/240

Ah, cool, thanks for the link @dhkatz ! It does indeed look non-trivial, though...

https://github.com/kunitoki/LuaBridge3 is the only binder supporting lua, luajit and luau

Looks nice! I'll have to focus on Luau support first-thing, then. I was hoping Luau would just..... build, out of the box.
Time to fix that!

should be pretty easy, the only tricky thing is getting all internal and user registrations to cleanup correctly without having __gc support in metatables... quite weird they don't want to support it, but 🤷🏻♂

....
Wait they don't provide WHAT--

They have a construct similar to a new taking a callable destructor, they name it lua_newuserdata_dtor where you can delete the objects, but any metatable __gc will be ignored.
I have some wrapping i use in luabridge3, but in general it's quite a behaviour switch and needs some tinkering to make it work with tables https://github.com/Roblox/luau/issues/256

Any updates on this :o?

....
Wait they don't provide WHAT--

Given this, are we to presume this isn't going to happen? :sweat_smile:

Like the other 100+ issues on this repo, I actually do plan to get to work on this. This year was supposed to be my "off" year, but I instead have to fight with a second Committee-Draft ballot for C23 (which is now looking like C24 since it will take so long) and like 30 other things. I'm hoping that before December I can finally start knocking tons of stuff out, but I have not been having luck focusing on my precious sol2 baby lately... 🥲

Would love to hear any updates on this so far @ThePhD ?

Following up again on this?

me too

And another request for update :) Luau is slowly taking over the Lua world, so getting support for it would be amazing!


updating opencl multi_normal_cholesky_lpdf to match the other implementation

Summary
#3002 missed checking cholesky factor for the opencl version of multi_normal_cholesky_lpdf.
This PR adds in the check_cholesky_factor. This should now pass the CI tests.
Tests
No new tests. There is a current test in develop that fails when running with opencl.
Side Effects
None.
Release notes
Updating opencl multi_cholesky_normal_lpdf implementation to check that the input is a valid cholesky factor.
Checklist

[x] Copyright holder: Daniel Lee
The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses:
- Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
- Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

[ ] the basic tests are passing

unit tests pass (to run, use: ./runTests.py test/unit)
header checks pass, (make test-headers)
dependencies checks pass, (make test-math-dependencies)
docs build, (make doxygen)
code passes the built in C++ standards checks (make cpplint)

[x] the code is written in idiomatic C++ and changes are documented in the doxygen

[ ] the new changes are tested

I think we need an opencl version of check_cholesky_factor to have parity


1.0.6

Changes:

Hex backports
Added flax seeds to seeds tag
Fixed edified panels recipe
Added phial merging

Checklist:

[x] Bumped pack.toml version number (if merging to master)
[x] Ran installer with -s both to ensure server-only mods work
[x] Ran packwiz refresh just before final commit

/schedule 2023-05-27 10:00

:hourglass: Merge Schedule
Scheduled to be merged on 2023-05-27 10:00:00 (UTC)


replace greeter mode with investment filter

closes #690
This basically turns greeter mode from yes, see freebies or no, don't see freebies -to-> only see posts with at least X sats "invested." For comments, if investmentFilter > 0, freebies are collapsed unless they've been upvoted.
This is also compatible with wild west mode.
By default investmentFilter = 10 and also applies to lurkers, giving them better spam filtering. We can increase this default for lurkers and new stackers as needed.

Good feedback. Will fix.


improvement: let users choose into which path they install the app

This is about the installer.
Currently the app installs automatically into %programfiles%. This folder requires elevated rights. Maybe the user or admin prefers a folder without elevated right to perform script-based updates.
Can this be added to the installer or at least a radio button option to install it either there or into %appdata%\Zulip?

@vbNETonIce Fixed. Now user will be able to decide where to install the app.


[SWIG][mmlspark] fix seg fault in LGBM_BoosterGetEvalNamesSWIG

fix seg fault in LGBM_BoosterGetEvalNamesSWIG

tagging @AlbertoEAF - this issue was causing a seg fault when I tried to update to the new LGBM_BoosterGetEvalNamesSWIG API
also adding @StrikerRUS @guolinke for review

@StrikerRUS @guolinke can the fix be merged - I can't update to latest right now because of the regression.  Thank you!


chore: add a 6.8 release process workflow

Description
What is changing?

Add a workflow for releasing from 6.8

Is there new documentation needed for these changes?
No
What is the motivation for this change?
Automated releases from 6.8
Double check the following

[x] Ran npm run check:lint script
[x] Self-review completed using the steps outlined here
[x] PR title follows the correct format: type(NODE-xxxx)[!]: description

Example: feat(NODE-1234)!: rewriting everything in coffeescript

[x] Changes are covered by tests
[x] New TODOs have a related JIRA ticket

3c3
<     branches: [5.x]
---
>     branches: [6.8]
11c11
< name: release-5x
---
> name: release-68
22c22
<           target-branch: 5.x
---
>           target-branch: 6.8
78c78
<           sarif_report_target_ref: 5.x
---
>           sarif_report_target_ref: 6.8
102c102,104
<       - run: npm publish --provenance --tag=5x
---
>         # Just picking a string to put here so that releases from this branch are not marked "latest",
>         # we should go and rm-dist-tag after this is published, no reason to keep it tagged.
>       - run: npm publish --provenance --tag=stable

The diff against release-5.x.yml


Rename allowence to allowance

Fixes inconsistent usage of allowence / allowance. Migrates according DB column.

Thank you @jekuno


Allow users to include ssl_sa_certs via env vars for kfp_tekton client

What changes were proposed in this pull request?

As the pipeline editor fails to connect to an unsecured pipeline server due to a certs issue, this PR includes an environment variable that can be pointed to the ssl_cert, which would be used for setting up the connection.
KF_PIPELINES_SSL_SA_CERTS can be set with cert path.
and ssl_ca_cert var would be set with the value and passed to kfp SDK.
Fixes: #3149
How was this pull request tested?

Developer's Certificate of Origin 1.1
   By making a contribution to this project, I certify that:

   (a) The contribution was created in whole or in part by me and I
       have the right to submit it under the Apache License 2.0; or

   (b) The contribution is based upon previous work that, to the best
       of my knowledge, is covered under an appropriate open source
       license and I have the right under that license to submit that
       work with modifications, whether created in whole or in part
       by me, under the same open source license (unless I am
       permitted to submit under a different license), as indicated
       in the file; or

   (c) The contribution was provided directly to me by some other
       person who certified (a), (b) or (c) and I have not modified
       it.

   (d) I understand and agree that this project and the contribution
       are public and that a record of the contribution (including all
       personal information I submit with it, including my sign-off) is
       maintained indefinitely and may be redistributed consistent with
       this project or the open source license(s) involved.

This only allows for one global cert path, should we actually add a config on the runtime metadata to allow passing this on the UI per server?

This only allows for one global cert path, should we actually add a config on the runtime metadata to allow passing this on the UI per server?

Is the idea that a site could target multiple KFP clusters (e.g., dev, test, and production) where the "valid" certs vary from target to target?
This makes sense, although I don't recall what the overhead is to extend runtime configurations with an optional property.  Does this require UI work or is that portion dynamic?

This only allows for one global cert path, should we actually add a config on the runtime metadata to allow passing this on the UI per server?

Is the idea that a site could target multiple KFP clusters (e.g., dev, test, and production) where the "valid" certs vary from target to target?
This makes sense, although I don't recall what the overhead is to extend runtime configurations with an optional property. Does this require UI work or is that portion dynamic?

@lresende  @kevin-bates thanks for the comments
If we want to provide this option via runtime configurations then it would require UI change.
With this my idea, was the simply provide a way for user with unsecured cluster to utilize the feature of elyra pipeline , with a simple env var set.
as i understand from the notes, the insecure cluster support for overall elyra feature is not in avenue of development for now.

Nice work, I like this current proposed no-frills way

LGTM, could you also provide a little update to the docs mentioning the var so that other users can leverage it.

could you also provide a little update to the docs mentioning the var so that other users can leverage it.

@lresende , sorry totally missed this PR.
As you instructed, I updated the docs with details.
PTAL, at your convenience


[actions] Refactor actions to reuse common get-image action

Summary: Adds a get_image.yaml github action that can be reused by the various actions that need to look at docker.properties to get the image name for their subsequent job.
This reduces the need to repeat code for all the different actions that require our custom dev image.
Type of change: /kind test-infra
Test Plan: Testing the actions with this PR.

Or perhaps just a shell script

Shouldn't get_image be a custom action instead of a workflow?

I'm following this guide: https://docs.github.com/en/actions/using-workflows/reusing-workflows
Seems unnecessary to make it a custom action to me, but if there's a reason you think its better I'm open to it.


Local waker reference optimization

The context API was specifically designed so that it only returns a reference to a local waker. This PR uses this fact and returns a local waker that is created without cloning the Arc<Node<T>>. Cloning the Arc is not required because the reference cannot outlive it anyway.
@cramertj This requires careful review. I'm not so sure whether we should merge it right away.

This is an interesting idea and could possibly be worth it, but I'm inclined to hold off on any more optimizations to this code before we do a cleanup of some of the unsafety and do careful profiling. FuturesUnordered as a whole is a large body of unsafe code that is difficult to reason about correctly.

@cramertj Let's let this simmer a bit. I got the idea from how Alex does it with the two queues FuturesUnordered has. He also made it so that the Arc is never cloned. I agree that we should hold off and wait until we have a large codebase we can test it on and see if it works as intended.

I've reworked this code, so that it is based on the current head of the 0.3 branch.

After my last refactoring a few days ago I feel now pretty confident about the quality of this code and I think we should merge it.
@cramertj Can you review my latest changes?


Better flight SQL example codes

Which issue does this PR close?

Closes #.
Rationale for this change
Provide more detail examples and test codes for flight SQL.
What changes are included in this PR?

Are there any user-facing changes?

I profiled the test case test_select_1 and found that prepare cause much more latency in TcpClient.
 cargo test --release --package arrow-flight --example flight_sql_server --all-features --features flight-sql-experimental --features tls -- tests::test_select_1 --exact --nocapture

running 1 test
testing uds client
prepare cost: 761.35µs
execute cost: 671.36µs
do get cost: 716.169µs
Client finished!
=======
testing tcp client
prepare cost: 41.503622ms
execute cost: 1.55827ms
do get cost: 1.58378ms
Client finished!
=======
testing https client
prepare cost: 1.39358ms
execute cost: 1.31692ms
do get cost: 1.354041ms
Client finished!
=======
test tests::test_select_1 ... ok

no ideas about the reason.

Oh, it's due to TcpNoDelay, it's not enabled.

Working on updating this

Thank you for this :+1:


Beta calculation is correct in Lecture 30?

Hello,
In lecture 30 ( (The Capital Asset Pricing Model and Arbitrage Pricing Theory) Beta was calculated with
AAPL_results = regression.linear_model.OLS(R-R_F, sm.add_constant(M)).fit()
but shouldn't be with the following formula?
AAPL_results = regression.linear_model.OLS(R-R_F, sm.add_constant(M-R_F)).fit()
I say this because the original formula for return is
R = Rf + Beta * (Rm - Rf).
resolving for Beta is
Beta = (R - Rf) / (Rm - Rf)
Thanks,
JM

I find this weird too, I think it is not correct. Anyone can answer it? Thanks


Feature/66 introduce logging config

Add new setup method and module for logging.
Refactored all modules and logging calls.

Closes #66

Release notes:

Add a new setup method and module for logging.
Refactored all modules and logging calls.

If I understand it correctly the issue was with not having a Handler, which caused not logging into CI.

Yes, from the experiment, this was the source of problems.


Visual mode highlighting fails

All attempts to highlight text in visual mode fail with E16: Invalid range. Other (built-in) vim commands succeed on the same visual selections. I've tried in a variety of types of buffers to confirm it's not an interaction with, e.g., an LSP or highlight setting.
I'm running neovim 0.9.5 with the latest version of vim-highlighter.

Thanks for your update.
Does this happen when you use command line input by pressing the colon : in visual mode? For example :Hi+x? If so, the auto range prefix :'<,'> may be causing this problem. In that case, please try deleting this prefix part and pressing enter. If it works, I would like to recommend using the default key mapping,HiSet.

Hey - that is in fact the issue & solution - thanks!


[PLOP-4592] First release

What Jira issue is your PR related to?
PLOP-4592
What change(s) does your PR add?
Enhances the original library to support a locks table to avoid concurrency when updating functions
How did you test your change(s)?
Local tests
What do you want feedback on?
Code, changes

@Stormyy   - this is a helper library I'm using further in GoldenEye.


Issue with using selenium and webdriver doc

I followed the document here:
https://github.com/atom/electron/blob/master/docs/tutorial/using-selenium-and-webdriver.md
using selenium-webdriver, but when I run a very simple version of the provided code:
var webdriver = require('selenium-webdriver');

var driver = new webdriver.Builder()
  // The "9515" is the port opened by chrome driver.
  .usingServer('http://localhost:9515')
  .withCapabilities({
    chromeOptions: {
      binary: '/usr/local/bin/atom'
    }
  })
  .forBrowser('electron')
  .build();

driver.quit();

And I let this run for about 30 seconds, I always get the error:
/Users/jonaldislarry/Projects/e2e/node_modules/selenium-webdriver/lib/goog/async/nexttick.js:41
  goog.global.setTimeout(function() { throw exception; }, 0);
                                      ^
UnknownError: unknown error: Chrome failed to start: exited normally
  (Driver info: chromedriver=2.20.353124<PHONE_NUMBER>62d32c80f1dce587c8154a1efa0c3b),platform=Mac OS X 10.11.0 x86_64)
    at new bot.Error (/Users/jonaldislarry/Projects/e2e/node_modules/selenium-webdriver/lib/atoms/error.js:108:18)
    at Object.bot.response.checkResponse (/Users/jonaldislarry/Projects/e2e/node_modules/selenium-webdriver/lib/atoms/response.js:109:9)
    at /Users/jonaldislarry/Projects/e2e/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:160:24
    at promise.Promise.goog.defineClass.invokeCallback_ (/Users/jonaldislarry/Projects/e2e/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:1337:14)
    at promise.ControlFlow.goog.defineClass.goog.defineClass.abort_.error.executeNext_.execute_ (/Users/jonaldislarry/Projects/e2e/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:2776:14)
    at promise.ControlFlow.goog.defineClass.goog.defineClass.abort_.error.executeNext_ (/Users/jonaldislarry/Projects/e2e/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:2758:21)
    at goog.async.run.processWorkQueue (/Users/jonaldislarry/Projects/e2e/node_modules/selenium-webdriver/lib/goog/async/run.js:124:15)
    at process._tickCallback (node.js:366:9)
From: Task: WebDriver.createSession()
    at Function.webdriver.WebDriver.acquireSession_ (/Users/jonaldislarry/Projects/e2e/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:157:22)
    at Function.webdriver.WebDriver.createSession (/Users/jonaldislarry/Projects/e2e/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:131:30)
    at Builder.build (/Users/jonaldislarry/Projects/e2e/node_modules/selenium-webdriver/builder.js:445:22)
    at Object.<anonymous> (/Users/jonaldislarry/Projects/e2e/main.js:12:4)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Function.Module.runMain (module.js:467:10)
    at startup (node.js:134:18)
From: Task: WebDriver.quit()
    at webdriver.WebDriver.schedule (/Users/jonaldislarry/Projects/e2e/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:362:15)
    at webdriver.WebDriver.quit (/Users/jonaldislarry/Projects/e2e/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:445:21)
    at Object.<anonymous> (/Users/jonaldislarry/Projects/e2e/main.js:39:8)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Function.Module.runMain (module.js:467:10)
    at startup (node.js:134:18)
    at node.js:961:3

I'm wondering if somebody can maybe point me in the right direction here.... Much appreciated!

Starting with /usr/local/bin/atom is probably not going to work since Atom has its own ways of handling command line, can you try with your own app or a fresh downloaded binary?

I ended up going with the excellent spectron package instead of this route.  I suspect the underlying issue with this was that the version of electron that atom was using was different than the one expected by the selenium package.  I'm going to close out this issue.  Thanks for your attention @zcbenz!


Makes shared libraries instead of static ones.

Makes shared libraries (linked binaries will be smaller).
Installed binaries and libraries will be stripped.
Fixed some minor inconsistencies which resulted in not optimized executables (like gpiod).
make install removes the old static libraries.

Will be changed to provide shared and static library.


Plans to support async event processing?

First, thanks for building this! Looks like it will be a great help.
Do you have any plans to support async event processing rather than how the package (I presume) works currently where events are processed during the same request as an event is created?
More generally, do you think there is a benefit to async event processing? Could it make an event-sourced application more robust?

You can queue events for async processing: https://docs.spatie.be/laravel-event-projector/v1/basic-usage/making-sure-events-get-handled-in-the-right-order#handling-events-in-a-queue
As for the benefits of async processing, the second paragraph of the section I linked answers it. If you're gonna need the result of the event's processing in the same request as the event is generated, use sync events. Else, async away.

Great, thanks.
Presumably when you say “you can set the name of the queue connection
in the queue key of the event-projector config file” you’re
referring to the same queue connections defined in the applications
Laravel configuration?

Great, thanks.
Presumably when you say...

"you can set the name of the queue connection
in the queue key of the event-projector config file"

...you’re referring to the same queue connections defined in the application's Laravel configuration?

Yes, naturally. It might be worth noting that you can set this per Projector, meaning the same event can be handled synchronously by some projectors, and asynchronously by others, and even in different queues.
For example, if you emit a "TaskCreated" event, you might want to immediately update your tasks table, but queue the update to your metrics reports.


Models not pushing to specified username (organisation)

Running:
hf_username="Trelis"
new_model_name="Meta-Llama-3-8B-Instruct-Gaeilge"
if True: model.push_to_hub_merged(f"{hf_username}/{new_model_name}", tokenizer, save_method = "merged_16bit")

still leads to pushing the model to the username associated with the hf token (RonanMcGovern in my case), and not the hf_username I have specified (Trelis, the org).
Full logs:
Unsloth: Merging 4bit and LoRA weights to 16bit...
Unsloth: Will use up to 1390.17 out of 2003.87 RAM for saving.
100%|██████████| 32/32 [00:00<00:00, 96.41it/s]
Unsloth: Saving tokenizer...
tokenizer config file saved in Meta-Llama-3-8B-Instruct-Gaeilge/tokenizer_config.json
Special tokens file saved in Meta-Llama-3-8B-Instruct-Gaeilge/special_tokens_map.json
Uploading the following files to RonanMcGovern/Meta-Llama-3-8B-Instruct-Gaeilge: tokenizer.json,special_tokens_map.json,tokenizer_config.json
Model config LlamaConfig {
  "_name_or_path": "meta-llama/Meta-Llama-3-8B-Instruct",
  "architectures": [
    "LlamaForCausalLM"
  ],
  "attention_bias": false,
  "attention_dropout": 0.0,
  "bos_token_id": 128000,
  "eos_token_id": 128009,
  "hidden_act": "silu",
  "hidden_size": 4096,
  "initializer_range": 0.02,
  "intermediate_size": 14336,
  "max_position_embeddings": 8192,
  "mlp_bias": false,
  "model_type": "llama",
  "num_attention_heads": 32,
  "num_hidden_layers": 32,
  "num_key_value_heads": 8,
  "pad_token_id": 128255,
  "pretraining_tp": 1,
  "rms_norm_eps": 1e-05,
  "rope_scaling": null,
  "rope_theta": 500000.0,
  "tie_word_embeddings": false,
  "torch_dtype": "bfloat16",
  "transformers_version": "4.41.0",
  "unsloth_version": "2024.5",
  "use_cache": false,
  "vocab_size": 128256
}

Configuration saved in Meta-Llama-3-8B-Instruct-Gaeilge/config.json
Configuration saved in Meta-Llama-3-8B-Instruct-Gaeilge/generation_config.json
 Done.
Unsloth: Saving model... This might take 5 minutes for Llama-7b...
The model is bigger than the maximum size per checkpoint (5GB) and is going to be split in 4 checkpoint shards. You can find where each parameters has been saved in the index located at Meta-Llama-3-8B-Instruct-Gaeilge/model.safetensors.index.json.
Uploading the following files to RonanMcGovern/Meta-Llama-3-8B-Instruct-Gaeilge: README.md,model.safetensors.index.json,model-00004-of-00004.safetensors,model-00003-of-00004.safetensors,model-00002-of-00004.safetensors,model-00001-of-00004.safetensors,generation_config.json,config.json
100%
 4/4 [01:03<00:00, 17.43s/it]
model-00004-of-00004.safetensors:
 1.18G/? [00:04<00:00, 669MB/s]
model-00003-of-00004.safetensors:
 4.93G/? [00:19<00:00, 614MB/s]
model-00002-of-00004.safetensors:
 5.01G/? [00:18<00:00, 779MB/s]
model-00001-of-00004.safetensors:
 4.99G/? [00:19<00:00, 630MB/s]
Done.
Saved merged model to https://huggingface.co/Trelis/Meta-Llama-3-8B-Instruct-Gaeilge

Oddly, there is still a readme that gets pushed to the Trelis Repo... but the model and tokenizer go to the RonanMcGovern repo

Oh my I will check this

Hi @RonanKMcGovern apologies for the error. Hopefully the issue is solved now? Thanks!


initial commit with angular 2 structure

@luisvt I started with the structure here,
in the ng2_strap the examples are in the web folder, I think they should be on example right ?

Another question is, can we use something like bootstrap_sass ? is it the best approach ?


create index.d.ts (for lib/assert.js)

It may not be necessary, I added a type definition file. (index.d.ts)
Please merge if you like. 😸

Thanks!


Enable test environment which don't require importing cluster

Along with #1230, we can reduce the steps for testing the topology.
At a minimum, we need to do several steps so that we can run test mode topology:

create cluster via importing cluster or setting up manual cluster
create environment and associate services

whereas running test topology don't require anything but making sure that Storm (and SR if necessary) is installed and properly configured to streamline node.
Test environment must be set to read-only.

#1232

Thanks @HeartSaVioR , merged #1232 to master


Passed parameter types do not seem to match

https://github.com/azure-rtos/usbx/blob/10ad1105ef70e8954e8beb684b409a5c8b5cedd1/common/usbx_host_classes/src/ux_host_class_cdc_acm_activate.c#L91
The trace found that the type of external incoming is UX_DEVICE *, which is forced to UX_INTERFACE * here

@zjm1060 thank you for the report. Our USB engineers will review the issue.  We may contact you for additional information.  This issue is closed. Feel free to reopen it if you have further questions.


assertSoftDeleted assertion passes incorrectly when database is SQLite

Laravel Version: 8.33.1
PHP Version: 8.0.1
Database Driver & Version: SQLite version 3.32.3

Description:
When using SQLite as the database driver in the testing environment, the assertSoftDeleted() assertion passes incorrectly for models that do not even use soft deletes.  I wonder if this is related to Quirk 10 of SQLite where dubious sql is allowed without any error or warning.  It seems wrong that the assertion doesn't fail on this driver however.
Steps To Reproduce:

Fresh install of Laravel 8
Switch to SQLite for database testing in PHPUnit.xml
Add a test that asserts that a freshly created user should be soft deleted:

public function testSoftDeleteBehaviour()
    {
        $user = User::factory()->create();

        $this->assertSoftDeleted('users',['id'=>$user->id]);
    }

The above test passes incorrectly on SQLite; fails as expected for MySql.

I can't reproduce this. The test fails for me.


make ChannelOutboundBuffer's flushed and unflushed state simpler

Motivation:
make ChannelOutboundBuffer's flushed and unflushed state simpler.
Imagine that flushedEntry is always chasing unflushedEntry, when flushedEntry==unflushedEntry, it is considered to be catching up.
case 1:
unflushedEntry=flushedEntry=null
case 2: (add)
Entry(unflushedEntry) --> ... Entry(tailEntry)-->null
case 3: (flush)

Entry(flushedEntry&unflushedEntry) --> ... Entry(tailEntry)-->null  (transitional phase)
Entry(flushedEntry) --> ... Entry(tailEntry)-->null(unflushedEntry)  (when flushedEntry==unflushedEntry, set unflushedEntry=tail.next)

case 4: remove

Entry(flushedEntry) --> ... Entry(unflushedEntry)-->...Entry(tailEntry)-->null
Entry(flushedEntry&unflushedEntry) --> ... Entry(tailEntry)-->null (abort, forbid this step when flushedEntry==unflushedEntry)

Modification:
ChannelOutboundBuffer's add, remove, flush... method
Result:
make ChannelOutboundBuffer's flushed and unflushed state simpler
Fixes #.
If there is no issue then describe the changes introduced by this PR.

I am not convinced this is any better ... lets close it


Translation Toolkit

When I was translating (#418), I did some research and wrote some translation notes.
After that, I wrote a toolkit which can help other translators work more efficiently.
This includes scripts to convert the language file into a spreadsheet file in their target language, together with adding comments and notes.
Please put this toolkit somewhere to help the other translators.
mediainfo_translation_toolkit.zip
mediainfo_translation_toolkit.zip (Update on Mar 1, 2020: Fix bug)
mediainfo_translation_toolkit.zip (Update on Mar 1, 2020: add note to "at ... fps")
Please read readme.md for instructions.

@stevenlele would you mind to open a PR with this files in e.g. /Contrib/mediainfo_translation_toolkit?

@JeromeMartinez OK.


DBZ-7314 Update column.include.list note and property description

DBZ-7314 Follow-up to #5149
This change includes the following updates:

Reword note that follows Table 8, Description of change event key
Reword description of column.include.list property to make it clear that settings must permit capture of primary key/unique key columns.

Merged, thasnk @roldanbob !


Unexpected error in GAX JISON parser for Firestore document path.

See googlecloudplatform/google-cloud-php#1119 for context.
The parse methods in GAX do not accept various symbols which are valid values in Firestore document names.
*
=
}
{
The presence of any of these symbols in arguments given to FirestoreGapicClient::documentPathName() raises the following error:
Fatal error: Uncaught Exception: Parse error on line 1:
Kind/F{[<,>.?509880146
------^
Expecting FORWARD_SLASH, COLON, RIGHT_BRACE, got 'LEFT_BRACE'

Is there any possibility that the parser may be able to support these symbols?

Closing this since support was released in gax 0.37. If there are still issues once google-cloud-php moves to 0.37, please feel free to reopen.


Support of conversion of millisecond Unix time to Refine datetime

Original author<EMAIL_ADDRESS>(September 15, 2012 11:52:15)
It would be nice to have a function such as FORMAT_UTC_USEC to convert Unix time ( which is a number) to a Datatime format, and to extract only year/month/day
Original issue: http://code.google.com/p/google-refine/issues/detail?id=609

For whomever works on this... Here's a good primer, since OpenRefine now uses java.time.offsetdatetime https://stackoverflow.com/questions/21242110/convert-java-util-date-to-java-time-localdate
Our code for the GREL toDate() function is here: https://github.com/OpenRefine/OpenRefine/blob/master/main/src/com/google/refine/expr/functions/ToDate.java

So I'm currently looking at toDate as per #1759 and @thadguidry reminded me of this (thanks Thad!).
At the moment I can think of two options for handling this:
Extend toDate to have a GREL specific 'format' option which is (something like) 'epochms' (epoch milliseconds) which tells toDate to use a long number (or a string which can be converted to a long number) as millisecond Unix time and use that to generate a date/time
The alternative I can see is to have a special new function such as 'epochToDate' which does this specifically.
The second approach avoids making the toDate function even more complex than it already is, but has the downside of introducing a new function rather than a single 'toDate' function handling all conversions to a date.
@thadguidry do you have thoughts on this?

Summary:
I think I would choose the format option to make it painless for our users (we do the hard things, to make it easier for them).
Errata:
While it is painful and complex within our toDate() function, this is necessary to keep GREL syntax nice and tidy. This is also how other programming languages handle this convention, like Javascript (Moment.js), Python, Pandas, Ruby.  Our toDate() already has an optional format argument.  Where I could see this leading to is possibly extending to handle a 3rd argument for timezone or utc.
Moment.js does things so beautifully and should be our model https://momentjs.com/docs/#/parsing/unix-timestamp-milliseconds/
Ruby uses time.at http://ruby-doc.org/core-1.9.3/Time.html#method-c-at
Pandas uses Pandas.Timestamp  https://pandas.pydata.org/pandas-docs/version/0.23.4/generated/pandas.Timestamp.html#
We're not looking to completely incorporate all methods in Ruby and Pandas.Timestamp into our toDate().  Those can be handled by Python/Jython instead of GREL.  But for GREL, it makes sense to at least have a common Unix timestamp convertor built into our toDate() for our users.

Thanks @thadguiry. I can see a new format option working

Our toDate() already has an optional format argument. Where I could see this leading to is possibly extending to handle a 3rd argument for timezone or utc.

One of the complexities of the toDate function in code is that it has a set of optional arguments- including one boolean type (month first) and two string types (locale and repeatable format).
Adding another optional argument (presumably of type string) for timezone will make it even more challenging to make sure the arguments are being interpreted correctly

@ostephens Then don't worry about timezone at this time.  Just use something like:
Date date = Date.from( Instant.ofEpochSecond( timeStamp ) );

and we should be good.  That will give us the UTC/Greenwich time.

[ ] Also ensure that we document on the Wiki this very important footnote:

OpenRefine internally uses java.time which converts a Unix Timestamp using The Java Time-Scale.
The Java Time-Scale divides each calendar day into exactly 86400 subdivisions, known as seconds. These seconds may differ from the SI second. It closely matches the de facto international civil time scale, the definition of which changes from time to time.  More information here: https://docs.oracle.com/javase/8/docs/api/java/time/Instant.html#Time-scale

Hi @thadguidry, as you suggested I've taken a look at this issue. If I understand correctly the goal here is to allow user to use something like toDate(123456, "epoch") for parsing dates from epoch format.

Correct @impune-pl , although we probably want to use the label "unix" instead of "epoch", since "epoch" is generally used to represent a "period of time".  In our case, its a very specific "period of time" that we want to handle more gracefully.  The "the number of seconds that have elapsed since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds."  Which is commonly referred to as Unix time.  Moment.js uses the syntax "moment.unix()" https://momentjs.com/docs/#/parsing/unix-timestamp/ and I think for OpenRefine GREL doing toDate(123456, "unix") would be aligned well with that.  At this time, I wouldn't worry about completely changing to Functional Composition as Ruby and Moment do, but continue to handle as a parameter passed to toDate.

Hi @impune-pl If you don't mind, please take a look at @tfmorris comment on your PR https://github.com/OpenRefine/OpenRefine/pull/2072#issuecomment-638346540

The original request was for microseconds, but we probably want seconds (Unix), milliseconds (ECMAscript), and nanoseconds (Java 8 Instants) as well.
I'm of two minds regarding overloading toDate() with more cruft in the form of made-up format specifiers, but perhaps that's easiest for the user. We may, however want to defer this until we have a design for adding a Date-only data type and fixing the current date handling.

Agree with the suggestions of the different units as listed by @tfmorris here.
I suggested the format string "epochms" originally which would given us the option of "epochs" and "epochns" for seconds/nanoseconds.
I also agree with his concerns about the 'toDate' parameters. toDate is already a bit of a monster in terms of the parameters you can pass, and I did suggest we could separate the epoch time -> date conversation into to a different function - which I think might be appropriate in this case - it would almost certainly be simpler and less prone to breaking things than changing the toDate function.
A possibility I still like is to add a GREL function like epochToDate (I'm sure we can come up with a better name!) which accepts a number as input, outputs a date, and has parameter which allows you to specify the units (seconds, milliseconds, nanoseconds)
This would give an option that could be easily added while we wait for any more substantial changes to the date handling

I'm Maria Angella, an Outreachy participant willing to work on this issue.
Kindly assign me the task for this period.
Thank you

Hi @MariaAngella, I assigned you one already, if you don't mind I would wait a bit more to assign you a second one as there is a chance we run out of good first issues in this initial Outreachy period.

This is fine @wetneb. I'll work on the one assigned already... Thanks

Hello! My name is Keerthy Reddy and I am a Outreachy applicant for Summer 2022. If it is still available, can I be assigned this issue to work on? Thank you so much!

Hello! My name is Keerthy Reddy and I am a Outreachy applicant for Summer 2022. If it is still available, can I be assigned this issue to work on? Thank you so much!

@keerthybreddy sure. I'm assigning it to you.
Regards, Antoine

Hi! I am currently working on testing the epochToDate() method that I have written to solve this issue, but am having trouble with it. Can someone explain how I can reproduce and test the issue? Thank you so much!

Hi!
I edited the GREL epochToDate() function written by SustechcsKing with ZoneId.systemDefault() in order to make sure that the function is using the time zone that the system is currently in rather than the "America/Chicago" time zone that was previously hardcoded into the function.
However, this change is causing the epoch timestamp to convert to the date-time of the current time zone when being edited and then change to the UTC date-time when published.
Is this the expected result or does the published result also need to have the current time zone date-time?

@keerthybreddy what do you mean by "published"?  You mean exported to a CSV/TSV/Excel or something? or do you mean once the Apply button in the Edit Cell dialog has been clicked?

@keerthybreddy what do you mean by "published"? You mean exported to a CSV/TSV/Excel or something? or do you mean once the Apply button in the Edit Cell dialog has been clicked after a Data type change is made then the value in the column cell is UTC date-time?

Sorry! I meant the latter. Once  I click the Edit Cells --> Transform option on the column with the timestamps, input value.epochToDate(), the preview shows the current time zone date-time, and changes to UTC date-time when I click the Ok button.

Sorry! I meant the latter. Once I click the Edit Cells --> Transform option
on the column with the timestamps, input value.epochToDate(), the preview
shows the current time zone date-time, and it changes to UTC date-time when
I click the Ok button.
I have attached screenshots of my screen before and after hitting the Ok
button while using my current timestamp that should return April 20, 2022
12:58 am.
On Tue, Apr 19, 2022 at 9:01 PM Thad Guidry @.***>
wrote:

@keerthybreddy https://github.com/keerthybreddy what do you mean by
"published"? You mean exported to a CSV/TSV/Excel or something? or do you
mean once the Apply button in the Edit Cell dialog has been clicked?
—
Reply to this email directly, view it on GitHub
https://github.com/OpenRefine/OpenRefine/issues/608#issuecomment-1103446999,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AYOSORJMSBUXHTCS3FSY6OLVF56QHANCNFSM4ABTK6SA
.
You are receiving this because you were mentioned.Message ID:
@.***>

Hi! I just submitted a pull request for this issue here, please review it when possible!

Originally I said:

A possibility I still like is to add a GREL function like epochToDate (I'm sure we can come up with a better name!) which accepts a number as input, outputs a date, and has parameter which allows you to specify the units (seconds, milliseconds, nanoseconds)

Which @keerthybreddy has been working on. During the work the question has arisen as to whether epochToDate is an appropriate name. Suggested alternatives we have so far are:

epochToDate()
unixToDate()
posixToDate()

I don't love any of these, but I'm torn between a more appropriate name and keeping the name short and simple ('timeSinceUnixEpochToDate' seems a bit OTT!)
Anyone else have suggestions?
@antoine2711 @wetneb @thadguidry

My opinion would be to keep it as epochToDate() because "epoch" is fairly common short terminology within Unix/Linux documentation and would be typically known coming from many places (including man pages in some cases) and https://en.wikipedia.org/wiki/Unix_time to be "time since Unix epoch".  It's understood that the "epoch" is really an interval and that's represented in an encoding sequence.  I would avoid the host and standards terms "unix" and "posix".
For the documentation, I definitely would point to that Wikipedia link which clears up lots of confusion for most folks.

On my side (as stated on the pull request) I would prefer "unix" or "posix" terms since I consider that "epoch" does not refer to an interval but a specific origin date.

I'm just saying that the representation of the scalar value in Unix systems is commonly called just "Unix time".  But universally, we would say "epoch time" or just "epoch".
I guess most users would be more familiar with "Unix time" (even though "epoch" is indeed a short term often seen as I stated).
So maybe unixToDate is fine... which is a short short version of saying unixTimeToDate which is not that bad an alternative to type out with GREL.  Pick one @ostephens ;-)

(...) Although strictly Unix time is always in seconds since the Unix epoch.
Unix and Posix also aren't date formats so I'm not so keen on posixToDate or unixToDate for the same reason as @wetneb doesn't like epochToDate.

How about the middle ground, unixEpochToDate()?
Regards, Antoine

"UNIX epoch" refers even more unambigously to 1970-01-01 I would say, so rather not for me :)

unixTimeSecondsSinceEpochToDate() might cover it, but it seam a bit long to me.
unixTimeSinceEpochToDate() could be an alternative, though still a bit long.
Even unixTimeEpochToDate() could make it… Your take, @wetneb?

Regards, Antoine

If we're going to go for accuracy over brevity I think we may as well be precise, so out of those my vote goes to timeSinceUnixEpochToDate()
Note that the function takes an argument to specify seconds, milliseconds or microseconds - so it isn't strictly the unix time or seconds - it's time (in seconds, milliseconds or microseconds) since the Unix epoch converted to a Java date/time. So I think "unixTimeSeconds" is definitely wrong, and as Unix Time is expressed in seconds, technically unixTime is also wrong

After reading through the article that @thadguidry linked, I think I agree with @ostephen 's suggestion of timeSinceUnixEpochToDate() for the name. If no one else has any objections, I can change the name of the function to this.


Handle exception if trigger registration fails

It looks like if there is a conflict in trigger type registration, we simply bubbled up the exception to the point the API process shut down. Now we catch the exception, log as a warning and move on.
This should address intermittent build failures in circle ci such as https://circleci.com/gh/StackStorm/st2-packages/310

+1

It seems like internal trigger registration failure should indeed be a fatal error and should bubble up.
Only time it shouldn't be a fatal error is if we get duplicate error or similar due to a race - we should explicitly catch this exception thought and bubble up others.
If internal triggers are not registered, this could cause all kinds of issues.

Only time it shouldn't be a fatal error is if we get duplicate error or similar due to a race - we should explicitly catch this exception thought and bubble up others.

You are right. We shouldn't ignore all exceptions. We were qucikly testing this out to see if it stops API process from restarting under gunicorn.


can we set text on left side?

Please consider submitting the following information (if relevant):

Library setup method: file, Carthage, CocoaPods or Swift Package Manager.
Version of the library. Example: 8.0.
Xcode version. Example: 8.3.3.
OS version. Example: iOS 10.3.2.

Thanks for the question @forTJ555. No, the library can't do that at the moment. But the text can easily be added as a UILabel and pinned to the left of the Cosmos view with auto layout.

thanks for updating


fix(types): move the types condition to the front

I moved types condition to the front. package.json#exports are order-sensitive - they are always matched from the top to the bottom. When a match is found then it should be used and no further matching should occur.
Right now, the current setup works in TypeScript but it's considered a bug and it should not be relied upon, see the thread and the comment here. For that reason, I would like to fix all popular packages that misconfigured their exports this way so the bug can be fixed in TypeScript.
⚠ this PR focuses solely on fixing "🐛 Used fallback condition" problem but the "🎭 Masquerading as CJS" remains here. You can check the reported errors here

I am honoured that Shapeshift is considered a "popular package" for this PR to be made.
I am curious however how we would go about fixing the "🎭 Masquerading as CJS" issue. We bundle for CJS, ESM and the web all at once with tsup (our config) and I would have no idea how we can improve that so we'd fix this issue.

I am curious however how we would go about fixing the "🎭 Masquerading as CJS" issue. We bundle for CJS, ESM and the web all at once with tsup (our config) and I would have no idea how we can improve that so we'd fix this issue.

By using tsup here you are creating a dual package. I consider this to be a mistake because you are making your package prone to dual package hazard. It's a popular setup though, so 🤷♂ at least you are not alone in this :P
But either way, by shipping a dual package you are shipping your runtime code twice, and both of those copies can be loaded at the same time by the runtime. In such a situation... it kinda only makes sense to ship your declaration files twice as well. This is the only way for your types to reflect 1 to 1 what the runtime can actually see. So for your .js files you need .d.ts, for your .mjs you need .d.mts and for your .cjs you need .d.cts.
All of this is somewhat complicated and tsup doesn't make it any easier (it doesn't handle it out of the box, I believe that there are open issues in their repo about this so you can find them and track them). So I wouldn't be that surprised if you wouldn't like to fix this at the moment.

Interesting. Thank you for the explanation. Yeah personally for now I'm a proponent of dual packages until the ecosystem at large starts to move more towards ESM. I'm not too fond of the idea of being the one to alienate a lot of our users.
In particular, as far as Sapphire is concerned is that we have to consider our roots. Those lie in @sapphire/framework, a framework for the (mega) popular DiscordJS Discord bot library so as long as DiscordJS ships both CJS and ESM support, so should we.
There have been polls regarding a move to full ESM and so far there really isn't a consensus yet. DiscordJS also has a pretty big backlog of other tasks to do first so I don't see it happening in the coming years honestly.
Eventually, this package and other Sapphire packages will definitely be ESM only, but that'll be quite some time from now.


show pod logs

Right now a user can only view the logs of containers, not of whole pods. We have a hack in place so that when a pod only has one non-pause container then in the details panel of the pod, we let the user view the logs of that container. This doesn't work for the likes of Weave Net pods, which comprise several containers.
Essentially we want the equivalent of kubectl logs -f <pod>.

Right now a user can only view the logs of containers, not of whole pods. We have a hack in place so that when a pod only has one non-pause container then in the details panel of the pod, we let the user view the logs of that container.

I completely misinterpreted what I was seeing...
The 'Get logs' button on the pod detail panel does fetch the pod logs using the k8s API. It even shows history.
HOWEVER, it appears that said k8s API requires a container to be specified when the pod contains more than one (plus plause). Otherwise a "a container name must be specified for pod blah, choose one of: [blah, blah]" error is returned.

What are you suggesting design-wise? Interleaving the logs in the output window? Should we add a prefix saying where they're from? eg.
[container_a] foo
[container_a] bar
[container_b] foo
[container_a] baz
[container_b] bar

see also #1493.

@awh has just found https://github.com/wercker/stern - perhaps we could embed that?


I have implemented BST in C++

Related Issues or Pull Requests
(Implementing Binary_Search_Tree in C++.)
Have you read the Contributing Guidelines?
(Yes, I did.)
Changes made ?
(Added the BST class file coded in C++ and modified readme.md.)
Checklist

[x] I've read the contribution guidelines.
[x] I've checked the issue list before deciding what to submit.

Checked!!

@manvendra264 create a new PR which does't affect any of the README files


Address some todos, create IntProvider for DimensionType

Changed Javadoc of LivingEntity#heal()
Made STATUS_PERMISSION_LEVEL_OFFSET public to remove a magic number from a test
Removed todo variant from WolfMeta since it has it
Added new void threshold field to instances
Add IntProvider class for Dimension Type, adapted from https://minecraft.wiki/w/Dimension_type and Fabric's https://maven.fabricmc.net/docs/yarn-1.17+build.13/net/minecraft/util/math/intprovider/IntProvider.html

I don't agree with the void threshold field, there's no game logic backing it and killing entities below that point (and that's a good thing, i don't think this should be default minestom behaviour)
To me it seems like sticking your own tag on instance for void height if necessary would be a better solution.


🚀 - Add Vitesse theme

Which @codeimage/* package(s) are relevant/releated to the feature request?
highlight
Description
This task consist of creating a new theme for CodeImage editor using CodeMirror API.
https://github.com/antfu/vscode-theme-vitesse

Instructions for contributions

Follow the CONTRIBUTING.md instructions to prepare your environment.

NOTE If your intention is to only develop a new theme, you don't need to use docker or install everything. You will work only on @codeimage/highlight package

Move to packages/highlight. You will see a How to create a new theme section in the README.md file .
Run the pnpm generate:theme script and put the vitesse theme name
Open the theme playground with pnpm dev (from the highlight package) or pnpm dev --filter=@codeimage/highlight (from the root folder)

For further help you can ask for help in the comments below

@riccardoperra  Could you assign this to me ?

Also which theme are we looking for ? Is it Vitesse light or dark ?

Sure .. i created a PR for dark theme. Please check it out.

merged #378


Microsoft.AppCenter WPF 2.2.1-preview error initializing storage

What App Center service does this affect?
Microsoft.AppCenter WPF 2.2.1-preview
Describe the bug
Calling

AppCenter.Start("ID", typeof(Analytics), typeof(Crashes));

Results in an error.
2019-08-09 11:37:35.840 [AppCenter] ERROR: An error occurred while initializing storage
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.MissingMethodException: Method not found: 'System.String SQLitePCL.raw.sqlite3_column_text(SQLitePCL.sqlite3_stmt, Int32)'.
   at SQLite.SQLite3.ColumnString(sqlite3_stmt stmt, Int32 index)
   at SQLite.SQLiteCommand.ReadCol(sqlite3_stmt stmt, Int32 index, ColType type, Type clrType)
   at SQLite.SQLiteCommand.ExecuteScalar[T]()
   at SQLite.SQLiteConnection.ExecuteScalar[T](String query, Object[] args)
   at SQLite.SQLiteConnection..ctor(String databasePath, SQLiteOpenFlags openFlags, Boolean storeDateTimeAsTicks, Object key)
   at SQLite.SQLiteConnectionWithLock..ctor(SQLiteConnectionString connectionString, SQLiteOpenFlags openFlags)
   at SQLite.SQLiteAsyncConnection..ctor(String databasePath, SQLiteOpenFlags openFlags, Boolean storeDateTimeAsTicks, Object key)
   at SQLite.SQLiteAsyncConnection..ctor(String databasePath, Boolean storeDateTimeAsTicks, Object key)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.AppCenter.Storage.StorageAdapter.<InitializeStorageAsync>b__9_0()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AppCenter.Storage.Storage.<InitializeDatabaseAsync>d__19.MoveNext()

To Reproduce
Steps to reproduce the behavior:
Call

AppCenter.Start("ID", typeof(Analytics), typeof(Crashes));

Expected behavior
AppCenter should be initialized properly.
Screenshots
NA
Desktop (please complete the following information):

OS: Windows 10 Pro 17763.615

I had this exact same error but for a different package. I downgraded SQLitePCLRaw.Core from 2.0.0 to 1.1.14 (along with any other related package at 2.0.0) and it then worked again. You may have done a similar thing of just upgrading NuGets, with this package being one of them.

The same here. The problem must be in SQLitePCLRaw.bundle_green, SQLitePCLRaw.core or https://github.com/praeclarum/sqlite-net. Right after I upgraded from 1.1.14 to 2.0.0 I got the same problem. Tried to check here: https://github.com/ericsink/SQLitePCL.raw/blob/master/v2.md but did not find the root cause...

I had this exact same error but for a different package. I downgraded SQLitePCLRaw.Core from 2.0.0 to 1.1.14 (along with any other related package at 2.0.0) and it then worked again. You may have done a similar thing of just upgrading NuGets, with this package being one of them.

THANK YOU! I downgraded like you said and it immediately resolved the issue!

Is this issue still not fixed?
i am also getting the same error but with SQLitePCLRaw.Core  2.0.2 and Winforms

I am also not able to downgrade as there is a dependency on another library
Severity	Code	Description	Project	File	Line	Suppression State Error		Unable to resolve dependencies. 'SQLitePCLRaw.core 1.1.14' is not compatible with 'SQLitePCLRaw.provider.dynamic_cdecl 2.0.2 constraint: SQLitePCLRaw.core (>= 2.0.2)'.			0

Still not fixes as of the time time I tried. Even if you downgrade changes are you will have an issue with another library as well. If I remember correctly it was system.web or something similar.

@hankinsoft , Thanks for the update. I am trying to reach them at the online chating support and update about the status and any possible fixes.

I think this exception is related to this topic.
A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (The database wasn't initialized.)
Problem Id:Microsoft.AppCenter.Storage.StorageException at Microsoft.AppCenter.Storage.Storage+<>c__DisplayClass30_01.b__0`

.NET Core 3.1 WPF
Microsoft.AppCenter v3.0.0

We're encountering the same issue, but the work around of reverting the SQLite package version doesn't seem to be possible on Microsoft.AppCenter v3.1.0 since it seems to require at least 2.0.
Is there any update on this or other solution beyond having to revert AppCenter to an earlier version that allows 1.1.14?

Hi there! This issue has been fixed in the 3.0.0 version of App Center SDK.
I'm closing this issue but feel free to open a new issue on the appcenter-sdk-dotnet repository if this issue still persists.