Properly remove vmmap and descs for forked cages after exec

The threads-teardown PR implements this now for most cages but in the case where we fork and then exec the cage doesn't get cleaned up properly.
To fix this we need to make some changes in RustPOSIX, so lets add these once we merge DashMap.

I'm going to outline the problem in a bit more detail here:
On exit(), we call the vmmap dtor and then close all the descs in a cage via nacl before we call the RustPOSIX exit_syscall counterpart. This makes sure we properly free all NaCl resources before closing the cage completely in RustPOSIX.
However on exec(), we clone the initial cages fd table, and add it to the new cage, then remove the initial cage completely. However this means the NaCl resources still exist for the initial cage as it waits for the exec'd cage to exit. If we try to deconstruct the vmmap/close nacl descs now, it will calls close_syscall in RustPOSIX for a cage that doesn't exist causing an exception.

Talking this out with @jesings, this may be a good opportunity to start implementing our syscall filter list. This would make this much easier by not removing the original cage on exec, but instead disallowing all syscalls except close and exit.

@jesings and I re-discussed the above fix attempt a few weeks ago and realized it doesnt fix the problem. After talking about it a bit, Jonathan made a suggestion of transferring the nacl descs from the first cage to the exec'd cage so even when we remove the first cage's vmmap, it wont actually call close internally to rustposix because those descs are still reffed and open in the exec'd cage.
Unfortunately, there are several descriptors that their lone reference exits in the vmmap, causing a close to RustPOSIX which fails. These are descriptors that are mapped and then closed, which can be done by a program, but for us are mostly descriptors pertaining to the initial mapped application code.
I think any solution here will have to deep copy the descriptors in RustPOSIX and then subsequently close them and destroy the vmmap in the original cage.

This issue also was eliminated by removing NaClDescs


Study returned Error in signature of compress and decompress

This task is to analyze the difference between using Error!void or only !void as the return signature of the compress and decompress functions.

The difference became clear while working on #32 as it includes higher-order functions which cannot infer errors. !void as shown here makes the Zig compiler infer what errors can be returned as documented here. In contrast Error!void specifies that the function will only return the error Error as specified here where Error is std.mem.Allocator.Error due to const Error = std.mem.Allocator.Error;. Also Error need not be a simple error, it can be a set of errors and multiple sets of errors can be combined using the || operator as documented here. Finally, the global set of errors is always named anyerror, so  any error can be coerced to it as documented here. For more information about errors in Zig read the section about errors here. As we only specify types when required by the Zig compiler, I propose we use the !void form for consistency and only use Error!void when necessary.

Great, we will do it this way.

@cmcuza did you close the issue because !void and Error!void are already used as stated above everywhere in the code? If not I propose we keep this issue open until they are so we remember that it should be fixed.

@cmcuza did you close the issue because !void and Error!void are already used as stated above everywhere in the code? If not I propose we keep this issue open until they are so we remember that it should be fixed.

Of course, my bad. I reopened it.


database/sql: Exec() never returns when IP is not reachable and maxOpenConns is reached

With go1.4.2, maxOpenConn set to 2, and an unreachable IP:
- two Exec() returns an error
- but the third Exec() never returns
import "database/sql"
import _ "github.com/go-sql-driver/mysql"
...
db := sql.Open("mysql", "root:password@tcp(<IP_ADDRESS>:3306)/mysql?timeout=15s")
db.SetMaxOpenConn(2)
db.SetMaxIdleConns(0)
for i := 0; i < 3; i++ {
go func() {
_, err := db.Exec("SELECT SLEEP(5)")
if err != nil {
log.Println(err)
}
log.Println("Done")
}
}
...
Adding a call to db.maybeOpenNewConnections() after database/sql/sql.go:667 seems to fix this issue. But I'm not sure whether this is the correct fix or not.  Please help.  Thanks.
664 ci, err := db.driver.Open(db.dsn)
665 if err != nil {
666 db.mu.Lock()
667 db.numOpen-- // correct for earlier optimism
db.maybeOpenNewConnections()
668 db.mu.Unlock()
669 return nil, err
670 }

The fix looks reasonable to me.

Hmm..  Though on further though I think that might open a race condition.  Consider:

numOpen = 1, and conn() decides to open a connection
The connection attempt fails and maybeOpenNewConnections() writes into db.openerCh
Another goroutine calls conn() again, sees numOpen = 1 and decides to open a connection
connectionOpener receives on db.openerCh and opens a third connection

Now you have three connections open, even though maxOpenConns is two.
I'm not sure whether a similar race condition already exists in the code or what the best way to fix it is.  The most simple fix appears to be to change this code in conn:
    if db.maxOpen > 0 && db.numOpen >= db.maxOpen

to also take db.pendingOpens into account.  But that might break some code path which already works today.

I have encountered this problem. Can we add it to the Go1.6 milestone? I can help work on the fix if that adds weight to my request.

I have a potential fix for this sitting in my local checkout. It's a little ugly, but I'd be happy to mail a CL if someone wants to review and propose edits

Sure, the easiest way to make sure an issue is fixed in the
next release is to propose CL for it (after discussion of the
design, of course).

Of course - the changes proposed above cover the case of db.maxOpen+1 connection attempts being made while we are unable to connect to the database, but in order to cover db.maxOpen+2 or more, I found that there's an additional check required in the connectionOpener routine that processes queued connections. I came up with something like this:
 func (db *DB) connectionOpener() {
        for range db.openerCh {
                db.openNewConnection()
+
+               db.mu.Lock()
+               if db.numOpen == 0 {
+                       // If there are no open connections,
+                       // check to make sure we don't have any connection requests
+                       // waiting for this one to be freed.
+                       // This is done in a separate goroutine so that there is no chance
+                       // for us to cause a deadlock.
+                       go func() {
+                               db.mu.Lock()
+                               db.maybeOpenNewConnections()
+                               db.mu.Unlock()
+                       }()
+               }
+               db.mu.Unlock()
        }
 }

As I said this is kind of ugly, but as far as I can see we need to have some sort of check here if we want to preserve the ability to open connections in parallel.

I have written a test that reproduces this issue. The issue still exists in 1.5.1.
The proposed fix in DB.conn shown below allows the test to pass when db.maxOpen+2 when added to the Go 1.5.1 tree.
	db.numOpen++ // optimistically
	db.mu.Unlock()
	ci, err := db.driver.Open(db.dsn)
	if err != nil {
		db.mu.Lock()
		db.numOpen-- // correct for earlier optimism
		db.maybeOpenNewConnections()        // <--- fix
		db.mu.Unlock()
		return nil, err
	}

@johto Although the scenario you describe does allow a third connection to be opened, the change made in https://github.com/golang/go/commit/cce127a75f72110c045319407a652829b5a5b716 causes the extra connection to be closed before it is ever added to the pool or services any queries. Your suggestion to change
if db.maxOpen > 0 && db.numOpen >= db.maxOpen

to
if db.maxOpen > 0 && (db.numOpen+db.pendingOpens) >= db.maxOpen

seems correct to me. All database/sql tests still pass when I make that change.
@potocnyj I don't understand how the proposed fix doesn't handle db.maxOpen+2. db.maybeOpenNewConnections can queue up multiple requests per call if needed. Could you walk us through the sequence that doesn't work?
I will submit a CL with the new test and the above changes if there are no objections.

@ChrisHines I appear to have misspoken - without the additional change I proposed db.maxOpen+2 works in my test program, but db.maxOpen+3 hangs on the last connection. Adding my change (in addition to what was already proposed) works though, no matter how many connections I open simultaneously.
For reference, the full code I am using to test the failure is here: https://gist.github.com/potocnyj/fe05406010ad73660889

@potocnyj OK, thanks for the correction. Yes, I understand now. Opening db.maxOpen*2+n (for n>0) will not work. Once db.openNewConnection becomes the sole source of new connections—and they fail—we aren't triggering additional attempts to service the still pending requests.
I have additions to the proposed fix that work in this scenario, and it actually simplifies the logic.
I propose we consolidate the numOpen and pendingOpens counters into numOpen and always increment numOpen optimistically. Whenever an attempted connection fails we decrement numOpen and call db.maybeOpenNewConnections. This change simplifies type DB by removing a field. It also and simplifies harmonizes the logic in db.conn, db.openNewConnection and db.maybeOpenNewConnections.
During testing I also uncovered a panic that occurred when DB.Close was called while len(db.connRequests) > 0. DB.Close ranges over db.connRequests and closes each response channel. This resulted in the go routines waiting on those channels to unblock and operate on a zero value sql.connRequest, which contained both a nil *driverConn and error. When that was returned to db.exec it caused a nil pointer panic. The fix is to use the comma-ok idiom to detect channel closure and return errDBClosed.
With these changes all database/sql tests pass, including the condition @potocnyj highlighted. I think this is good enough to mail a CL, and the changes are difficult to fully appreciate when described here.


generalize Plot.select

demo: https://observablehq.com/@observablehq/plot-select-generalize-656
closes #515
select a sample:

select min and max of a color:

On the topic of having a selector interface {select(I, V)} instead of just a function(I, V), so that we could potentially have a more convenient shorthand form for functions, I couldn’t think of a better shorthand for functions in this case, so I’m going to punt on that even though it’s a little different than what we did for reduce and map. Unlike, say, the filter transform, the select transform operates on a group of data at a time, so we need a way to identify a subset of that data, and a subset of the index feels like the most natural form for that.


Make the < result > row be optional for Context Expressions on DMN Editor's Boxed Expression Editor

### Acceptance criteria
- [ ] Write a nice description for this issue.
- [ ] Add acceptance criteria here.

@tiagobento thank you for this issue. From what I know, it is kind of 'optional' already. meaning that if user do not fill this <result> row with any text/data, then dmn engine returns all entries of nearest parent context box.
Is this kie-issue about not adding <result> row by default? Is your idea to add this <result> row just in case user explicitly want it? For example context menu should contain and menu item insert <result> row?

@jomarko Yeah, but the UI doesn't reflect that very well.. Users might be confused that an empty "<result>" row with the "Select expression" indication means that there's something missing there. Another thing to consider is that having or not having the "<result>" row will drastically change the behavior of a Context boxed expression..
"Is this kie-issue about not adding  row by default?"
Not necessarily... I think it's important that users know that there's an obvious option to add a "<result>" row if they want.
"Is your idea to add this  row just in case user explicitly want it?"
Yes
"For example context menu should contain and menu item insert  row?"
Maybe... but I think that would be too hidden... We'll need to explore UI options for this, without losing the indication that the "<result>" row option is avaible.


feat(tool): copy the env with each tool

The copy probably isn't technically necessary (like cwd) since we could just use os.environ in each action, but whatever.
cc @pgoodman

Make sure to strip out your swizzling from the PATH. ;-)

Good catch, thank you!


[Checkbox] Styles Should Not Adjust Input["text"]

Line 12645:
.ui.checkbox input  {
  position: absolute;
  top: 0px;
  left: 0px;
  opacity: 0;
  outline: none;
}

