Adding ability to control rendering of relationships

This allows us to workaround upstream bug 277, which is logged at https://github.com/beam-community/jsonapi/issues/277 Additionally, it gives full control over rendering the relationship if desired.
defmodule MyAppWeb.AuthorView do
  use JSONAPI.View, type: "authors"

  def fields do
    [:name]
  end

  # The addition of this new hook method allows us to override the rendering of the relationship.
  # In the below contrived example, we return `nil` for the relationship data if the id of the
  # resources is 37. Otherwise it passes through the data unchanged. It is important to be able to
  # return nil because it lets code higher up the call stack - encode_rel_data/2 - to cleanly detect
  # the nil and ultimately surface a { data: null } for the relationship in the response, which works
  # around https://github.com/beam-community/jsonapi/issues/277
  #
  def relationship_data(data) do
    case data.id do
      37 -> nil
    _ -> data
    end
  end
end

I would also like to see it become possible to serialize null in this way rather than omitting relationship keys.
I have an alternative implementation to suggest, though. I believe it is equally valid to omit to-one relationships or encode them as null according to the spec, and I think there are reasonable semantic differences between the two options, so I think it would be nice to easily control which serialization is used on a per-relationship level.
Therefore, I propose we implement this as an option similar to the existing :include flag that tells a particular relationship to be included by default. Right now, you can specify a relationship as follows (taken from the README): author: {MyApp.UserView, :include}. I think that supporting author: {MyApp.UserView, [:include, :serialize_empty]} (naming TBD) would be a nice way to offer very granular control over this feature.

Thanks @mattpolzin. I'd be in broad agreement with your above suggestions. I am not hugely experienced with this library so yourself and others would be better judges of what approach would be more idiomatic for this library.
One callout: I have use cases in which it is useful to have some flexibility in what is considered null in my business model layer (eg. in my description on this ticket above, I have the contrived example where the foreign key is 37 and I want that to be surfaced as null). I can understand if allowing for that kind of use case is considered bad taste by those who contribute and maintain this library. But if it can be catered for then that is a win for my requirements.

I’ve got a clarifying question. The issue that spawned this PR was about serializing absent relations as null, but your example about id 37 is a separate use-case, right? In the case of id 37, the relation would not have been null but rather something like { “data”: { “id”: “37”, “type”: “something” } } so you are in some cases interested in serializing missing relations as null and in other cases interested in serializing relations that are not missing as null.

@mattpolzin Yes, exactly. This should really be two separate issues in github:

Serializing absent relations as null
Serializing relations that are not missing as null

Serializing relations that are not missing as null.

While I can imagine situations where I would want to null-out a relationship that the backend knows about but for some reason the client should not, I wonder whether relationship_data/1 in a JSONAPI.View has the right information available to it to really support that use-case in general. In your example (which I realize you did say was contrived), nulling out is based on a hard-coded id. In the general case, I imagine this logic would at least be based on a non-constant value (requiring a database lookup perhaps) or even some business logic that required more than knowing only the id and type of the relation (probably requiring knowledge other information about the request or the resource that defines the relationship).
Unless you disagree with that, I'd say that relationship_data/1 is not equipped to handle that use-case more broadly that in the example this PR description lays out. On the other hand, sometime prior to serialization, there must have been some code that actually performed a lookup (perhaps a database query) to retrieve the resource and its relatives and that code necessarily did have all of the aforementioned context (request parameters, database access, knowledge of both the parent resource and the relation) so that feels like a more appropriate place to null-out a relation.

@mattpolzin I would think that you are broadly correct in your last comment. And maybe, as you say, there may be another part of the stack (outside the view layer) feels like a more appropriate place to null-out a relation.
I suppose I've just seen many cases, down through the years, where there is a small range of well-known IDs or (or single ID) that should not be sent to the client - for "missing" records or similar, where the database design wants to avoid the use of nulls - eg. https://stackoverflow.com/questions/4336687/how-can-i-avoid-nulls-in-my-database-while-also-representing-missing-data
However, I'm only presenting the counter-argument and not arguing for it :smile:
If I was to argue for it, it would probably be something abstract like - it seems reasonable that the view layer has the ability to suppress the surfacing of a relationship. But, I'm not saying this is a knockdown argument.
In terms of syntax, (full disclosure: I have more of Ruby background than an Elixir background so forgive me if the following example doesn't compile - as I'm more focused on eating Christmas leftovers at the moment than coding on my laptop :rofl:  )...
author: {MyApp.UserView, [:include, :serialize_empty, empty_if: fn data -> data.author_id != 1 end]}

So, in summary, I think that it (1) Serializing absent relations as null should be implemented and I agree that (2) serializing relations that are not missing as null could be left unimplemented for now, or forever, unless there requests for such a feature or better arguments in favour of it.
Thanks again for the quick replies.

there may be another part of the stack (outside the view layer) that feels like a more appropriate place to null-out a relation.

This is of course one of those situations where I wouldn't dare pretend to have the right answer for another person's codebase, but I'll just mention how I would approach it briefly because the following would be compatible with the current capabilities of this JSON:API library (or any other serialization framework) because it only relies on Ecto.
I'd use a filtered relationship on my schema: https://hexdocs.pm/ecto/Ecto.Schema.html#has_many/3-filtering-associations. This filter could hard code some ids or it could use a field in the database (perhaps the relation's table has a expose_to_client field)  or maybe you're looking for soft-deletion (perhaps the relation's table has a is_visible or deleted_at field).
In the example that would mirror the original PR description above,
defmodule MyApp.Schema.Author do
  ...
  schema "authors" do
    ...
    has_one :publisher, Publisher,
      where: [id: {:not, 37}]
  end
end

Hi @mattpolzin thanks very much for your suggestion. I had look at this option but a couple of things jumped out at me...

where: [id: {:not, 37}] didn't actually work for me (the docs say where: [id: {:not, nil}] and, after if failed when I tried an integer ID, I assumed that maybe that ecto functionality only worked with nil and not an ID integer - I'm not sure if it was just an issue on my machine)
I was able to get the equivalent of that syntax working with {:fragment, expr} which is also listed in those docs, but...
I noticed that the ecto relationship would be null, but that the foreign key ID (ie. author_id id 37 on my Book struct) would still be 37. So if that struct is passed around then there is a contraction between the author_id (which is not null) and the author relationship (which is null). Ideally, I don't think I want that contradiction - so, given the struct will contain an author_id of 37, I want it to keep pointing at my non-null "placeholder" record
That's why I only want the relationship to go to null as late as possible (ie. when surfacing the relationship in the API - as there will be no author_id of 37 to speak of at that moment in time)
I could add a layer to null out both the author_id and the relationship at the same time - a layer that would exist between the ecto layer and the jsonapi view layer - but that felt like it might be over-engineering things
That's why the best tradeoff for me seemed to be to have the existing jsonapi view layer (which avoids me having to create another layer) offer me some control over how to surface the relationship (or not)

Again, not arguing for the case for this feature - just explaining my thinking. I could be thinking about this all wrong - either way, this conversation is useful learnings for me, thanks!

Thanks for going back and forth with me on this.
The distinction between a nulled out relationship vs a non-null Id is interesting. I guess I’ve only ever considered an relational field to be an attribute (author_id) or a relationship (author) but never access the same field as both in my code (I surface it as an attribute or a relationship in my Ecto Schema) so I’ve never had to worry about a association filter causing the relationship to be nil while the id property is not.
I’m only one person so I’ll leave the door open for others to voice their opinions but specifically the feature to null out relationships inside views using only the data property of the relationship itself feels like a narrow enough use-case (e.g. hard coding certain ids to be null) that id like to see others have need for something similar before adopting it into the library. Not just because if more people need it then it’s worth having, but also because others might have subtly different but very similar needs that would influence how the feature was designed.
I think it’s worth the effort to add an ability to control whether null relations are serialized as null or omitted, though. I’ve seen the use cases for that distinction numerous times before.

Hi @mattpolzin, I agree with your points above. If I get a chance to rework this to follow the approach you noted at https://github.com/beam-community/jsonapi/pull/278#issuecomment-1364107901 then I will note it here. (I may not get around to that for quite a while depending on my schedule).
In the meantime, happy new year and thanks for all your discussion above!

I'm not even close to getting time to implement the approach noted above. And I can currently work around the issue. Given a fresh PR will clean content in it would probably be better anyway, I plan close this PR soon (unless there are objections).

Sounds good. Thanks!

Thanks :+1: Closing PR as promised.


Installation of non-standard packages

