LIDAR-Lite v3HP - NACK attack on Arduino Due

I have tested LiDAR 3HP on both Arduino UNO and Due microcontroller board with I2C connection. It seems like the Due microcontroller is always encountered by NACK attack comparing to UNO board and I found the value of nackCatcher is 2 returning from endTransmission(). I suspect that the Due board clock speed affects the performance on LiDAR 3HP which I added delayMicroseconds() command after each write() and read() function in LIDARLite_v3HP.cpp to ensure that master and slave device have sufficient time to acknowledge. After several trying, it still remains unsolved.

Garmin has not tested the v3HP with an Arduino Due. That being said - You shouldn't have too many problems, but the Arduino Due boards can be finicky. The Wire.h library is also less than perfect. There may be other I2C library solutions available that you could try and possibly get better results if you want to continue with a Due.
However, below are a few things you could quickly try to see if they help. No guarantees. Good luck!!

1 - Since you are using the Due, you can remove most everything inside the #ifdef for FAST_I2C except the call to Wire.setClock(). This will make the code easier to read/follow and then you can try changing the I2C bus speed and see if it helps.
    // Initialize Arduino I2C (for communication to LidarLite)
    Wire.begin();
//  #ifdef FAST_I2C
//      #if ARDUINO >= 157
            Wire.setClock(400000UL); // Set I2C frequency to 400kHz (for Arduino Due)
//      #else
//          TWBR = ((F_CPU / 400000UL) - 16) / 2; // Set I2C frequency to 400kHz
//      #endif
//  #endif

2 - The Due has external pullup resistors on the I2C bus (the UNO does not). The code in the v3HP example sketches will cause internal pullups to be activated by default. You don't want both, so you should turn off those internal pullups when using the Due and see if that helps. This can be done by adding the these two lines of code directly after the I2C initialization instructions in the setup() routine -
    digitalWrite(SCL, LOW);
    digitalWrite(SDA, LOW);

3 - I've found that the Due doesn't perform a repeated START on the I2C bus when using the Wire library read functions as written like they are in the Arduino Library source for the v3HP. Try replacing the read() function in the library with the following to get the Due to use a repeated START during a read and see if that helps -
void LIDARLite_v3HP::read(uint8_t regAddr,  uint8_t * dataBytes,
                           uint8_t numBytes, uint8_t lidarliteAddress)
{
    uint8_t   i = 0;
    uint8_t   numHere;

    // This single function performs the following actions -
    //     1) I2C START
    //     2) I2C write to set the address
    //     3) I2C REPEATED START
    //     4) I2C read to fetch the required data
    //     5) I2C STOP
    Wire.requestFrom
    (
        lidarliteAddress, // Slave address
        numBytes,         // number of consecutive bytes to read
        regAddr,          // address of first register to read
        1,                // number of bytes in regAddr
        true              // true = set STOP condition following I2C read
    );

    numHere = Wire.available();

    while (i < numHere)
    {
        dataBytes[i] = Wire.read();
        i++;
    }
}

I followed the guideline as suggested above, it alleviates NACK attack by changing read() function to repeated START. But the NACK attack on write() function(from 3HP cpp) is still not solved yet. I should mention that NACK attack occurred on both read() and write() while it starts measuring distances. Therefore, it leads into another issue that distance being read as “256” will never be true value after setting was changed. The value of distance “256” will randomly be detected at any time in any range during continuous distance measurement. I will upload the image to show to illustrate the issue.

Glad that the read functions appears to be fixed. I'm honestly not sure what to tell you about the write side of things.
Unfortunately, Garmin doesn't have any further insight on the Arduino Due as it hasn't been tested with the v3HP. Garmin's platform for the code base here was an Arduino UNO and the base is merely an example of how one can communicate with the LIDAR-Lite v3HP. Its main purpose is to help illustrate how someone might design their own application.
If you want to continue with a Due, I would suggest examining your I2C bus signaling to try to determine where the issue might be. Then if you can point to an issue with the LIDAR-Lite you can go through Garmin Support to report your findings and get help.
If you're open to a different platform, this code base does work very well on the Arduino UNO. I've also used this code with an Arduino MEGA in the past and had good luck, so that's another low cost option for you to try. No guarantees, of course.
Sorry I can't be more help. Please report back if you find something interesting.
Good luck!


Hide the Download button of folders

How do I hide the Download button of any folders? Any help is appreciated.

How do I hide the Download button of any folders? Any help is appreciated.

can you explain little bit??

add me to your repo

add me to your repo

Thanks, I think I have managed to hide it.


Add php 7.0 into travis

travis bump to newest version of php. Allows for failures.

Thanks!

No problem, I was having some issues that was unrelated with 7.0 and thought I would leave this here. hhvm may still need some work.


Shortcodes cannot be literally presented in inline codes/codeblocks

Describe the bug
Not sure if this is the intended behavior but, shortcodes cannot be literally presented in inline codes or codeblocks.
To Reproduce

Make sure the "simple-icons" icon pack is installed and enabled.
Type the following anywhere: `:SiGoogle:`
Type the following anywhere: \:SiGoogle\:
Type the following anywhere: :SiGoogle:

Expected behavior

Expected the string :SiGoogle: inside inline code in all three cases.
Actually got Google logo inside inline code in all three cases.

This is now fixed with version 2.8.1.


created function to return the the current winner and functionality to check draw state of baord and used LLVM clang-format

made a function which check the board state and return the winner as char also added functionality to check the draw state

Thek hi hoga shrug


docs(version): update latest to 2.3

I think it's superseded by https://github.com/kumahq/kuma-website/pull/1382


Solves #1512

Proposed changes
Please include a description of the problem or feature this PR is addressing. If there is a corresponding issue, include the issue #.
Checklist
Added pool3d class and maxpool3d in pooling.py file
Put an x in the boxes that apply.

[ ] I have read the CONTRIBUTING document
[ ] I have run pre-commit run --all-files to format my code / installed pre-commit prior to committing changes
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] I have updated the necessary documentation (if needed)

@awni We have implemented Maxpool3d and Avgpool3d, if it looks good then we can proceed with adding tests to it.

@awni We believe that’s a good idea and will consider your advice.

I think after merging the pooling was removed?
Could you add pool3d back, rebase on main and push force to the same branch? Then I will run the tests and merge if they pass.
Also, sorry for the nitpicking but do you mind putting _Pool3d together with _Pool2d class (higher in the file), implementing average pooling 3d and writing docstrings for the new layers? The docstrings don't have to be as verbose as for the rest of the pooling layers but they should exist at least.
Thanks!

I think after merging the pooling was removed?
Could you add pool3d back, rebase on main and push force to the same branch? Then I will run the tests and merge if they pass.
Also, sorry for the nitpicking but do you mind putting _Pool3d together with _Pool2d class (higher in the file), implementing average pooling 3d and writing docstrings for the new layers? The docstrings don't have to be as verbose as for the rest of the pooling layers but they should exist at least.
Thanks!

@angeloskath We have made the suggested changes. I think this is ready to merge. Let me know if anything else is required from our side.

@angeloskath do you think needs any correction?

@angeloskath Could you confirm if everything is fine, and if so, would it be possible to merge it?


Spot doesn't display content after login

Describe the bug
After login no songs or anything is loaded. I did try first to login without premium (which expectantly failed)  and then I enabled three months of premium trail.
To Reproduce
Steps to reproduce the behavior:

Login
Nothing is loaded

Expected behavior
I would expect to have access to the music library
Screenshots

General information:

Distribution: Fedora
Installation method [e. g. built from source, installed from Flathub...]: Flathub
Version [e.g. 0.1.0]: 0.2.0
Device used [e. g. desktop, phone...]: desktop

Additional context
Terminal output:
flatpak run dev.alextren.Spot

** (process:83306): WARNING **: 15:13:15.929: Error writing credentials to socket: Error sending message: Broken pipe

(process:2): Gtk-WARNING **: 15:13:15.930: Locale not supported by C library.
	Using the fallback 'C' locale.
bitrate: Bitrate160
using pulseaudio

Hi! Is this a new account that perhaps has no albums in the library? Does search work?

Hi! Is this a new account that perhaps has no albums in the library? Does search work?

Yes the search works, and my library is empty (now i added something).
I think it would be good to have a text saying that the user needs to add stuff to the library and how to add them.

i created an issue for the boarding experience https://github.com/xou816/spot/issues/305. Feel free to close this issue.

Perfect :) thanks!


Multiple OTUs for couplet entry in Dicothomus key

Feature or enhancement
I thought it could be great to include the option of choosing and adding multiple OTUs to an entry of a couplet in the Dichotomous key. At this stage, only one OTU is possible. For instance, in the image below, in the left panel, I would have loved to add also more subfamilies other than Eristalinae.
Location
Dicothomous key
Screenshot, napkin sketch of interface, or conceptual description

Your role
No response

@DavideDalPos Interesting use-case, un-named clades.  At present I don't anticipate adding this for a while but it's certainly a good issue.  The TaxonWorky approach would be to make a place-holder OTU  with name "Aidae, Bidae, Cidae" with some Content as to why this concept exists.

If I'm interpreting the screenshot correctly, it looks like this relates to #4145 as well, where otu(s) are being used to indicate intermediate progress, in this case at subfamily(ies) on the way from family to genus.


performance improvements and refactoring for animations

wow, that is much, but seems fine.

Yes, let's talk about the changes next year.
And i hid 2 bugs for you as a late christmas gift ;)
ps.
experimenting with css3 named animation (keyframe) based viewmanager
transistions right now. while the activityindicator is much more smooth
with it, the modal viewmanager chops into place (only up, down looks
fine) even worse than with requestAnimationFrame on the xoom. :/ I guess
it has to do with the fact that the animated element wasn't visible before
On 12/29/2011 05:20 PM, Sebastian Fastner wrote:

wow, that is much, but seems fine.

Reply to this email directly or view it on GitHub:
https://github.com/unify/unify/pull/58#issuecomment-3302115


when can provide both http and rpc support？

some service may be the http service and also as a rpc server to be use

You can add gateway to the rpc
code : https://github.com/zeromicro/go-zero/tree/master/gateway
demo : https://github.com/kevwan/gateway

thank  u


Shader Debugging is not supported on OpenGL

When clicking on the "Debug Compute Shader", literally nothing happens.
I have a GTX 750 Ti, driver version 364.72, Windows 10, using OpenGL. i also tested it with another random OpenGL app (tesseract) i had on the machine.

Yes, shader debugging and pixel history are both only supported on D3D11 currently. This should be made more obvious in the UI though when you're using a different API.
Would you mind opening a separate bug for one of them (either debugging or pixel history)? Since both features are a large task I'd rather track them separately.

yeah sure.

This would be awesome!

there's a spirv-vm by @dfranx
can it be added to renderdoc?

DirectX has gotten me used to SPIR-V debugging. GLSL debugging would be nice, but at this point, anything would make me very happy. Is this on the roadmap? Perhaps for 1.10...?