I have a situation where I'd like the user to be able to choose an option with a text input inside. In my local build, I changed the selector to be more specific:
.ui.checkbox input[type="radio"], .ui.checkbox input[type="checkbox"]  {
  position: absolute;
  top: 0px;
  left: 0px;
  opacity: 0;
  outline: none;
}

I think this should be changed in the build to allow for this use case.

Late rather than never. In next


Account Domain Name not the same as email domain resulting in login failures

@kloor I was trying to troubleshoot our install of CentralAuth.  It looks like this code in the LdapAdapter.php is the culprit on line 32:
$email = $this->getUsername(). '@'.
$this->_options['ldap']['accountDomainName']
Our ldap account domain is different from our email domain, so logins always fail. If, for example, I hard code our email domain, email.unc.edu, then logins proceed correctly.
Perhaps an option can be added in the config form to add email domain if it's different.
thanks,
Dean

Yes, that was a faulty assumption on my part. There should be a separate configuration option for the domain part added to the username obtained from LDAP, like there is for CAS.

This is now fixed with a separate option for email domain in v1.2.


Importing lightstep-tracer-go bloats programs and significantly slows down build time

Hello, I've recently integrated a program with lightstep using the lightstep-tracer-go package and the size of the compiled binary went from 17MB to 24MB and build time increased by over 2x. It seems like the package has lots of dependencies, to give an idea of the situation:
# in lightstep-tracing-go, listing external dependencies
$ govendor list +e | wc -l
      69

Some of those dependencies are sub-packages of grpc and others but still... it's quite a lot.
What's most problematic about this is a lot of this code is unused in the resulting application (because the program will make use of either grpc, thrift, or http to send spans to the collectors), but the compiler cannot eliminate this code since it's not dead code, because the selection of the protocol happens at runtime through the options passed to the tracer when it's created.
Here's an example showing the cost of integrating lightstep-tracer-go in one of or production services (measurements done on OSX 17.5.0 with Go 1.10).
# without lightstep-tracer-go
$ time go build ./cmd/main/

real	0m2.540s
user	0m3.177s
sys	0m0.549s
$ ls -l main
-rwxr-xr-x 1 achille achille 17828770 Jul  7 00:23 main

# with lightstep-tracer-go
$ time go build ./cmd/main/

real	0m5.854s
user	0m1.911s
sys	0m4.510s
$ ls -l main
-rwxr-xr-x 1 achille achille 24043642 Jul  7 00:23 main

The main problem with slowing down build time is it gets in the way of developer productivity, more than doubling is a significant cost that we pay when attempting to iterate quickly on a project. The example I'm giving you is from a project that has already quite a bit of code, to put things in perspective here is the number of lines there were before adding lightstep-tracer-go (but including all other dependencies):
$ loc -u
--------------------------------------------------------------------------------
 Language             Files        Lines        Blank      Comment         Code
--------------------------------------------------------------------------------
 Go                     677       256832        25115        20994       210723
 Markdown                19         2439          537            0         1902
 Perl                     8         1141          142          140          859
 Assembly                23          877          217           24          636
 Bourne Shell             3          787           65          260          462
 JSON                     1          255            0            0          255
 Python                   2          128           24            6           98
 YAML                     4           83           11            6           66
 Makefile                 2           48           11            0           37
 C                        1           47           11            7           29
 JavaScript               2           16            4            0           12
--------------------------------------------------------------------------------
 Total                  742       262653        26137        21437       215079
--------------------------------------------------------------------------------

Then here is the number of lines of code in lightstep-tracer-go (including this package's dependencies):
$ loc -u
--------------------------------------------------------------------------------
 Language             Files        Lines        Blank      Comment         Code
--------------------------------------------------------------------------------
 Go                     463       257034        19460        28965       208609
 Python                  27         4882          847          587         3448
 Makefile                 8         1385          164          103         1118
 C                        2         1257          234          107          916
 Perl                     8         1141          142          140          859
 Assembly                23          877          217           24          636
 Bourne Shell             6          913           80          287          546
 Markdown                12          699          189            0          510
 Protobuf                 8         1730          188         1112          430
 JSON                     1          299            0            0          299
 C/C++ Header             1          247           40           55          152
 Toml                     1           19            4            0           15
 YAML                     1            7            1            0            6
--------------------------------------------------------------------------------
 Total                  561       270490        21566        31380       217544
--------------------------------------------------------------------------------

So adding tracing with lightstep here is doubling the total line count of the program, which aligns with the 2x increase in build time in this case.
I totally get that adding new features requires pulling in a bunch of code, but looking at your implementation it seems like lots could be done to make things better. For example, you're using importing golang.org/x/net/http2 to use HTTP2 over TLS, but my understanding is this is supported by the standard library already and could avoid taking a dependency (I'm totally missing internal context tho so feel free to just let me know what were the design decisions behind that choice). Overall it would be ideal if only the features needed by a lightstep client were to be included in the final compiled program instead of bringing in tons of unnecessary code.
I'd love to get your take on the issue, and I'm available if you need help exploring how to improve the situation.

Hi @achille-roussel, thanks for doing the timing measurements while reporting this issue. We do still need to support all three transports, but maybe we can move configuration of the transport from run-time to compile time to avoid the large build size for users who don't need it.
We've been batting around one approach here and I'd be interested to hear your opinion on it.
We'd create a Transport interface or similar for the Tracer, and move the code that implements this transport interface into independent packages in this library. Initializing the tracer would require a type that implements the Transport interface, which could be imported from one of these packages. Perhaps we'd depend on the HTTP client by default because it has the smallest footprint.
You're right that there are probably other cleanups that we could make that would impact overall LoC size - replacing all instances of x/net/context now that the standard library includes it. I think we would be very open to getting specific issues on the tracer for those individual changes. I think the scope is a little large to discuss them all on this one issue.


Refactor JSON serdes

serialization/deserialization, ofc
hopefully we can get rid of the whole JsonAdaptedWhatever stuff
Add serdes for:

[x] AddressBook

[x] UniquePersonList

[x] Person

[x] Name
[x] Email
[x] Address
[x] Phone
[x] Tag
[x] Set<Tag>

Job

[x] Money
[x] Rate

and:

[x] rewrite load/save to use the model classes directly
[x] get rid of JsonAdapted*

closes #66

Codecov Report

Merging #65 (bf39242) into master (f5f3347) will increase coverage by 0.29%.
The diff coverage is 90.90%.

@@             Coverage Diff              @@
##             master      #65      +/-   ##
============================================
+ Coverage     72.95%   73.24%   +0.29%
- Complexity      444      445       +1
============================================
  Files            73       73
  Lines          1305     1327      +22
  Branches        138      140       +2
============================================
+ Hits            952      972      +20
- Misses          319      321       +2
  Partials         34       34

Impacted Files
Coverage Δ

...main/java/seedu/address/commons/util/JsonUtil.java
89.47% <50.00%> (-4.65%)
:arrow_down:

src/main/java/seedu/address/model/person/Name.java
96.42% <100.00%> (+6.42%)
:arrow_up:

Continue to review full report at Codecov.

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

not implementing serializer for Job at the moment because it's got a Set<Person> which will result in duplicates when serializing the entire AddressBook, which can break consistency guarantees too

@Spyobird

If the current attributes extend a superclass (for instance Attribute<T>), would it largely affect the nested serdes classes. (I would think due to inheritance it might not be an issue, but I am not sure)

should be fine -- it's possible to implement (de)serializers for generic classes, though it might be a little less straightforward

Adding on to that, if Person were to have something like an 'attribute map' to store the attributes instead of storing them by subclass (i.e. Name, Address etc.), would it result in large changes in serdes. The attribute map may function like key-value pairs and so perhaps it may have structural similarities with JSON.

don't think so, you might be able to delegate the serdes of the Map to Jackson and let it handle everything (as long as the type(s) of the key/value have (de)serializers implemented)


No Payment Method Available at the moment. Please reach out to support

Description
When I try to make any payment method like Card or Mpesa I get this error.
No Payment Method Available at the moment. Please reach out to support
Reproduces how often
This is my code
public function initiateMpesaPayment($amount, $customer, $redirectUrl, $sale_id)
    {
          $transactionRef = "TEST-" . uniqid() . time();
          $data = [
              "amount" => $amount,
              "currency" => Currency::KES,
              "tx_ref" => $transactionRef,
              "redirectUrl" => $redirectUrl
          ];

        $mpesaPayment = Flutterwave::create("mpesa");
        $customerObj = $mpesaPayment->customer->create([
            "full_name" => $customer->name,
            "email" => $customer->email,
            "phone" => $customer->phone
        ]);
        $data['customer'] = $customerObj;
        $payload = $mpesaPayment->payload->create($data);
        return $mpesaPayment->initiate($payload);
    }

    public function initiateCardPayment($amount, $customer, $cardDetails, $redirectUrl, $sale_id)
    {
        $transactionRef = "TEST-" . uniqid() . time();
        $data = [
            "amount" => $amount,
            "currency" => Currency::KES,
            "tx_ref" => $transactionRef,
            "redirectUrl" => $redirectUrl,
            "additionalData" => [
                "subaccounts" => [
                    ["id" => "RSA_345983858845935893"]
                ],
                "meta" => [
                    "unique_id" => uniqid() . uniqid()
                ],
                "preauthorize" => false,
                "payment_plan" => null,
                "card_details" => $cardDetails
            ],
        ];

        $cardPayment = Flutterwave::create("Card");
        $customerObj = $cardPayment->customer->create([
            "full_name" => $customer->name,
            "email" => $customer->email,
            "phone" => $customer->phone
        ]);
        $data['customer'] = $customerObj;
        $payload = $cardPayment->payload->create($data);

        return $cardPayment->initiate($payload);
    }

Hi @Jimmy-kiarie8  Please kindly call the bootstrap method in your constructor Flutterwave::bootstrap().

Hi @Jimmy-kiarie8  Please kindly call the bootstrap method in your constructor Flutterwave::bootstrap().


Fix up Smart Start

I believe this should fall more in line with what ProvisionSmartStartNode wants?

The QR code can also contain additional info, like manufacturer and label. While it is not required to provision a node, it would still be good to copy all additional properties from QRProvisioningInformation to the PlannedProvisioningEntry, so they get persisted in the cache.
Z-Wave JS UI for example shows them if they exist.

Right!
I do that anyway, in NR - Thanks


Connection to ioBroker is getting lost after a few seconds.