Reminder to decide a standard way of instructing users to install non-standard packages in the tutorials.

The format STScI follows is to create a folder with the same name as the notebook, then put the notebook and a "requirements.txt" file into that folder.
The "requirements.txt" file should look something like:
astropy >= 4.2.0
matplotlib >= 3.3.3
numpy >= 1.19.0
Here's our formatting guide for additional details.
https://github.com/spacetelescope/style-guides/blob/master/guides/jupyter-notebooks.md

I vaguely recall that we were not going to do a requirements.txt file. I
will discuss with @eteq  and/or Scott --
kelle (via iOS)

Relevant to #10 (gphoton)

Should we also link to the package's docs on how to install? Presuming the URL is stable enough.

Should we also link to the package's docs on how to install? Presuming the URL is stable enough.

Generally, that's not necessary. If you think the package is particularly tricky to install, you can add the link. But if "pip install [package]" works, I wouldn't add it.


Rayshud Missing Alert Button

In the main menu and in game pause menu, there is no way to see your pending alerts.
When booting up the game with a pending alert, I hear the notification sound notifying me of the pending alert (new items) however there's no actual button that I can interact with to open the alerts.
For context, I used to use the old rayshud installer and the issue only came up when switching to using HUDEditor. I tried out other huds in the editor and none had the same problem. I am also using mastercomfig if that's at all relevant.
I have not tried replicating this on a clean install of the game yet so it is possible this could be an error on my end. Please let me know if you believe that to be the case.
I also looked through my console log on bootup and didn't see anything that seemed relevant. However I can still provide that log file if needed.
Proof of having a pending alert:

What my main menu looks like:

What my pause menu looks like:

Forgot to mention this but I am using the latest release, version 2.2 and my schemas are up to date

This isn't related to the editor and is instead an issue with rayshud itself. I moved the notification button and panel to be above the buttons on the right hand side of the screen for both modern and classic main menu styles. This should resolve the issue. Thanks!
https://github.com/raysfire/rayshud/commit/f93c2fed5bc1fe506cada968cbe205372b939810


Add Version Check workflow

Pull Request
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#145  👈
#143
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @JackPlowman and the rest of your teammates on  Graphite


Inconsistent fields naming in middleware/names/reverse

All names returned by middleware/names/reverse endpoint has  created_at_height and expires_at fields. Does expires_at mean block height? If yes, so I propose to add _height or to remove it from created_at_height.

@shekhar-shubhendu can you elaborate why won't fix it?


reorder the requirements section

you can only pip3 install -r requirements.txt once the project has been cloned locally

Thanks you!


Enable Flannel to support Windows for host-gw and VXLAN

Description
This PR enables Flannel to build and run on windows and support configuring Kubernetes using the host-gw and VXLAN backend. The goal is to enable users to provision a Kubernetes cluster with windows nodes in VXLAN mode or mixed windows and Linux nodes in host-gw mode.
The change requires a related change to the Flannel CNI to enable it to delegate to Windows CNI.
PRs open on CNI:
flannel CNI for windows: https://github.com/containernetworking/plugins/pull/76
host-local IPAM for windows: https://github.com/containernetworking/plugins/pull/77
Todos

[ ] Tests
[ ] Documentation

Thanks for taking a look Tom. Your comments are very reasonable. I'm going
to update the PR with changes I've made for VXLAN and address the easy
fixes like removing logrus and adding some unit tests. Will get back to you
on how best to build/integration test after I get a chance to huddle with
others on the Windows networking team. Just letting you know so you're not
surprised to see the PR increase in feature scope before your comments are
addressed - this will allow me to avoid merge madness.
On Fri, Oct 13, 2017 at 4:28 PM, Tom Denham<EMAIL_ADDRESS>wrote:

@tomdee requested changes on this pull request.
Thanks for this PR. I've taken a look and it's looking broadly OK, though
I do have a few questions/comments.

Common code
What are your thoughts on all the duplicate code in hostgw_*.go? The
Windows and Linux versions share quite a bit of code, do you think it
should be pulled out?
Testing
How will the flannel.exe binary be automatically tested? TravisCI
doesn't support windows so we need some alternative.
You'll need to add some windows specific tests before this can be
merged.
Maintenance
Who is going to be responsible for ongoing maintenance for Windows
support in flannel? I am likely going to need help in this area since I
don't have a Windows computer. I'm thinking of things like Windows specific
test failing, reviewing Windows specific PR and providing Windows support.
Documentation
This PR will need to include some Windows specific documentation

Also, you shouldn't have added logrus as a submodule in vendor. If you
need it to be updated you should do it through glide.
In backend/hostgw/hostgw_network_windows.go
https://github.com/coreos/flannel/pull/832#discussion_r144674198:

+// See the License for the specific language governing permissions and
+// limitations under the License.