That makes no sense, DirectX doesn't use SPIR-V.
Shader debugging for OpenGL may happen at some point now since SPIR-V debugging has been implemented for vulkan, but certainly not in the next release. It is still quite low priority due to OpenGL being a flawed API not suited to shader debugging.
The most that could be supported would be debugging GL shaders that are either already SPIR-V - which is extremely rare - or modern enough GLSL that they can be compiled to SPIR-V - which is still quite rare as the large majority of people using OpenGL are using old/legacy shaders. Those who use modern shaders likely don't use OpenGL. That is partly why it's low priority since it would be only implementing partial support for a subset of users.

GLSL that they can be compiled to SPIR-V

Looks like RenderDoc is already doing this for reflection purposes. Could that be reused for debugging?

What's the current status for OpenGL Pixel History and Shader debugging? I am trying it on a VR app on Quest2. I noticed that the pixel history button only shows me the glClear() call in the list, but never shows me a glDraw call.

This issue is about shader debugging on OpenGL, which is not supported. If you are encountering a bug with using the pixel history please file an issue about it and follow the issue template for a bug report, do not report it here.

I'd like to investigate the scope of effort required for an individual contributor such as myself to implement this feature.
Any advice on how to get start on that? I'm at the point where I can make this my first priority, nearly regardless of how long it takes. But before getting started, I'd like to know what I'm getting myself into and if any guidance would be available from the maintainers in the process :)

The effort would be quite high, and I would not recommend this as your first contribution to the project as it will be quite complex to implement. The most feasible implementation would be as mentioned above to restrict it only to shaders that can be compiled to SPIR-V using glslang and expand and re-use the SPIR-V debugging from Vulkan to provide the debug information.
Getting started would be to familiarise yourself with RenderDoc's codebase and how the Vulkan shader debugging works particularly with how it interfaces with the API and what things would need to be abstacted and re-implemented on GL. Again this would not be a small project and I would suggest attempting something smaller at first if you are a new contributor. If you do start working on this please stay in contact via email (easier than very noisy comments here) as suggested in the CONTRIBUTING documentation to ensure you don't do a huge amount of work only to find that it needs to be rewritten when it comes time to review.

From our cursory scan, it's looking like this sort of endeavor is on the order of many 10klocs - even bigger than we had anticipated! While that was going on, we just found some rendering issues on Intel GPUs with OpenGL 3D renderer. Coupled with the issues we're currently having with AMD OpenGL, we're now looking at instead increasing the priority of our Vulkan renderer rewrites. If we go ahead and do that, we'll probably end up having to drop further effort into this here. Once we firm up things further, we'll provide another update.


Vulkan: 3D visuals involving reflections are broken (hardware dependent)

Godot version
v4.0.alpha.custom_build [21c79d751]
System information
Linux (Fedora 36), Radeon R9 390X w/ amdgpu driver
Issue description
After #62133 was merged, any scene with a sky background or ReflectionProbes causes the errors:
ERROR: Condition "shader.is_null()" is true.
   at: cubemap_roughness (servers/rendering/renderer_rd/effects/copy_effects.cpp:1033)

and
ERROR: Condition "!version" is true. Returning: RID()
   at: version_get_shader (./servers/rendering/renderer_rd/shader_rd.h:140)

to print to the console several times upon loading the scene or updating the reflection probes. All objects in the area of a reflection probe or anywhere in a scene with a sky background appear as scrambled colors or pitch black. It seems worse on Vulkan clustered, but happens on mobile too. Clustered also causes glow to appear far too strong.
Reverting #62133 and deleting .godot/shader_cache/ from the project fixes the issues. There are likely other visual issues as well but I didn't test much beyond opening the projects I already had.

Steps to reproduce
Open any 3D scene with a ReflectionProbe, or with an environment using a sky background (including the editor preview environment)
Minimal reproduction project
BrokenShaders.zip

@jtnicholl can you test if this fixes it for you: https://github.com/godotengine/godot/pull/62420  ?

Yep, that fixes it for me. The error messages and the visual bugs are both gone.


Das_Schwarze_Auge_4-1 - PA_Aktiv no more calculated on new character

When creating a new character on the said sheet the value for PA_Aktiv is not calculated correctly. It still works on existing characters but not on new ones. Also cloned characters seem to be affected.

It seems to be related to the wounds a character has taken. Having him take a wound and removing it again fixes the issue.

It seems to be related to the wounds a character has taken. Having him take a wound and removing it again fixes the issue.