I pushed the following yaml to my ESP32.
All went fine and the ESP32 is connecting to ioBroker.
`
substitutions:
name: jkbms01
device_description: "Monitor and control a JK-BMS via bluetooth"
external_components_source: github://syssi/esphome-jk-bms@main
mac_address: xx:xx:xx:xx:xx:xx
protocol_version: JK02
esphome:
name: bms01
comment: "Monitor and control a JK-BMS via bluetooth"
project:
name: "syssi.esphome-jk-bms"
version: 1.1.0
esp32:
board: wemos_d1_mini32
framework:
type: esp-idf
version: latest
external_components:

source: ${external_components_source}
refresh: 0s

wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
# Set this to the IP of the ESP
static_ip: <IP_ADDRESS>
# Set this to the IP address of the router. Often ends with .1
gateway: <IP_ADDRESS>
# The subnet of the network. <IP_ADDRESS> works for most home networks.
subnet: <IP_ADDRESS>
ota:
logger:
api:
esp32_ble_tracker:
ble_client:

mac_address: ${mac_address}
id: client0

jk_bms_ble:

ble_client_id: client0
protocol_version: ${protocol_version}
throttle: 5s
id: bms0

binary_sensor:

platform: jk_bms_ble
balancing:
name: "${name} balancing"
charging:
name: "${name} charging"
discharging:
name: "${name} discharging"

button:

platform: jk_bms_ble
retrieve_settings:
name: "${name} retrieve settings"
retrieve_device_info:
name: "${name} retrieve device info"

number:

platform: jk_bms_ble
jk_bms_ble_id: bms0
balance_trigger_voltage:
name: "${name} balance trigger voltage"
cell_count:
name: "${name} cell count"
total_battery_capacity:
name: "${name} total battery capacity"
cell_voltage_overvoltage_protection:
name: "${name} cell voltage overvoltage protection"
cell_voltage_overvoltage_recovery:
name: "${name} cell voltage overvoltage recovery"
cell_voltage_undervoltage_protection:
name: "${name} cell voltage undervoltage protection"
cell_voltage_undervoltage_recovery:
name: "${name} cell voltage undervoltage recovery"
balance_starting_voltage:
name: "${name} balance starting voltage"
voltage_calibration:
name: "${name} voltage calibration"
current_calibration:
name: "${name} current calibration"
power_off_voltage:
name: "${name} power off voltage"
max_balance_current:
name: "${name} max balance current"
max_charge_current:
name: "${name} max charge current"
max_discharge_current:
name: "${name} max discharge current"

sensor:

platform: jk_bms_ble
jk_bms_ble_id: bms0
min_cell_voltage:
name: "${name} min cell voltage"
max_cell_voltage:
name: "${name} max cell voltage"
min_voltage_cell:
name: "${name} min voltage cell"
max_voltage_cell:
name: "${name} max voltage cell"
delta_cell_voltage:
name: "${name} delta cell voltage"
average_cell_voltage:
name: "${name} average cell voltage"
cell_voltage_1:
name: "${name} cell voltage 1"
cell_voltage_2:
name: "${name} cell voltage 2"
cell_voltage_3:
name: "${name} cell voltage 3"
cell_voltage_4:
name: "${name} cell voltage 4"
cell_voltage_5:
name: "${name} cell voltage 5"
cell_voltage_6:
name: "${name} cell voltage 6"
cell_voltage_7:
name: "${name} cell voltage 7"
cell_voltage_8:
name: "${name} cell voltage 8"
cell_voltage_9:
name: "${name} cell voltage 9"
cell_voltage_10:
name: "${name} cell voltage 10"
cell_voltage_11:
name: "${name} cell voltage 11"
cell_voltage_12:
name: "${name} cell voltage 12"
cell_voltage_13:
name: "${name} cell voltage 13"
cell_voltage_14:
name: "${name} cell voltage 14"
cell_voltage_15:
name: "${name} cell voltage 15"
cell_voltage_16:
name: "${name} cell voltage 16"
cell_voltage_17:
name: "${name} cell voltage 17"
cell_voltage_18:
name: "${name} cell voltage 18"
cell_voltage_19:
name: "${name} cell voltage 19"
cell_voltage_20:
name: "${name} cell voltage 20"
cell_voltage_21:
name: "${name} cell voltage 21"
cell_voltage_22:
name: "${name} cell voltage 22"
cell_voltage_23:
name: "${name} cell voltage 23"
cell_voltage_24:
name: "${name} cell voltage 24"
cell_resistance_1:
name: "${name} cell resistance 1"
cell_resistance_2:
name: "${name} cell resistance 2"
cell_resistance_3:
name: "${name} cell resistance 3"
cell_resistance_4:
name: "${name} cell resistance 4"
cell_resistance_5:
name: "${name} cell resistance 5"
cell_resistance_6:
name: "${name} cell resistance 6"
cell_resistance_7:
name: "${name} cell resistance 7"
cell_resistance_8:
name: "${name} cell resistance 8"
cell_resistance_9:
name: "${name} cell resistance 9"
cell_resistance_10:
name: "${name} cell resistance 10"
cell_resistance_11:
name: "${name} cell resistance 11"
cell_resistance_12:
name: "${name} cell resistance 12"
cell_resistance_13:
name: "${name} cell resistance 13"
cell_resistance_14:
name: "${name} cell resistance 14"
cell_resistance_15:
name: "${name} cell resistance 15"
cell_resistance_16:
name: "${name} cell resistance 16"
cell_resistance_17:
name: "${name} cell resistance 17"
cell_resistance_18:
name: "${name} cell resistance 18"
cell_resistance_19:
name: "${name} cell resistance 19"
cell_resistance_20:
name: "${name} cell resistance 20"
cell_resistance_21:
name: "${name} cell resistance 21"
cell_resistance_22:
name: "${name} cell resistance 22"
cell_resistance_23:
name: "${name} cell resistance 23"
cell_resistance_24:
name: "${name} cell resistance 24"
total_voltage:
name: "${name} total voltage"
current:
name: "${name} current"
power:
name: "${name} power"
charging_power:
name: "${name} charging power"
discharging_power:
name: "${name} discharging power"
temperature_sensor_1:
name: "${name} temperature sensor 1"
temperature_sensor_2:
name: "${name} temperature sensor 2"
power_tube_temperature:
name: "${name} power tube temperature"
state_of_charge:
name: "${name} state of charge"
capacity_remaining:
name: "${name} capacity remaining"
total_battery_capacity_setting:
name: "${name} total battery capacity setting"
charging_cycles:
name: "${name} charging cycles"
total_charging_cycle_capacity:
name: "${name} total charging cycle capacity"
total_runtime:
name: "${name} total runtime"
balancing_current:
name: "${name} balancing current"
errors_bitmask:
name: "${name} errors bitmask"

switch:

platform: jk_bms_ble
charging:
name: "${name} charging"
discharging:
name: "${name} discharging"
balancer:
name: "${name} balancer"

platform: ble_client
ble_client_id: client0
name: "${name} enable bluetooth connection"

text_sensor:

platform: jk_bms_ble
errors:
name: "${name} errors"
total_runtime_formatted:
name: "${name} total runtime formatted"
`

But after a few seconds. I am getting a
[08:43:30][W][api.connection:080]: iobrokermaster (::FFFF:<IP_ADDRESS>): Connection closed
The connection is not coming back at all.
Can anyone give me some help?
Thanx in advance!

Sorry, the CODE Tag is not working!?

I have the same problem. Anyone an idea ?

I have the same problem. Anyone an idea ?

That ist my Yaml
`esphome:
name: test
esp8266:
board: esp01_1m
Enable logging
logger:
Enable Home Assistant API
api:
ota:
password: "58806ed2e79dac18f843ff7f75c227a7"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Test Fallback Hotspot"
password: "nu2Pe4AN9p4g"
substitutions:
device_name: test
captive_portal:
web_server:
port: 80
binary_sensor:

platform: gpio
name: mmwave_in_bedroom
pin:
number: GPIO16
mode: INPUT_PULLDOWN

uart:
id: uart_bus
tx_pin: GPIO4
rx_pin: GPIO5
baud_rate: 115200
debug:
direction: BOTH
dummy_receiver: true
after:
delimiter: "\n"
sequence:
- lambda: UARTDebug::log_string(direction, bytes);
number:

platform: template
name: distance
id: distance
min_value: 0
max_value: 1350
initial_value: 315
optimistic: true
step: 15
restore_value: true
unit_of_measurement: cm
set_action:

uart.write: "sensorStop"
delay: 1s
uart.write: !lambda
int cm = (int)ceil(x / 15.0);
std::string cms = "detRangeCfg -1 0 " + to_string(cm);
return std::vector(cms.begin(), cms.end());
delay: 1s
uart.write: "saveCfg 0x45670123 0xCDEF89AB 0x956128C6 0xDF54AC89"
delay: 1s
uart.write: "sensorStart"

platform: template
name: latency
id: latency
min_value: 0
max_value: 65000
initial_value: 12500
optimistic: true
step: 25
restore_value: true
unit_of_measurement: ms
set_action:

uart.write: "sensorStop"
delay: 1s
uart.write: !lambda
int ms = (int)ceil(x / 25.0);
std::string mss = "outputLatency -1 0 " + to_string(ms);
return std::vector(mss.begin(), mss.end());
delay: 1s
uart.write: "saveCfg 0x45670123 0xCDEF89AB 0x956128C6 0xDF54AC89"
delay: 1s
uart.write: "sensorStart"

button:

platform: restart
name: Restart $device_name

platform: template
name: "factory_reset_sensor"
id: "factory_reset_sensor"
on_press:

uart.write: "sensorStop"
delay: 1s
uart.write: "factoryReset 0x45670123 0xCDEF89AB 0x956128C6 0xDF54AC89"
delay: 3s
uart.write: "sensorStart"`

An when I reuse it to
`esphome:
name: test
esp8266:
board: esp01_1m
Enable logging
logger:
Enable Home Assistant API
api:
ota:
password: "58806ed2e79dac18f843ff7f75c227a7"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Test Fallback Hotspot"
password: "nu2Pe4AN9p4g"
substitutions:
device_name: test
captive_portal:
web_server:
port: 80
binary_sensor:

platform: gpio
name: mmwave_in_bedroom
pin:
number: GPIO16
mode: INPUT_PULLDOWN

uart:
id: uart_bus
tx_pin: GPIO4
rx_pin: GPIO5
baud_rate: 115200
debug:
direction: BOTH
dummy_receiver: true
after:
delimiter: "\n"
sequence:
- lambda: UARTDebug::log_string(direction, bytes);`
Than the connection still are connected

I have the same problem -regardless of my yaml-config and my ESP-device (eg a Wemos D1 mini and a seperate NodeMCU V2).
What happens:

Adapter (V0.2.4) is running fine, also the ESPHome-Dashboard.
I can edit and flash new versions, see the logs in the dashboard, communicate via webserver of the ESPHomees with them.
BUT: after every connection via ESPHome-API (in my case every 30 seconds, like configured in the esphome.0-instance) I get a connection, but after constant 5 seconds it gets closed again. For every device.
I get the following error in the log of the ESPHomees:

12:37:41 | [D] | [api:102] | Accepted 192.168.178.xxx
12:37:46 | [W] | [api.connection:080] | raspi-bridge (192.168.178.xxx): Connection closed

And in the log of the iobroker:
esphome.0	2022-08-07 12:37:45.635	warn	Client 192.168.178.yyy Timeout, connection Lost, will reconnect automatically when device is available!
esphome.0	2022-08-07 12:37:40.672	error	ESPHome client 192.168.178.yyy TypeError: Cannot read properties of undefined (reading 'deserializeBinary')
esphome.0	2022-08-07 12:37:40.655	error	ESPHome client 192.168.178.yyy TypeError: Cannot read properties of undefined (reading 'deserializeBinary')