+package hostgw
+
+import (

"sync"
"time"

log "github.com/golang/glog"
"golang.org/x/net/context"

"github.com/coreos/flannel/backend"
"github.com/coreos/flannel/subnet"

netroute "github.com/rakelkar/gonetsh/netroute"

This will need to be added to the glide.* files
In backend/hostgw/hostgw_windows.go
https://github.com/coreos/flannel/pull/832#discussion_r144674481:

+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.

+package hostgw
+
+import (

"fmt"

"github.com/Microsoft/hcsshim"

this will also need to be added to glide
In backend/vxlan/vxlan_windows.go
https://github.com/coreos/flannel/pull/832#discussion_r144674732:

@@ -0,0 +1,25 @@
+// +build windows

Do you need this file since vxlan isn't currently supported on Windows?
In network/ipmasq_windows.go
https://github.com/coreos/flannel/pull/832#discussion_r144674790:

@@ -0,0 +1,34 @@
+// +build windows

Why have a windows version of this file?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/coreos/flannel/pull/832#pullrequestreview-69370341,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADQphVIlA5QEGEzKQh_Nbv4QL5NTfcA2ks5sr_IhgaJpZM4PtGcf
.

--
Rakesh Kelkar

Snuff out logrus (it snuck in)

@rakelkar If it's possible to submit smaller PRs then that's helpful for me. e.g. moving the ipmasq code out of main might be a generally applicable change which doesn't depend on the Windows changes.

Can do..
On Oct 20, 2017 9:14 AM, "Tom Denham"<EMAIL_ADDRESS>wrote:

@rakelkar https://github.com/rakelkar If it's possible to submit
smaller PRs then that's helpful for me. e.g. moving the ipmasq code out of
main might be a generally applicable change which doesn't depend on the
Windows changes.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/coreos/flannel/pull/832#issuecomment-338249932, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ADQpheSFml_G2st5OIjYHffbkBQptlZBks5suMSTgaJpZM4PtGcf
.

@tomdee We are planning to break this PR up into the following new PRs:
PR1: ipmasq to build for windows - this is a just refactor, hopefully can be approved without too much controversy :)
PR2: build for windows, appveyor, windows iface code+gonetsh via glide
This PR will focus on getting Flannel to build on windows, with a little bit of functionality to determine the default interface.
PR3a: hostgw
This PR will add _windows files for hostgw functionality
PR3b: vxlan
This PR will add _windows files for vxlan functionality

Maintenance: The team that own the Windows Host Networking Services has agreed to own maintenance of these features. This is ofcourse dependent on automated testing, still poking about to figure out best to automate.

cc: @alinbalutoiu

Closing this PR as it's now being done in stages.


Implement AOPP Support

AOPP (Address Ownership Proof Protocol) is a new, simple protocol that specifies the transmission of signed messages via a URI scheme: https://gitlab.com/aopp/address-ownership-proof-protocol
Providing proof of ownership over an address is required to withdrawal Bitcoin in some countries (Switzerland, the Netherlands, Singapore, and soon more). It's a hassle to do that manually for the user and the exchange. AOPP heavily improves that. See aopp.group for more information about it.
Besides improving the UX for the user, there are two more benefits:

There is no need to copy & paste a Bitcoin address for the wallet to the exchange to withdraw. This prevents malware from replacing it in the clipboard (e.g. https://www.fortinet.com/blog/threat-research/vipersoftx-new-javascript-threat)
The wallet is aware that the user is withdrawing from an exchange (even which exchange) and with that can suggest other options, which might be better for his privacy, provide better fees or better technology (e.g. segwit support, etc.).

AOPP does not affect and is not even visible to users of exchanges who don't have AOPP (don't require ownership proof).
As Sparrow already supports URI handling for bitcoin: and the signing of messages, this shouldn't be too hard to implement. BlueWallet (which also has both) implement AOPP support in less than a day (https://github.com/BlueWallet/BlueWallet/pull/2915).

I've tried this on my website (getbittr.com) but the Sparrow implementation doesn't seem to work. In the first version (I think) with AOPP enabled (1.4.1), Sparrow was sending an address and version number to our server but not the signature so the validation didn't work. In the latest version (1.4.3), Sparrow doesn't send anything at all after clicking "Sign and send".
Also testing the AOPP demo doesn't work with Sparrow (https://testing.aopp.group/?&msg=vasp-chosen-msg&asset=btc&format=any) so I don't think the issue is on getbittr's end.

This was indeed a regression. Fixed in 34d1571.
I have just successfully registered an address on testing.aopp.group. Thanks for the report.


Custom hooks & plugins

Where can I find documentation for writing custom plugins and hooks?

I'm putting off a plugin guide until v8 where it will be a much better experience and make way more sense.


Measuring Vbat

I want to measure the voltage of Vbat and use the folllowing program:
void setup()
{
  Serial.begin(115200);

  analogReadResolution(12);
  analogSetAttenuation(ADC_11db);
}

void loop()
{
  // read the analog / millivolts value for GPIO2:
  int analogValue = analogRead(2);
  int analogVolts = analogReadMilliVolts(2);
  float temp = temperatureRead();

  // print out the values you read:
  Serial.printf("ADC analog value = %d\n",analogValue);
  Serial.printf("ADC millivolts value = %d\n",analogVolts);
  Serial.printf("Core temperature = %3.1f °C\n\n", temp);

  delay(2000);  // delay in between reads for clear read from serial
}

The output is:
E (798844) tsens: Do not configure the temp sensor when it's running!
E (798844) tsens: Temperature sensor is already running or not be configured
ADC analog value = 2954
ADC millivolts value = 1407
Core temperature = 44.6 °C
I expect a voltage of about 2000 mV for a full loaded battery.What means the tsens output?

I am also trying to measure the voltage of Vbat. According to my previous experience on T-Display board, the maximum measuring range of the esp32 series chip is 0 mV ~ 2500 mV (https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32c3/api-reference/peripherals/adc.html ). So, for a 3.7V battery, usually the adc pin only measures half of the voltage:

By looking at the schematic, this seems to be the case. the connection is GND -> R13(100K) -> R7(0) -> A0 -> R26 -> Vbat, and the adc is mesuring the volt between R13 and GND. So, simply double the voltage.

My current code to get volt is:

// see https://github.com/espressif/esp-idf/blob/master/examples/peripherals/adc/single_read/single_read/main/single_read.c
esp_adc_cal_characteristics_t adc_chars;

void battery_adc_init()
{
  esp_err_t ret;
  bool cali_enable = false;
  esp_adc_cal_value_t val_type;
  ret = esp_adc_cal_check_efuse(ESP_ADC_CAL_VAL_EFUSE_TP);
  if (ret == ESP_ERR_NOT_SUPPORTED) {
      Serial.println("Calibration scheme not supported, skip software calibration");
  } else if (ret == ESP_ERR_INVALID_VERSION) {
      Serial.println("eFuse not burnt, skip software calibration");
  } else if (ret == ESP_OK) {
      cali_enable = true;
  } else {
      Serial.println("Invalid arg");
  }

  val_type = esp_adc_cal_characterize(ADC_UNIT_1, ADC_ATTEN_DB_11, ADC_WIDTH_BIT_12, 0, &adc_chars);
  if (val_type == ESP_ADC_CAL_VAL_EFUSE_TP)
  {
    Serial.printf("Two Point --> coeff_a:%umV coeff_b:%umV\n", adc_chars.coeff_a, adc_chars.coeff_b);// Two Point --> coeff_a:47304mV coeff_b:0mV
  }
  else
  {
    Serial.println("Unknown Calibration");
  }

  adc1_config_width(ADC_WIDTH_BIT_12);
  adc1_config_channel_atten(ADC1_CHANNEL_2, ADC_ATTEN_DB_11); // ADC1_CHANNEL_2 => GPIO2
}

uint32_t get_battery_mvolt() {
  int raw = adc1_get_raw(ADC1_CHANNEL_2); // GPIO2
  uint32_t volt = esp_adc_cal_raw_to_voltage(raw, &adc_chars); // mVolt
  return volt;
}

There is no #ifdef CONFIG_IDF_TARGET_ESP32C3 in https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-adc.c . I guess directly using analogReadMilliVolts will return an uncalibrated result.

Thats clear. I should meassure the voltage output via serial monitor at A0. But, the values differ. Dr. Claus Kühnel - Talstr. 13b - CH-8852 AltendorfMobile +41-76-3960801
-------- Ursprüngliche Nachricht --------Von: am009 @.> Datum: 28.05.22  07:08  (GMT+01:00) An: Xinyuan-LilyGO/LilyGo-T-OI-PLUS @.> Cc: Claus Kühnel @.>, Author @.> Betreff: Re: [Xinyuan-LilyGO/LilyGo-T-OI-PLUS] Measuring Vbat (Issue #19)
I am also trying to measure the voltage of Vbat. According to my previous experience on T-Display board, the maximum measuring range of the esp32 series chip is 0 mV ~ 2500 mV (https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32c3/api-reference/peripherals/adc.html ). So, for a 3.7V battery, usually the adc pin only measures half of the voltage:
By looking at the schematic, this seems to be the case. the connection is GND -> R13(100K) -> R7(0) -> A0 -> R26 -> Vbat, and the adc is mesuring the volt between R13 and GND. So, simply double the voltage.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

/*
 * File: ESP32-C3_AnalogRead.ino
 *
 * Using ADC of T-OI plus ESP32-C3
 * used Board: STAMP-C3U
 *
 * 2022-05-27/Claus Kühnel @.***
 */

float conversionFactor = 3300./4096;
void setup()
{
  Serial.begin(115200);
  delay(2000); // wait for serial monitor
  Serial.println("T-OI plus ESP32-C3 ADC");

  analogReadResolution(12);
  analogSetAttenuation(ADC_11db);
}
void loop()
{
  // read the analog value for GPIO2:
  int analogValue = analogRead(2); // Reads Vbat
  // int analogVolts = analogReadMilliVolts(2); do not use this
  int analogVolts = (int) (analogValue * conversionFactor) + .5;
  float temp = temperatureRead();

  // print out the values you read:
  Serial.printf("ADC analog value = %d\n",analogValue);
  Serial.printf("ADC millivolts value = %d\n",analogVolts);
  Serial.printf("Core temperature = %3.1f °C\n\n", temp);

  delay(2000);  // delay in between reads for clear read from serial
}
I get the following output for 2.06 V on A0:
Dr. Claus Kühnel - Talstr. 13b - CH-8852 Altendorf
Mobile +41-76-3960801
-- Aus dem Rheinwerk-Verlag: Arduino - das umfassende Handbuch ISBN 978-3-8362-7345-9 [https://www.rheinwerk-verlag.de/arduino-das-umfassende-handbuch/] --
Am 28.05.2022 07:08:00 schrieb am009 @.>:
I am also trying to measure the voltage of Vbat. According to my previous experience on T-Display board, the maximum measuring range of the esp32 series chip is 0 mV ~ 2500 mV (https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32c3/api-reference/peripherals/adc.html [https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32c3/api-reference/peripherals/adc.html] ). So, for a 3.7V battery, usually the adc pin only measures half of the voltage:
[image] [https://user-images.githubusercontent.com/23314210/170810678-96a8d7c7-91a8-47b8-952e-5ebf32fca1eb.png]
By looking at the schematic, this seems to be the case. the connection is GND -> R13(100K) -> R7(0) -> A0 -> R26 -> Vbat, and the adc is mesuring the volt between R13 and GND. So, simply double the voltage.
—
Reply to this email directly, view it on GitHub [https://github.com/Xinyuan-LilyGO/LilyGo-T-OI-PLUS/issues/19#issuecomment-1140175497], or unsubscribe [https://github.com/notifications/unsubscribe-auth/AABPZTEKZFP2ESTLDZZXU5DVMGS2VANCNFSM5XA25NRQ].
You are receiving this because you authored the thread.Message ID: @.>
[cf2c34dd-2ffc-4736-b131-183d6f40f7ac]

Hello,

Obtain battery voltage.
2.The output is:
E (798844) tsens: Do not configure the temp sensor when it's running!
E (798844) tsens: Temperature sensor is already running or not be configured

This may have something to do with the ESP32 version. Or a software bug
Submit feedback questions here

Thanks a lot, it works now.
Dr. Claus Kühnel - Talstr. 13b - CH-8852 Altendorf
Mobile +41-76-3960801
-- Aus dem Rheinwerk-Verlag: Arduino - das umfassende Handbuch ISBN 978-3-8362-7345-9 [https://www.rheinwerk-verlag.de/arduino-das-umfassende-handbuch/] --
Am 30.05.2022 12:14:50 schrieb LilyGO @.***>:
Hello,

Obtain battery voltage [https://github.com/Xinyuan-LilyGO/LilyGo-T-OI-PLUS/tree/main/example/battery_voltage].
2.The output is:
E (798844) tsens: Do not configure the temp sensor when it's running!
E (798844) tsens: Temperature sensor is already running or not be configured
This may have something to do with the ESP32 version. Or a software bug
Submit feedback questions here [https://github.com/espressif/arduino-esp32/issues]
—
Reply to this email directly, view it on GitHub [https://github.com/Xinyuan-LilyGO/LilyGo-T-OI-PLUS/issues/19#issuecomment-1140970778], or unsubscribe [https://github.com/notifications/unsubscribe-auth/AABPZTEGPT4J756PLJSAHCLVMSIJLANCNFSM5XA25NRQ].
You are receiving this because you authored the thread.Message ID: @.***>
[40b7a09a-1642-4976-9865-96118185cffb]

Soo Is vbat hardwired to one of the ADCs, or did you loop a wire from vbatt back to a pin?


Add team requests page

Related to #3
Add a new page for team-based requests and update existing components to support it.

New Components:

Add TeamRequestItem.tsx to display team request items.
Add TeamRequestList.tsx to display a list of team request items with search and filter functionality.
Add TeamRequestHero.tsx for the hero section of the team requests page.

New Page:

Add team-requests.tsx to create a new page for team requests.
Fetch data from team_requests.json and pass it to the TeamRequestList component.

Data File:

Add team_requests.json to store team request data.

Updated Components:

Update HeroContainer.tsx to include a reference to the new team-based requests.
Update RepositoryItem.tsx to handle both individual and team requests.

Updated Index Page:

Update index.tsx to include a link to the new team requests page and a brief description of its purpose.

For more details, open the Copilot Workspace session.

Add website field to TeamRequestItemProps

Link organization name to website in a new window

For more details, open the Copilot Workspace session.

Update RepositoryItem component to handle team requests

Add website prop to TeamRequestItem component for team requests

For more details, open the Copilot Workspace session.


Perl support

Hello  .  Would it be possible to support Perl?

Hey, sure ;)

I've created a PR with single line comment support https://github.com/Bogdan-Lyashenko/codecrumbs/pull/72


Runtime Warning

Thanks for writing this great tool!
I get the following warning when i open the notebook. Any idea?

Thanks for the kind words!
Maybe upgrade pyzmq and tornado?

i upgraded both. Same warning.

What versions of pyzmq and tornado do you have?

# packages in environment at C:\Users\asharaf\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone:
#
# Name                    Version                   Build  Channel
tornado                   6.2              py39h2bbff1b_0
pyzmq                     22.2.1                   py39_0    esri

$ python --version
Python 3.9.11

Can you upgrade pyzmq to version 24?

hi, same warning with pyzmq 24.0.1

I will create a new vmenv and see what i get.


Setup shows the ERRO even fix function do needful

19:53:36 + crc setup
19:53:36 INFO[0000] Error loading global state: open /root/.crc/globalstate.json: no such file or directory
19:53:36 crc - Local OpenShift 4.x cluster
19:53:36 INFO  Caching oc binary
19:53:36 ERRO Error occured: oc binary is not cached.
19:53:38 INFO  Copying '/tmp/crc103903385/oc' to '/root/.crc/cache/oc/oc'
19:53:38 INFO  Setting up virtualization
19:53:38 INFO  Setting up KVM
19:53:38 INFO  Installing Libvirt
19:53:38 INFO  Adding user to libvirt group
19:53:38 ERRO Error occured: [root] not part of libvirtd group
19:53:38 INFO  Enabling libvirt
19:53:38 INFO  Starting Libvirt service
19:53:38 INFO  Installing crc-driver-libvirt
19:53:39 INFO  Setting up Libvirt crc network
19:53:40 ERRO Error occured: Libvirt network crc not found
19:53:40 INFO  Starting Libvirt crc network
19:53:40 ERRO Error occured: Libvirt crc network is not active
19:53:41 INFO  Writing Network Manager config for crc
19:53:41 INFO  Writing dnsmasq config for crc

This is because of recent PR merge from @cfergeau, this is not the good UX for crc setup.

Nope, it's caused by commit f70e40f45ff6a, something like this fixes the issue:
diff --git a/pkg/crc/preflight/preflight_checks_linux.go b/pkg/crc/preflight/preflight_checks_linux.go
index 601af77..e7de588 100644
--- a/pkg/crc/preflight/preflight_checks_linux.go
+++ b/pkg/crc/preflight/preflight_checks_linux.go
@@ -2,6 +2,7 @@ package preflight

 import (
 	"bytes"
+	"errors"
 	"fmt"
 	"io"
 	"io/ioutil"
@@ -15,7 +16,7 @@ import (
 	"text/template"

 	"github.com/code-ready/crc/pkg/crc/constants"
-	"github.com/code-ready/crc/pkg/crc/errors"
+	crcerr "github.com/code-ready/crc/pkg/crc/errors"
 	"github.com/code-ready/crc/pkg/crc/logging"
 	"github.com/code-ready/crc/pkg/crc/machine/libvirt"
 	"github.com/code-ready/crc/pkg/crc/oc"
@@ -175,7 +176,7 @@ func checkUserPartOfLibvirtGroup() (bool, error) {
 		logging.Debug("Current user is already in the libvirt group")
 		return true, nil
 	}
-	return false, errors.NewF("%s not part of libvirtd group", currentUser.Username)
+	return false, crcerr.NewF("%s not part of libvirtd group", currentUser.Username)
 }

 func fixUserPartOfLibvirtGroup() (bool, error) {

I'll file a PR tomorrow if noone beats me to it.

Ohh yes, i was also thinking it was a side effect of the debug logs PR, but since the import of errors got changed, we are seeing those, so if we use the pkg/crc/errors package then forming a new error using errors.New() prints the message using logging.Error().
https://github.com/code-ready/crc/blob/2780967e54f1a797706a8504938e27d1442971fd/pkg/crc/errors/error.go#L10-L18

Closed via #191


DEC-286

Add React component StartShowcaseButton.
Show a link to the first showcase on the collection introduction page.
Uses Showcase card for consistent interface. (Replace with nifty graphic from Andy later?)
If there are no showcases, the section is not displayed.

:+1:


Separate authentication specification from JWT specific implementation

Currently the authentication specification for the V2 API contains two main sections. The first describing the role of an authentication server and the second describing a JWT token specification which is used by the hub and integrated into the distribution project. These sections should be split out and the JWT token specification should be listed as one example of an authentication server with distribution server side support. The authentication server should be described more generally.  In the future a wider range of tokens should be accepted including macaroon based authentication.
cc @mattmoor raising this issue in the working group

In particular, I would word this as "tokens should be treated as opaque data by the Docker client".
It should be assumed that only the registry that provided a token can interpret it.
thanks for opening this.


Some change 01

Add some comment with highlight :)

And another comment:

to see how it looks :)

I see that you started working on a file that should be locked first.
No problem, this is how you can lock it:
/lock MeticulouslyCraftedModel.stl


Update README.md

I think nice to show we can reuse formatters.

Thanks. Maybe combine it with the example above and add some explanations in plain English?

How about that @dblock:
Apply a formatter before exposing a value.
format_with(:iso_timestamp) { |dt| dt.iso8601 }
with_options(format_with: :iso_timestamp) do
  expose :created_at
  expose :updated_at
end

Defining a reusable formatter between multiples entities:
# Helper module for instance
Grape::Entity.format_with :utc do |date|
  date.utc if date
end

# Entity
expose :updated_at, format_with: :utc

The language is fine, but I'd like the two code examples to be consistent, for example the first doesn't have Grape::Entity. and the second does. One uses a block with do and the other one has {.

Just format_with inside a helper raises an exception like undefined method format_with for ApiHelpers:Module, that is the reason for Grape::Entity. before. Maybe we can give a bit more of context like below. { is the proper style for inline blocks, we can change to a multi line block if necessary (I don't think so).
Apply a formatter before exposing a value.
module Entities
  class MyModel < Grape::Entity
    format_with(:iso_timestamp) { |dt| dt.iso8601 }

    with_options(format_with: :iso_timestamp) do
      expose :created_at
      expose :updated_at
    end
  end
end

Defining a reusable formatter between multiples entities:
module ApiHelpers
  extend Grape::API::Helpers

  Grape::Entity.format_with :utc do |date|
    date.utc if date
  end
end

module Entities
  class MyModel < Grape::Entity
    expose :updated_at, format_with: :utc
  end

  class AnotherModel < Grape::Entity
    expose :created_at, format_with: :utc
  end
end

Much better, amend and I'll merge.

I still have major ADD around { vs. do btw!

Please, check now.

Looks great, merging.


Npm weirdness

Fixes issue #74, which broke linting and tests on Windows.

Closed in favour of #76


[ISSUE] Authentication prompts before validating IdP init SSO is enabled for the SP

Describe the issue:
When an IdP initiated SSO flow in triggered for a specific service provider without enabling 'IdP Init SSO' for that SP, validation happens only after the login is prompted.
How to reproduce:

Configure a SAML SP without enabling 'IdP Init SSO'
Initiate a IdP initiated SSO flow for the SP
Observe that login prompts
Upon providing credentials note that you will be redirected to an error

Expected behavior:
Validation for the configuration of the service provider (request validation) should happen prior to authentication.

Optional Fields
Related issues:

Suggested labels:

This issue is being closed due to extended inactivity. Please feel free to reopen it if further attention is needed. Thank you for helping us keep the issue list relevant and focused!


:bug: Increment version in stackrox syncer

Summary
Use one version object throughout stackrox syncing and increment it accordingly.
Tests

[ ] Unit/function tests have been added and incorporated into make unit-tests.
[ ] Integration tests have been added and incorporated into make integration-test.
[ ] E2E tests have been added and incorporated into make e2e-test-all.
[ ] List other manual tests you have done.

FYI - @jhernand

/cc @jhernand

/ok-to-test

@yanmxa Seems like we still need the sleep - https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/stolostron_multicluster-global-hub/1123/pull-ci-stolostron-multicluster-global-hub-main-test-integration/1838145151910809600#1:build-log.txt%3A1806

Thanks, @danmanor and @jhernand!
I see that the stackrox_controller.go includes additional logic, so we can retain the current implementation. However, if your goal is simply to send the resources to the global hub manager, you can directly leverage the following logic:
We've implemented a GenericObjectSyncer, where you can simply provide the configuration for syncing the current object the global hub manager. For example, if you want to sync managed clusters, you can refer to the managed cluster syncer for guidance.
Here’s how to configure it step by step:

Configure how to watch the managed cluster resources:
// controller config
instance := func() client.Object { return &clusterv1.ManagedCluster{} }
predicate := predicate.NewPredicateFuncs(func(object client.Object) bool { return true })

Configure how to emit/send:
I added an annotation to each managed cluster to indicate which managed hub it belongs to:
// emitter config
tweakFunc := func(object client.Object) {
   utils.MergeAnnotations(object, map[string]string{
      constants.ManagedClusterManagedByAnnotation: statusconfig.GetLeafHubName(),
   })
}
emitter := generic.ObjectEmitterWrapper(enum.ManagedClusterType, func(obj client.Object) bool {
   return true
}, tweakFunc, false)

Add the syncer to the manager:
return generic.LaunchGenericObjectSyncer(
   "status.managed_cluster",
   mgr,
   generic.NewGenericController(instance, predicate),
   producer,
   statusconfig.GetManagerClusterDuration,
   []generic.ObjectEmitter{
      emitter,
   })

You can follow the above guidelines, it's internal implementation includes version control and multi-goroutine handling to avoid race conditions, among other features.

/test test-integration

/cc @danmanor

/cc @clyang82 @ldpliu

/lgtm

/cherry-pick release-2.12

/test images
/test test-e2e


Cookie Storage example always timesout

Browser is up and showing the cookie set page but the cookie future is timing out even increase it to 10+ seconds
File "/Users/liutao/projects/maxmypoint/HotelChecker/ffcookie.py", line 96, in main
cookie_resource = cookie_fut.result(13.0)
File<EMAIL_ADDRESS>line 460, in result
raise TimeoutError()
concurrent.futures._base.TimeoutError

Thank you for your report. I just ran the tests and the storage related functions are broken on newer Firefox versions. I will tackle these issues if I got the time.

Okay, everything is working again. You can see the changes here.


Session migration

Please don't mind unrelated changes:

Internal delegates have been organized (warning for unhandled delegates)
WebSocket fixes

Maybe not necessary, but I am a bit concerned about the magnitude of these changes. Were you planning a refactor @hiroshihorie or did the migration/reconnect use case force you to do all this?

There's a lot internal improvements (non-breaking) which got mixed up in this PR, please don't mind 😅 I'll try to keep the next PR simple 🙏

Thanks onichans checking my PR on a Saturday! haha 🙏


Search: Update Maria and Postgres searchers to mirror SQL server capability

@muzammil-ali1 , could you determine if this issue is still needed as part of the work you are doing on improving search ?


Failed to decompress package (rpm)

hi,
ubuntu 20.04:
./get.sh rpm
Getting rpm
-> Location: http://rpmfind.net/linux/fedora/linux/updates/35/Everything/x86_64/Packages/g/glibc-2.34-29.fc35.x86_64.rpm
-> ID: libc-2.34-29.fc35.x86_64
-> Already have this version, 'rm /home/wzsx150/bin/libc-database/db/libc-2.34-29.fc35.x86_64.*' to force
Getting rpm
-> Location: http://rpmfind.net/linux/centos-stream/9-stream/BaseOS/x86_64/os/Packages/glibc-2.34-25.el9.x86_64.rpm
-> ID: libc-2.34-25.el9.x86_64
-> Downloading package
-> Extracting package
error: pkg.rpm: signature hdr data: BAD, no. of bytes(27320) out of range
error reading header from package
rpm2cpio failed
cpio: 归档非正常终止
cpio failed
Cannot locate the libc file
how to fix it?

Also getting this error. Might troubleshoot later.

That's a bug in the rpm2cpio version packaged with Ubuntu 20.04.
https://bugs.launchpad.net/ubuntu/+source/rpm/+bug/1947120
Try upgrading to Ubuntu 22.04 or compile it from source https://rpm.org/download.html


Deprecation

Should this repository be deprecated, seeing as GitHub now offers their own canned responses?
https://github.com/blog/2135-saved-replies

@notwaldorf We appreciate you efforts but please at least add a note of the official feature to the README.

I've added a note to the readme, but it's not like I'm forcing you to use this extension. There's no real point in deprecating the repo, since the code still works and whether or not you want to use this or GitHub's actual feature is entirely your choice.


Upgrading dataframe to version 1.22.0

Describe the pull request

What does your PR fix?
It is an upgrade of dataframe package to version 1.22.0

Which triplets are supported/not supported?
Yes

If you have added/updated a port: Have you run ./vcpkg x-add-version --all and committed the result?
<Yes / I am still working on this PR>

If you are still working on the PR, open it as a Draft: https://github.blog/2019-02-14-introducing-draft-pull-requests/

@microsoft-github-policy-service agree

@hosseinmoein, Thanks for your pr, please use command ./vcpkg format-manifest ports/dataframe/vcpkg.json format your vcpkg.json file. then run command
git add .
git commit -m "update vcpkg.json"
./vcpkg x-add-version dataframe --overwrite-version and command again


Prepare for v11

Prepare v11 for release with (after) Commander v11

Simple release to match Commander 11, and can pass tests now it exists. :-)
I'll release after approved.


Fix check for connection error

Fixes #109 by adjusting check against errors.

@pschmitt : sure, will add it.
Black is now OK but flake8 fails because of your other changes :
./roombapy/remote_client.py:117:81: E501 line too long (88 > 80 characters)
60
./roombapy/remote_client.py:131:81: E501 line too long (88 > 80 characters)
Do you want to fix it yourself or ignore it?
For the comment: 'RC = 0 indicates success' is enough?

@pschmitt : sure, will add it.
Black is now OK but flake8 fails because of your other changes :
./roombapy/remote_client.py:117:81: E501 line too long (88 > 80 characters)
60
./roombapy/remote_client.py:131:81: E501 line too long (88 > 80 characters)
Do you want to fix it yourself or ignore it?

My bad. Let's ignore that. Imma deal with it later ;)

For the comment: 'RC = 0 indicates success' is enough?

Pretty much, yeah. I'd add a link to the upstream doc as well.

@pschmitt : sure, will add it.
Black is now OK but flake8 fails because of your other changes :
./roombapy/remote_client.py:117:81: E501 line too long (88 > 80 characters)
60
./roombapy/remote_client.py:131:81: E501 line too long (88 > 80 characters)
Do you want to fix it yourself or ignore it?

My bad. Let's ignore that. Imma deal with it later ;)

For the comment: 'RC = 0 indicates success' is enough?

Pretty much, yeah. I'd add a link to the upstream doc as well.

There's another way of fixing it.
Changing None to "None" in const.py for 0 in MQTT_ERROR_MESSAGES and remove the rc != 0 condition?
Either works, just a matter of preference.

It's fine currently. Not a fan of "None" ;)


Uniform Buffer Fixes and Improvements

Fix issue with multiple Uniform Blocks not able to be used.
Add internal global binding value management.
Update docs and information.

I'm good to merge this in code-wise, so let me know (or feel free to merge yourself) after you see Square's comments.

I have updated the specific wording on these. It should be good to go.


Cannot consume web5-kt as a dependency

Tried to include web5-kt as a dependency in a new project and encountered the following:
❯ mvn clean install -U                                                                                02:05:33
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< org.tbddev:SDK-TEST-OK >-----------------------
[INFO] Building consoleApp 1.0-SNAPSHOT
[INFO]   from .polyglot.pom.yml
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from mavenCentral: https://repo1.maven.org/maven2/com/github/TBD54566975/web5-kt/0.0.9-beta/web5-kt-0.0.9-beta.pom
Downloading from jitpack.io: https://jitpack.io/com/github/TBD54566975/web5-kt/0.0.9-beta/web5-kt-0.0.9-beta.pom
Downloading from jboss-thirdparty-releases: https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/com/github/TBD54566975/web5-kt/0.0.9-beta/web5-kt-0.0.9-beta.pom
Downloading from central: https://repo.maven.apache.org/maven2/com/github/TBD54566975/web5-kt/0.0.9-beta/web5-kt-0.0.9-beta.pom
[WARNING] The POM for com.github.TBD54566975:web5-kt:jar:0.0.9-beta is missing, no dependency information available
Downloading from mavenCentral: https://repo1.maven.org/maven2/com/github/TBD54566975/web5-kt/0.0.9-beta/web5-kt-0.0.9-beta.jar
Downloading from jitpack.io: https://jitpack.io/com/github/TBD54566975/web5-kt/0.0.9-beta/web5-kt-0.0.9-beta.jar
Downloading from jboss-thirdparty-releases: https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/com/github/TBD54566975/web5-kt/0.0.9-beta/web5-kt-0.0.9-beta.jar
Downloading from central: https://repo.maven.apache.org/maven2/com/github/TBD54566975/web5-kt/0.0.9-beta/web5-kt-0.0.9-beta.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.410 s
[INFO] Finished at: 2023-11-22T02:05:47-06:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project SDK-TEST-OK: Could not resolve dependencies for project org.tbddev:SDK-TEST-OK:jar:1.0-SNAPSHOT: The following artifacts could not be resolved: com.github.TBD54566975:web5-kt:jar:0.0.9-beta (absent): Could not find artifact com.github.TBD54566975:web5-kt:jar:0.0.9-beta in mavenCentral (https://repo1.maven.org/maven2/) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

The same happened for 0.0.8-beta, 0.0.7-beta, 0.0.6-beta, and 0.0.5-beta
Steps to reproduce
Include the following as a dependency in pom.xml
<dependency>
    <groupId>com.github.TBD54566975</groupId>
    <artifactId>web5-kt</artifactId>
    <version>0.0.9-beta</version>
</dependency>

or include the following as a dependency in a build.gradle.kts
implementation("com.github.TBD54566975:web5-kt:0.0.9-beta")

[!IMPORTANT]
This is making it such that tbdex-kt is not consumable either because it has web5-kt:0.0.9-beta as a dependency

@mistermoe I just tried this with implementation("com.github.TBD54566975:web5-kt:v0.0.9-beta") and it worked for me. Note that I used v0.0.9-beta vs 0.0.9-beta.  It's important to use the exact release tag we're using in github.
For pom.xml style, you'd do the following:
<dependency>
    <groupId>com.github.TBD54566975</groupId>
    <artifactId>web5-kt</artifactId>
    <version>v0.0.9-beta</version>
</dependency>

You can see an example at https://github.com/andresuribe87/java-web5-kt/blob/main/app/build.gradle

i wonder what changed 🤔 . seems like 0.9.0-beta was working 3 weeks ago

i wonder what changed 🤔 . seems like 0.9.0-beta was working 3 weeks ago

Weird. I don't really have any hypothesis as to what might have happened. Closing this for now, as the dep can be consumed. We'll also be moving to the Central Repository soon, which is tracked in #68


Error : keep occurring R.java not found

Hello, Infer team
I'm doing research about analysis tools for Android apps and one of it is this Infer.
The problem that I have right now is that I can run ./gradlew build clean, ./gradlew clean succesfully but when I try to run infer -- ./gradlew build clean it tells me that infer cannot find R.java.
I'm using v0.9.2, and for example applying Infer on iosched `s version 9f38e2d9e6ca81341fecf82d881cf629effb4be2 gives this error.(Also on some other projects too)
In Addition, my envorionment is MacOS Sierra
full error log is below
Is this error from Infer? or occurs from other reasons?
Thank you,
javac: file not found: <MYPATH>/iosched/android/build/generated/source/r/mapEditor/debug/android/support/design/R.java
Usage: javac <options> <source files>
use -help for a list of possible options
Traceback (most recent call last):
  File "/usr/local/bin/../Cellar/infer/0.9.2/bin/../lib/infer/infer/lib/python/infer.py", line 228, in <module>
    main()
  File "/usr/local/bin/../Cellar/infer/0.9.2/bin/../lib/infer/infer/lib/python/infer.py", line 190, in main
    capture_exitcode = imported_module.gen_instance(args, cmd).capture()
  File "/usr/local/Cellar/infer/0.9.2/lib/infer/infer/lib/python/inferlib/capture/gradle.py", line 87, in capture
    return util.run_compilation_commands(cmds, clean_cmd)
  File "/usr/local/Cellar/infer/0.9.2/lib/infer/infer/lib/python/inferlib/capture/util.py", line 40, in run_compilation_commands
    if cmd.start() != os.EX_OK:
  File "/usr/local/Cellar/infer/0.9.2/lib/infer/infer/lib/python/inferlib/jwlib.py", line 264, in start
    self._compile()
  File "/usr/local/Cellar/infer/0.9.2/lib/infer/infer/lib/python/inferlib/jwlib.py", line 338, in _compile
    return self.javac.run()
  File "/usr/local/Cellar/infer/0.9.2/lib/infer/infer/lib/python/inferlib/jwlib.py", line 233, in run
    subprocess.check_call(failing_cmd)
  File "<MYPATH>/anaconda/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '[u'javac', u'-J-Duser.language=en'<EMAIL_ADDRESS>u'@/var/folders/n3/s93xtgws2114_yqxdy6x8xch0000gn/T/javac_args_rQQ5S4']' returned non-zero exit status 2
Failed to execute: /usr/local/bin/../Cellar/infer/0.9.2/bin/../lib/infer/infer/lib/python/infer.py --multicore 4 --out <MYPATH>/iosched/infer-out --project_root /Users/shunsuke/Desktop/college/research/Apps/iosched -- ./gradlew build clean

For additional information, even I update infer to v0.9.4, this still occurs.
just for adding detail
Thank you,

The gradle integration shipped with infer is crude and will run javac on all the files ending in ".java" in gradle's verbose output... If there is no file R.java then that will fail.
You may have more luck with the more robust uber's gradle plugin for infer.

@jvillard
thank you for info. I will take a try.

Finally I solved the problem.
After running gradlew init, infer started to run successfully.
Thanks,


docker.io

PR-Codex overview
The focus of this PR is to update the workflow to push Docker images to docker.io instead of ghcr.io.
Detailed summary

Updated workflow to push Docker images to docker.io instead of ghcr.io
Updated the push action to use docker.io registry
Updated the action configuration with the new registry information

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@rultor release, tag is 0.0.3

@rultor release, tag is 0.0.3

@h1alexbel OK, I will release it now. Please check the progress here

@rultor release, tag is 0.0.3

@h1alexbel Done! FYI, the full log is here (took me 3min)


Add option in JS sample to select output format

Purpose
Address #960 , add option in JS sample to select output format
[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

When you change the format and you try and save the file extension it is always .mp3 so if you select Raw8Khz8BitMonoMULaw it should be .wav.


Implement Display for value::owned::Struct, value::owned::Sequence, etc.

value::owned::Element implements Display: https://github.com/amzn/ion-rust/blob/main/src/value/owned.rs#L456-L483
But e.g., Struct, Sequence to not implement Display
So if I have a Struct (perhaps I've checked type and called as_struct on the Element and passed to another function), I can't easily display without something like Element::from(struct_.clone()).to_string()

Fixed in #486, this will be included in the next release.


copr: Add non-vectorize to_seconds

What have you changed?
Add Non-Vectorize to_seconds
What is the type of the changes?

Improvement (a change which is an improvement to an existing feature)

How is the PR tested?

Unit test

Does this PR affect documentation (docs) or should it be mentioned in the release notes?

Does this PR affect tidb-ansible?

NO
Refer to a related PR or issue link (optional)
Duplicate https://github.com/tikv/tikv/pull/6386/files
Benchmark result if necessary (optional)
Any examples? (optional)

@gengliqi @MyonKeminta PTAL and the next deadline for reviewing is 2020-02-20 24:00:00


Fix unit test under clang-15

What problem does this PR solve?
Issue Number: ref https://github.com/pingcap/tiflash/issues/5265
Problem Summary: https://github.com/pingcap/tiflash/issues/5265#issuecomment-1275698115
In file included from /workspace/tiflash/dbms/src/Common/tests/gtest_cpu_affinity_manager.cpp:31:
In file included from /workspace/tiflash/contrib/boost/boost/algorithm/string.hpp:23:
In file included from /workspace/tiflash/contrib/boost/boost/algorithm/string/split.hpp:16:
In file included from /workspace/tiflash/contrib/boost/boost/algorithm/string/iter_find.hpp:27:
In file included from /workspace/tiflash/contrib/boost/boost/algorithm/string/find_iterator.hpp:24:
In file included from /workspace/tiflash/contrib/boost/boost/algorithm/string/detail/find_iterator.hpp:18:
In file included from /workspace/tiflash/contrib/boost/boost/function.hpp:30:
In file included from /workspace/tiflash/contrib/boost/boost/function/detail/prologue.hpp:17:
In file included from /workspace/tiflash/contrib/boost/boost/function/function_base.hpp:22:
/workspace/tiflash/contrib/boost/boost/type_traits/has_trivial_copy.hpp:34:4: error: builtin __has_trivial_copy is deprecated; use __is_trivially_copyable instead [-Werror,-Wdeprecated-builtins]
   BOOST_HAS_TRIVIAL_COPY(T) BOOST_TT_TRIVIAL_CONSTRUCT_FIX
   ^
/workspace/tiflash/contrib/boost/boost/type_traits/intrinsics.hpp:190:41: note: expanded from macro 'BOOST_HAS_TRIVIAL_COPY'
#     define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference<T>::value)
                                        ^
In file included from /workspace/tiflash/dbms/src/Common/tests/gtest_cpu_affinity_manager.cpp:31:
In file included from /workspace/tiflash/contrib/boost/boost/algorithm/string.hpp:23:
In file included from /workspace/tiflash/contrib/boost/boost/algorithm/string/split.hpp:16:
In file included from /workspace/tiflash/contrib/boost/boost/algorithm/string/iter_find.hpp:27:
In file included from /workspace/tiflash/contrib/boost/boost/algorithm/string/find_iterator.hpp:24:
In file included from /workspace/tiflash/contrib/boost/boost/algorithm/string/detail/find_iterator.hpp:18:
In file included from /workspace/tiflash/contrib/boost/boost/function.hpp:30:
In file included from /workspace/tiflash/contrib/boost/boost/function/detail/prologue.hpp:17:
In file included from /workspace/tiflash/contrib/boost/boost/function/function_base.hpp:23:
/workspace/tiflash/contrib/boost/boost/type_traits/has_trivial_destructor.hpp:30:86: error: builtin __has_trivial_destructor is deprecated; use __is_trivially_destructible instead [-Werror,-Wdeprecated-builtins]
template <typename T> struct has_trivial_destructor : public integral_constant<bool, BOOST_HAS_TRIVIAL_DESTRUCTOR(T)>{};
                                                                                ^
/workspace/tiflash/contrib/boost/boost/type_traits/intrinsics.hpp:196:47: note: expanded from macro 'BOOST_HAS_TRIVIAL_DESTRUCTOR'
#     define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T)  && is_destructible<T>::value)
                                              ^
2 errors generated.
[44/223] Building CXX object dbms/CMake...ests/gtest_funtions_decimal_arith.cpp.o
ninja: build stopped: subcommand failed.
make: *** [dev] Error 1

What is changed and how it works?
use boost wrapper
suppress warnings when building grpc and abseil-cpp
Check List
Tests

[ ] Unit test
[ ] Integration test
[ ] Manual test (add detailed scripts or steps below)
[ ] No code

Side effects

[ ] Performance regression: Consumes more CPU
[ ] Performance regression: Consumes more Memory
[ ] Breaking backward compatibility

Documentation

[ ] Affects user behaviors
[ ] Contains syntax changes
[ ] Contains variable changes
[ ] Contains experimental features
[ ] Changes MySQL compatibility

Release note

None

/run-all-tests

/cc @breezewish

It would be best if boost wrapper could be dropped. But anyway it is off-topic.

/merge


Scala.js: Default to ECMAScript 2015

The official default for Scala.js is ECMAScript 2015, but Mill currently defaults to ES 5.1, here:
def useECMAScript2015: T[Boolean] = false

https://github.com/com-lihaoyi/mill/blob/main/scalajslib/src/ScalaJSModule.scala#L200
Mill should default to ES 2015 instead. The workaround is to add this line to your build.sc file:
override def useECMAScript2015 = T(true)

Can you provide a link to that claim?
I only found this:

ES modules and Node.js
Node.js needs explicit signaling that a module is an ECMAScript module (the default is CommonJS).

from https://www.scala-js.org/doc/project/module.html, 2022-01-11

@lefou ESModule is an orthogonal setting to the ESVersion.
Scala.js recently (1.6.0) deprecated the useECMAScript2015 for a esVersion setting that can have multiple values (ES5, ES2015, ES2020).
Mill should probably do the same.

Shouldn't we infer the default from the selected ScalaJS version then?

Fair challenge, all I can only offer is that Scala.js's author suggested I raise this issue, which I realise is an appeal to authority but...

I discovered this was a problem for me when I noticed that code compiled in sbt was working as expected, but identical code compiled through Mill resulted in runtime errors.
Currently all you've got is a boolean flag, so being consistent with sbt is easy enough, just set it to true as in the PR - however that is a bit of a magic value. Inferring the right version based on Scala.js version will be a marginally more involved change, but I'd be ok with it being a setting the user had to provide to avoid ambiguity.

I think that for now we can change the default as you did.
Changing for a single version of ScalaJS is not possible for how Mill works. But I don't think it is a problem to change the default in 0.6 I don't think anybody still uses 0.6.
In the future we could change mill to have esVersion and deprecate the option.

Changing for a single version of ScalaJS is not possible for how Mill works.

Why? We can just depend on scalaJS target and if the version is high enough (> 1.6 or even > 1.x) we can set it to ECMAScript2015.

In the future we could change mill to have esVersion and deprecate the option.

We should do this now. The change is simple and we are still before a 0.10 release, so for adding and deprecating API this is the best time.


v8 depreciation warning using the watch flag with Node v6.0.0

Using the watch flag on Node v6.0.0 displays warnings and a stack trace in the terminal
node node_modules/.bin/ava --verbose --watch

(node) v8::ObjectTemplate::Set() with non-primitive values is deprecated
(node) and will stop working in the next major release.

==== JS stack trace =========================================

Security context: 0x1e3d5b4c9fa9 <JS Object>#0#
    1: .node [module.js:568] [pc=0x328d7de52204] (this=0x20bb46efb931 <an Object with map 0x24ef30617be1>#1#,module=0x3dbe390f2a99 <a Module with map 0x24ef306181b9>#2#,filename=0x3dbe390f2a61 <String[129]
...

See: https://github.com/strongloop/fsevents/pull/128
We're using chokidar for file watching, which uses the native dependency fsevents for more consistent behavior and better performance.

strongloop/fsevents#128 is merged and released as a patch release.
I'm closing. Users still experiencing this should rm -rf node_modules && npm install


[WIP] Issue-967

Initial implementation for getsAsync()
Created the following classes:
AsyncReader
TransactionImplTest

This is my first pass at implementing getsAsync, though I haven't had a good chance to look it over and test properly. I started to try and test it but was having trouble creating a transaction to test with. I'm going to give it another go tomorrow.

Also need to implement close() still

Just a note, I noticed all of the get methods with Byte were called "get(...)" while all the get methods with Strings were called "gets(...)". I kept this consistent with the async methods.

@jkosh44 I noticed your branch is based off an older commit.  I usually add a git remote called upstream like the following.
git remote add upstream https://github.com/apache/fluo.git

Then with that I added I update my local master with the latest commits from upstream before branching for a new issue.
# update all remote tracking branches
git fetch --all
git checkout master
# bring local master branch up to date with latest commits
git merge upstream/master
# create new branch from latest master
git checkout -b issue-xyz

Don't worry about this PR being based on an older commit, its ok.

Is it too late to follow the git upstream steps for this issue?

Is it too late to follow the git upstream steps for this issue?

No, you can try.  If you are new to git I would recommend experimenting in another branch.  Try the following just to see what happens.  Does the rebase command have conflicts?
git checkout issue-967
# create a new branch to test rebase
git checkout -b issue-967-rebase-test
git fetch --all
git rebase upstream/master

My latest commit should address all the issues mentioned.
I changed to asyncGet.defaultValue.
I no longer remove AsyncGets from getsList after completing them.
I changed the default method to your suggestion.
The rebase command had a conflict at TransactionImpl.java because of one of the imports, I fixed the conflict and then the rebase continued and completed fine

@keith-turner Also I never commented on the 1.2.0 release. That sounds good to me. If you need someone to work on other Async functionality let me know and I'd be happy to help.

@jkosh44  these changes are looking good.  I am still puzzling out the async story for Fluo.  Currently there are a few areas I have identified and opened issue about.

To really get good throughput from async Fluo operations, I feel Accumulo itself needs to be modified to offer async APIs for reading a writing data.  #651 #675
For Fluo workers, the number of concurrent transaction could be limited by what will fit into memory instead of the number of threads.  Offering async observers allows Fluo to process as many notifications as will fit into memory instead of limiting it to an arbitrary number of threads as it currently does #968.  This could lead to much higher throughput in conjunction with #651 and #675.
For loading data, Fluo should offer async operations #795.  Need to test this by implementing use cases of loading data using Kafka. This could lead to much higher throughput in conjunction with #651 and #675.
Internally Fluo uses a quasi asynchronous commit process.  This was written using Guava's Listenable futures.  Now that Fluo is using Java 8 this needs to be converted to CompletableFuture. #722

I left a comment on #722 and will give it a go. On an unrelated note, I feel like all my commits fail on the continuous-integration Travis CI build. Is there a specific reason? I'm not really sure what I'm doing to cause this.

On an unrelated note, I feel like all my commits fail on the continuous-integration Travis CI build. Is there a specific reason?

The builds on travis are not always predictable.  Sometimes this is an issue with Travis and sometimes its Fluo.  I have been trying to correct Fluo's flakiness as we run into it.  For your latest commit, the new IT is missing an import stmt for CompletableFuture.  Lets see what happens with Travis after that is fixed.
https://travis-ci.org/apache/fluo/builds/307577351#L2882

I squashed and rebased this and added a few comments in #1099.  Looking at this, it would be nice to have in the next release.

Just reviewed it and compared it to this one and it looks good to me

This work was merged in #1099


Solar Heat Gains

This might—or might not—be in another module... but we need this.
The current Wall calculations use Front and Back temperature to advance. Adding the contribution of incident solar radiation would require using a Sol-Air temperature.

This module assumes that the Incident Solar Radiation is pre-calculated and stored in the Simulation State. This value will be calculated using Daylight Coefficients in another module.


Rewrite docs/CONTRIBUTING.md

Add technical instructions and information
Drop the generic collaboration information
Document engine conventions

Starting IDs
Write to success only on failure
Success / failure return codes

Mention that the linting target / workflow must pass

Started on branch update-docs


Documentation and examples are out of sync - again

https://github.com/mattermost/mattermost-mobile/blob/master/fastlane/env_vars_example and https://developers.mattermost.com/contribute/mobile/build-your-own/environment-vars/ are out of sync, yet again - NOTIFICATION_SERVICE_IDENTIFIER this time.
There is a previously reported issue with the same theme at https://github.com/mattermost/mattermost-mobile/issues/2401
The two items were brought in sync when that issue was filed, but here we are, with the same problem.
I propose two solutions -

Just get rid of fastlane/env_vars_example all together so that no one has to update anything.
Keep fastlane/env_vars_example in sync with https://developers.mattermost.com/contribute/mobile/build-your-own/environment-vars/ so that people can build custom mobile apps without banging their heads against a wall with each release.

While the first solution eliminates the problem, the second one solves it.

@harshilsharma63 would you like to submit a PR?

@enahum I can, but the problem here is not the out-of-sync state at present but rather the multiple occasions when this has happened. Can we expect the two items to stay in sync starting next release?

The PR can be to remove the sample var and just follow the documentation. Is very easy to forget about the sample vars and imo is just that “a sample”.


External Users unable to render custom webparts

Category

[x] Question
[ ] Typo
[x] Bug
[ ] Additional article idea

Expected or Desired Behavior
Webparts should render for external users with permissions, maybe is related within the WebPart Context.
Results
Error:
SPLoaderError.loadComponentError]:
***Failed to load component "8c02ac1f-8292-4454-a417-73cee57d00f6" (SpRenderListWpWebPart). Original error: ***Failed to load path dependency "SpRenderListWpWebPartStrings" from component "8c02ac1f-8292-4454-a417-73cee57d00f6" (SpRenderListWpWebPart). Original error: Error loading https://component-id.invalid/8c02ac1f-8292-4454-a417-73cee57d00f6_0.0.1/SpRenderListWpWebPartStrings
Unable to load script https://bridgecolab.sharepoint.com/sites/appcatalog/ClientSideAssets/290e491d-b436-4b75-9831-5d5315188755/spfx_webparts-sprenderlistwpwebpartstrings_en-us_536e65149b0acf4d52c0043073b9fc59.js
***INNERERROR:
***Failed to load path dependency "SpRenderListWpWebPartStrings" from component "8c02ac1f-8292-4454-a417-73cee57d00f6" (SpRenderListWpWebPart). Original error: Error loading https://component-id.invalid/8c02ac1f-8292-4454-a417-73cee57d00f6_0.0.1/SpRenderListWpWebPartStrings
Unable to load script https://bridgecolab.sharepoint.com/sites/appcatalog/ClientSideAssets/290e491d-b436-4b75-9831-5d5315188755/spfx_webparts-sprenderlistwpwebpartstrings_en-us_536e65149b0acf4d52c0043073b9fc59.js
***CALLSTACK:
Error
at t [as constructor] (https://spoprod-a.akamaihd.net/files/sp-client-prod_2019-09-27.007/sp-pages-assembly_en-us_61b38e7460d331dc3c506e8793260f48.js:4:53495)
at new t (https://spoprod-a.akamaihd.net/files/sp-client-prod_2019-09-27.007/sp-pages-assembly_en-us_61b38e7460d331dc3c506e8793260f48.js:20:48986)
at Function.e.buildErrorWithVerboseLog (https://spoprod-a.akamaihd.net/files/sp-client-prod_2019-09-27.007/sp-pages-assembly_en-us_61b38e7460d331dc3c506e8793260f48.js:20:112759)
at Function.e.buildLoadComponentError (https://spoprod-a.akamaihd.net/files/sp-client-prod_2019-09-27.007/sp-pages-assembly_en-us_61b38e7460d331dc3c506e8793260f48.js:20:108790)
at https://spoprod-a.akamaihd.net/files/sp-client-prod_2019-09-27.007/sp-pages-assembly_en-us_61b38e7460d331dc3c506e8793260f48.js:20:45200
Steps to Reproduce
Assign a external user as Owner of the Hub Site, Sites
Try render a custom react webpart

Check the cdnBasePath in "config -> write-manifests.json file", it should be a library folder url which stores the JavaScript file generated by SPFX solution, check this Folder's permission, make sure External user have at least read permission to this folder.

Where were these web parts deployed, site collection / tenant app catalog?