Thanks for reporting this. These are some side effects of the ongoing efforts of switching to sheetworker scripts - it is a bug nonetheless. I have a hunch for the root cause and for the next new feature release I plan on adding more code to stabilize the sheet against such issues. Some attributes are only set via sheetworker scripts. On a new sheet, they do not exist yet and when trying to access them they will taint everything that relies on them.
Unfortunately, I know of no way to automatically test individual character sheets (unit tests), so finding bugs is a manual process.
(By releasing new stuff now and then, people will complain if stuff breaks I haven't found in my testing. Therefore, this kind of feedback is very valuable to me and all other players!)

I'll just add that for existing characters, if you use the Trefferpunkte feature to determant damage I get the following error message in chat:

I think there may be a common cause.

I'll just add that for existing characters, if you use the Trefferpunkte feature to determant damage I get the following error message in chat:

I think there may be a common cause.

No, there is isn't, see: https://github.com/kreuvf/roll20-character-sheets/issues/69.

It seems to be related to the wounds a character has taken. Having him take a wound and removing it again fixes the issue.

The latest version/Pull Request (https://github.com/Roll20/roll20-character-sheets/commit/8ef92ddf209566383d85f19e447348c4c8cedf4c) should fix this. When version 20210425 is live (~tomorrow), please tell me whether the issue persists or not.

@FKueng: Please verify that this bug is gone and report this here. :)

Thanks for fixing it @kluver


Make a working options menu that works for global options

We possibly need to rewrite the menu/ options available

Options Menu Buttons:

Brightness
Volume


⚠ Quirk Club Argentina (API endpoint) has degraded performance

In 6366b11, Quirk Club Argentina (API endpoint) (https://us-central1-quirkclub-dev.cloudfunctions.net/api/check/api) experienced degraded performance:

HTTP code: 200
Response time: 7462 ms

Resolved: Quirk Club Argentina (API endpoint) performance has improved in 20a9a17.


Add cost-model bench

Problem

Calculating TransactionCost can be expensive.
#1987 improves cost tracker performance, but was unable to measure the performance benefit of cost calculation without a cost-model benchmark

Summary of Changes

Add simple cost-model benchmark

Fixes #

test bench_cost_model ... bench:   1,025,992 ns/iter (+/- 67,786)

Just over 1us per transaction (1M TPS) - needs to be improved if we want TPS to improve as well.


Bro please add koyeb, or railway deployment🥲

Iam still w8ing foor railway deploumet and iam wa8 for your bgm version

Iam still w8ing foor railway deploumet and iam wa8 for your bgm version

Poda funde

Iam still w8ing foor railway deploumet and iam wa8 for your bgm version

Poda funde

Bro please add🥹🤲🏻

Iam still w8ing foor railway deploumet and iam wa8 for your bgm version

Poda funde

Bro please add🥹🤲🏻

Anthada ninne ippo kanathe


floorplan: set PDN_TCL for top level

@jeffng-or FYI

@jeffng-or Please add automerge feature in CI plan for megaboom.
I'm doing a manual CI build here, I think a build is on the order of 12 hours now, depending on workstation. If it passes, I will merge.

Floorplan Outline: (0.0, 0.0) (2160.73, 2160.73),  Core Outline: (1.026, 1.08) (2159.73, 2159.73)
        Number of std cell instances: 1743858
        Area of std cell instances: 220985.73
        Number of macros: 72
        Area of macros: 691249.12
        Halo width: 20.00
        Halo height: 20.00
        Area of macros with halos: 1292620.62
        Area of std cell instances + Area of macros: 912234.88
        Core area: 4659886.50
        Design Utilization: 0.20
        Core Utilization: 0.06
        Manufacturing Grid: 1

[ERROR MPL-0040] Failed on cluster frontend/bpd/banked_predictors_1/btb
Error: macro_place_util.tcl, 143 MPL-0040
Command exited with non-zero status 1

@jeffng-or To create a test-case(artifacts are available so quick to generate):
bazel run BoomTile_floorplan_deps  `pwd`/build
build/make do-floorplan
# wait for failure, then run:
build/make macro_place_issue
ls -lh build/macro_place_BoomTile_asap7_base_2024-08-25_18-26.tar.gz

One hour is a painfully long turnaround time for debugging... I will try to start a run to whittle down the problem:
openroad -python ~/OpenROAD-flow-scripts/tools/OpenROAD/etc/deltaDebug.py --persistence 3 --use_stdout --error_string "ERROR MPL-0040" --base_db_path results/asap7/BoomTile/base/2_3_floorplan_tdms.odb --step ./run-me-BoomTile-asap7-base.sh

@jeffng-or Please add automerge feature in CI plan for megaboom.
I'm doing a manual CI build here, I think a build is on the order of 12 hours now, depending on workstation. If it passes, I will merge.

Done

@jeffng-or @maliberty Gets through placement and probably CTS, but I will turn off timing repair in CTS, because it takes a long time to run.


Navigator: Changed transitioner background color to 'transparent'

... for setting the transition background color between scenes. For issue #563

Now setting backgroundColor on the Navigator style will control the transition background color

This is awesome, love that it's so simple.

:+1: nice solution


Fix default behaviour of enter press leading to form submission in core components.

Description
Pressing enter on core components redirects to thankyou page which is not the correct behaviour. This fix prevents the default behaviour of enter press on form level.

Related Issue
https://jira.corp.adobe.com/browse/FORMS-15630

Motivation and Context

How Has This Been Tested?
Tested on localhost deployment and test cases tested using cypress.

Screenshots (if appropriate):
Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[x] I have signed the Adobe Open Source CLA.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[x] I have added tests to cover my changes and the overall coverage did not decrease.
[x] All unit tests pass on CircleCi.
[x] I ran all tests locally and they pass.

Can we also change the type of submit button in this PR, since the changes are related.

As discussed in scrum, will cover in separate PR.

Closed this PR and opened new https://github.com/adobe/aem-core-forms-components/pull/1363 as per discussion in scrum.


Add methods for extracting results from interfaces

For each interface there should be a uniform way to query results and run information such as final log-likelihood and estimation time.

[ ] null log likelihood
[ ] final log likelihood
[ ] parameters
[ ] standard error/deviation
[ ] 't' ratio
[ ] estimation time


Add OrganizationMembership.create_or_update{,!}

Didn't tested because I don't have proper zendesk credentials ._.

…and endpoint is 404 :disappointed:
Should I create a support ticket for that?

Should I create a support ticket for that?

No! it's all good. PR workflows don't actually have permissions to read repository secretes, unless the PR is created within the repo (which is not the case).
But , I fetched this reference and pushed it to a local branch we use to run spec_live tests, and everything seems to be working fine! so yeah, merging!
Thanks for the contribution!


Try printing the env in travis.

Do not merge: Opening a phony PR to get travis to build my branch.

Dude! No! Encrypted values are there.

Well, at least in the java ones.


Add option for specifying digits of the output files

I found an interesting rounding algorithm that might be useful: https://stackoverflow.com/a/792476
And I created an example which would be not normalized with the normal rounding but would preserve the normalization with this rounding algorithm:

Normal Rounding
Original Data
Running Total
Running Total Rounding
Cascade Rounding

0.98
0.9840
0.9840
0.98
0.98

0.00
0.0040
0.9880
0.99
0.01

0.01
0.0080
0.9960
1.00
0.01

0.00
0.0040
1.0000
1.00
0.00

sum
0.99

1.00

And an example which would preserve the normalization with the normal rounding and would be even more accurate with the normal rounding than the new rounding algorithm:

Normal Rounding
Original Data
Running Total
Running Total Rounding
Cascade Rounding

0.98
0.9840
0.9840
0.98
0.98

0.00
0.0040
0.9880
0.99
0.01

0.01
0.0060
0.9940
0.99
0.00

0.01
0.0060
1.0000
1.00
0.01

sum
1.00

1.00

So I think it is better to sum the entries after the normal rounding, and change to the cascade rounding if the normal rounding fails the normalization. But it would take a longer time to calculate the result.

@XingerTang if I am getting you right, you are showing two tables with slightly different inputs and you apply cascade rounding to both, correct?
I don't fully understand how this works, but I wonder if this is actually a good idea, because in both cases you have two events with the same probability, but cascading rounding gives us different probabilities for these events, which might not be what we want.
I suggest we don't worry about rounding just now and just provide an option to specify number of decimals and we worry about normalisation some other day - maybe someone has thought hard how to round probability mass values so that we preserve the probabilities in the best possible way?

Cascade running has linear complexity which is appealing from computational perspective, but is inducing distortion. Just something to think about.


Misuses of cryptographic APIs

Hi
The following lines have cryptographic API misuses.  File name => src/main/java/org/asteriskjava/manager/internal/ManagerConnectionImpl.java: Line number => 562: API name => MessageDigest:Unexpected call to method <java.security.MessageDigest: byte[] digest()> on object of type java.security.MessageDigest. Expect a call to one of the following methods <java.security.MessageDigest: void update(byte[])>,<java.security.MessageDigest: void update(byte[],int,int)>,<java.security.MessageDigest: byte[] digest(byte[])>,<java.security.MessageDigest: void update(java.nio.ByteBuffer)>,<java.security.MessageDigest: void update(byte)> File name => src/main/java/org/asteriskjava/manager/internal/ManagerConnectionImpl.java: Line number => 571: API name => MessageDigest:

This is a false positive. I assume whatever tool you are using is assuming that both challenge and password can be null, but in practice they won't be.


Make our internal chef-guard happy

Adding the chefignore will make sure knife/berks is uploading only the important files into the chef server.

Thanks for the PR. This is finally released.


Revision View - bring back formatting

Describe the bug
Recently, the revision view was stripped of formatting, as a workaround for this issue: https://github.com/OpenTechFund/opentech.fund/issues/1299
While this has worked for this particular application (https://apply.opentech.fund/apply/submissions/4043/) it makes it hard to read, understand and review revisions overall.
To Reproduce
Steps to reproduce the behavior:

See revision view.

Expected behavior
Priority

Medium

Affected roles

Staff
Reviewers

Additional context
We might run into the same problem at some point, but there needs to be proper solution on the long run for this problem,rather than having formatting stripped off for every application.

The diff functions needs to be completely rebuilt and we have an issue for that https://github.com/OpenTechFund/opentech.fund/issues/748.
I see no way to improve the current function in any substantial way unfortunately.


Need to better support publishers

Publishers do not usually request authentication if it is not provided, so pre-emptive (cached) authentication is necessary.  Also, the hard-coded test page should be changed to something that actually works for publisher or should be at least configurable.

[ ] Add Publisher option to connection manager
[ ] Change code to only use new connection method for publishers
[ ] Test against a SAML-configured instance

A code fix is actually pending now -- this just needs to be cleaned up.

Seems like it's working, closing for now


Map hyphenated-element-IDs to camelCase in this.$ node reference marshalling

The widespread convention is to use "hyphenated-element-IDs" in HTML. In Polymer this makes the $ syntactic sugar less sweet:
var a = this.$['some-id'];
var b = this.$.someId;

{{$['some-id'].label}}

{{$.someId.label}}

Since Polymer converts attribute names between HTML and JS, why not IDs as well?

Why is that desired? There's no auto-downcasing of attribute values in HTML like there is for attribute names.

I was asked to file this by a Polymer team member. I've expanded my comment with rationale. Thanks for considering.

You could use someId as the ID directly in the HTML since it's an attribute value. Values are not case-insensitive like names are:

...
this.$.someId;

The idea would be to let us use hyphenated ID names, which as I said I believe is pretty much the convention on the Web (and within Google), without having to wrap them in brackets and quotes.

...
this.$.someId;

Polymer would augment each element's $ node mapping as follows:
for (id in this.$) {
  var camelCaseId = toCamelCase(id);
  if (!(camelCaseId in this.$))
    this.$[camelCaseId] = this.$[id];
}

I was told this would be pretty simple since the map is only generated once. If it's relatively simple to add I'd like to request it as a feature.

Yup yup, it would be easy to do. However, the dash-to-camel-case conversion of attribute names is done because HTML attribute names are case-insensitive. Attribute values are intentionally left alone because they have no such restriction.
Doing this would also make clashes possible, for example:

In HTML those are two unique IDs, but camel casing the dashes would make them the same.
This seems like sugar that's best left to the developer if that's the ID naming style they prefer.

I have to agree with Ross. The aliasing of ids that would occur could lead to strange, though admittedly very rare, bugs. Camel-casing attributes names is by necessity, I'm not sure symmetry beats the simplicity of doing nothing here.

I agree, this sugar seems like developer rather than framework choice. The $['..'] syntax, while arguably ugly, is definitely not surprising.

We've elected not to provide extra sugar for this right now. We'll consider it based on additional user feedback


The Kubernetes API

Link Kubernetes Protobuf serialization from this page (https://kubernetes.io/docs/concepts/overview/kubernetes-api/) returns 404

It basically shows The 'kubernetes/community' repository doesn't contain the 'contributors/design-proposals/api-machinery/protobuf.md' path in 'master' .  Do we have to create a new page in the given path or the chances might be that this page is lost somewhere?

Thank you for spotting the problem.
This is a duplicate of #34165.
And there is a open PR that fixes this,
so @NitishKumar06 you don't have to work on this.
/triage duplicate
/retitle The link 'Kubernetes Protobuf serialization' is broken

okay @jihoon-seo


Add solidity-coverage support

Investigate the vscode apis for displaying line by line coverage inline and use them to support solidity-coverage.
Solidity coverage is a hardhat extension. We should determine from config whether it is enabled for a project.
I am unsure when coverage calculation should be generated. Perhaps we monitor for changes in the output file? Or add a run coverage task if it is detected in hh config and then process its output.

An example of and extension that provides coverage support inline is: https://marketplace.visualstudio.com/items?itemName=ryanluker.vscode-coverage-gutters


[qmsched] Feature request: make scheduling quiet mode optional (like Theme and LCD settings)

Hi there,
I'm looking for a way to set my watch to dark mode and dim the LCD during the night. Great that the 'Quiet Mode Scheduler' app (qmsched) does that, but I don't actually want it to set to quiet mode, too (I set it to dark mode and dim the LCD when my son goes to bed, but then it's several hours before I go to bed, and I'd like notifications during that time). When I do go to bed, I set my phone to DnD, which automatically sets my watch to DnD, so I don't need that managed in the app.
So I'm wondering if it would be possible to make the 'quiet mode' an optional setting in the app, like the Theme and LCD settings.
Or is there an existing way to achieve this that I'm not aware of?
Thanks.

Maybe @alessandrococco has some ideas here? As I understand it 'quiet mode' is just a set of options that is applied or not, so if those settings didn't include something that turned off buzzing, it'd work great

I have a similar need for a different use case: sometimes I wear earplugs at night and I want to rely on the watch to be woken up if someone calls. I really enjoy the fact that quiet mode allows to automatically dim the LCD and disable the 'wake on twist' setting, so having those features while keeping buzz on calls would be great.

Right now it works by

(old) schedule code that switches the global quiet setting
Every app that would buzz checks the setting to determine whether to stay quiet
At boot: if quiet is enabled, it overrides the theme/LCD settings

I think the app is in need of an overhaul:

update it to use the sched library
change it to "Settings Schedule", i.e. don't hang it all on "quiet mode", but just allow scheduling any combination of DnD/theme/LCD setting changes


node school

do it.
http://nodeschool.io/#workshoppers
all of them :)

making good progress

https://github.com/natsn/brain/tree/master/abc


Extend aad user set with capabilities to change or reset a password

Closes #2852
A 'short' summary of what I've changed / added:
New options:

Name
Description

resetPassword
Has to be specified if we want to reset the password of a user. Can not be used in combination with currentPassword or newPassword

password
Has to be specified if resetPassword is specified. Can not be combined with currentPassword or newPassword

forceChangePasswordNextSignIn
If set, we will force the user to change his password on the next login after resetting. If not set, false will be used in requestbody

currentPassword
Used for changing the password of the current logged in user. If set, newPassword is also required

newPassword
Used for changing the password of the current logged in user. If set, currentPassword is also required.

To accomplish this, I've extended the requestBody for updating the properties so that if the parameter resetPassword is specified, we will add an object named passwordProfile to the request body as this can be done in the same 'patch' call. I've also added a check to see if any keys are available in the requestBody, as now it is possible that we call the command to just set the password for the currently signed in user, in which case we would not need to send a patch call as the body will be empty.
Finally I've added the changePassword method to change the password for the currently signed in user.

Nice job adding the extra info @MathijsVerbeeck!
We'll try to review it ASAP!

Is the PR ready for review? If so, let's mark it as such so that we can proceed with the review 🚀

Is the PR ready for review? If so, let's mark it as such so that we can proceed with the review 🚀

Hi Waldek
I'm still stuck regarding the option sets and would love your input regarding this.

I'm still stuck regarding the option sets and would love your input regarding this

Sure thing @MathijsVerbeeck! Do you have a piece of code that I could review to start with or struggling where to start?

I've written my findings on the comment that you made. I think that this shows a good example.

Ah, totally missed that, sorry! On it!

Thanks for the feedback @waldekmastykarz . I'll finish the code and check it in by tomorrow!

@waldekmastykarz The final changes have been made. Was struggling a bit with merge conflicts, so I cherry-picked the branch a bit to make the commits look 'cleaner'. Could you please have another look?

Will do, thank you!

Merged manually. Thank you! 👏


Add support for batch mode

A text file with a list of numbers to batch download. This would be done via a command-line argument with the filename. May require light refactoring to support, but would probably be useful to a great number of people.

Ex: python3 nhentai_dy.py --batch sacred_num_list.txt


Add option for a Solution roll-up of BDIO Reports

Allow users to specify flag to, in additional to individual BDIO files, generate a single BDIO which merges the project reports

What's the use case where this rollup flag might be false?

@akamen let me know you guys are a bit buried, and I'd love to get this squared away before CoPilot's "real" launch, so I thought I'd take a crack at it.
A disclaimer - I've never:

Used Visual Studio before
Written in C# before
So I apologize in advance for anything terrible; please feel free to point stuff out, I'll be more than happy to correct it.

As far as I can tell, this does in fact compile. However, I didn't see any tests in the repository, and VS didn't (seem to?) run any. As a result, I'd recommend:

Someone more familiar than me trying this on a live project
Running the branch through the integration tests
Before even considering merging... cause I don't want to accidentally break anything.

I did my best to follow what seemed to be the naming/setup conventions, though I expect we'll want to modify a few things before it's ready

Well that's ironic - CoPilot seems to have trouble with it's Hub right now and failed the build.... I'll poke IT

@psantos1113 Looking through this again, my open concern is whether the other properties besides the output directory are bgin reset to the solution's values after generating the project BDIOs - let me load up VS 2015 on my mac and check, then we can try running the integration tests?

@psantos1113 I've added the previously mentioned restoration of project/version name on the solution level

Tested the code.  Added a few lines to set default projectName and version information.  Other than that the changes are good.


Support older hardware models

The community would like to see older models also supported with the HA integration. We are currently making a firmware version for the older models to support the local server etc. and thus communication with HA.  There is no difference in the sensors, configuration etc that would impact the HA integration.
However these models will have a different model name:
DIY-PRO-4.3
DIY-PRO-3.7 and
DIY-BASIC-4.0
@joostlek Can we add these models and give them the exact same functionality like I-9PSL ?

Currently we check if the model starts with I for enabling the display related entities and if the model contains an L for led bar entities, should both be added if the model contains DIY as well?

@joostlek Yes we can add.
Would that work?
DIY-PRO-I-4.3PS
DIY-PRO-I-3.7PS and
DIY-BASIC-I-4.0PS
none of the models has the LED bar but all models have a display.

That would work after a small change yes

Great. Then please implement that small change.

Will do

I am now also thinking, DIY already has I in it, so the model doesn't have to change to make this work

@joostlek Please use below names: I will also add them to the website.
DIY-PRO-I-4.3PS
DIY-PRO-I-3.7PS and
DIY-BASIC-I-4.0PS

Fixed


Add a new processor which removes markdown and special chars from TTS text

This one was a bit painful as there were a ton of edge cases to handle. Here's the gist:
This is a new processor intending to reside between the LLM and TTS services. It handles a TextFrame, modifies the text in the frame and then pushes the processed text into a TextFrame.
The goal was to make the spoke text work well both for the bot-llm-text and bot-tts-text methods. This logic accounts for both cases.
The processing involves:

Stripping newlines and replacing with spaces, which can happen when Anthropic generates lists.
Before markdown processing, preserve spacing and numbered lists, as converting to HTML will remove those.
Processing the text with the markdown pages to convert the text to HTML. This standardizes the text into an easy to parse format. It also serves the purpose of cleaning up much of the formatting.
Remove HTML tags
Replace HTML encodings with their corresponding chars
Restore the number lists and spaces
Return the processed text

This has been tested with all combinations of:

LLM: Anthropic, OpenAI, TogetherAI, Groq (both bot-tts-text and bot-llm-text)
TTS: Cartesia (bot-tts-text), ElevenLabs (bot-tts-text), OpenAI (bot-llm-text)

Awesome! Can we move it to processors/text (new submodule, don't forget and empty init.py)? I'm planning to reorganize a few into submodules before things get out of hand.

A couple of comments. LGTM!

Also a CHANGELOG update :pray:


[BUG] Alert trigger bug

 Issue by leejongpyo
Monday Nov 09, 2020 at 10:33 GMT
Originally opened as https://github.com/opendistro-for-elasticsearch/alerting/issues/295

Describe the bug
I created three triggers per monitor through a console program through API.
severity 3: CPU 70% to 80%
severity 2: CPU 80% ~ 90%
severity 1: CPU 90%
Although the conditions are all different, if 90% of the triggers trigger the alarm, all the triggers alarm.
Only severity 1 should occur, and severity 2 and severity 3 should not occur.
Even if you check the trigger, the result is false, but it is a Triggerd that generates an alarm.
Is this an error, or is there another setting?
monitor, trigger, action
Monitor
{
    "size": 0,
    "query": {
        "bool": {
            "filter": [
                {
                    "range": {
                        "@timestamp": {
                            "from": "{{period_end}}||-1m",
                            "to": "{{period_end}}",
                            "include_lower": true,
                            "include_upper": true,
                            "boost": 1
                        }
                    }
                },
                {
                    "match": {
                        "event.dataset": {
                            "query": "system.cpu",
                            "operator": "OR",
                            "prefix_length": 0,
                            "max_expansions": 50,
                            "fuzzy_transpositions": true,
                            "lenient": false,
                            "zero_terms_query": "NONE",
                            "auto_generate_synonyms_phrase_query": true,
                            "boost": 1
                        }
                    }
                }
            ],
            "adjust_pure_negative": true,
            "boost": 1
        }
    },
    "aggregations": {
        "host": {
            "terms": {
                "field": "host.name.keyword",
                "size": 10,
                "min_doc_count": 1,
                "shard_min_doc_count": 0,
                "show_term_doc_count_error": false,
                "order": [
                    {
                        "_count": "desc"
                    },
                    {
                        "_key": "asc"
                    }
                ]
            },
            "aggregations": {
                "monitor_result": {
                    "max": {
                        "field": "system.cpu.total.norm.pct"
                    }
                }
            }
        },
        "result_value": {
            "terms": {
                "field": "text",
                "size": 10,
                "min_doc_count": 1,
                "shard_min_doc_count": 0,
                "show_term_doc_count_error": false,
                "order": [
                    {
                        "_count": "desc"
                    },
                    {
                        "_key": "asc"
                    }
                ]
            }
        }
    }
}

Trigger : 70% ~ 80% : serverity 3
 def min = 70;
def max = 80;

ctx.results[0].aggregations.host.buckets.stream()
   .filter(item -> item.doc_count >= 1)
   .filter(item -> (item.monitor_result.value != null))
   .filter(item -> (item.monitor_result.value >= min * 0.01) && (item.monitor_result.value <= max * 0.01))
   .forEach(item -> ctx.results[0].aggregations.result_value.buckets.add(item.key));

return ctx.results[0].aggregations.result_value.buckets.length >= 1;

Trigger : 80% ~ 90% : serverity 2
def min = 80;
def max = 90;

ctx.results[0].aggregations.host.buckets.stream()
   .filter(item -> item.doc_count >= 1)
   .filter(item -> (item.monitor_result.value != null))
   .filter(item -> (item.monitor_result.value >= min * 0.01) && (item.monitor_result.value <= max * 0.01))
   .forEach(item -> ctx.results[0].aggregations.result_value.buckets.add(item.key));

return ctx.results[0].aggregations.result_value.buckets.length >= 1;

Trigger : 90% : serverity 1
def min = 90;
def max = 0;

ctx.results[0].aggregations.host.buckets.stream()
   .filter(item -> item.doc_count >= 1)
   .filter(item -> (item.monitor_result.value != null))
   .filter(item -> (item.monitor_result.value >= min * 0.01))
   .forEach(item -> ctx.results[0].aggregations.result_value.buckets.add(item.key));

return ctx.results[0].aggregations.result_value.buckets.length >= 1;

Action
{
  "monitor_name": "{{ctx.monitor.name}}",
  "trigger_name": "{{ctx.trigger.name}}",
  "trigger_id": "{{ctx.trigger.id}}",
  "severity": "{{ctx.trigger.severity}}",
  "period_start": "{{ctx.periodStart}}",
  "period_end": "{{ctx.periodEnd}}",
  "host_name": "{{ctx.results.0.aggregations.result_value.buckets}}"
}

Expected behavior
Only severity 1 should occur, and severity 2 and severity 3 should not occur.
Screenshots

Desktop (please complete the following information):

OS:

Server : Ubuntu 18.04
Client : windows 10

Browser : Crome, Firefox
Version :

Chrome : 86.0.4240.183
Firefox : 82.0.2 (64-bit)
Opendistro for Elasticsearch, Kibana: 1.11.0  (Docker)

 Comment by leejongpyo
Wednesday Nov 11, 2020 at 12:10 GMT

@skkosuri-amzn

I figured out the pattern of the bug.
Triggers are registered at the top of the History item in the order of registration.
If the condition is 80% ~ 90% satisfied, not only the 80% ~ 90% triggers, but also the previously registered 70% ~ 80% or less triggers will be alerted.
Likewise, if a trigger that satisfies the condition of 50% ~ 70% is registered at the top, it will be propagated to all triggers that were previously registered: 90%, 80% ~ 90%, and 70% ~ 80%.
Is it working normally?
How do I get it to work normally?

 Comment by skkosuri-amzn
Wednesday Nov 11, 2020 at 16:57 GMT

@leejongpyo thanks for the detailed analysis. Much appreciated. We are looking more into this.

@qreshi , @aditjind I'm not big expert with painless scripts but I think the issue here is the way how triggers are coded. this part of code actually is an issue (in my opinion):
.forEach(item -> ctx.results[0].aggregations.result_value.buckets.add(item.key));

So result context is shared here as all triggers are based on same query, and first trigger which actually adds something in bucket will also make all triggers checked after it to actually has this bucket not empty and all will succeed.
In order for these triggers to work properly you must check count immediately on stream itself not to add it to structure later used by other triggers s well.


Update help / usage message

Hi @ifratric, I'm very excited to see TinyInst support in WinAFL.
I compiled WinAFL with support for TinyInst and ran into some problems initially. The first debug step I did was to run winafl and check the help menu. I was looking for the -y option but it wasn't there. The next thing I did was look at the version and compare with older builds. Neither of these helped me determine if I actually compiled in TinyInst support so I inspected the binary with IDA to confirm.
I proposing a few changes to help others who may face the same situation:

bump WINAFL_VERSION to indicate support for TinyInst
Add -y option to usage message

Makes sense, thanks!


[Feat] - add flag for display only valid authentication

Hello,
This is just an idea, but I think I'm not the only one with very large perimeters and miles of logs, so I propose a flag to display only valid authentications

Hello thank you for the idea, I think I will go for the solution from @NeffIsBack :)


Can this generate pyproject.toml from requirements.txt or from import statements

I've been looking at building a tool that generates 'pyproject.toml' files from my python scripts and found this repo on Github.
What I'm looking for:

you pip install <package name>
Once its installed it scans the python code and generates the pyproject.toml file based on the existing scripts, settings or .idea since we are 100% a jetbrains shop.
I'd like to help update the docs on a few items so you will see me lurking around the repo, loving the design of this.

Nice, thanks for checking this out! Any contributions you care to offer would be much appreciated.
I think the use case you're describing of making a pyproject.toml from requirements.txt or the contents of a virtualenv would be out of scope for this project. We're specifically focused on converting setup.py files or other setuptools configuration files, and requirements.txt isn't really a project configuration file in that sense - it only handles dependencies, not other metadata (like project name, version, etc.).
I'm sure it would be a handy thing to build as a separate tool though. There are definitely cases where people could use that.

I seem to recall there was a tool that could analyse the Python import statements and figure out what external modules you were using, with a view to maintaining the metadata to match.
Quick search reveals https://pypi.org/project/pip-module-scanner/ -- there looks to be an API one might be able to use to get a listing of packages/versions.
Accuracy is a big question at this stage.  There are a few ways to write an import statement, statements can appear anywhere in the code, and therefore be subject to control flow statements.
So lots of edge cases there that might trip things up, causing a dependency to be erroneously included or omitted.
That said, this isn't a reason to throw away the idea, it could be quite useful to supply the basic project metadata on the command line, then use a tool like that above to figure out what dependencies should be put there.  Hand-massaging might be needed at the end, but it may still save significant effort.

@sjlongland @diazona i'll play with this repo a little and will look at the ''module-scanner' you mention.
I might bookend the front of your repo with one that starts with [black] or [ruff] linters and 'requirements.txt'.
Maybe I could call it "pyprojectoml_generator"?
Then once those are created point the user to your repo for expansion, that way we can support your work and stay in scope.
Users with a Python script, that just has import statements.

We scan the .py file
They could be linted with black or ruff.
We generate the requirements file
We generate a README.md (I already built this)
We generate supporting folders for data, tests, model (I already built this)
Generating a setup.py should be an interesting issue programmatically since my IDE just does this with a click of a button.

If I understand correctly, with the exception of step 6, I should this to be enough for me to code up a prototype of this in a week or two.
"Scoped to support a broad array of brand new, advanced and supporting data migrating users to provide a path to better pyproject.toml files."


Custom date cell content in the Date Picker

This function solves the problem (这个功能解决的问题)
Often, I need to mark a day in the date picker to notify the user of some events. In my case, I want to notify the user about upcoming discounts during order checkout. I believe that this is a very useful feature because it is implemented in many other frameworks
Expected API (期望的 API)
Default slot (as it done in Element Plus)
Or prop to pass rendering function (as it done in Ant Design)

请问一下这个功能现在添加了吗？很急，在线等~~ @07akioni

This issue does not have any recent activity. If you are still experiencing similar problems, open a new error, including a minimal copy of the problem


Fix/keymap/vim ctrl w idle

Add new keymap for ctrl-w in normal mode.
type idle is not catched by Command dispatcher and therefore idles.

Thanks!

Questions
Is there context on why <C-w> was explicitly disabled in normal mode?  I'd work on a pull request to re-enable it (or submit a revert) but I want to understand the use case for the pull @marijnh @fraxx001.

Would it make sense to revert this change or would that break another use case?
If it would break another use case, would you accept a patch to over-ride entries in the default keymap for contexts it makes sense?

Context
Because <C-w> is explicitly disallowed in the default keymap, it is not possible to use window manipulation routines like split, vsplit, and pane navigation in a context that makes sense.
For context, I'm using vim mode in Obsidian with the obsidian-vimrc-support plugin, and would like to make the following work:
exmap focusRight obcommand editor:focus-right
nmap <C-w>l :focusRight

exmap focusLeft obcommand editor:focus-left
nmap <C-w>h :focusLeft

exmap focusTop obcommand editor:focus-top
nmap <C-w>k :focusTop

exmap focusBottom obcommand editor:focus-bottom
nmap <C-w>j :focusBottom

exmap splitVertical obcommand workspace:split-vertical
nmap <C-w>v :splitVertical

exmap splitHorizontal obcommand workspace:split-horizontal
nmap <C-w>s :splitHorizontal

I have an hilarious hack to patch the vim.js in Obsidian, that does let me use the <C-w> leader to manipulate windows splits and navigate windows.


A new release v0.7.11 just cut for web5-js.

Please check the api docs for compatibility with the release. Here is the link to release notes.

WIP here, will be done by EOD, need to sync with Nick


Whitelist event listeners to prevent "scene 'on...' is not defined" warning

Hello!
When I open a scene with Actions.scene({ onUpdateSmth: this.myFunc }) or Actions.scene({ onUpdateSmth: undefined }) I get scene "onUpdateSmth" is not defined.
We should use whitelist for events that starts with on.

Hey. Could you remove package-lock from this PR, please?

Why? It's not in gitignore and it's good practice to keep .lock files.
@onrige

Sure, but we use yarn (also for this). You can add package-lock to gitignore in commit if you want :)

Please check latest master now. I fixed it in different way because you PR would break other functionality (like custom transition shortcuts like onLogin='loginScene')

Ok. Thanks! @aksonov
Works without PR


Fixes an issue with ToTraversable/ToSized and length-1 HLists

Issue raised this day (2015/02/20) by @mpilquist on gitter

The build doesn't pass because of the package syntax in the functor examples by the way =|

Yeah, I messed that up minutes before having to go out for the evening :-(

Merged, validated and pushed locally. Many thanks :-)


Change to production fonts

Rationale: the typography.com account that is hosting the Whitney limits the amount of bandwidth for projects in "development" to 1GB. Open Vault has been pulling fonts from an account in "development" mode and is close to reaching that limit, so the typography.com folks sent us a message saying we need to kick it over to "production" mode to avoid an interruption. See this screenshot...

Transitioning to "production" mode requires a little handshake between your website and typography.com.
We're planning on putting the fonts on S3.
Done when

[x] S3 location for fonts is established and sent to<EMAIL_ADDRESS>who will add the location in the typograph.com account, and then deliver a package back to us to put into S3
[x] font package uploaded to S3
[x]  verify that the font is reachable on S3 by hosts matching *.openvault.wgbh-mla.org. This may involve adding typography.com to the whitelist of referrers in the S3 bucket policy - not sure about that yet.

Tim Kinnel verified that everything is ok on the typography.com end. Closing


Use of clap Arg methods with flattened clap-cargo Items

Am I supposed to be unable to use Arg methods alongside flatten with clap-cargo items?
Repro
rustup
stable-x86_64-unknown-linux-gnu
rustc 1.57.0 (f1edd0429 2021-11-29)

Cargo.toml inclusions
clap = { version = "3.0.5", features = ["derive", "cargo", "env", "wrap_help"] }
clap-cargo = { version = "0.8", features = ["cargo_metadata"] }

Boilerplate code
#[derive(Parser)]
#[clap(name = "cargo geiger")]
#[clap(about, author, version, bin_name = "cargo geiger")]
pub struct GeigerCli {
    #[clap(subcommand)]
    pub command: GeigerCommands,
}

impl GeigerCli {
    pub fn from_cli() -> Result<Self, clap::Error> {
        GeigerCli::try_parse()
    }
}

I would have to write it like this - repeating e.g. Workspace across Subcommand enum
#[derive(Subcommand)]
#[clap(setting(AppSettings::DeriveDisplayOrder))]
pub enum GeigerCommands {
    /// Geiger with build tree
    Build {
        #[clap(flatten)]
        workspace: clap_cargo::Workspace,
    },
    /// Geiger with test tree
    Test {
        #[clap(flatten)]
        workspace: clap_cargo::Workspace,
    }
}

Instead of this
#[derive(Subcommand)]
#[clap(setting(AppSettings::DeriveDisplayOrder))]
pub enum GeigerCommands {
    /// Geiger with build tree
    Build {
        #[clap(flatten, global(true))]
        workspace: clap_cargo::Workspace,
    },
    /// Geiger with test tree
    Test {
    }
}

I can write regular arguments under Subcommand but flattened entry conflicts with methods
error: methods are not allowed for flattened entry
  --> cargo-geiger/src/args.rs:62:16
   |
62 |         #[clap(flatten, global(true))]
   |                ^^^^^^^

Flatten obviously brings FromStr trait considering if I remove flatten
62  |         #[clap(global(true))]
    |         ^ the trait `FromStr` is not implemented for `clap_cargo::Features`

In order to refactor this with global() on clap-cargo items under the Subcommand enum -
How this should be addressed with clap-cargo perhaps if this is something clap-cargo doesn't handle yet?

error: methods are not allowed for flattened entry

This is a clap_derive limitation and one unlikely to ever change because of the complexities of having derives interact with each other (only at runtime through the traits).  The only option is to not use global but include them on each command.

Okay so maybe I will PR a documentation on
https://github.com/clap-rs/clap/blob/v3.0.5/examples/derive_ref/README.md
Under Magic Attributes and in clap-cargo

I've raised coverage analysis here on which methods may or may not be supported in the future
https://github.com/clap-rs/clap/issues/3269

Since this is a clap_derive thing, I'll go ahead and close this out


Fix RPM script

Summary:

Syntax error fix
Help message moved to a variable
New parameter - final RPM destination absolute path
Fixed copying final RPMs + added ability to specify destination RPM directory
Removed ./bin directory from source since it is not a part of code base and it wasn't possible to build - - - RPMs without running compiling PhantomJS first by running ./build.sh
${builddir} must be also removed after rpmbuild process

Pull request: https://github.com/ariya/phantomjs/pull/13600

Fixed in https://github.com/ariya/phantomjs/commit/71a06f8d19b9315996f42e0ff190bd7f212bcb7e


feat: adding trace/logs/metric collection

Here is a general product direction comment we discussed:
Default plugin to capture all Gatsby log data, don't try to guess what the user doesn't need. We can then push all that in NR, and they can filter on the dashboard side of things.

What is the status and next steps on this PR @rudouglas ?

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.1 out of 2 committers have signed the CLA.:white_check_mark: rudouglas:x: rdouglasrdouglas seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

The team is syncing on this PR tomorrow to discuss some concerns, risks and next steps to get this to a state where we can merge it in,.


Fix for HasProperty

For issue https://github.com/paulbartrum/jurassic/issues/22

Thanks, I went with your fix but I coalesced it down into one method.


Request: Possibility to define functions with template variables

I tried using {=functions} template variable but I couldn't figure out a way to pass the functions definitions as input. I tried with TextFields node and also with the Javascript processor node outputting a JSON.stringify payload

Using braces in textfields can get tricky because they must be escaped. You should use a Tabular Data node if you have a lot of JSON you wish to use as input. We have a longstanding issue around being able to toggle off templates in textfields nodes and also to change to handlebars double-braces in Settings. No one has yet opened a PR for these issues, though.


Add boot, floopy, keyboard flags.

I want to install Windows XP with virtio driver floppy image.
-e FLOPPY=/data/virtio-win-1.1.16.vfd \
-e BOOT=once=d \
-e KEYBOARD=ja \
-e DISK_DEVICE=ide \

virtio-win-1.1.16.vfd

Thanks @tukiyo, merged.


Create Pause Menu

Bare Bones Pause Menu which needs to be reviewed

Menus need to be adjusted for change in window aspect ratio.


mount / unmount / mount issue?

I tried writing code which basically mounts the flash writes some files then unmounts and loops back again to the mount.
All seems to go OK for a while then I start to get read and write errors (say after 3 cycles)
If I mount once and never unmount then the writes continue as expected overwriting the originals.
I have checked my erase functions, chip is fully erased and Spiffs does not call any erase function before the errors show up.
Should I expect to be able to do a mount/unmount and still have it function OK? It would seem the thing to do between usage of the flash which may be days between writes in my case.
Thanks

Hi,
Yes that should definitely work. What errors do you get?

Hi,
The errors are not consistent each time although they tend to follow a pattern.
The folder I am using for the project is copied to here spiffs (file://ROBYN-PC/Users/Robyn/Dropbox/Public/spiffs <file:///\ROBYN-PC\Users\Robyn\Dropbox\Public\spiffs> )
The program main.ino is set up to run in the loop() mounting and unmounting. Apart from that and my interface to my Flash routines it is your example program.
I am using a 512Kbyte Flash and set Spiffs up to work on a page size of 256 bytes and a block size of 4K at the moment. The flash routines have been changed to check after erase. It would be interesting if you could run the program with your flash routines to see if you got a similar effect.
If I just put the mount in the setup() section and remove the mount/unmount from loop() then it works fine.
Possibility is that my unmount() routine is not correct but it seems straightforward.
Thanks
Robyn
Robyn Hannah PhD BE (Hons 1) Grad Dip Counselling.
http://nrie.com.au/NRIEWB9Version/index.html NRIE Logo
NRI Electronics Pty. Ltd.
PO Box 20, Alstonville, NSW, 2477.
Phone: 02 6628 7961 or 0427 068 257
email<EMAIL_ADDRESS><EMAIL_ADDRESS>www.nrie.com.au
From: Peter Andersson<EMAIL_ADDRESS>Sent: Thursday, 12 January 2017 06:40
To: pellepl/spiffs
Cc: robynjayqueerie; Author
Subject: Re: [pellepl/spiffs] mount / unmount / mount issue? (#126)
Hi,
Yes that should definitely work. What errors do you get?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/pellepl/spiffs/issues/126#issuecomment-271972311 , or mute the thread https://github.com/notifications/unsubscribe-auth/AFEuid4vwmYVYP_yum27d_0b1DjlVckAks5rRTAbgaJpZM4Lgak5 .  https://github.com/notifications/beacon/AFEuidvXMI3sBJy8Og5mz14lpQrr2hOyks5rRTAbgaJpZM4Lgak5.gif

This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Peter,
I ran it again here as mount/unmount and captured the attached logout.
I had changed the logical page size to 512 from the link I had given you earlier but that is the only change.
Regards
Robyn
Robyn Hannah PhD BE (Hons 1) Grad Dip Counselling.
http://nrie.com.au/NRIEWB9Version/index.html NRIE Logo
NRI Electronics Pty. Ltd.
PO Box 20, Alstonville, NSW, 2477.
Phone: 02 6628 7961 or 0427 068 257
email<EMAIL_ADDRESS><EMAIL_ADDRESS>www.nrie.com.au
From: Peter Andersson<EMAIL_ADDRESS>Sent: Thursday, 12 January 2017 06:40
To: pellepl/spiffs
Cc: robynjayqueerie; Author
Subject: Re: [pellepl/spiffs] mount / unmount / mount issue? (#126)
Hi,
Yes that should definitely work. What errors do you get?
—
You are receiving this because you authored the thread.
 I did however try a thing in the testbench:
First, I created an fs worth of 1 mbyte, with 4k blocks and 512 byte pages.
Then I looped this sequence a hundred times:

mount
list all files
create and write four files (named file1, file2, file3, file4) with different sizes (100, 500, 1000, 2000 bytes), overwriting if already there
read them back and verify contents
unmount

For what it's worth, it worked in the testbench. Is there any chance the ram becomes corrupt between your unmount and mount?

Evidently replying direct to the emails does not copy the links.
The dropbox link to my folder is \ROBYN-PC\Users\Robyn\Dropbox\Public\spiffs
The capture file i obtained from the main.ino routine is
capture.txt
I don't think the ram is being corrupted, all I have between the unmount and the mount is a 10 second delay

Hi, sorry, but the Dropbox link still just seem to be plaintext. The log
works though.
Den 14 jan. 2017 12:23 AM skrev "robynjayqueerie"<EMAIL_ADDRESS>
:

Evidently replying direct to the emails does not copy the links.
The dropbox link to my folder is \ROBYN-PC\Users\Robyn\Dropbox
Public\spiffs
The capture file i obtained from the main.ino routine is
capture.txt https://github.com/pellepl/spiffs/files/705547/capture.txt
I don't think the ram is being corrupted, all I have between the unmount
and the mount is a 10 second delay
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/pellepl/spiffs/issues/126#issuecomment-272575058, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AE3NV2vApTaAvPq31S7nA2J7uui38qJvks5rSAeIgaJpZM4Lgak5
.

If all else fails resort to a zip file. See if this makes some sense.
spiffs.zip
Thanks for your help
Robyn

Ah, good old reliable zip :)
Well, at a first glance (I'm no arduino guy though), your main loop looks good. However, I did find something odd in spiffs/FLASH/flash.cpp. When you write and erase, you check the SR for completion of the write operation. What you do is pulling chip select, sending 0x05 command (read sr), send 0x00 to read the sr, and whilst bit one of the read is high you continuously send 0x00 to re-read the sr. I think the problem is that the subsequent reads will contain results from command 0x00 instead.
Instead, try doing this when checking if spi flash is busy:
  d = 0xff;
  while (d & 0x01) {
    digitalWrite(flash_CS, LOW);
    SPI.transfer(0x05);
    d = SPI.transfer(0x00);
    digitalWrite(flash_CS, HIGH);
  }

Thanks Peter,
You could be right, I will give it a go here and see what is different. The data sheet suggests that I just set the initial address and then clock in to see when it changes but it is a bit ambiguous.
I have been able to set up Spiffs to work with the flash, I am downloading firmware files via ftp, checking their md5 count, saving them with spiffs and then recalling to reflash the device’s firmware. However I have to only mount once or I screw it up.
I will give you the feedback
Robyn
Robyn Hannah PhD BE (Hons 1) Grad Dip Counselling.
http://nrie.com.au/NRIEWB9Version/index.html NRIE Logo
NRI Electronics Pty. Ltd.
PO Box 20, Alstonville, NSW, 2477.
Phone: 02 6628 7961 or 0427 068 257
email<EMAIL_ADDRESS><EMAIL_ADDRESS>www.nrie.com.au
From: Peter Andersson<EMAIL_ADDRESS>Sent: Monday, 16 January 2017 18:39
To: pellepl/spiffs
Cc: robynjayqueerie; Author
Subject: Re: [pellepl/spiffs] mount / unmount / mount issue? (#126)
Ah, good old reliable zip :)
Well, at a first glance (I'm no arduino guy though), your main loop looks good. However, I did find something odd in spiffs/FLASH/flash.cpp. When you write and erase, you check the SR for completion of the write operation. What you do is pulling chip select, sending 0x05 command (read sr), send 0x00 to read the sr, and whilst bit one of the read is high you continuously send 0x00 to re-read the sr. I think the problem is that the subsequent reads will contain results from command 0x00 instead.
Instead, try doing this when checking if spi flash is busy:
d = 0xff;
while (d & 0x01) {
digitalWrite(flash_CS, LOW);
SPI.transfer(0x05);
d = SPI.transfer(0x00);
digitalWrite(flash_CS, HIGH);
}
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/pellepl/spiffs/issues/126#issuecomment-272792339 , or mute the thread https://github.com/notifications/unsubscribe-auth/AFEuidjG_ZYAh1DKaK6rm8GMItxOSw5tks5rSx6PgaJpZM4Lgak5 .  https://github.com/notifications/beacon/AFEuiU8Cfo_P_7chSfy2B57Oi5_3y2jmks5rSx6PgaJpZM4Lgak5.gif

This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Hi Robyn,
Yes when I think of it that is the standard way on spi flashes. However, on
some flashes there are more than one sr-byte, so it may be worth giving it
a shot anyway. You might have the case of reading sr1 then sr2 then sr1 ..
etc. I guess this would mostly be a problem when you start erasing as you
would not wait long enough.
But it is very weird that it works with one mount only. Practically, there
is not much reason to unmount actually, as unmounting equals closing all
filedescriptors. But it should work.
Perhaps the config structure has changed somehow between the first and
subsequent mounts. May be worth checking also.
Den 16 jan. 2017 23:00 skrev "robynjayqueerie"<EMAIL_ADDRESS>
Thanks Peter,
You could be right, I will give it a go here and see what is different.
The data sheet suggests that I just set the initial address and then clock
in to see when it changes but it is a bit ambiguous.
I have been able to set up Spiffs to work with the flash, I am downloading
firmware files via ftp, checking their md5 count, saving them with spiffs
and then recalling to reflash the device’s firmware. However I have to only
mount once or I screw it up.
I will give you the feedback
Robyn
Robyn Hannah PhD BE (Hons 1) Grad Dip Counselling.
http://nrie.com.au/NRIEWB9Version/index.html NRIE Logo
NRI Electronics Pty. Ltd.
PO Box 20, Alstonville, NSW, 2477.
Phone: 02 6628 7961 or 0427 068 257
email<EMAIL_ADDRESS><EMAIL_ADDRESS>www.nrie.com.au
From: Peter Andersson<EMAIL_ADDRESS>Sent: Monday, 16 January 2017 18:39
To: pellepl/spiffs
Cc: robynjayqueerie; Author
Subject: Re: [pellepl/spiffs] mount / unmount / mount issue? (#126)
Ah, good old reliable zip :)
Well, at a first glance (I'm no arduino guy though), your main loop looks
good. However, I did find something odd in spiffs/FLASH/flash.cpp. When you
write and erase, you check the SR for completion of the write operation.
What you do is pulling chip select, sending 0x05 command (read sr), send
0x00 to read the sr, and whilst bit one of the read is high you
continuously send 0x00 to re-read the sr. I think the problem is that the
subsequent reads will contain results from command 0x00 instead.
Instead, try doing this when checking if spi flash is busy:
d = 0xff;
while (d & 0x01) {
digitalWrite(flash_CS, LOW);
SPI.transfer(0x05);
d = SPI.transfer(0x00);
digitalWrite(flash_CS, HIGH);
}
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <
https://github.com/pellepl/spiffs/issues/126#issuecomment-272792339> , or
mute the thread <https://github.com/notifications/unsubscribe-
auth/AFEuidjG_ZYAh1DKaK6rm8GMItxOSw5tks5rSx6PgaJpZM4Lgak5> . <
https://github.com/notifications/beacon/AFEuiU8Cfo_P_7chSfy2B57Oi5_
3y2jmks5rSx6PgaJpZM4Lgak5.gif>

This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/pellepl/spiffs/issues/126#issuecomment-272971740, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AE3NV8CBX5k2rupDGoA29dJH4qkDWtpvks5rS-iIgaJpZM4Lgak5
.

Peter,
yes I tried the change to the status but it does not make any difference. The new capture.txt file is attached
capture.txt
It does seem to work for 3 or 4 mount/unmount sequences but then starts to fail, recovers at times and fails again.
Is there a fuller explanation of the error codes available? Apart from a general idea of what they are reporting I really don't have much concept of where to start.
Thanks for you help, the platform is a Particle Electron board on a custom built shield that we have developed. It is based on Arduino initially, shares similar software
https://community.particle.io/t/anybody-using-a-particle-device-with-sdi-12-interface/22649/24

Hi Robyn,
unfortunately no, there is no fuller explanation of the errors other than the code itself. Looking at the capture.txt, the first failing run gives -10004 (ERR_DELETED) at open for write. This do not make much sense as you have CREAT|TRUNC|RDWR as flags.
I think we need to take it step by step. First, let us check that the spi flash is ok before each mount. In your FLASH/flash.cpp, please add something like this:
uint32_t flashReadJEDEC(void) {
  uint32_t id = 0;
  digitalWrite(flash_CS,LOW);
  SPI.transfer(0x9f);
  id = (id<<8) | SPI.transfer(0xff);
  id = (id<<8) | SPI.transfer(0xff);
  id = (id<<8) | SPI.transfer(0xff);
  digitalWrite(flash_CS,HIGH);
  return id;
}

and then in your loop in main.ino, add
Serial.printf("jedec id: 0x%08x\n", flashReadJEDEC());

before the call to mount.
If the spiflash/communication is ok, you'll get the same id number in every loop.
You can also try to add this in the loop, after your mount:
my_spiffs_mount();
Serial.printf("AFTER MOUNT\n");
SPIFFS_vis(&fs);

and this before the unmount
Serial.printlnf("--> %s <--\n", buf);
Serial.printf("BEFORE UNMOUNT\n");
SPIFFS_vis(&fs);
my_spiffs_unmount();

Above needs you to redefine spiffs_config a bit, setting
#define SPIFFS_TEST_VISUALISATION         1

and
#define spiffs_printf(...)                Serial.printlnf(__VA_ARGS__)

This will give us a shallow dump of the filesystem before and after modification.
Finally, to behave correctly, at each error we should try to close the fd and unmount directly.  A summarized alteration of the main loop should then look something like this:
void loop(){
char buf[1024];
char cnt;
	Serial.printf("jedec id: 0x%08x\n", flashReadJEDEC());

	my_spiffs_mount();
	Serial.printf("AFTER MOUNT\n");
	SPIFFS_vis(&fs);

	// create a file, delete previous if it already exists, and open it for reading and writing
	spiffs_file fd = SPIFFS_open(&fs, "my_file", SPIFFS_CREAT | SPIFFS_TRUNC | SPIFFS_RDWR, 0);
	if (fd < 0) {
		Serial.printlnf("SPIFFS_open errno %i\n", SPIFFS_errno(&fs));
		goto spiffs_error2;
	}
	// write to it
	for(cnt=0;cnt<30;cnt++){
		if (SPIFFS_write(&fs, fd, (u8_t *)"Hello world this is your master \r\n", 34) < 0) {
			Serial.printlnf("SPIFFS_write errno %i\n", SPIFFS_errno(&fs));
			goto spiffs_error1;
		}
	}
	// close it
	if (SPIFFS_close(&fs, fd) < 0) {
		Serial.printlnf("SPIFFS_close errno %i\n", SPIFFS_errno(&fs));
		goto spiffs_error2;
	}

	// open it
	fd = SPIFFS_open(&fs, "my_file", SPIFFS_RDWR, 0);
	if (fd < 0) {
		Serial.printlnf("SPIFFS_open errno %i\n", SPIFFS_errno(&fs));
		goto spiffs_error2;
	}

	// read it
	if (SPIFFS_read(&fs, fd, (u8_t *)buf, 1023) < 0) {
		Serial.printlnf("SPIFFS_read errno %i\n", SPIFFS_errno(&fs));
		goto spiffs_error1;
	}

spiffs_error1:
	// close it
	if (SPIFFS_close(&fs, fd) < 0) {
		Serial.printlnf("SPIFFS_close errno %i\n", SPIFFS_errno(&fs));
	}
	// check it
	Serial.printlnf("--> %s <--\n", buf);
spiffs_error2:
	Serial.printf("BEFORE UNMOUNT\n");
	SPIFFS_vis(&fs);
	my_spiffs_unmount();
	delay(10000);
}

Due to the nature of the problem, I feel something might be tampering with the ram. Are you running a multithreaded system? Perhaps there is another thread running talking to the flash also? Related to this, I'm wondering if you have any stack guards setup? Spiffs can be pretty stack hungry, and  perhaps the stack top is hit. Though, then you should have the same problem without mounting/unmounting of course.

Thanks Peter, will do, probably Friday, I have to see some clients tomorrow.
Robyn
Robyn Hannah PhD BE (Hons 1) Grad Dip Counselling.
http://nrie.com.au/NRIEWB9Version/index.html NRIE Logo
NRI Electronics Pty. Ltd.
PO Box 20, Alstonville, NSW, 2477.
Phone: 02 6628 7961 or 0427 068 257
email<EMAIL_ADDRESS><EMAIL_ADDRESS>www.nrie.com.au
From: Peter Andersson<EMAIL_ADDRESS>Sent: Wednesday, 18 January 2017 18:49
To: pellepl/spiffs
Cc: robynjayqueerie; Author
Subject: Re: [pellepl/spiffs] mount / unmount / mount issue? (#126)
Hi Robyn,
unfortunately no, there is no fuller explanation of the errors other than the code itself. Looking at the capture.txt, the first failing run gives -10004 (ERR_DELETED) at open for write. This do not make much sense as you have CREAT|TRUNC|RDWR as flags.
I think we need to take it step by step. First, let us check that the spi flash is ok before each mount. In your FLASH/flash.cpp, please add something like this:
uint32_t flashReadJEDEC(void) {
uint32_t id = 0;
digitalWrite(flash_CS,LOW);
SPI.transfer(0x9f);
id = (id<<8) | SPI.transfer(0xff);
id = (id<<8) | SPI.transfer(0xff);
id = (id<<8) | SPI.transfer(0xff);
digitalWrite(flash_CS,HIGH);
return id;
}
and then in your loop in main.ino, add
Serial.printf("jedec id: 0x%08x\n", flashReadJEDEC());
before the call to mount.
If the spiflash/communication is ok, you'll get the same id number in every loop.
You can also try to add this in the loop, after your mount:
my_spiffs_mount();
Serial.printf("AFTER MOUNT\n");
SPIFFS_vis(&fs);
and this before the unmount
Serial.printlnf("--> %s <--\n", buf);
Serial.printf("BEFORE UNMOUNT\n");
SPIFFS_vis(&fs);
my_spiffs_unmount();
Above needs you to redefine spiffs_config a bit, setting
#define SPIFFS_TEST_VISUALISATION         1
and
#define spiffs_printf(...)                Serial.printlnf(VA_ARGS)
This will give us a shallow dump of the filesystem before and after modification.
Finally, to behave correctly, at each error we should try to close the fd and unmount directly. A summarized alteration of the main loop should then look something like this:
void loop(){
char buf[1024];
char cnt;
Serial.printf("jedec id: 0x%08x\n", flashReadJEDEC());
    my_spiffs_mount();
    Serial.printf("AFTER MOUNT\n");
    SPIFFS_vis(&fs);

    // create a file, delete previous if it already exists, and open it for reading and writing
    spiffs_file fd = SPIFFS_open(&fs, "my_file", SPIFFS_CREAT | SPIFFS_TRUNC | SPIFFS_RDWR, 0);
    if (fd < 0) {
           Serial.printlnf("SPIFFS_open errno %i\n", SPIFFS_errno(&fs));
           goto spiffs_error2;
    }
    // write to it
    for(cnt=0;cnt<30;cnt++){
           if (SPIFFS_write(&fs, fd, (u8_t *)"Hello world this is your master \r\n", 34) < 0) {
                   Serial.printlnf("SPIFFS_write errno %i\n", SPIFFS_errno(&fs));
                   goto spiffs_error1;
           }
    }
    // close it
    if (SPIFFS_close(&fs, fd) < 0) {
           Serial.printlnf("SPIFFS_close errno %i\n", SPIFFS_errno(&fs));
           goto spiffs_error2;
    }

    // open it
    fd = SPIFFS_open(&fs, "my_file", SPIFFS_RDWR, 0);
    if (fd < 0) {
           Serial.printlnf("SPIFFS_open errno %i\n", SPIFFS_errno(&fs));
           goto spiffs_error2;
    }

    // read it
    if (SPIFFS_read(&fs, fd, (u8_t *)buf, 1023) < 0) {
           Serial.printlnf("SPIFFS_read errno %i\n", SPIFFS_errno(&fs));
           goto spiffs_error1;
    }

spiffs_error1:
// close it
if (SPIFFS_close(&fs, fd) < 0) {
Serial.printlnf("SPIFFS_close errno %i\n", SPIFFS_errno(&fs));
}
// check it
Serial.printlnf("--> %s <--\n", buf);
spiffs_error2:
Serial.printf("BEFORE UNMOUNT\n");
SPIFFS_vis(&fs);
my_spiffs_unmount();
delay(10000);
}
Due to the nature of the problem, I feel something might be tampering with the ram. Are you running a multithreaded system? Perhaps there is another thread running talking to the flash also? Related to this, I'm wondering if you have any stack guards setup? Spiffs can be pretty stack hungry, and perhaps the stack top is hit. Though, then you should have the same problem without mounting/unmounting of course.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/pellepl/spiffs/issues/126#issuecomment-273406469 , or mute the thread https://github.com/notifications/unsubscribe-auth/AFEuicj4z3rxrsXZoAMRGR9O5PZq8Ftmks5rTcQHgaJpZM4Lgak5 .Image removed by sender.

This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Hi Peter,
Sorry to be a bit longer getting back to you. Life got in the way.
I have implemented the diagnostics you suggest up to providing the shallow dump of the system. I am attaching the capture.txt.
I also had the chips changed on the boards to larger chips, they are now 1MByte chips and I am using all of the space for Spiffs. So there has been that small change to the configuration.
The flashReadJEDEC() result is constant each call jedec id: 0x001f8501
I have not implemented the last part of your email about "close the fd and unmount directly. " I thought I would let you look at the results to this stage first.
In my full project I am not having any problems downloading firmware files and using them to reflash the device, all using Spiffs. But I need to ensure I don't unmount. There are 4 firmware files 2 at about 128KBytes and two a bit smaller.
Thanks for your help.
Robyn
capture.txt

Hi Robyn,
no problem, life has a tendency to do this to you ;)
Ok, I think we can rule out the spiflash driver. Looking at the dumps something fishy happens at the fourth iteration. I would like to try to reproduce this in the testbench if possible, it does indeed look like a bug.
Could you please post me your spiffs_config.h and the exact contents of how you're mounting, and your loop? I tried running something similar in the testbench before, but it seems it is dependent on details, so I want to make sure I am running the exact same setup as you when it comes to filesystem configuration and usage.

Peter, I have attached the zip file of the whole project as I ran it last and created that capture file. Thanks
spiffs.zip

Hi Robyn,
Well.. I've hammered at it pretty good, trying to reproduce the exact thing. To no avail I'm afraid. However, eventually I did one thing in your spiflash driver. Try commenting out line 217 in flash.cpp, here:
	SPI.transfer(b);
	SPI.transfer(c);
	while(length > 0){
		*fptr = SPI.transfer(0x00);
		fptr++;
//		*fptr = 0; // EVIL LINE
		length--;
	}
	digitalWrite(flash_CS,HIGH);

That line is evilness which make a wild write beyond the area given, which in turn would corrupt the stack. This would be my best bet for the problem as of now at least.

Peter, Brilliantly found, I did change that and it has been cycling happily for 20 minutes.
I think I had that line there because during testing I was saving long strings and reading them back, it was easier to read the text and see if there were errors in it. The NULL at the end was an automatic end of string.
Thank you, I will keep testing but it seems fine.
Robyn
Robyn Hannah PhD BE (Hons 1) Grad Dip Counselling.
http://nrie.com.au/NRIEWB9Version/index.html NRIE Logo
NRI Electronics Pty. Ltd.
PO Box 20, Alstonville, NSW, 2477.
Phone: 02 6628 7961 or 0427 068 257
email<EMAIL_ADDRESS><EMAIL_ADDRESS>www.nrie.com.au
From: Peter Andersson<EMAIL_ADDRESS>Sent: Friday, 27 January 2017 19:07
To: pellepl/spiffs
Cc: robynjayqueerie; Author
Subject: Re: [pellepl/spiffs] mount / unmount / mount issue? (#126)
Hi Robyn,
Well.. I've hammered at it pretty good, trying to reproduce the exact thing. To no avail I'm afraid. However, eventually I did one thing in your spiflash driver. Try commenting out line 217 in flash.cpp, here:
    SPI.transfer(b);
    SPI.transfer(c);
    while(length > 0){
           *fptr = SPI.transfer(0x00);
           fptr++;

//             *fptr = 0; // EVIL LINE
length--;
}
digitalWrite(flash_CS,HIGH);
That line is evilness which make a wild write beyond the area given, which in turn would corrupt the stack. This would be my best bet for the problem as of now at least.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/pellepl/spiffs/issues/126#issuecomment-275610036 , or mute the thread https://github.com/notifications/unsubscribe-auth/AFEuiZsJoGoTAoiRQHcpEqyolEkkk_V2ks5rWaWfgaJpZM4Lgak5 .  https://github.com/notifications/beacon/AFEuieu0TqTs2830XKfG-lO47od1xTPkks5rWaWfgaJpZM4Lgak5.gif

This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Just an observer here.. Your "null terminator" is actually a buffer overflow generator :)
Take for example, if fptr pointed to an array of size 1 and you wanted to read 1 byte:
uint8_t fptr[1];
length = 1
while(length > 0)
{
   *fptr = SPI.transfer(0x00); // fptr[0] - ok
   fptr++; // now points to fptr[1].. oh dear..
   *fptr = 0; // kabooom! well, maybe, who knows what that is.
  length--; //exit loop, cross fingers
}

And even if you do account for that with a bunch of checks, you'll still run into trouble because you'll also be doing that to internal spiffs operations. So you'll want to do that outside the flash driver.
Also, I noticed you're using sizeof() to get the length for your reads/writes, at least in the test code. I'm guessing that's what led you to putting in the *fptr = 0 in the first place- it's writing the entire buffer regardless of actual string length. And you're not 0ing the buffer so the excess elements could be anything. So use memset(str, 0, sizeof(str)) before strcpy and you should be able to print the string after reading as long as your buffer is big enough.

feel free to reopen if necessary


FR and JP translation fix for Getting Started index.html file

@nethip It looks like this was merged after you split off the release branch. If you want this in 1.2 it will need to be pulled in.

@redmunds Thanks for pointing this out. I will merge this to release branch.

Luckily there's nothing else on master that's not already on release, so this can be a straightforward merge from master->release without fear of bringing in any other unwanted commits.  If other stuff (not stable enough for 1.2) had landed on master in the meantime, we'd have to git cherry-pick this commit instead.

@peterflynn I just merged these changes back to release. So this PR should be merged now. Thanks!


problem debugging second function in my function app

My directory structure:
PythonFunctions/  # should be "app"?
MyFunc1/
init.py  # fixed; was "init.py"
function.json
MyFunc2/
init.py  # fixed; was "init.py"
function.json
local.settings.json
requirements.txt
...just as 'Azure Functions Python developer guide' recommends.
I can successfully debug MyFunc1, but trying to debug MyFunc2 returns "404 Not Found" when I call it using Postman, even when I close MyFunc1 from VS Code...
WHY ???
VS Code version: Code 1.43.0 (78a4c91, 2020-03-09T19:47:57.235Z)
OS version: Windows_NT x64 10.0.18362

@EsaHeikkiPoutanen can you post a screenshot of your workspace? You should have "PythonFunctions" open as the root folder to debug both functions. In addition, you can use our "Create Project" and "Create Function" buttons which will set up the correct file structure for you.

Idid have:

at lesat I think so..

Sorry I meant a screenshot of the file explorer view. Something like this:

Oh, ok:

Closing as stale. Please open another issue if you're still facing this.


Native support for google drive,mega like third party online storage

🚨🚨 Feature Request

[x] Related to an existing #400

A method or support for  google drive,mega,Microsoft Dropbox to store the dateset and we can use them for personal usage so the users get a option whether they want to store to their own personal accounts or hub servers it may save storage for hub.
It's also helpful when hub servers down they can use from their google or Microsoft account storage.
ds.storage("gdrive")
@davidbuniat take a look

@davidbuniat , for this issue, I am assuming that we need to incorporate google drive API for authentication and then storing it in user specified path?If not coul you guide me on this?

@mynameisvinn Could you help me in finding out whether my thoughts are right or wrong?

yep @madhucharan you are correct, we would to handle client_id, client_secret and possibly refresh tokens.

@mynameisvinn In general, while I was working on colab, to access gdrive to load data or to store, there will be a connection establishment where we need to copy an access token and enter to establish connection. I went through the api docs and may be hub needs to have the client_id and secret and then with auth2.0 the user will provide access token right? I would like to know if it can be done by hub to handle id and secret inorder to work on this, this might be a potential feature as well since users are mostly sharing and storing large files through gdrive

@madhucharan can you share one of your colab notebooks with me so I can see how you connect to google drive?

I generally use the documentation provided by the colab on welcome page, And after reading through documentation here we need to register an application and to get access to id and secret key

Thanks @madhucharan!

Update: I'd love to replicate this behavior somehow but haven't been successful.

@mynameisvinn are you created a new notebook using a google account on a chrome browser? In that case google automatically authorize colab to use the drive, try to use a third-party notebook or another one's colab notebook.

@sparkingdark Okay, I will use a local Jupyter notebook.

I’m closing this issue because it has been inactive for a while and isn't related to v2.0.


Added Browserify support for ng-sortable

This change allows ng-sortable.js to work with Browserify (see closed PR #471). It works on my Angular app that uses Browserify to bundle the JS. To use, just require('Sortable/ng-sortable');

Thx.

You are welcome, glad to help.


CC72864: Text wrongly marked as code

Hello, @rwike77,
This proposed file change comes from https://github.com/MicrosoftDocs/azure-docs.es-es/pull/137 .
Could you review this contribution and help to merge if agreed?
Many thanks in advance.

@v-makoud : Thanks for your contribution! The author, @rwike77, has been notified to review your proposed change.

@ktoliver : Thanks for your contribution! The author, @rwike77, has been notified to review your proposed change.

Merging typo fix


No results if defender doesn't have a weapon

https://kagerochart.com/damage-calc?&weapon-2=None
When switching to no weapon from having a weapon, the calculator will not update until they have a weapon.

Thanks for the report. This one is a long-standing issue that keeps evading patches

Fixed in the upcoming refinements update!


bugfix: cannot upload local cache

Signed-off-by: Congrool<EMAIL_ADDRESS>
What type of PR is this?
/kind bug
What this PR does / why we need it:
Translate disk storage key to etcd storage key before using etcdstorage to update the pool cache. Otherwise, ErrUnrecognizedKey will occur.
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:

Does this PR introduce a user-facing change?

other Note

/lgtm
/approve


Fix endpoint names for Apple trends

The overview endpoint is no longer needed as it is subsumed by the trends endpoints.


AttachmentPrompts within a Waterfall dialog err out

Version
4.5.1
Describe the bug
When an AttachmentPrompt is added as a step in a waterfall dialog, an error is thrown
To Reproduce
I modified the multi-turn .NET sample to add a middle step of AttachmentPrompt gist here
After selecting one of the adaptive cards, an error will be thrown:
Microsoft.Bot.Builder.Integration.AspNet.Core.BotFrameworkHttpAdapter:Error: Exception caught : Error reading JArray from JsonReader. Current JsonReader item is not an array: StartObject. Path 'DialogState.DialogStack.$values[0].State.dialogs.DialogStack.$values[0].State.options.Prompt.attachments.$values[0].content.body'.
Expected behavior
No error should be thrown
[bug]

@rob-derosa - To me that looks like the problem is related to Adaptive Cards and not attachment prompts. It looks like you modified the sample to use Adaptive Cards. There is a longstanding bug in the AdaptiveCards package that throws errors when the cards are serialized with type information, as they are in the Bot Builder dialog stack. You have to convert the card to a non-AdaptiveCard type like a JObject:
Content = JObject.FromObject(result.Card)

Closing as not a real bug

Closing as not a real bug

Solution Worked for me ...
public static Attachment ToAdaptiveCard(this AdaptiveCard card)
{
var adaptiveCardJson = JsonConvert.SerializeObject(card);
return new Attachment()
{
ContentType = "application/vnd.microsoft.card.adaptive",
Content = JsonConvert.DeserializeObject(adaptiveCardJson),
};
}

@v-kydela  Can you please reopen this?
This is a bug, because the card gets stored as conversation history the bot state.
When the bot tries to fetch the conversation state again, the JSON containing the adaptive cards will be part of the previousBotResponses property of the state.
When trying to load that, the bot automatically uses IgnoreEmptyItemsConverter which assumes an array for previousBotResponse.$values[0].attachments.$values[0].content.body while the list of AdaptiveElement is wrapped as an object.

@hansmbakker - It sounds like you're describing this bug, which I already linked to