When I switch to degug-output of the instance, I get the following befor each "cannot read properties...":
esphome.0	2022-08-07 12:47:06.967	error	ESPHome client 192.168.178.yyy TypeError: Cannot read properties of undefined (reading 'deserializeBinary')
esphome.0	2022-08-07 12:47:06.966	debug	192.168.178.yyy client data �T9�
esphome.0	2022-08-07 12:47:06.934	error	ESPHome client 192.168.178.yyy TypeError: Cannot read properties of undefined (reading 'deserializeBinary')
esphome.0	2022-08-07 12:47:06.933	debug	192.168.178.yyy client data �L��

The strange bytes seem to vary over time.
I think, this problem was not there for the first few days I installed the ESP-Home-Adapter and occurs since last wednesday (august 3rd). But I am not sure. And I don't know what I changed since then with relation to iobroker...
What I tried since I encountered the problem:

boot of course
deinstalled and reinstalled the adapter and instance
installed adapter and instance on second iobroker-host (ma slave, I user a multihost-setting)
All with no effect.

My configuration is:

iobroker multihost
master:
-- Raspi 4B
-- iobroker-admin v5.3.8
-- iobroker-esphome v0.2.4
slave:
-- Raspi 3B
on both:
-- node v16.16.0, nodejs v16.16.0, npm v8.11.0
-- js-controller 4.0.23
-- Python v3.9.2

I attached two of my tested ESPHome-configs, both have this problem, also some different (filename is .yaml.txt instead of .yaml, because github says, .yaml is not allowed)
briefkasten.yaml.txt
basic.yaml.txt
I like the ESPHome-adapter and the whole concept very much. And even if I switch to direct MQTT-communication because of faster sending of sensor-data after wakeup from deep-sleep, I'd like to get it running via esphome - it's just so easy and fast to get things running (when it's all running ;-) ) So many thanx for your development, @DrozmotiX, and thanx in advance for your kind support!
Stefan

Same problem


Old SSH mechanisms

On latest debian stretch (OpenSSH 6.7) old key exchange mechanisms are disabled by default. The message when I click Mount is: No suitable authentication method found to complete authentication. And nothing is logged to auth.log on server, but the connection remains active. Putty has released an update recently to support more secure mechanisms, but it looks like RenciSSH library still doesn't support them.
http://www.openssh.com/txt/release-6.7
ssh -v server (debug) with default config expects these:
debug1: kex: server->client aes128-ctr<EMAIL_ADDRESS>none
debug1: kex: client->server aes128-ctr<EMAIL_ADDRESS>none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
I can't tell for sure if this is the problem, but the connection is never successful with any password and even when using public key. Let me know if I can test something for you.

I'm also willing to troubleshoot or help out if I can. I'm not a programmer so I can't sit down and fix it 😕

WinSSH uses SSH.NET library and this problem is related to this library.  If this can be solved, it shoud be solved in ssh.net. https://sshnet.codeplex.com/
Im using debian 8.2 with openssh-server 6.7p1-5, default configuration, and winssh works for me.

This is interesting - on my Ubuntu box I have 6.6p1 installed and WinSSH works:
ii  openssh-client 1:6.6p1-2ubu amd64        secure shell (SSH) client, for se
ii  openssh-server 1:6.6p1-2ubu amd64        secure shell (SSH) server, for se
ii  openssh-sftp-s 1:6.6p1-2ubu amd64        secure shell (SSH) sftp server mo
On my openSUSE box I have the same version installed, and WinSSH does NOT work:
Information for package openssh:
Repository: Main Repository (OSS)
Name: openssh
Version: 6.6p1-5.1.3
Arch: x86_64
Vendor: openSUSE
Installed: Yes
I wonder if there is anything else that affects it. I have absolutely no problem accessing/mounting the openSUSE ssh server using WinSCP, Putty, or in another Linux system.

The version number from upstream (6.6p1) is not always meaningful. Different distributions may apply different sets of patches than other distributions. I have seen both functional backports from later versions and also security patches, including disabling certain ciphers etc. now considered unsecure.

Thanks ERnsTL, that makes a lot of sense. I'll try a few more versions and see if I can find a workaround until this has been fixed in SSH.NET.


[Bug report] Sidebar menu still visible when set to false

Does the following issue belong here? If so, I will move the description here an update this one.
https://github.com/vuejs/vuepress/issues/3004

Yes, the issue belongs here.

I agree that this as a bug. Though we support sidebar slots, we can have a workaround setting sidebar: [] or sidebar: {}.

I tried setting sidebar: [] but the result is the same.

It is a bug, the screenshot you provided shoud be sidebar: [] behavior, and false should disable entirely. PR welcomed


Add volley as gradle target

Closes https://github.com/oryanm/TrelloWidget/issues/23.
Adds volley as gradle target.

Cool stuff 👍


Further demo improvements

[x] 1. Rename settings section titles: "Save/Load" -> "File", "HySE" -> "HySE Options", "Graph Ops" -> "Graph Operations", "Cose/Dagre" -> "CoSE/Dagre Layout", "Experiment/Test" -> "Experiments"
[x] 2. Shorter title background for accordions (2/3 of what it is now?)
[x] 3. For all settings, review the label and tooltips. Also make sure capitalization is consistent (i.e., "Ideal edge length")
[x] 4. Change the default for Animation tick delay from 100 to 10
[x] 5. Can we automatically load a new sample when the selection in the dropdown box changes (as opposed to having to click "Load sample")?
[x] 6. In File > Load, add ellipses "Load.." (as it opens up a dialog)
[x] 7. "Run experiment" needs a more detailed tooltip explanation
[x] 8. "Create test graph" tooltip could say "Create a test graph with above parameters"
[x] 9. The color coding of the borders to mark swaps could be made optional (false by default)

Pushed the mentioned changes.


Adding link to README

Refer to this link for build results (access rights to CI server needed):
http://ops-jenkins-master-001.optoro.io:8080/job/optoro_skel-pr/1/
Test PASSed.


"Echelon" style layout

Show root node(s) in one column/row, then "first-degree" nodes in next column/row, etc.

Cool!
On May 4, 2015, at 9:57 AM, Roni Choudhury<EMAIL_ADDRESS>wrote:

Show root node(s) in one column/row, then "first-degree" nodes in next column/row, etc.
—
Reply to this email directly or view it on GitHub.


Othos: track-books

Excellent project. The UI is awesome and the codebase is neat and clearly written. Keep up the good job Meron:muscle:.

Thanks Eric!


[SourceForge] Add the old API back

PR #9078 breaks the existing URLs for downloads like this
https://img.shields.io/sourceforge/dt/sevenzip.svg

The API is changed to something like this
https://img.shields.io/sourceforge/downloads/dt/sevenzip.svg

This commit add the support for the old URLs by adding sourceforge.service.js and sourceforge.tester.js back with some modifications to adapt the existing sourceforge-downloads.service.js.

You can check the diff result of 8d060fd4192acf8bb580092998fc2b93094fbb13(parent of c2998a2dc960c854dd3b571d5b54fd50f4d87b5e, which breaks the existing URLs) and this PR to see what was changed
https://github.com/badges/shields/compare/8d060fd4192acf8bb580092998fc2b93094fbb13...wh201906:old_api?expand=1#diff-8d0f2396969ff76e7735d4e5069f3bf11b83880dd3383191c0b3783a40c69027

Agree with the objective - we broke this by mistake - but we shouldn't duplicate all this code. It only needs a one line change to fix. Closing in favour of https://github.com/badges/shields/pull/9102


Secure by default approach

It would be great if Denali's default stance was security, which users can opt-out from. Things like frameguarding, CSP, etc should be turned on by default, with clear paths to disable for users who want to opt out.

I'm closing this for now - Denali currently ships with all the safeguards offered by helmet enabled by default. Default TLS support is tracked in #96. But this should be considered an ongoing effort - we should keep an eye out for anything we can do to improve the default security story for Denali.


Fixed image source example as it wasn't working in non-web RN

This fixes facebook/react-native#28592

Deploy preview for react-native processing.
Building with commit 5950b9b9b9e3c7347a09faa25d52f6cc9b5d0edf
https://app.netlify.com/sites/react-native/deploys/5e9448bfc422e60007713db5


ML 5.14 : Cross Validation (D)

Description
📌  Issues for Week 5
Welcome to 'ML' Team, good to see you here
:arrow_forward: This issue will helps readers in acquiring all the knowledge that one needs to know about ----
Cross Validation.
:red_circle: To get assigned to this issue, add your Batch Numbers mentioned in the spreadsheet of "Machine Learning", the approach one would follow and choice you prefer (Documentation, Audio, Video). You can go with all three or any number of options you're interested to work on.
✔ Domain : Machine Learning
:red_circle::yellow_circle: Points to Note :

The issues will be assigned on a first come first serve basis, 1 Issue == 1 PR.

"Issue Title" and "PR Title should be the same. Include issue number along with it.

Changes should be made inside the Machine Learning/Machine_Learning/Feature_Engineering_and_Performance_Metrices Branch.

Follow Contributing Guidelines & Code of Conduct before start Contributing.

This issue is only for 'GWOC' contributors of 'Machine Learning' domain.

:white_check_mark: To be Mentioned while taking the issue :

Full name
Batch Number
GitHub Profile Link
Which type of Contribution you want to make :

[ ] Documentation

Happy Contributing 🚀
All the best. Enjoy your open source journey ahead. 😎
Domain
Machine Learning
Type of Contribution
Documentation
Code of Conduct

[X] I follow Contributing Guidelines & Code of conduct of this project.

Tanvi Deshmukh
batch-5
Type- Documentation
Plz assign to me

Name: Priya Gupta
Batch: Batch 1
GitHub: https://github.com/guptapriya-83900
Type: Documentation

Yugal Agarwak
Batch -1
Github- https://github.com/Yugal41735
Documentation

Name: Priyal Palkhiwala
Batch: 5
Profile link
Contribution type: Documentation
I would like to contribute to this issue.

Pranav Kaushik
Batch - 4
Github: https://github.com/pranav7kaushik
Type: Documentation

/assign


A smaller client plugin level?

I think some of the functionality that is currently in src/github.js is pretty generic. Maybe a smaller plugin could have an API something like:

constructor(spec)
fetchIssues
fetchComments(issueId)
createIssue(fields) -> id
createComment(issueId, fields) -> id
updateIssue(id, fields)
updateComment(id, fields)
deleteIssue(id, fields)
deleteComment(id, fields)

And using only local identifiers. and using its own schema for Issue and Comment
And then I'll move the sync logic into src/sync.ts

I'll keep calling them replicas for now because that's still what they are, basically (even if they don't support foreign identifiers).
In src/sync.ts I can then also make sure the issue exists before trying to create a comment that references it
And Sync should receive events when the replica produces a change that needs propagating

It might be cleaner to have a single uuid identifier in the DataStore, and then a mapper in each bridgeBot.
service - client - bridgeBot - store - bridgeBot - client - service

The client should expose the agreed fields, but can use its own local identifiers.
The bridgebot keeps a two-way LRI mapping between service id's and data store id's.
Other than that, there is an event stream going from left service to right service, and possibly back from right service to right bridgeBot to update the LRI map, in case of a create.


How to get a font used on the page?

Hi!
In v2.0.550, fonts used for rendering, like "g_d1_f1" were openly available for the whole document to use them. React-PDF used this behavior to create identically positioned text layers over canvas rendering and for annotations rendering.
It seems like in v2.0.943 this behavior is no longer true. The fonts are not "leaking" now (which I get is a good thing) so all I'm left is a Times New Roman fallback :)
Is there a way to get the old behavior back, or somehow stop fonts from being cleaned up after rendering?
Thanks!

In fact, this diagnosis may be wrong. It may be caused by #10205. I could be wrong that the fonts are not available - they now just use odd characters to render text. So now I can't write the text Sample in a pdf.js-loaded font, I would need to write  instead. This forces me to choose between accessibility and displaying the text nicely.

This was because of #9340


Migrate tracing libs

migrate tracing libs to tempo-coordinator

@lucabello not for the scope of this PR, but it's worth looking at changes from #639 that would hopefully unblock ops 2.16. For ops 2.17 I think the full scenario 7 migration will be needed similar to https://github.com/canonical/traefik-k8s-operator/pull/405


[glimmer-syntax][bugfix] codegen fixes

This PR adds tests and fixes two bugs in the current codegen printer:

block params should be separated by spaces
comments should alway be generated as multi-line comments

@sclaxton Thank you!


Email journey

Hi Please find the PR for  the changes regarding email journey.

@AndyHWChung just added two test cases for email address confirmed page, where we have added a check that passcode verification result should be a match, otherwise technical error page
changes here

@AndyHWChung just added two test cases for email address confirmed page, where we have added a check that passcode verification result should be a match, otherwise technical error page changes here

:+1: looks good


Rebrand Library

Issue
This library should be renamed.
Reasoning
This library does far more than just terminal commands, and encapsulates everything to do with the terminal.
Challenges
The best name for this library would be LethalAPI.Terminal, however, this couldn't be used as the default namespace.
Using it as the namespace would cause reference ambiguity between the .Terminal namespace of LethalAPI.Terminal, and the Terminal class from Lethal Company.
A namespace similar to LethalAPI.TerminalLib or LethalAPI.TerminalAPI could be used instead, however discussion on the namespace would be appreciated.
Decision
The decision was made to rename the library to LethalAPI.Terminal, and the namespace to LethalAPI.LibTerminal for the reasons above. This has been implemented in #17, and is to be included in the next update.
Next Step
This repository needs to be renamed to LethalAPI.Terminal to match the new branding.

Closing this, as @MaxWasUnavailable has renamed the repository, and the rebranding is complete.


⚠ Bofrost.de has degraded performance

In 2b03379, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1157 ms

Resolved: Bofrost.de performance has improved in 7f0a814 after 1 hour, 9 minutes.


Explanation request

UTF-8 mouse mode escape sequence (CSI ? 1005 h / CSI ? 1005 l)
Escape for reading clipboard (OSC 52 ; <s / p / c> ; ? BEL)
Set selection clipboard (OSC 52 ; <s / p> ; <BASE64> BEL)

What do the above 3 lines mean?

Great question!
This is essentially how applications inside terminal emulators function and communicate with the terminal to instruct it to do certain things.
For example to get the red text TEST on screen, you'd do printf "\e[31mTEST". So the \e[31m is used here to tell the terminal to color it red.
There are multiple different types of escape sequences, which are separated by specific byte(s) at the start of it. These are:

ESC -> \e
CSI -> \e[
OSC -> \e]
DCS -> \eP

So in the changelog the CSI is just a short form for one of these control sequence introductions.
The rest of the syntax are usually the exact bytes of the escape sequence, or placeholders for positions where values can be specified. The whitespace in between is just a distinction for making things easier to read and separate token, those are not printed.
So if you want to set the clipboard from the terminal, you can for example use the following:
printf "\e]52;s;$(printf 'test' | base64);\a"
# \e] -> OSC
# ; -> separator
# s -> selection clipboard (you can paste this with middle mouse on linux)
# ; -> separator
# $(printf 'test' | base64) -> encode the string 'test' in base64
# \a -> mark end of escape sequence

The same thing applies for the other three escapes, example uses of those would be printf "\e[1005h", printf "\e[1005l" and printf "\e]52;s;?\a".
Now that should hopefully suffice as a basic introduction on how escape sequences work, if you have any more questions please let me know.
If you want to know what other fun escape sequences there are, there's a great resource for all of them here. This lists pretty much every ESC, OSC, CSI and DCS escape there is, though not all of them are supported by all terminal emulators.

This is essentially how applications inside terminal emulators function and communicate with the terminal to instruct it to do certain things.
text text text

This. This is why I love this project. Keep up the good work @chrisduerr

Thank you for the detailed explanation.


Requirement R4 - Prompt user for shared database password on startup

When the shared database password is configured to be stored in memory, prompt the user for the password on startup. This way we can guarantee that it will always be available when needed.
In the case that credential manager password storing has been implemented and in-memory passwords are used as fallback, then prompting the user for the password immediately on startup will make them aware that the fallback is active (and they might have to take action).

The implementation of this, while not started, could borrow a lot from the implementation of #49.


containerd.exe config default results in parsing error on Windows

Description
If using the the default configuration creation on windows the output file is not formatted correctly and results in error when running or configuring the service:
containerd: Near line 0 (last key parsed ''): bare keys cannot contain '�'

Steps to reproduce the issue:
From a Windows machine:
$ containerd.exe config default > config.toml
$ .\containerd.exe --register-service
containerd: Near line 0 (last key parsed ''): bare keys cannot contain '�'

Describe the results you received:
Describe the results you expected:
Should be able to use the default config.
Output of containerd --version:
containerd github.com/containerd/containerd v1.4.0-beta.2 5d470fa23bf969e16b25212703b7a9902dd6cda7

Any other relevant information:
It appears this is a bug in the toml project due to the way it write new lines. The project doesn't appear active or I would submit a PR to fix it there.
https://github.com/BurntSushi/toml/blob/a368813c5e648fee92e5f6c30e3944ff9d5e8895/encode.go#L510
I created the issue in case other folks run into it can find the quick workaround of using Powershell Out-File -encoding which re-writes the output to use the correct line endings:
 .\containerd.exe config default | Out-File config.toml -Encoding ascii

Format your config.toml file to ANSI or ASCII encoding and it should work fine. Happened to me too.
It's an encoding error when writing the default config to your filesystem. For some reason containerd seems to be write the file in the UCS-2 encoding.

Format your config.toml file to ANSI or ASCII encoding and it should work fine. Happened to me too.
It's an encoding error when writing the default config to your filesystem. For some reason containerd seems to be write the file in the UCS-2 encoding.

@justurtevant can you confirm that you are using Windows PowerShell (e.g. PowerShell 5) when you are seeing this? I have only been able to repro with that. This does not seem to repro when using bash (WSL), PowerShell Core (e.g. PowerShell 6+), and cmd.
The issue seems to be that the TOML library expects UTF8 with no BOM. Windows PowerShell defaults to the Unicode encoding when redirecting to a file, which uses UTF-16 LE with a BOM. PowerShell Core defaults to UTF8NoBom, so it does not see this issue.
As mentioned above, it can be worked around with Out-File -Encoding ascii (on Windows PowerShell), or by using PowerShell Core, bash, or cmd.

@justurtevant can you confirm that you are using Windows PowerShell (e.g. PowerShell 5) when you are seeing this? I have only been able to repro with that. This does not seem to repro when using bash (WSL), PowerShell Core (e.g. PowerShell 6+), and cmd.
The issue seems to be that the TOML library expects UTF8 with no BOM. Windows PowerShell defaults to the Unicode encoding when redirecting to a file, which uses UTF-16 LE with a BOM. PowerShell Core defaults to UTF8NoBom, so it does not see this issue.
As mentioned above, it can be worked around with Out-File -Encoding ascii (on Windows PowerShell), or by using PowerShell Core, bash, or cmd.

@jsturtevant Realized I typo'd tagging you in my last response. I'm guessing this is just caused by PowerShell mucking with the encoding, and isn't the fault of containerd or BurntSushi/toml.

one humble man's workaround to this perplexing issue
Get-Content 'config.toml' | out-file -encoding ASCII 'C:\Program
Files\containerd\config.toml

seems like theres gotta be a way to make burntsushi/toml capable of handling this case, right ?

seems like theres gotta be a way to make burntsushi/toml capable of handling this case, right ?

It would need to be enhanced so instead of just casting from []byte to string here, they instead:

Detect the UTF-16LE BOM at the start of the file (0xFFFE).
Convert the little-endian []byte read from the file (minus the BOM) into a []uint16.
Call utf16.Decode and cast the result to a string.

Given that this issue only seems to repro with the old Windows PowerShell (which uses UTF16LE with a BOM), and that most of the world seems to have moved away from BOMs entirely, I'm not sure this is worth trying to fix. It seems easiest to either work around the issue with Out-File -Encoding Ascii, or switch to a tool such as PowerShell Core that doesn't have this problem.

We've switched the TOML implementation from BurntSushi/toml to pelletier/go-toml. Interestingly the new TOML implementation supports BOM apparently.
https://github.com/pelletier/go-toml/issues/250
So I think we can close the issue now.
@jsturtevant, @jayunit100 or @kevpar Could you confirm the behavior?

I get a different error now:
PS C:\projects\containerd\bin> ./containerd.exe config default > config.toml
PS C:\projects\containerd\bin> .\containerd.exe -c .\config.toml
containerd: failed to load TOML: .\config.toml: (1, 1): parsing error: keys cannot contain   character
PS C:\projects\containerd\bin> .\containerd.exe -v
containerd github.com/containerd/containerd v1.5.0-rc.1-30-gdda530a75 dda530a75065d5936b8414517110e8301e98b23d


Swap out tooltip with VR4VET impl

Swap out the cude implementation in #40 with https://github.com/orgs/vr4vet/projects/7

Blocked by next release of VR4VET

Blocked by next release of VR4VET

Closing for now, until unblocked.


fix: apply the right type of roundness when pasting styles

Since diamonds only use proportional radius for now, we shouldn't copy adaptive radius from rectangles to diamonds, which unfortunately it does in production at the moment.
While we don't wanna copy adaptive radius roundness from rectangles to diamonds, we do want the target diamonds to be rounded if styles are copied from a rounded rectangle.
So, what we are doing in this fix is to first check if the given source roundness type can be applied to the target element. If not, we provide a default roundness for the target element, so that the target element is rounded also.

simplified/generalized. We may wanna write tests.


chore(deps): celestia-app v3.0.0-alpha

Closes https://github.com/celestiaorg/celestia-node/issues/3824
Draft PR to see what breaks. Don't merge.

A few of the types have changed from go-square v1 to v2 so this PR should be stacked on top of https://github.com/celestiaorg/celestia-node/pull/3782

@vgonkivs bumped to v3.0.0 in https://github.com/celestiaorg/celestia-node/pull/3782 and is already testing on Robusta so this PR seems pointless.


[Question] Is there a way to assign a single utterance to 2 different LUIS intents? i have a same query for 2 different flow of conversation but both have different response. so i am not able to create a proper flow of conversation using LUIS for MS chat bot.

System Information (Required)

SDK Language: C#
SDK Version: 4.6
Development Environment: OTHER

Issue Description
i am using LUIS intents to get a respective response through C# code. I have some scenario where i want different response as per my flow for same utterance hit.
Also is there any way from which we can get a fall back intent as its possible in API.AI, so that i can make a flow of conversation by using LUIS for MSBOT.
Code Example

Expected Behavior
I want to build a conversation in a flow for same questions which occur in another flow.
Actual Results
i am getting same answer for same question, i am trying to make a flow so that i can get different answers for similar question.

@NehaShaikh786
It might be possible to assign the same utterance to two different intents via the API, but this isn't possible via the portal.
When you get the response from LUIS, it'll provide the "topScoringIntent" along with a list of "intents" that are arranged in descending score order.
If the wrong intent has the leading score, then you'll have to retrain the model with this utterance to mark it with the correct intent.

@sayyednazeer hi thanks for you response, can you give example of LUIS API, if possible? my problem is- i have intent named as "moisturizer" and its utterance is "do you have moisturizer" but when i retrain the model and type "do you have abcd" it still hit the moisturizer intent, which i don't expect. I want this utterance to hit to "None" intent.
My motive is- I have huge data in my model, after hitting to top score intent i am using dialog for further conversation (also adding to this do you have another solution except formflow and dialog?). So i dont want my dialog to initiate when user enters the partial utterance as mentioned above. please provide some solution to this.

If I understand correctly you want the following in terms of intents and utterances:
"do you have moisturizer"                               -->              Mosturizer Intent
"do you have [anything but mosturizer]"         -->              None Intent
You could accomplish this by wrapping the work "mosturizer" in an entity. And then map the Utterance that does not have that particular entity to None.

@NehaShaikh786
just map the... do you have [any text] to None Intent
Train your luis from https://www.luis.ai/
Everything will work perfectly
If you face any such case then just go the the LUIS dashboard and map that utterance with the intent you want and train it.
After that luis will handle it and will start pointing to the correct intent.

hi @sayyednazeer @megancooper @nwhitmont Thanks for your response, i have used phrase list feature so that i can give required words in luis. But now i have an issue of context handling.
Please tell me by using luis how can i make a context flow.
For e.g- if i have two flow of conversation and the ans of same questions are different then how can i manage it if i'm going in first flow then it should give the answer of  first flow (Like-Ques-"Do you have daily cream?" and Ans-"what is your skin concern" ) and if i'm in second flow then it should give the answer of second flow(Like Ques-"Do you have daily cream?" and Ans-"please mention its for face or forehead?").
I want such context handling from Language understanding only. I am restricted to use form flow because its something static. i want it to handle by language understanding.
For e.g-This thing can be done in api.ai by using context and fall back intent.
please give me answer with example.

@NehaShaikh786, did you find a solution for this question?

Hoping that issue has been resolved, closing it. Feel free to reopen if any questions.


Is there a nice way to do 2D embedding?

Hi Guys,
I am trying to find a way to do a 2D embedding layer.
I am working on sentiment classification on document level. Different from sentiment classification on sentence level, each doc may contain multiple sentences. The idea is to use a convolution layer to extract a sentence representation for each sentence, then feed the sentence representation into a LSTM/GRU for classification. It's very similar to the fig1 in this paper: http://arxiv.org/pdf/1411.4389v3.pdf, except that the prediction is only made at the last time step.
The embedding layer in keras takes a input of  2D tensor, and ouput  a 3D tensor. However, after padding, my X is a 3D tensor of shape (nb_samples, maxlen_doc, maxlen_sentence), and want to transform it via a Embedding layer to shape (nb_sample, maxlen_doc, maxlen_sentence, embedding_dims).
I was wondering are there any nice ways to do so? Or I need to create a 2Dembedding class? Thanks!

Just reshape your X to 2d, use a normal embedding, and then reshape its output via http://keras.io/layers/core/#reshape

Thanks! very nice way to do so.


[FLINK-36496][table]Remove deprecated method CatalogFunction#isGeneric

What is the purpose of the change
Remove all deprecated methods CatalogFunction#isGeneric
Brief change log
Remove deprecated methods CatalogFunction#isGeneric
Verifying this change
This change is a simple code cleanup without any specific usage.
Does this pull request potentially affect one of the following parts:

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

Documentation

Does this pull request introduce a new feature? (no)

@flinkbot run azure

Reviewed by Chi on 12/12/24. Asked submitter questions


Button to "Resend Webhooks" in Medplum App

Many workflows rely on Subscription + Bot triggers. We have a $resend endpoint on each resource type, but it would be very convenient to call it via the Medplum App, not just the CLI

https://github.com/medplum/medplum/pull/4918


[Designer] Needs to be usable at higher zoom levels

Problem Description
Original bug: #6263
WCAG 2.1 requirements state that content needs to be able to be read/interacted with using only vertical scrolling at 1280x768 400% zoom.
The original bug tracks getting the designer to the point where everything is at least accessible, if not convenient. This bug tracks giving the designer a more thoughtful redesign to be useful and usable at high zoom levels.
Card JSON
{}

Screenshot
width 1280 @ 400% zoom:

PR addressing issue has been merged


bug of parse string with slash

when I run
fmt.Println(
	gjson.Parse(
		`{ "a" : "c:\m\m\m.exe" }`,
	).Value(),
)
============ stdo utput ===========
map[a:c:]

as you see, strings after slash is disappeared.
But I found a method to resolve this ,
fmt.Println(
	gjson.Parse(
		strings.ReplaceAll(
			`{ "a" : "c:\m\m\m.exe" }`,
			`\`, `\\`,
		),
	).Value(),
)
============ std output ===========
map[a:c:\m\m\m.exe]

the eaten letters comes back.
will you fix this ?

{ "a" : "c:\m\m\m.exe" }

That's not valid json. The only allowable escape characters are:
\" \/ \b \f \n \r \t \u0000

Ummmm , I see . I read websocket message ,  the parsed error joined in from that.

If you are uncertain whether the json is valid, you can check it beforehand with gjson.Valid(json).
For example:
json := `{ "a" : "c:\m\m\m.exe" }`
if (gjson.Valid(json)) {
    gjson.Parse(json).Value()
}

Great! This is very helpful.


The job has a Success status, and nothing special from cloud run logs:
Info
2021-11-19T16:50:56.701466Z
Cloud Run gcr-cleaner {@type: type.googleapis.com/google.cloud.audit.AuditLog, resourceName: namespaces/my-test-project/services/gcr-cleaner, response: {…}, serviceName: run.googleapis.com, status: {…}}
Default
2021-11-19T17:02:01.455463Z
deleting refs for eu.gcr.io/my-test-project since 2021-11-19 17:02:01.455315674 +0000 UTC
Info
2021-11-19T17:02:02.780201Z
POST200 727 B 1.3 s Google-Cloud-Scheduler https://gcr-cleaner-ascdkoub3a-lz.a.run.app/http
Default
2021-11-19T17:02:08.255180Z
server is listening on 8080

However, no images have been deleted:
❯ gcloud container images list-tags eu.gcr.io/my-test-project/test/nginx
DIGEST        TAGS    TIMESTAMP
6dd48dba5945  latest  2021-10-01T18:22:48
42bba58a1c5a          2021-04-13T21:20:40
❯ gcloud container images list-tags eu.gcr.io/my-test-project/test/nginx2
DIGEST        TAGS  TIMESTAMP
aa3bfd8050fd        2021-11-19T16:56:55
42bba58a1c5a  0.1   2021-04-13T21:20:40

Could you please have a look and tell me what was misconfigured or if this is a bug somewhere?
Best!

Recursive deletion on GCR can take a very, very, very long time. It's honestly probably still running. The reason for this is that the Docker registry API does not permit partial paging. So to recursively delete your resources, gcr-cleaner has to page over every repository your credential has access to, which includes all public GCR repos.

Can make sense, but from the Cloud Run Metrics Dashboard, I can see that there is no more running container 5 minutes after launch!

BTW, all worked as expected when running it locally:
server
❯ docker run -e GCRCLEANER_TOKEN="$(gcloud auth print-access-token)" -p 8080:8080 europe-docker.pkg.dev/gcr-cleaner/gcr-cleaner/gcr-cleaner
Unable to find image 'europe-docker.pkg.dev/gcr-cleaner/gcr-cleaner/gcr-cleaner:latest' locally
latest: Pulling from gcr-cleaner/gcr-cleaner/gcr-cleaner
Digest: sha256:6dd48dba59455e9d0a6cfd7625c7dce2a71c58cb504ca9115b8e70b1a059f287
Status: Downloaded newer image for europe-docker.pkg.dev/gcr-cleaner/gcr-cleaner/gcr-cleaner:latest
server is listening on 8080
deleting refs for eu.gcr.io/my-test-project since 2021-11-22 08:56:20.5558459 +0000 UTC

client
❯ curl -X POST 'http://<IP_ADDRESS>:8080/http' -d '{"repo": "eu.gcr.io/my-test-project", "recursive": true}'
{"count":2,"refs":["sha256:42bba58a1c5a6e2039af02302ba06ee66c446e9547cbfb0da33f4267638cdb53","sha256:6dd48dba59455e9d0a6cfd7625c7dce2a71c58cb504ca9115b8e70b1a059f287"]}%
# took 2m 24s

Any thoughts though?

That's definitely interesting. What happens if you invoke your Cloud Run job manually? As the creator, you can do something like:
curl <URL_OF_CLOUD_RUN_SERVICE> -H "Authorization: Bearer $(gcloud auth print-identity-token)" -d '{"repo": "eu.gcr.io/my-test-project", "recursive": true}'

That's definitely interesting. What happens if you invoke your Cloud Run job manually? As the creator, you can do something like:
curl <URL_OF_CLOUD_RUN_SERVICE> -H "Authorization: Bearer $(gcloud auth print-identity-token)" -d '{"repo": "eu.gcr.io/my-test-project", "recursive": true}'

I got no refs found:
❯ export SERVICE_URL=$(gcloud run services describe gcr-cleaner --project "${PROJECT_ID}" --platform "managed" --region "europe-north1" --format 'value(status.url)')

❯ curl "${SERVICE_URL}/http" -H "Authorization: Bearer $(gcloud auth print-identity-token)" -d '{"repo": "eu.gcr.io/'${PROJECT_ID}'", "recursive": true}'
{"count":0,"refs":[]}%

Are there any refs left given your successful run above?

Are there any refs left given your successful run above?

Yes I added new images without tags to each repository:
❯ gcloud container images list-tags eu.gcr.io/my-test-project/test/nginx
DIGEST        TAGS  TIMESTAMP
1a690e51d37a        2021-11-15T16:18:11
❯ gcloud container images list-tags eu.gcr.io/my-test-project/test/nginx2
DIGEST        TAGS  TIMESTAMP
d536cf3289b3        2021-11-20T11:48:17
❯ curl "${SERVICE_URL}/http" -H "Authorization: Bearer $(gcloud auth print-identity-token)" -d '{"repo": "eu.gcr.io/'${PROJECT_ID}'", "recursive": true}'
{"count":0,"refs":[]}%

I always get confused with shell escaping in bash. Are you sure that's properly injecting the project id? Just to be sure, can you hardcode it in your command?

I always get confused with shell escaping in bash. Are you sure that's properly injecting the project id? Just to be sure, can you hardcode it in your command?

sure :)
❯ curl "https://gcr-cleaner-***-lz.a.run.app/http" -H "Authorization: Bearer $(gcloud auth print-identity-token)" -d '{"repo": "eu.gcr.io/my-test-project", "recursive": true}'
{"count":0,"refs":[]}%

BTW, can you give it a try deploying all the stack and check if you can reproduce?

Following your steps above:
First attempt I got an error back from the container:

error 400: failed to list child repositories for "xx": failed to fetch all repositories from registry eu.gcr.io: GET https://eu.gcr.io/v2/_catalog?n=1000: DENIED: Cloud Resource Manager API has not been used in project xx before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com/overview?project=xx then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.

After fixing that, I can confirm I'm getting the same behavior as you. I'm still digging...

Alright, so I've narrowed it down a bit further. The issue appears to be that the service account on Cloud Run doesn't have permissions to list images, therefore the recursive call returns an empty list when querying the catalog. That makes the effective cleanup list [], which is why we're seeing nothing being cleaned up. If you specify the full repo path, it works as expected. I'm still digging into the permissions issue.

If you plan on using the recursive functionality, you must also grant the service account "Browser" permissions on the project:
gcloud projects add-iam-policy-binding "${PROJECT_ID}" \
  --member<EMAIL_ADDRESS>\
  --role "roles/browser"

Unfortunately there is no more granular permission available in Container Registry. In Artifact Registry, you can scope this to individual repos.

Thanks for the explanations and for updating the documentation.


remove duplicate ips in frontend webpage

If an interested party exists twice (same name + address) then only display it once in the frontend.

Your Pull Request code is being promoted!  Please follow the link below.
Main Merge Workflow


Add ToService type class for better error messages

This is just a proposal, but moving the toService method from enrichment classes to RouterN itself via a new type class makes it easier to provide nice error messages. Now instead of this:
scala> case class X(i: Int)
defined class X

scala> (Get / "foo" /> X(100).toFuture).toService
<console>:28: error: could not find implicit value for parameter folder: shapeless.ops.coproduct.Folder.Aux[io.finch.route.RouterN.EncodeAll.type,shapeless.:+:[com.twitter.util.Future[X],shapeless.CNil],com.twitter.finagle.Service[R,io.finch.HttpResponse]]
       (Get / "foo" /> X(100).toFuture).toService
                                        ^

The user sees this:
scala> case class X(i: Int)
defined class X

scala> (Get / "foo" /> X(100).toFuture).toService
<console>:28: error: You can only convert a router into a Finagle service from R to an HttpResponse if R can be
converted into an HttpRequest, and if the result type of the router is one of the following:

  * An HttpResponse
  * A value of a type with an EncodeResponse instance
  * A future of an HttpResponse
  * A future of a value of a type with an EncodeResponse instance
  * A RequestReader that returns a value of a type with an EncodeResponse instance
  * A Finagle service that returns an HttpResponse
  * A Finagle service that returns a value of a type with an EncodeResponse instance
  * A coproduct made up of some combination of the above

com.twitter.util.Future[X] does not satisfy the requirement. You may need to provide an EncodeResponse instance for
com.twitter.util.Future[X] (or for some part of com.twitter.util.Future[X]).

       (Get / "foo" /> X(100).toFuture).toService
                                        ^

Omg. This looks fantastic! I like this approach very much. Thanks, Travis!

Merging this.


Suggest minimizing the patch for Math-65

Hi,
Because defects4j aims to prune out unnecessary changes for each bug, I think the patch for Math-65 should be minimized by excluding the changes in getRMS(). I believe that the testcase triggered in the buggy commit can be passed by modifying only getChiSquare(). The description in the report for this defect like "Once corrected, getRMS() can even reduce ..." also supports that the changes in getRTS() can be considered as a refactoring action.

Hi @tolskais,
Thanks for reporting this! Will will take a closer look at the patch.
Best,
Rene

Hi @tolskais,
Just to make sure we are on the same page, are you suggesting to replace the current patch for Math-65:
diff --git a/src/main/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java b/src/main/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java
index 5a60da8..30ebfff 100644
--- a/src/main/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java
+++ b/src/main/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java
@@ -237,7 +237,12 @@ public abstract class AbstractLeastSquaresOptimizer implements DifferentiableMul
      * @return RMS value
      */
     public double getRMS() {
-        return Math.sqrt(getChiSquare() / rows);
+        double criterion = 0;
+        for (int i = 0; i < rows; ++i) {
+            final double residual = residuals[i];
+            criterion += residual * residual * residualsWeights[i];
+        }
+        return Math.sqrt(criterion / rows);
     }

     /**
@@ -250,7 +255,7 @@ public abstract class AbstractLeastSquaresOptimizer implements DifferentiableMul
         double chiSquare = 0;
         for (int i = 0; i < rows; ++i) {
             final double residual = residuals[i];
-            chiSquare += residual * residual * residualsWeights[i];
+            chiSquare += residual * residual / residualsWeights[i];
         }
         return chiSquare;
     }

with the following patch (which excludes all changes in the getRMS() method)
diff --git a/src/main/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java b/src/main/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java
index 5a60da8..30ebfff 100644
--- a/src/main/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java
+++ b/src/main/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java
@@ -250,7 +255,7 @@ public abstract class AbstractLeastSquaresOptimizer implements DifferentiableMul
         double chiSquare = 0;
         for (int i = 0; i < rows; ++i) {
             final double residual = residuals[i];
-            chiSquare += residual * residual * residualsWeights[i];
+            chiSquare += residual * residual / residualsWeights[i];
         }
         return chiSquare;
     }

Although your proposed patch seems to be a valid minimal patch, it triggers more test cases than the original patch and the current patch in D4J. Thus, it cannot be considered a valid patch.
The current patch in D4J only triggers one test case (same as the original patch)
--- org.apache.commons.math.optimization.general.LevenbergMarquardtOptimizerTest::testCircleFitting
junit.framework.AssertionFailedError: expected:<0.004> but was:<0.0019737107108948474>
	....
	at org.apache.commons.math.optimization.general.LevenbergMarquardtOptimizerTest.testCircleFitting(LevenbergMarquardtOptimizerTest.java:442)

And the proposed patch triggers three test cases (two of them neither triggered with the original or minimal patch provided by D4J)
--- org.apache.commons.math.optimization.general.GaussNewtonOptimizerTest::testCircleFittingBadInit
junit.framework.AssertionFailedError: expected:<0.04268731682389561> but was:<0.021343658411947804>
	...
	at org.apache.commons.math.optimization.general.GaussNewtonOptimizerTest.testCircleFittingBadInit(GaussNewtonOptimizerTest.java:477)
--- org.apache.commons.math.optimization.general.LevenbergMarquardtOptimizerTest::testCircleFitting
junit.framework.AssertionFailedError: expected:<0.004> but was:<0.0019737107108948474>
	...
	at org.apache.commons.math.optimization.general.LevenbergMarquardtOptimizerTest.testCircleFitting(LevenbergMarquardtOptimizerTest.java:442)
--- org.apache.commons.math.optimization.general.LevenbergMarquardtOptimizerTest::testCircleFittingBadInit
junit.framework.AssertionFailedError: expected:<0.043> but was:<0.021343658411516093>
	...
	at org.apache.commons.math.optimization.general.LevenbergMarquardtOptimizerTest.testCircleFittingBadInit(LevenbergMarquardtOptimizerTest.java:494)

--
Best,
Jose

From your feedback, I realize that I misunderstood how defects4j reproduces the buggy commit.
I expect that defects4j reproduces each bug with the minimal fixes from the buggy commit. For example, the original buggy commit in commons-math is like the following code.
     public double getRMS() {
        double criterion = 0;
        for (int i = 0; i < rows; ++i) {
            final double residual = residuals[i];
            criterion += residual * residual * residualsWeights[i];
        }
        return Math.sqrt(criterion / rows);
     }

     public double getChiSquare(...) {
         ....
         double chiSquare = 0;
         for (int i = 0; i < rows; ++i) {
             final double residual = residuals[i];
            chiSquare += residual * residual / residualsWeights[i];
         }
         return chiSquare;
     }

My expectation is that the above code can be fixed as below.
     public double getRMS() {
        double criterion = 0;
        for (int i = 0; i < rows; ++i) {
            final double residual = residuals[i];
            criterion += residual * residual * residualsWeights[i];
        }
        return Math.sqrt(criterion / rows);
     }

     public double getChiSquare(...) {
         ...
         double chiSquare = 0;
         for (int i = 0; i < rows; ++i) {
             final double residual = residuals[i];
            chiSquare += residual * residual * residualsWeights[i];
         }
         return chiSquare;
     }

the patch between two version is what I expected from the patch in defects4j, which you posted.
index 5a60da8..30ebfff 100644
--- a/src/main/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java
+++ b/src/main/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java
@@ -250,7 +255,7 @@ public abstract class AbstractLeastSquaresOptimizer implements DifferentiableMul
         double chiSquare = 0;
         for (int i = 0; i < rows; ++i) {
             final double residual = residuals[i];
+            chiSquare += residual * residual * residualsWeights[i];
-            chiSquare += residual * residual / residualsWeights[i];
         }
         return chiSquare;
     }

I need this version of the patch to identify which code blocks are related to the bug fixes. Currently, the related blocks could be overestimated when the blocks are identified based on the current patch. Now I understand the patches in defects4j are not created concerning my purpose.
Anyway, thanks for your attention.

@jose Is this something we should reconsider for a minor release of version 3?


How to make overlay  repeated when setting global is true.

Hi:
When I set the global is true,the map can be repeated.How to make overlay repeat too,just like set wrapX: true on the vector source.

That is not supported. You'd have to create a 2nd overlay with different coordinates. Consider using a vector layer instead of using an overlay.

@ahocevar thank you very much for your answer.


Prevent page break between h3 and ul when printing to pdf

Avoid this. But how? This didn't work 4dc6318b

@froddd
I'm working on this on the print-css branch


OAuth 2.0 Error？

Hi,
I install NODE-RED to the local mac and use it in cooperation with Alexa
Since I do not work since yesterday, I try to link my account from the Alexa application and I will fail
The following logs were displayed
ForbiddenError: Unable to load OAuth 2.0 transaction: HoeNWViD
    at SessionStore.load (/home/ec2-user/node-red-alexa-home-skill-web/node_modules/oauth2orize/lib/txn/session.js:27:25)
    at transactionLoader (/home/ec2-user/node-red-alexa-home-skill-web/node_modules/oauth2orize/lib/middleware/transactionLoader.js:42:24)
    at Layer.handle [as handle_request] (/home/ec2-user/node-red-alexa-home-skill-web/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/ec2-user/node-red-alexa-home-skill-web/node_modules/express/lib/router/route.js:137:13)
    at app.post.oauthServer.decision.done.scope (/home/ec2-user/node-red-alexa-home-skill-web/index.js:483:3)
    at Layer.handle [as handle_request] (/home/ec2-user/node-red-alexa-home-skill-web/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/ec2-user/node-red-alexa-home-skill-web/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/home/ec2-user/node-red-alexa-home-skill-web/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/home/ec2-user/node-red-alexa-home-skill-web/node_modules/express/lib/router/layer.js:95:5)
    at /home/ec2-user/node-red-alexa-home-skill-web/node_modules/express/lib/router/index.js:281:22
    at Function.process_params (/home/ec2-user/node-red-alexa-home-skill-web/node_modules/express/lib/router/index.js:335:12)
    at next (/home/ec2-user/node-red-alexa-home-skill-web/node_modules/express/lib/router/index.js:275:10)
    at serveStatic (/home/ec2-user/node-red-alexa-home-skill-web/node_modules/serve-static/index.js:75:16)
    at Layer.handle [as handle_request] (/home/ec2-user/node-red-alexa-home-skill-web/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/home/ec2-user/node-red-alexa-home-skill-web/node_modules/express/lib/router/index.js:317:13)
    at /home/ec2-user/node-red-alexa-home-skill-web/node_modules/express/lib/router/index.js:284:7

What does this error mean?

You should not be using this code, it is only for running the back end service. The node uses a single shared backend.

What is your username?

thx!
my username is adapterZero

ok, all the oAuth tokens should have been removed from your account. Try and link the account again

Thank you for a quick response!
i can link with it!


[WFCORE-2332] ReloadRedirectTestCase stuck on HP-UX

cliProcess.destroy() does stuck on HP-UX if cliProcess is waiting for input from user (accept certificate dialogue)
https://issues.jboss.org/browse/WFCORE-2332 - ReloadRedirectTestCase stuck on HP-UX

@jfdenise please approve


out of memory error

I have placed the animated view inside of a fragment that is hold by a ViewPager.
When I make the fragment visible for the first time everything is alright.
But when the fragment gets reloaded I get the following issue:
FATAL EXCEPTION: main
Process: com.ads.adstimer, PID: 14680
java.lang.OutOfMemoryError: Failed to allocate a 2007612 byte allocation with 1750816 free bytes and 1709KB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:831)
at android.graphics.Bitmap.createBitmap(Bitmap.java:808)
at android.graphics.Bitmap.createBitmap(Bitmap.java:739)
at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:615)
at com.hanks.htextview.animatetext.AnvilText.animateStart(AnvilText.java:67)
at com.hanks.htextview.animatetext.HText.animateText(HText.java:74)
at com.hanks.htextview.HTextView.animateText(HTextView.java:97)
at com.ads.adstimer.fragment.Registration.Slides.FragmentScanCode.onCreateView(FragmentScanCode.java:37)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1962)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
at android.support.v4.app.FragmentManagerImpl.attachFragment(FragmentManager.java:1426)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:728)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1613)
at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:570)
at android.support.v4.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:141)
at android.support.v4.view.ViewPager.populate(ViewPager.java:1106)
at android.support.v4.view.ViewPager.populate(ViewPager.java:952)
at android.support.v4.view.ViewPager$3.run(ViewPager.java:251)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
at android.view.Choreographer.doCallbacks(Choreographer.java:670)
at android.view.Choreographer.doFrame(Choreographer.java:603)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
I hope, you can solve it.
I really like that library, good job!

@EnduroXPro  Thank you for your feedback ， I'm trying some way to fix OOM  . if you can solve it , welcome to commit  pull request

I don't think that

can always fix oom.
It's document
/**
     * Indicates to the VM that it would be a good time to run the
     * garbage collector. Note that this is a hint only. There is no guarantee
     * that the garbage collector will actually be run.
     */

I don't think that

can always fix oom.
It's document
/**
     * Indicates to the VM that it would be a good time to run the
     * garbage collector. Note that this is a hint only. There is no guarantee
     * that the garbage collector will actually be run.
     */

@xu6148152  yes，System.gc()  can't solve OOM problem, it should change the implement of the library if we want to sovle it fundamentally

@xu6148152  yes，System.gc()  can't solve OOM problem, it should change the implement of the library if we want to sovle it fundamentally

会发生OOM

Same issue here

android:largeHeap="true"
in manifest file inside application Tag

AnvilText had been deleted


Speech to text

Description
Include a summary of the change and relevant motivation/context. List any dependencies that are required for this change.
Fixes #11
Type of Change:
Delete irrelevant options.

Code
Quality Assurance
User Interface
Outreach
Documentation

Code/Quality Assurance Only

Bug fix (non-breaking change which fixes an issue)
This change requires a documentation update (software upgrade on readme file)
New feature (non-breaking change which adds functionality pre-approved by mentors)

How Has This Been Tested?
I have tested this locally on my machine and this will work provided a frontend where this js file can be included.
Checklist:
Delete irrelevant options.

[ ] My PR follows the style guidelines of this project
[ ] I have performed a self-review of my own code or materials
[ ] Any dependent changes have been merged

Code/Quality Assurance Only

[ ] My changes generate no new warnings
[ ] My PR currently breaks something (fix or feature that would cause existing functionality to not work as expected)
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been published in downstream modules

For running this code we need a frontend where this script will be running. I can give a demo with a test HTML file, but once we have a legit frontend on flask we can just sideload this script into the main HTML file.

Hence, no documentation is required as of now?

Yup not required now.

Merging this then!!!


⚠ Bofrost.de has degraded performance

In 080886d, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1229 ms

Resolved: Bofrost.de performance has improved in aced92b after 6 minutes.


docs: add Java example to the Wasm Guide

Signed-off-by: Nick Vidal<EMAIL_ADDRESS>

A Java example was added the WebAssembly Guide:
https://enarx.dev/docs/webassembly/java


Does one scheduler passes the other defined scheduler ?

There are 2 schedulers
Scheduler that runs every every hour start
Scheduler 1
scheduler.cron '0 * * * *' do
//Do some task
end

Scheduler that runs every day starting of day and start of hour
Scheduler 2
scheduler.cron '0 * * * *' do
//Do another task
end

In the scheduler file if scheduler 1 is above scheduler 2 and takes say 3 minutes to complete the task, the scheduler 2 is not executed at all.
Am I missing something or is there a work around to handle or is this a known issue.

@jmettraux Can you please let me know about this.

@seemalakishore  wrote:

@jmettraux Can you please let me know about this.

Hello, it's 23:29 here, I just got back from the gym, I'm going to take a shower now and then I'll look at your issue. Please be patient !

Hello,
I tried to reproduce what you describe.

require 'rufus-scheduler'

p `uname -a`
p [ RUBY_VERSION, RUBY_PLATFORM ]
p Rufus::Scheduler::VERSION

tformat = '%F %T.%L'

scheduler = Rufus::Scheduler.new

n = Time.now
m = n.min + 1

puts "now:  #{n.strftime(tformat)}"
puts "m:    #{m}"

# schedule 1 (not scheduler 1)

scheduler.cron "#{m} * * * *" do
  10.times do |i|
    puts "#{Time.now.strftime(tformat)} -> schedule 1 -> #{i}"
    sleep(rand * 3)
  end
  puts "#{Time.now.strftime(tformat)} -> schedule 1 -> over for now."
end

# schedule 2

scheduler.cron "#{m} * * * *" do
  10.times do |i|
    puts "#{Time.now.strftime(tformat)} -> schedule 2 -> #{i}"
    sleep(rand * 3)
  end
  puts "#{Time.now.strftime(tformat)} -> schedule 2 -> over for now."
end

scheduler.join
  #
  # So that the Ruby main threads joins the scheduler thread,
  # so that the Ruby process isn't immediately terminated.

Here is a sample output after running that:
OpenBSD yawara 6.8 GENERIC.MP#1 amd64
"2.6.6"
"x86_64-openbsd6.7"
"3.6.0"
now:  2020-11-28 00:00:34.508
m:    1
2020-11-28 00:01:00.255 -> schedule 1 -> 0
2020-11-28 00:01:00.255 -> schedule 2 -> 0
2020-11-28 00:01:00.785 -> schedule 2 -> 1
2020-11-28 00:01:02.895 -> schedule 1 -> 1
2020-11-28 00:01:03.535 -> schedule 2 -> 2
2020-11-28 00:01:03.845 -> schedule 1 -> 2
2020-11-28 00:01:05.425 -> schedule 1 -> 3
2020-11-28 00:01:06.345 -> schedule 1 -> 4
2020-11-28 00:01:06.545 -> schedule 2 -> 3
2020-11-28 00:01:07.609 -> schedule 2 -> 4
2020-11-28 00:01:08.105 -> schedule 2 -> 5
2020-11-28 00:01:08.515 -> schedule 1 -> 5
2020-11-28 00:01:09.325 -> schedule 2 -> 6
2020-11-28 00:01:09.815 -> schedule 1 -> 6
2020-11-28 00:01:10.095 -> schedule 1 -> 7
2020-11-28 00:01:11.115 -> schedule 1 -> 8
2020-11-28 00:01:11.205 -> schedule 2 -> 7
2020-11-28 00:01:12.302 -> schedule 1 -> 9
2020-11-28 00:01:13.185 -> schedule 2 -> 8
2020-11-28 00:01:13.575 -> schedule 1 -> over for now.
2020-11-28 00:01:14.185 -> schedule 2 -> 9
2020-11-28 00:01:14.325 -> schedule 2 -> over for now.

As you can see, the two schedules (there is a single scheduler, like in your code, although you say "scheduler") are running concurrently. Rufus-scheduler has a pool of working thread and here, each schedule is running in its own thread.
You'll find the whole setup at https://gist.github.com/jmettraux/0056ee7919bf0b7a983d5305a8072877
You wrote:

Am I missing something or is there a work around to handle or is this a known issue.

If it were a known issue, there would be an open issue for it in the issue tracker. There isn't.
I cannot tell you what you are missing because you don't tell me what your scheduled code does. Maybe schedule 1 and schedule 2 share some resource and a lock is set. Add some logging to your code to see what happens, log the time the schedules wake up, log the time they terminate, etc...
If you cannot come up with a proof that rufus-scheduler is the cause of the issue then I will close this issue. As you can see, rufus-scheduler is, by default, "multi-schedule". You have to find the cause of the problem in your code or provide me with a reproducible proof that rufus-scheduler is wrong.
You haven't told me what version of Ruby you are using, what version of rufus-scheduler you are using, what platform you are using. You haven't told me what your code is supposed to do. Am I supposed to guess all of that? It is very hard to help you in those conditions. The only thing I could do is to prove that my piece of code is behaving as expected, as described in its documentation, as tested in its spec.
It's 00:19 now and I am going to bed.
Best regards.

Closing the issue as there is no further information.
Not closing the conversation though.


reserved identifier violation

I would like to point out that identifiers like "_NODE_H_" and "_STRM_H_" do not fit to the expected naming convention of the C language standard.
Would you like to adjust your selection for unique names?

probably I will rename them with STRM_ prefix, e.g STRM_NODE_H etc.

Are there any more update candidates left over?