HalfMoon example on Quantum Hardware

Describe the bug
We are trying to get the Azure Quantum ML classifier with the HalfMoon example running on quantum hardware/Azure simulator, but are running into issues with the job submission using the Python host file. Trying to determine if we're just doing something incorrectly in the submission or if running this on the remote system is not possible. Same error occurs with other Quantum targets, but works fine with the simulate command locally.
To Reproduce
Steps to reproduce the behavior:

Clone or copy the HalfMoon classifier code
Change the "simulate" calls to the HalfMoon objectives to:

qsharp.azure.execute(
      TrainHalfMoonModel,
      trainingVectors=data['TrainingData']['Features'],
      trainingLabels=data['TrainingData']['Labels'],
      initialParameters=parameter_starting_points,
      shots=1000,
      jobName=f"Train half moon model"
   )

Attempt to run on IonQ simulator target
See error

{'text/plain': 'Connecting to Azure Quantum...', 'application/x-qsharp-data': '"Connecting to Azure Quantum..."'}
Connected to Azure Quantum workspace refactorquantum in location eastus.
Loading package Microsoft.Quantum.Providers.IonQ and dependencies...
Active target is now ionq.simulator
The Q# operation Microsoft.Quantum.Samples.TrainHalfMoonModel could not be compiled as an entry point for job execution.
Invalid snippet code
fail: Microsoft.Quantum.IQSharp.AzureClient.EntryPointGenerator[0]
      QS6235 (/entrypoint.qs:Microsoft.VisualStudio.LanguageServer.Protocol.Range): Multi-dimensional arrays are not supported in entry point arguments.
fail: Microsoft.Quantum.IQSharp.AzureClient.EntryPointGenerator[0]
      QS6235 (/entrypoint.qs:Microsoft.VisualStudio.LanguageServer.Protocol.Range): Multi-dimensional arrays are not supported in entry point arguments.
fail: Microsoft.Quantum.IQSharp.AzureClient.EntryPointGenerator[0]
      QS5027 (/entrypoint.qs:Microsoft.VisualStudio.LanguageServer.Protocol.Range): The callable TrainHalfMoonModel requires runtime capabilities which are not supported by the target ionq.simulator.
      Result Opacity: Transparent
      Classical Capability: Full
fail: Microsoft.Quantum.IQSharp.AzureClient.EntryPointGenerator[0]
      QS6238 ((null):Microsoft.VisualStudio.LanguageServer.Protocol.Range): Missing entry point. Execution on a quantum processor requires that a Q# entry point is defined using the @EntryPoint() attribute. Any C# driver code should be defined in a separate project.
fail: Microsoft.Quantum.IQSharp.AzureClient.EntryPointGenerator[0]
      Error compiling entry point for operation Microsoft.Quantum.Samples.TrainHalfMoonModel.
fail: Microsoft.Quantum.IQSharp.AzureClient.AzureClient[0]
      The Q# operation Microsoft.Quantum.Samples.TrainHalfMoonModel could not be compiled as an entry point for job execution.
      Microsoft.Quantum.IQSharp.Common.CompilationErrorsException: Invalid snippet code
         at Microsoft.Quantum.IQSharp.AzureClient.EntryPointGenerator.Generate(String operationName, String executionTarget, TargetCapability capability, Boolean generateQir) in D:\a\1\s\submodules\iqsharp\src\AzureClient\EntryPoint\EntryPointGenerator.cs:line 166
         at Microsoft.Quantum.IQSharp.AzureClient.AzureClient.SubmitOrExecuteJobAsync(IChannel channel, AzureSubmissionContext submissionContext, Boolean execute, CancellationToken cancellationToken) in D:\a\1\s\submodules\iqsharp\src\AzureClient\AzureClient.cs:line 435
/entrypoint.qs(5,69): error QS6235: Multi-dimensional arrays are not supported in entry point arguments.
/entrypoint.qs(5,125): error QS6235: Multi-dimensional arrays are not supported in entry point arguments.
/entrypoint.qs(7,32): error QS5027: The callable TrainHalfMoonModel requires runtime capabilities which are not supported by the target ionq.simulator.
Result Opacity: Transparent
Classical Capability: Full
(1,1): error QS6238: Missing entry point. Execution on a quantum processor requires that a Q# entry point is defined using the @EntryPoint() attribute. Any C# driver code should be defined in a separate project.
Traceback (most recent call last):
  File "run_remote.py", line 47, in <module>
    (parameters, bias) = qsharp.azure.execute(
  File "/Users/***/miniconda3/envs/quantum/lib/python3.9/site-packages/qsharp/azure.py", line 161, in execute
    if "error_code" in result: raise AzureError(result)
qsharp.azure.AzureError: {'error_code': 1010, 'error_name': 'InvalidEntryPoint', 'error_description': 'The specified Q# operation cannot be used as an entry point for Azure Quantum job submission.'}

Additional context
Add any other context about the problem here.

Same issue - have you found a solution?

Well, if it is still actual - I tried to pass arrays as 1-dimensional. I parsed them with this:
    parameter_starting_points = [
        [0.060057, 3.00522, 2.03083, 0.63527, 1.03771, 1.27881, 4.10186, 5.34396],
        [0.586514, 3.371623, 0.860791, 2.92517, 1.14616, 2.99776, 2.26505, 5.62137],
        [1.69704, 1.13912, 2.3595, 4.037552, 1.63698, 1.27549, 0.328671, 0.302282],
        [5.21662, 6.04363, 0.224184, 1.53913, 1.64524, 4.79508, 1.49742, 1.545]
    ]

    # Submit the Q# operation to Azure Quantum
    trainingVectors=data['TrainingData']['Features']
    trainingLabels=data['TrainingData']['Labels']
    initialParameters=parameter_starting_points

    data1 = [row[0] for row in trainingVectors]
    data2 = [row[1] for row in trainingVectors]

    _1 = [row[0] for row in initialParameters]
    _2 = [row[1] for row in initialParameters]
    _3 = [row[3] for row in initialParameters]
    _4 = [row[4] for row in initialParameters]

and then just passed them with this job

(parameters, bias) = qsharp.azure.execute(TrainHalfMoonModel, data1=data1, data2=data2, trainingLabels=trainingLabels, _1=_1, _2=_2, _3=_3, _4=_4, shots=100, jobName="Train", timeout=18000)

In q# I just combined them back

    operation TrainHalfMoonModel(
        data1 : Double[],
        data2 : Double[],
        trainingLabels : Int[],
        _1 : Double[],
        _2 : Double[],
        _3 : Double[],
        _4 : Double[],
    ) : (Double[], Double) {
        let trainingVectorsArray = Zipped(data1, data1);
        let trainingVectors = Mapped(CombineFunction, trainingVectorsArray);

        let initialParametersArray = Zipped4(_1, _2, _3, _4);
        let initialParameters = Mapped(CombineFunction4, initialParametersArray);

        ..........................

And few functions:
    function CombineFunction(a: Double, b: Double): Double[] {
        return [a, b];
    }

    function CombineFunction4(a: Double, b: Double, c: Double, d: Double): Double[] {
        return [a, b, c, d];
    }


Make auto-closing tag consume following closing angle bracket

This changes the behavior of autoClosingTag extension take into account leading >, it consumes the > instead of adding a new one.
I found this behavior to be more sane as I'm writing code inside codemirror.
Here's a video of the interaction
https://user-images.githubusercontent.com/1994028/192403206-94ef735b-d1e0-4cfa-98c2-c63481e21e7f.mp4
And here's a before interaction
https://user-images.githubusercontent.com/1994028/192403216-8e4e2f3f-2ee2-4793-a567-11444c32fe9b.mp4

I can update the JSX auto closing extension if this change makes sense to you.

Yes, this looks like a good idea.


Policy-making ℹ Onboarding (The Agora)

Title

Onboarding (The Agora)
Elevator Pitch

This issue tracks feedback from the pilot onboarding session that runs on 26-May 2022.
Justification

Specifically, feedback is required to ensure the onboarding session provides attendees with:

An understanding of the project's aims and its value for the research ecosystem
A shared terminology for when engaging with The Timeline
An understanding of the culture encouraged amongst its community
A sense of what they can contribute to the project

Unformed Thoughts

I think I don't show up here because I tagged the same issue as @EstherPlomp, I'm happy to be named 😄

Thanks @pherterich! This also happened with @Alejandro-deltell and @arus23, so I'm mentioning them here =)

This is now the final section of Protocol 7: Public Engagement:
To add the badge to your GitHub profile

Go to github.com/[your user name]/[your user name] (For example, @Ismael-KG would go to github.com/ismael-kg/ismael-kg
Click on "Edit README"
Add the following:
[![Contributing An Incomplete History of Research Ethics](https://img.shields.io/badge/Contributing-An%20Incomplete%20History%20of%20Research%20Ethics-red)](https://github.com/Ismael-KG/An_Incomplete_History_of_Research_Ethics)
Click "commit" towards the bottom of the screen to confirm the change. You can then visit github.com/[your user name] to see how the badge fits!

[ ] My next task will be to read through all your helpful feedback and make pertinent changes. I will use issue #142 to ask for suggestions.
[ ] I can then draft the onboarding section of Protocol 11: Networking at the Agora
[ ] I will then re-record videos
[ ] And finally, I'll create a YouTube channel to host the recordings!
[ ] Nb.: This would all be made a great deal easier if I had some branding guidelines, so that might be another issue to open!

Aha, @EstherPlomp, I can't assign you (or anybody!) who doesn't appear in the project's release. Are you able to assign yourself to the issue?

Maybe we need to be added as contributors before you can assign? I can't seem to assign myself :(

Ah, okay! This is helpful! Now I know: for the next onboarding session, those who sign up need to be added as collaborators first! Thank you!


Add unit tests for FindCommand class #110

Fixes #110
Ready for review.

This change is

Seems like you have unrelated commits in this branch.

Sorry, I rebased the commits wrongly! Have rectified.

Implemented the requested changes!

@KnewYouWereTrouble what's the status of this PR?

Ready for review!

Ready for review!

@KnewYouWereTrouble reminder

Ready for review!

Ready for review

Reviewed 1 of 15 files at r1, 4 of 14 files at r2, 1 of 5 files at r4, 3 of 4 files at r9.
Review status: all files reviewed at latest revision, 6 unresolved discussions.

Comments from Reviewable

Ready for review!

Reviewed 2 of 2 files at r11.
Review status: all files reviewed at latest revision, 1 unresolved discussion.

src/seedu/addressbook/data/tag/UniqueTagList.java, line 169 at r2 (raw file):

                        && this.internalList.equals(((UniqueTagList) other).internalList));
    }

Why was this line deleted? Usually we leave a blank line (or two) between last method and the closing brace of the class.

Comments from Reviewable

@pyokagan any further inputs?

Ready for review!

@KnewYouWereTrouble Just fix these problems below. Configure your IDE to automatically trim trailing whitespace so you won't have this problem any more. Everything else looks good.
[ant:checkstyle] [ERROR] /home/pyokagan/pyk/addressbook-level2/src/seedu/addressbook/data/tag/UniqueTagList.java:169: Line matches the illegal pattern 'Trailing whitespace'. [Regexp]
[ant:checkstyle] [ERROR] /home/pyokagan/pyk/addressbook-level2/test/java/seedu/addressbook/commands/FindCommandTest.java:35: Line matches the illegal pattern 'Trailing whitespace'. [Regexp]
[ant:checkstyle] [ERROR] /home/pyokagan/pyk/addressbook-level2/test/java/seedu/addressbook/commands/FindCommandTest.java:46: Line matches the illegal pattern 'Trailing whitespace'. [Regexp]

@KnewYouWereTrouble Just fix these problems below. Configure your IDE to automatically trim trailing whitespace so you won't have this problem any more. Everything else looks good.
[ant:checkstyle] [ERROR] /home/pyokagan/pyk/addressbook-level2/src/seedu/addressbook/data/tag/UniqueTagList.java:169: Line matches the illegal pattern 'Trailing whitespace'. [Regexp]
[ant:checkstyle] [ERROR] /home/pyokagan/pyk/addressbook-level2/test/java/seedu/addressbook/commands/FindCommandTest.java:35: Line matches the illegal pattern 'Trailing whitespace'. [Regexp]
[ant:checkstyle] [ERROR] /home/pyokagan/pyk/addressbook-level2/test/java/seedu/addressbook/commands/FindCommandTest.java:46: Line matches the illegal pattern 'Trailing whitespace'. [Regexp]

Ready for review!


Ban unqualified imports

Summary
Given the lack of documentation on plutus itself, developers regularly need to read sourcecode.
import X without qualifications or named imports makes it very hard to tell where a particular function comes from.
Implicit prelude makes even prelude functions confusing, since we have at least 3 preludes in play, (GHC prelude, PlutusTx prelude, Cardano-prelude)
Solution:
Across the board, ban ALL unqualified imports, imports must take the form:
import qualified X as Y
or
import X (foo, bar)
ideally, force explicit constructor names as well instead of DataType(..)
Steps to reproduce
Steps to reproduce the behavior:
Try to read sourcecode.
Expected behavior
Source code is explicit and clear, easy to read
System info (please complete the following information):

OS: ALL
Version ALL
Plutus version or commit hash: ALL

Thanks @Benjmhart ; we're going to take a look at this by enabling the -Wmissing-import-lists ghc flag! :)


Failed to turn on - session not found in database

When trying to turn on the charger from the switch in the card on the dashboard in HA, the error below is presented and it fails to turn on:
Failed to call service homeassistant/turn_on. Ohme API response error: /v1/chargeSessions/ohmeapaaaaaa/stop, 404; {"timestamp":1704524149903,"status":404,"error":"Not Found","message":"Session with ID ohmeapaaaaaa not found in DB. Ended meanwhile?","path":"/v1/chargeSessions/ohmeapaaaaaa/stop"}
Note that this is when there is no car connected, I was just trying to experiment with changing settings from HA vs in the Ohme app.  Also may be relevant that we have been without a car for a while as the old one went back and the new one is yet to arrive. The last charge session available in the Ohme app was 10th December.
(I have changed the last 6 letters of the device ID to aaaaaa just in case).
Thanks,
Jon.

Which switch are you using? Looks like the pause charge one?

It's the "main" switch - I assumed that would link/unlink the integration to Ohme's servers (as opposed to doing anything specific to a charger):

(hopefully the image uploads)

That's a card-specific switch which turns all the switches within it on/off. It's not part of the integration, but I believe you can remove the switch in the card configuration.

Well, that's a new thing learned today!
I've turned off "show header toggle" on the card; will experiment with the individual switches, but I would expect trying to pause a charge when charging isn't happening would throw an error, so that now all makes sense..
Thanks,
Jon.


Class icons won't show when genertating on Chrome

The class icons won't show up on the back of the card when generating the card sheet on Chrome.

Works for me, can you describe your problem in detail?

When you try to print as pdf you must select the "Background graphics" option. that will solve the problem

Yes, that's why it's mentioned in the popup box with printing instructions.

Sorry looks like the image didn't upload, it is only the class icons, not any others.

Forgot to add, where on the purple one it should have the sorc class icon

what is the exact name of the icon you're trying to use?

class-sorcerer, I tired with some other class icons and got the same result.

Should be fixed now


Enum typing, custom filter impl typing

[x] PIXI.* enums are now extern enums
[x]  Filter.apply is method properly typed
[x] Important FilterManager's methods:
calculateNormalizedScreenSpaceMatrix
calculateScreenSpaceMatrix
calculateSpriteMatrix

No custom filters without em ;D

"src/pixi/plugins/app/Application.hx:245: characters 4-5 : Unexpected )"

Well, i've fixed typedef->enum stuff, but i'm still unsure that this is a good change.
Regardless strict typing, extern enums are not real haxe enums and getName(), getIndex(), getParameters() methods will not be available.
What do you think?

👍


Upgrade insecure dependencies

Result of looking at initial report from #6457
/cc @mnquintana

:+1: There are probably more from build/package.json (and definitely more from individual packages), but this should be good to start


Syntax highlighting within {} blocks

I'm quite new to Lean so I'm sorry if I have misunderstood something, but shouldn't tactics inside curly bracket blocks also be highlighted? If I change the curly brackets to begin ... end it works.

This was apparently caused by another plugin.


virus detected!

hi. i upload the released exe file to virustotal and i get alert from 14 antivirus:
https://www.virustotal.com/gui/file/e7179adcf6ea092ddf18b866b90ca538bd9eb9ead7be00fbef2b790fa0ef7201

These are false positives from little-known antivirus scanners, this is normal.
I changed the SFX module, the number of false positives decreased. The installer files have been updated.


selection of hashtag-link sometimes fails

hashtags shall be marked as link. That moslty works, but in some cases not:

This may be a problem with umlaute, but strangely it works with the word "Köln" but not with "München".

The hastag regex has
var hashtagReg = /#([\wäöå]+)/gi;

so the ü character is missing and has to be converted into
var hashtagReg = /#([\wäöåü]+)/gi;

But this would just solve it for this case, what are the other possible cases in which this could fail ?

Please try out all kinds of special local characters and other languages as well. @sudheesh001 Please do some tests as well.


PWA-154: Made register link to be configurable. Defaults to previous behavior.

Pull Request Test Coverage Report for Build 569

0 of 1 (0.0%) changed or added relevant line in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.007%) to 40.293%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

pages/Login/index.jsx
0
1
0.0%

Totals

Change from base Build 563:
-0.007%

Covered Lines:
1812

Relevant Lines:
4401

💛  - Coveralls


telescope: Fix homepage URL

Description of changes

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 323610 run on x86_64-linux 1

The change of the url seems correct as the old one loads nothing and the new one loads a telescope site.


Added new Optional property ibDelegate of type AnyObject which se…

…rves as a workaround and addresses the fact that IB cannot reference protocol outlets in Swift files (still the case in Xcode 8.0). This property can be used to set the delegate of the view in a storyboard. See http://bit.ly/2eLvVoq for details.
Made the delegate property an @IBOutlet.
The example app sets the rating view delegate from the storyboard.
Opened the storyboard of the example project in Xcode 8.0 and fixed resulting misplacements.

Addresses issue #20

Sorry haven't been maintaining this repo much lately @raginmari . I just pushed 3.0 which adds some improvements. Please resubmit PR if this is still an issue.


Compare guardrails scans using BCGOV_WORKLOAD_admin_tmhl5tvs and AWSCloudFormationStackSetExecutionRole roles

Describe the Issue
As a tester I want to ensure a workload account using the role AWSCloudFormationStackSetExecutionRole has the same access and rights that the same workload account using the same roles the ministry teams will utilize the accounts (for example
BCGOV_WORKLOAD_admin_tmhl5tvs) are representative of the roles used by the ministry team.
Additional Context
Currently there are scripts that scan the guardrails. There are two versions of the same script, one requires manual intervention, the second is automated and once started allows the tester to go for coffee, with an execution time of >30' depending of the zone.
The difference between the scripts is the first requires to enter the account credentials, that are associated to a specific role (the end users will actually use this role) for each account, while the 'automated' script requires to enter, once, the master account credentials, and then it assumes the AWSCloudFormationStackSetExecutionRole on each of the users account.
In principle, the policies associated to AWSCloudFormationStackSetExecutionRole and the roles used by the workload accounts are the same, but I want to verify this claim.
See #2028, actually, the results obtained by this ticket will inform #2028
Acceptance Criteria

Run the scripts using both methods
Compare the results obtained by the master account assuming the workload account role AWSCloudFormationStackSetExecutionRole  and the workload account using the role BCGOV_WORKLOAD_admin_tmhl5tvs
Execute the previous steps for each Landing Zone and for different org. units (dev, tools)
Analyze results and provide recommendations

Completed: I have run the scan on several workload accounts using directly their credentials and the script getSnapshot.py and running getFullSnapshot.py. The later script requires the Master account (for the zone) credentials and then assumes the AWSCloudFormationStackSetExecutionRole role of the workload account.
I was expecting to find some differences, but I was wrong. There are no differences. This is good because running the _getFullSnapshot.py._script only requires to enter once the AWS credentials while the first script requires the AWS credentials for each scanned account.
This ticket can be closed.


database_size

In the example app provided in the test directory, when the database is opened, the database size is set to 200000
const database_size = 200000;

What does this number represent?

Not much - leftover from initial release - it stands for estimated size and is outlined in Web SQL Spec. It is not used by this module.


Allow remote signing infrastructure to assign operational IDs

Problem
The operational credentials delegate interface includes the SetFabricIdForNextNOCRequest and SetNodeIdForNextNOCRequest methods, which are supposed to provide non-binding operational ID hints to signers.
However, these actually are not optional because no matter what identifiers the signer encloses in the certificate chain, the commissioner assumes the signer has honored its suggestions and will not be able to locate or communicate with the commissioned node unless it carries the identifiers the commissioner has proposed.
Change overview
This commit fixes the issue by using the signer-provided certificate chain as source of truth, extracting compressed fabric ID and node ID from this.
This will not disrupt signers that honor the commissioner's hints, but also works for signers that assign their own IDs.  In the case of a combined commissioner / admin, the signer is free to assign node IDs of its choice.  In the case of a standalone commissioner implementation that does not establish CASE or invoke CommissioningComplete, the signer is free to select all of root cert, fabric ID and node ID.  In all cases, the resulting PeerId struct in the CommissioneeDeviceProxy will carry identifiers that match the certificate chain from the signer.
Fixes #13500
Testing

Unit tests have been added for the new crypto helpers that are extracting operational ID from the cert chain.
Commissioning with commisisoner-selected node IDs was manually tested - no regressions.
Commissioning with signer-selected node IDs was manually tested - this now works and didn't before.
Existing chip-tool integration commissioning tests pass.

CC @samadDotDev , @kianooshkarami , @pan-apple , @cecille , @tcarmelveilleux

fast track: unit tested code that has been up for sufficient time for cross timezone review.


rails_helper template: Restore old order of support files

Before #2678, the suggested code snippet for loading support files loaded files in directories (e.g. spec/support/a/b.rb) after files with the same basename as those directories (e.g. spec/support/a.rb).
This tends to be the preferrable load order, given how Ruby modules and classes are usually structured.
The root cause is a difference between the alphabetic ordering of string sorting compared to Pathname#<=>.

@JonRowe suggested this approach in https://github.com/rspec/rspec-rails/pull/2678#issuecomment-2311836926.

Side note: Is there a template for a default spec_helper.rb (for non-Rails projects) somewhere? 🧐

Is there a template for a default spec_helper.rb

Here you go, @franzliedke.

Thank you!

Released in 6.1.5 (and later)


how to get forward_from with getMessage()->getForwardFrom()

Required Information

PHP version: 7.0
PHP Telegram Bot version: 0.40.1
Using MySQL database: no
Update Method: Webhook
Self-signed certificate: no
RAW update (if available): yes

On a custom UserCommand
getMessage()->getForwardFrom() should return a User but returns null. The reply from Telegram is correct, I can see on the raw update logs that forward_from is defined with the user data, but this method don't return a User but null. As I can't see where can ask this project this questions, I do it by opening a issue...
I didn't change original code or is a complex project yet, it should work, I'm looking at the UserCommand examples to make mine.

You need to catch the getForwardFrom in the GenericmessageCommand, as it doesn't count as a user command.
Could you explain what you're trying to achieve? And what do you mean by On a custom UserCommand?

what I want to do is that when a message is forwarded to the bot with a command like /getid the bot returns the original user id.
what I mean on a custom UserCommand its just a new command on the Commands folder copying example files, but I get null when I try to get getMessage()->getForwardFrom()

Ok, that should work though.

Message to be forwarded: /getid (from private chat or group)
Forwarded to the bot
Bot executes the getid command
You have access to the 'forwardFrom' User object
Get the ID using $this->getMessage->getForwardFrom()->getId()

What does your raw update look like?
(Replace the IDs and names to ensure privacy)

Well, for me $this->getMessage()->getForwardFrom() is already null.
raw update like $this->getUpdate()->toJson()? doesn't show "forward_from" and the User object.
But, on raw logs like
Longman\TelegramBot\TelegramLog::initUpdateLog($path . '/' . $BOT_NAME . '_update.log');
it shows "forward_from" and User data is good.

Strange. If the message itself is forwarded, there should be something in ->getForwardFrom().
What if you add this to your GenericmessageCommand.php in execute() method:
$message = $this->getMessage();

return Request::sendMessage([
    'chat_id' => $message->getChat()->getId(),
    'text'    => $message->getForwardFrom() ? $message->getForwardFrom()->getId() : 'not forwarded...',
]);

Then forward a message to your bot in the private chat. Does this work?

says not forwarded...

Hmm, that's very strange. Will need to do some testing to figure this one out.
Any extra information you can give me about your setup?

mmm idk, I know it is weird, is it working for you? It needs a database? Im not using one. But the data Telegram sends is good because you can see it on the log...

Yes, it's working for me, with and without database, with and without webhook.
I don't understand yet why it's not working, even though it's in the raw update...

Do you have PHP 7 too? Idk what to do next, I tried many things already. I can't even find an error that can be the cause of this problem.

Do you have PHP 7 too?

Yes I do. Don't think that's the problem though.
Summoning @jacklul @akalongman @MBoretto
Any ideas?
Alternatively, would it be possible to log into your server that's running the bot?

would it be possible to log into your server that's running the bot?

sorry, thats no possible xD

Can be some parsing error? I mean, if on the logs I get the right json from Telegram but when I do $this->getUpdate()->toJson() the "forward_from" already doesnt exists?

I've just noticed that getUpdate() doesn't seem to be returning the correct value I think.
Something weird is going on, hmmm 😕

What I noticed when it comes to DB:
Forward message from another private chat:

forward_from = id (correct)
forward_from_chat = null (missing)
forward_from_message_id = null (correct)

Forward message from group chat:

forward_from = id (correct)
forward_from_chat = null (missing)
forward_from_message_id = null (correct)

Forward message from channel:

forward_from = null (correct)
forward_from_chat = id (correct)
forward_from_message_id = number (correct)

I met this problem too, and found out that it's a correct behavior, since -

ok, for me forward_from ,forward_from_chat , forward_from_message_id is null forwarding group chats or channel messages, all null.
I'm using this inside class GetidCommand extends UserCommand {
And, sorry, I did this again:

What if you add this to your GenericmessageCommand.php in execute() method:
$message = $this->getMessage();
return Request::sendMessage([
'chat_id' => $message->getChat()->getId(),
'text'    => $message->getForwardFrom() ? $message->getForwardFrom()->getId() : 'not forwarded...',
]);
Then forward a message to your bot in the private chat. Does this work?

and the result is that it returns empty answer (without command, just forwarding from group or channel).
I have php cache disabled btw.

@juanjofm Did you manage to resolve this?

Hi @noplanman no, but I stopped trying... Everything else worked well.

Is this still actual?

I think it is all about Telegram's recent privacy update. User's can break the link back to them in forwarded messages.
If user A breaks the link back, so getForwardFrom() would return null which shouldn't. Because  there are already some information about the forwarded message like forward_sender_name, forward_date and text.

@ttvd94 Are you experiencing this problem now?
(This issue is very old, so not sure the initial problem is due to the recent changes)

I don't know how, but I resolved this issue long ago, it was working, sorry for not commenting. But I can't test if it's working right now because I don't develop a Telegram bot since more than a year now.
Let me look for the code and see if I can help with it.

@ttvd94 Are you experiencing this problem now?

@noplanman Yes I am. And I work it around like I said.

Right, I've had a look at this and this isn't a Telegram problem, but rather a data access problem.
As @ttvd94 pointed out, sometimes the forwarded message doesn't contain the forward_from field but instead has the forward_sender_name and forward_date fields set.
So when trying to access the data, that needs to be checked for:
$message           = $this->getMessage();
$forward_from_date = $message->getForwardDate();
$forward_from_name = $message->getForwardSenderName();
if ($forward_from = $message->getForwardFrom() ?: $message->getForwardFromChat()) {
    $forward_from_name = $forward_from->tryMention();
}


My personal Jarvis

Nice but try to update moree...👍

a=random.randint(0,len(songs))
os.startfile(os.path.join(music_dir,songs[a]))


Jetpack Compose Basics

Hi @AR102023
Please provide the requested information so we can help you.
There is no information currently provided on this ticket.
Regards.

Hi John,
If there's no text displayed it means that I've deleted the text as I'm unable to delete the text message itself.

From: John Shea @.>
Sent: Tuesday, November 7, 2023 4:06:46 PM
To: google-developer-training/basic-android-kotlin-compose-birthday-card-app @.>
Cc: AR102023 @.>; Mention @.>
Subject: Re: [google-developer-training/basic-android-kotlin-compose-birthday-card-app] Jetpack Compose Basics (Issue #492)
Hi @AR102023https://github.com/AR102023
Please provide the requested information so we can help you.
There is no information currently provided on this ticket.
Regards.
—
Reply to this email directly, view it on GitHubhttps://github.com/google-developer-training/basic-android-kotlin-compose-birthday-card-app/issues/492#issuecomment-1799039371, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BDNTKDNUXORKZST2SAXUQ7TYDJMBNAVCNFSM6AAAAAA66SOBOWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJZGAZTSMZXGE.
You are receiving this because you were mentioned.Message ID: @.***>

Hi.
Thank you for the update. I will close the issue.
Regards.


Don't report Dynamic call to static method on macros

Larastan Version: 2.1.12
--level used: 9

Description
Laravel supports calling the same macro as both static and regular method, so this is a false-positive.
Laravel code where the issue was found
Registering macro
Request::macro('to_object', fn (string $class_name) => new $class_name($this->all()));

Using macro
public function test(TestRequest $request)
{
    $request->to_object(Test::class);
}

Error
Dynamic call to static method App\Http\Requests\TestRequest::to_object().

Are you also using phpstan-strict-rules?

Yes

Then this is a know issue. Please subscribe to this issue for further updates.


GUID and IDIR missing on submissions to BI API services and ODS

We just noticed that as of Nov 9th 10:30 AM, GUID and IDIR are no longer passed with the submissions to ODS.  As of Dec. 5th 9:44 AM, there are 1205 records with missing IDIR and GUID.
Can the records be re-submitted?  Unfortunately, this impacts reporting and will require the information records to be updated or re-submitted.
To review if we can make those fields mandatory

Simen recommends See if we can reproduce in Test - assign to Bhumin or Iman - could be an issue related to the upgrade

@simensma-fresh
I loaded a file with records with missing GUID.  Unfortunately, the email or application IDs are not sent to ODS.  File is loaded to SharePoint: https://bcgov.sharepoint.com/:x:/r/teams/03991/Shared Documents/Data Collection/Telework_submissions_with_missing_GUID_Dec6_2022.csv?d=wfb49c6be39f74860bc267569d94e42fa&csf=1&web=1&e=Z8NPV2

@simensma-fresh I'm definitely open to that idea of keeping submissions in the system for 60 days - can you confirm it would mean that completed Telework Agreements (= those signed by supervisors) would still be available after they have been approved, so up to 120 days (60 days for manager to approve + 60 days retained?)
@Stella-Archer I would like you to weigh in on this issue to to see about any impacts to other forms in development. For Telework, we would need to update the PIA.

@MeghanStothers That would be my suggestion for the Telework Agreement at least (60 days for manager to approve + 60 days retained)

@T854236 I sent two Telework submissions from our DEV and TEST environment to ODS. Can you please verify if idir and guid are properly sent?

@iman-jamali-fw
Yes confirmed I see them with the GUID and IDIR information.  I noticed the schedule is missing.  Is that expected with your tests?

@iman-jamali-fw
I don't see the 3rd one yet.  Do you need to approve it first before it is send to the API service?

@T854236  Just sent another. One thing I  learned is that we flatten the schedule before sent to ODS so the values will be the days of the week (e.g, monday:false, firday: true) and schedule itself will be removed before sent to ODS. Is that expected?

@iman-jamali-fw
I see the 3rd test now and the schedule column is blank.  It used to have values before (e.g. {"monday":true,"tuesday":true,"wednesday":true,"thursday":true,"friday":true,"saturday":false,"sunday":false}).  Was there a decision to remove this field from ODS?
I can ask Sarah M. if she uses this field for reporting purposes.

I believe we decided to flatten the data sent to ODS when we were working on the SL Review form. The flatter function should have removed schedule :(
Can we update these fields to something like schedule-friday , schedule-monday?

@T854236  Hmm, seems like a lot of effort to change that. Does the current structure with the schedule as flat values (e.g., monday:true) work for ODS and BI purposes?

@iman-jamali-fw
I would recommend to revert the change with the schedule for now and open to discuss if changes are required.  We should bring in Steven's team so they are aware of the changes if that is what we want to do.
The column is a string value up to 4000 characters.  I believe it was an array and converted to string.  Sample below.
{"monday":true,"tuesday":true,"wednesday":true,"thursday":true,"friday":true,"saturday":false,"sunday":false}

@T854236 Perfect thanks. I'll take a look and see what I can do

@Stella-Archer - Can you have a peek at this ticket?  Thanks For now, I have added you to the ticket and we could talk about it at scrum tomorrow.

Alison checked with Jodi who is ok with rolling back the function. Jodi said they will have the PSA ADMs in there in January sometime so we'll have to find a way to fix it early in Jan. Alison let
Simen and Iman know and they
might have a fix for TWA that doesn't involve BI so SLR won't be affected. They will keep us posted....

@MeghanStothers @simensma-fresh  If it makes sense, I can move the missing schedule issue to a separate ticket. And have this ticket to only track GUID and IDIR which are currently deploying in PROD.

@T854236
I sent a Telework submission with applicationId 28620 on Prod. Do you mind verifying if GUID and IDIR were received on your end?

@T854236
Great! Thank you.


Why not WP-CLI commands

Hello @devuri 👋🏻
WordPress has a CLI tool called WP-CLI.
If you start a new project why don't you make it a collection of WP-CLI commands?
WP-CLI provides everything to write commands and share them with others.

WP-CLI is great and I looked at it and considered it during initial planning of the project, WP-CLI is awesome for managing WordPress sites.  WP-CLI is like a Swiss Army knife for general WordPress magic.
But for this specific use case  it seemed to be too much. wpenv-console is meant to be a standalone CLI tool and is actually part of another project called  wp-env-app which fully supports the WP-CLI.
This project is still in its early stages of development. That means it's open to change and improvement based on suggestions and feedback. So your ideas and feedback are super welcome!


6.6.3 Update - Rekordbox Real Time

I need the currently playing track in .txt file to display in BUTT. Looking through the unbox files the only directory with a text file is 'rekordbox_realtime' but that only works with 6.5.2 as the latest version.
Im currently running Rekordbox 6.6.3. I guess I can't simply change the asot.html page to asot.txt as the script and other stuff wont work.
How can I output artist and title in a .txt file only but using the Rekordbox only and not Rekordbox Real Time?

You should be able to use the latest unbox version with rb 6.6.3 on Windows, here's an example of someone's configuration to make unbox work with rb 6.6.3, note that they just set the path to the 6.6.3 executable and unbox launched @unreal-dan's hook as expected: https://github.com/erikrichardlarson/unbox/issues/35#issuecomment-1094084118
Lmk if you run into any issues, happy to help!

You should be able to use the latest unbox version with rb 6.6.3 on Windows, here's an example of someone's configuration to make unbox work with rb 6.6.3, note that they just set the path to the 6.6.3 executable and unbox launched @Unreal-Dan's hook as expected: #35 (comment)
Lmk if you run into any issues, happy to help!

Unfortunately it isn't working for me. I changed the path and it opens Rekordbox but the first time, it had an exception error and closed (it's a DMP file so I cant attach it here and opening it in notepad it is just symbols) The second time it opened fine and didn't crash but I was getting no display on the decks (the controller) when I dragged tracks onto deck 1 and 2.
Tried once more and it opened but closed a minute later.
So there's obviously something it doesn't like for me.

Gotcha are you using the latest unbox version? https://github.com/erikrichardlarson/unbox/releases/download/10.0/unbox_windows.zip

I downloaded again from the windows link on the description assuming you'd
update that link once you released an update but I'll try this link
tomorrow 👍
On Sun, 17 Apr 2022, 23:28 erikrichardlarson, @.***>
wrote:

Gotcha are you using the latest unbox version?
https://github.com/erikrichardlarson/unbox/releases/download/10.0/unbox_windows.zip
—
Reply to this email directly, view it on GitHub
https://github.com/erikrichardlarson/unbox/issues/82#issuecomment-1100959747,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ATAOZC7ZPQBWNENOSU3Y453VFSGARANCNFSM5TKPZO2A
.
You are receiving this because you authored the thread.Message ID:
@.***>

Ah yeah that's my bad, I have the previous version in the description right now since Denon is having some issues in the latest release. I think rb will work for you in this latest release, lmk if you run into any issues though.

Ok great, downloaded the version from the link you gave and all working. The track updates instantly which is great. Couple of bugs for me though.

Once I mix a track in and the previous deck is stopped I get a javascript error (see attached) This happens after every mix.

If I minimize rekordbox to look on desktop which I do often for my radio show notes etc. the music stutters like it is struggling to cope but memory etc. is all good on this machine.

So the JavaScript error you're seeing usually comes from the Artist / Track field being empty, you may need to fill out the metadata on some of your tracks?
For the lag you're seeing I'll have to look into this, and see if I can recreate. For now maybe you could keep the rb window maximized, and open file explorer to get to your desktop instead of minimizing the rb window?

So the JavaScript error you're seeing usually comes from the Artist / Track field being empty, you may need to fill out the metadata on some of your tracks?
For the lag you're seeing I'll have to look into this, and see if I can recreate. For now maybe you could keep the rb window maximized, and open file explorer to get to your desktop instead of minimizing the rb window?

All the metadata is 100%, it has to be for my radio show BUT...one thing I didn't mention is it does work still so when I get the javascript error, the artist and title are in fact writing to the text file so in theory I could hit ok on the error and carry on but wanted to make you aware of it.
For the minimize issue, its no big deal if I just get in the habit of not doing that, I can always use a laptop alongside things so this isn't a problem.


port to mobile

A player thought it would be fun to play on a mobile device.
See what's required to port to Android and iOS. Port the game, if it's feasible.

ported to Android ok. Now it just needs lots of polish, and we have to figure out what it takes to get something on the Google Play Store.


Updated to SPFx 1.14

Category

[x] Content fix
[ ] New article

What's in this Pull Request?
Queued up update for release of SPFx 1.14

Docs Build status updates of commit 5e6c7ec:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/spfx/set-up-your-development-environment.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

This can be closed as this change is part of a bigger & previously submitted PR #7715

Closed as edits are in on the other PR. Thanks @hugoabernier and @andrewconnell 🙏


Object doesn't support property or method 'click'

Hi
I am using version 3.1.2 and testing on IE 11  and this is the error that I get:
Object doesn't support property or method 'click'
It happens as soon as I click on the button to select a file in a template like...
<button ng-file-select  ng-multiple="true" ng-file-change="process($files, 'upload')">

My navigator.appVersion and navigator.userAgent values are as follows:
5.0 (Windows NT 6.1; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729;
.NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; rv:11.0) like Gecko

Mozilla/5.0 (Windows NT 6.1; Trident/7.0; SLCC2; .NET CLR 2.0.50727;
.NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0;
.NET4.0C; rv:11.0) like Gecko

Error occurs in  resetAndClick method's clone[0].click(); statement
function resetAndClick(evt) {
		if (fileElem[0].value != null && fileElem[0].value != '') {
			fileElem[0].value = null;
			// IE 11 already fires change event when you set the value to null
			if (navigator.userAgent.indexOf("Trident/7") === -1) {
				onChangeFn({target: {files: []}});
			}
		}
		// if this is manual click trigger we don't need to reset again
		if (!elem.attr('__afu_clone__')) {
			// fix for IE10 cannot set the value of the input to null programmatically by cloning and replacing input
			// IE 11 setting the value to null event will be fired after file change clearing the selected file so
			// we just recreate the element for IE 11 as well
         console.log('appv',  navigator.appVersion, '--', navigator.userAgent);
			if (navigator.appVersion.indexOf("MSIE 10") !== -1 || navigator.userAgent.indexOf("Trident/7") !== -1) {
				var clone = recompileElem();
				clone.attr('__afu_clone__', true);
				clone[0].click();
				evt.preventDefault();
				evt.stopPropagation();
				return true;
			}
		} else {
			elem.attr('__afu_clone__', null);
		}
	}

Could you update the the late versions, that could've been fixed already

Will do


Spatial tree

Is there already a way to display the spatial tree of an IFC file in the web viewer?

Yes, you can access the web-ifc-three function just as well from a project that is using web-ifc-viewer. You just need to call the async IfcLoader.IfcManager.getSpatialStructure (modelID: number) function from web-ifc-three.
You can access this, once you created a viewer and a model, by using a function like this: yourViewer.IFC.loader.ifcManager.getSpatialStructure(yourModel)

And can I get geometries of elements (not whole models) by some way?

Please open new issues for new questions. Btw, not with web-ifc-viewer, but you can try to use web-ifc, which is more flexible.

There is also an implementation of the spatial tree here:
https://github.com/IFCjs/hello-world/tree/main/examples/web-ifc-viewer/spatial-tree


make sure path is a string

What does this change?
obj.get returns an Option, which caused the collectionPath to be serialised as Some("A/B")
Using flatmap to get the value of the Option
How to test
The pathProcessor logs the input paths and selectors.
We can see with the change that they are values, not Some(value)
From
Input paths (1-6): Some("A/B"), Some("A/B/C/D"), Some("E/F/G"), Some("F/G/H"), Some("Y/Z"), Some("Z")
to
Input paths (1-6): "A/B", "A/B/C/D", "E/F/G", "F/G/H", "Y/Z", "Z"
How can we measure success?
The batcher service and lambda output the same values
Have we considered potential risks?
The batcher lambda output is not subscribed yet

🫓🗺

Flatbread world? 🤔


perf: replace truncate with delete

Description
Weird, but it seems that in our case, delete is more performant than truncate.
An explanation could be that TRUNCATE can be rolled back in a transaction for MySQL > 8.0. https://dba.stackexchange.com/a/292081
But I don't understand why it also improves others DB.

🚀 CI was able to deploy the build of this PR, so you can now try it directly here
Notes: The deployed app is linked to the management API of APIM master. (Same login and password as APIM master)

With the Docker Layer Cache option activated:


Register v0.1.0

@JuliaRegistrator register branch=trunk

Registration pull request created: JuliaRegistries/General/103061
Tip: Release Notes
Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.
@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.
Tagging
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
git tag -a v0.1.0 -m "<description of version>" 183a7efdb9852668ac2ee74ff210990edee1c7bc
git push origin v0.1.0


Add RSKGrowingTextView to UI section.

This adds a light-weight UITextView subclass (called RSKGrowingTextView) that automatically grows and shrinks to the UI section.
I hope you will like it! :gem:

@dkhamsing :+1:


Not able to pull data past Sept 8, 2017

Noticed this Monday (Sept 11th, 2017) that no data was able to be collected using either "yf.download" or "pdr.get_data_yahoo". Works like a charm for any date range up to Friday sept 8th, 2017.

Upon:

updating pandas data reader
updating fix-yahoo-finance
choosing an end date of '2017-09-13', I seem to have been able to get data for September 11th and 12th, 2017.

Will setup a VM and confirm that solution works.


problematic step() output: unstable instead of sinusoidal

I am trying to plot step response of a 3rd order process Gp, controlled with a P controller.
Gp = 6/[(s+1)(s+2)(s+3)]
I am using v0.8.3
from control.matlab import *

Gp = tf(6,[1,6,11,6])
Gc = 10
Gor = Gp*Gc/(1 + Gp*Gc)
y,t = step(Gor)
# Plotting code

Gor has 3 poles at (-6, sqrt(11) j, - sqrt(11) j ) and the expected behavior is sinusoidal oscillations after the initial transients have died down (ie t > ~ 2/3)
But what I get is an unstable system:

Octave gives the correct result (ymin 0.113, ymax 1.705 after transients):

The system is ill-conditioned since the closed loop system has a pure imaginary pole => small numerical errors can generate problems.
The main problem in the python-control version is that it is computing the time range for the step response differently.  If you look closely at the units on the x axis for your first plot, you will see they go to 3e15 (!).  If you give the step response an explicit time range, you get something that looks like Octave:
from control.matlab import *
import numpy as np
import matplotlib.pyplot as plt

Gp = tf(6, [1, 6, 11, 6])
Gc = 10
Gor = Gp*Gc/(1 + Gp*Gc)
y, t = step(Gor, np.linspace(0, 10, 1000))
plt.plot(t, y)

There is still a problem here to be fixed, which is the computation of the default time for the simulation in cases where there is a pure imaginary pole.  Currently this computation is coming from scipy.signal.lti._default_response_times.  Related to PR #383 and issue #287.

Thanks. Missed the e15 part.
As you have mentioned, a problematic default sampling rate gave me the following aliased output even for the simple damped oscillator, G = s/[(s + 0.01)^2 + 1] (this's similar to the 'goto example' mentioned by ilayn in  #287, but a bit simpler.)
a = -0.01
G1 = tf([1,0],[1,-2*a, 1+a**2])
y,t = step(G1)

ytrue_func = lambda t : np.exp(a*t)*np.sin(t)
t_true = linspace(0,700,2000)
ytrue = ytrue_func(t_true)

Somehow all cases like this seem to be using a fixed 100 time steps, instead of using more to avoid aliasing.
Scipy output is also identical - does the step function use scipy lti.signal.step?
The code at  https://github.com/ilayn/harold/blob/master/harold/_time_domain.py#L280-L454 mentioned in #287 works very well for this case with a good dt of 0.25 and ~1800 steps.

Thanks for pointing out the Harold code, @prashant2.  I'm going to spend some time trying to fix up this  problem as part of PR #383.

This is what I get from the current master of harold.
 a = -0.01
G1 = harold.Transfer([1,0],[1,-2*a, 1+a**2])
step_response_plot(G1)

Note that the dynamics are still decaying until 400s so I think Octave doesn't take that into account (in case you haven't specifically zoomed in).

If this corona thing lets me do some open source work, I'll try to release 1.0.2 soon. Please let me know if you encounter some nonsensical results.
Richard it would be great if you can look into the repeated pole sensitivity issue. The rest you can copy/paste at will if the code is useful (I can delicense it if needed no attribution etc. required).

New code that incorporates @ilayn's code, in PR #454 seems to fix this issue:

as well as the second example.

Should be resolved when that PR is merged.


Add NFC_NXP_CHIP_TYPE keyword for detecting NXP NFC chips on newer phone models

Add new NXP chip key value for SN1x0 and SN2x0 NXP chip types

Thanks for contributing! We already added the new chip codes in the v2-dev branch. If you would like to re-target this PR to the v2-dev branch for the new nfc chip keyword, please see the changes requested below.

Thanks for contributing! We already added the new chip codes in the v2-dev branch. If you would like to re-target this PR to the v2-dev branch for the new nfc chip keyword, please see the changes requested below.

Done

For some reason this PR is shown as having conflicts with the v2-dev branch.

My original commit had SN1x0 instead of SN1X0, I did fix the conflict though, weird that it still showed conflicts. Rebased on v2-dev with the last change - should be good now for sure.

should be good now for sure

Looks good, no more conflicts. I had to request one more change unfortunately, sorry!

8

?


Config changes to reflect the default branch from master to main. Please merge to complete the default branch renaming job.

Auto branch renaming content.

Docs Build status updates of commit d2cf649:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error: GitBranchDeletedOrForcePushed] Cannot sync git repo to specified commit because branch cbce1cb3-d1bc-47d2-b65b-a4b0299f3107 has been deleted or has been force pushed

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


Make GitHub Actions see Errors (and Warnings)

Describe the bug
Any warnings in "Build Github Pages" of the Release are not shown to the user.
It was only in trouble-shooting another site that I discovered them in the release.
Reproduction Steps

Go to GitHub pages for your site

Click on Actions tab

Click on a previous Release

Click on the Release on the next page

Expand "Build Github Pages"

Look for Warnings. (see screenshot below)

URL of a source Notion page that, when docu-notion accesses or converts it, shows the problem:
https://jennibeadle.notion.site/Stage-3-Preparing-for-the-Consultant-check-b2e2a08bd0f44a7da06333d46250331c
URL of GitHub showing the warnings
https://github.com/sillsdev/paratext-manual/actions/runs/4060888616/jobs/6990404972
URL of Docusaurus page
https://sillsdev.github.io/paratext-manual/Stage-3
Expected behavior
If there are warnings, the user should be informed.
The Release ran without any errors.  So I was most surprised to stumble across the warnings.
Screenshots
Screenshot show warnings
I

OK, some progress on this.  With v10.0, we now get

and

We also now get "grouped" sections in the log:


Slash Commands, Interactions and Message Components

Adds new Discord API features like Slash Commands, Interactions and Message Components. Also contains functions for the automatic discovery and registration of Attribute based Application Command handlers. Has Custom ID based interaction handling and methods for creating UI Components. Slash Commands module is designed as an optional, separate package.

Could you pull the Interaction branch and open a pr for that branch, the slash command service branch is out of date


Patch image model

This PR updates the image model to Include the image_data as allowed property and updates the relationship target to prefer to use the data over the configured URL. Added a test to assert that the image_data value is set as expected. The base64 string contains a pink PNG pixel.
This solves #131

I'm guessing this isn't going to get merged in?


UART1 on STM32F0 Series not working: errors in makro to enable clock

STM32F0 Series has no real APB2 clock, but uses APB1 GRP2 instead.
UART initialization code in drivers/serial/uart_stm32.c for UART1 (UART6 to UART8 might be effected, too, but they are not present on the SoCs I have available) tries to initialize STM32_CLOCK_BUS_APB2 but should Initialize STM32_CLOCK_BUS_APB1_2 instead.
Same for the generated LL_APB2_GRP1_PERIPH_USART1 instead of LL_APB1_GRP2_PERIPH_USART1 that would be correct for F0 Series.
My temporary fix, generic enough, that it could work as a general fix, but still not beatuiful:
https://gist.github.com/DWagenk/6c37b20b3ffd8f92646d901ec25104ee#file-uart_stm32-c-diff
Anybody here that has a better fix? maybe just having a different #define for STM32_CLOCK_UART(...) on F0 that can "translate" APB2 to APB1, GRP2?

I wonder if we should finally keep this whole macro thing.
It's not the easiest to read, does not get better in time and might end up using more code than initial declarations.

fix merged to arm branch. closing it now.


Allow users to select and visualise multiple (but not all) lines of a visualisation

This isn't a 'must do', but instead one to have a discussion about.
Do we want to make it so that those engaging with a page can highlight multiple parts of a visualisation, but not all parts of it? e.g. highlight unemployed rate & economically inactive rate, but not Total NEET rate in the below visualisation?

@ODILMichelle Perhaps I'm missing something but I don't see "unemployed rate & economically inactive rate, but not Total NEET rate" in the screenshot.
The current implentation is my opinion. Things to think about for a more complex user interaction system... If you want to be able to select multiple series, how do you want to do that? Will that method work for mouse, keyboard, and touch inputs (to maintain accessibility)? Will it stop existing behaviours e.g. currently one click/touch/enter can quickly switch between different individual series?

Archiving this as it feels like a 'nice to have' not a 'must do'


Add rename button in all projects page

splitted from https://github.com/microsoft/pxt/pull/10016

@riknoll I don't know how pxt.tickEvent function works. Could you let me know briefly?

@sae220 LGTM! lint is failing because of trailing whitespace. you can run the lint locally with gulp lint

@sae220 we don't have a docker container or anything like that, but we have people who work on Windows, Linux, and MacOS on the team so they should all work fine! I personally use Ubuntu on WSL, and that's what I would recommend if you're on Windows

@riknoll
OK. I'll use Ubuntu on WSL.
Can I cherry pick this for stable9.3? As I said before, we can't rename projects in pxt-minecraft now.

please do! tag me in the PR


[Feature request] HugoMods module to integrate Sveltia CMS

Requested Feature
A HugoMods module to support the Feature rich Sveltia CMS, Alternative to Netlify/Decap CMS. Modern, fast, lightweight, Git-based headless CMS ... May be implemented as a global Module for headless Decap and Sveltia CMS
What is Sveltia
Alternative to Netlify/Decap CMS. Modern, fast, lightweight, Git-based headless CMS. Free & open source. UX-driven development. Made with Svelte.
Sveltia CMS is a Git-based lightweight headless CMS under active development as a modern, quick replacement for Netlify CMS and [Decap CMS](https://decapcms.org/). In some simple cases, migration is as easy as a single line of code change, although we’re still working on improving compatibility. The free, open source, UX-focused alternative to Netlify/Decap CMS
Third party integration
https://github.com/privatemaker/headless-cms
Hugo Module for headless Decap and Sveltia CMS
Best regards,
Tshitshi

Thanks for the idea, we have module for Decap CMS (larger community) already, https://github.com/hugomods/decap-cms, I'm not planing to implement an alternative.
Btw, I'd suggest sharing ideas on Discussion instead of this repo.


Path of models using Ollama with IPEX-LLM (Windows)

Hello.
I'm trying to figure out the path of the downloaded models when I run:
ollama pull <model name>
using the version of Ollama with IPEX-LLM.
It's not C:\Users\<username>\.ollama\models (obviously)

Actually it should be C:\Users\<username>\.ollama\models as default.

Well, no.
I tried to search the model after downloading it and it should be easy due to the size (> 4GB) but it was invisible - search couldn't find it.
So, I had to monitor the download procedure in real-time and I discovered that the path actually is:
C:\Windows\System32\config\systemprofile\.ollama\models
How can I set the default path to another location ? (e.g C:\Users\<username>\.ollama\models)

It works like a charm.
I had already seen the suggestion in FAQ and suggestions of "community ollama" but somehow I think this "Intel's ollama IPEX-LLM" version is something different with its own settings.


Image error control

Have you read the Contributing Guidelines on issues?

[X] I have read the Contributing Guidelines on issues.

Motivation
Greetings,
I am not 100% sure if this should be in the proposal part or the bug part but I chose to use the proposal issue because the thing I am going to write about is not exactly a bug, it is expected, I just think it can be handled in a better way.
So when you go to https://docusaurus.io/ and go to the Loved by many engineers part, tweets come up(The code has a component and it is mapped over by the data). I believe some twitter images are breaking for example this screenshot:

Mael and Kent's pictures' URL is broken and hence the img tag shows the alt name. I believe it would be much better if it showed a default avatar instead. This can be done in a few easy steps and I am willing (and excited) to work on this.
What are my next steps? I am open to suggestions!
Thanks.
Self-service

[X] I'd be willing to do some initial work on this proposal myself.

Yes that Twitter thing is a pain, as their image urls changes and they do not make it easy at all to get the image URL from an avatar (unlike GitHub
What I suggest we do instead:

add a githubUsername prop: all users on that list should have a GitHub account and the URL always work: https://github.io/slorber.png
read twitterUsername from the tweet URL prop, and use unavatar.io
Image URL = https://unavatar.io/twitter/<twitterUsername>?fallback=https://github.com/<githubUsername>.png
Example: https://unavatar.io/twitter/sebastienlorber?fallback=https://github.com/slorber.png

Do you want to contribute this?

Hey @slorber , I'd like to work on this issue!

@slorber I've created a PR for the issue!

@slorber I've created a PR for the issue!

Hey @abhinandanwadwa since i initiated this, i would like to fix this and make a pr. Please follow the same process from the next time. @slorber I'll be making a pr soon, hope that's fine.

@shawshankkumar sorry but our policy is that if you want to claim an issue you have to submit a draft PR first
This is to prevent people from saying that they will work on something, and then they ghost us and nobody works on the issue due to the issue being claimed, which happened a lot in the past.
This also saves maintainer time.
If you want to claim an issue, you have to demonstrate you really plan to work on it fast otherwise someone else will

@shawshankkumar sorry but our policy is that if you want to claim an issue you have to submit a draft PR first
This is to prevent people from saying that they will work on something, and then they ghost us and nobody works on the issue due to the issue being claimed, which happened a lot in the past.
This also saves maintainer time.
If you want to claim an issue, you have to demonstrate you really plan to work on it fast otherwise someone else will

Oh Okay. i had the code ready for the first one and was working on the second.  Thanks for your time.

sorry about that
the best way to contribute small issues such as this one is to directly open a PR with a fix proposal, demonstrating your intention to work on it. From there I can review your PR and suggest a possible better alternative if your approach is not good enough

That sounds great. I'll look for more!
On Thu, Dec 15, 2022 at 5:21 PM Sébastien Lorber @.***>
wrote:

sorry about that
the best way to contribute small issues such as this one is to directly
open a PR with a fix proposal, demonstrating your intention to work on it.
From there I can review your PR and suggest a possible better alternative
if your approach is not good enough
—
Reply to this email directly, view it on GitHub
https://github.com/facebook/docusaurus/issues/8436#issuecomment-1352948412,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AR22P3PVVOGO644XETD5ZTDWNMA35ANCNFSM6AAAAAAS44MWLA
.
You are receiving this because you were mentioned.Message ID:
@.***>


Enable optimisation in Cargo.toml of b3sum

Enable stripping, link-time optimization and and all compiler optimizations. This should make executables considerably smaller (~800kB instead of >4MB for Linux, through stripping and lto, could be improved by setting opt-level = "s", see The Cargo Book) and maybe faster (through lto and optimizations, although my dodgy tests didn't show any speed increase, could be because of a hard-drive bottleneck which would honestly be insane how fast this algorithm is).
I dun know yet how to exactly test performance of such performance-critical programs, the best I could to is make a sloppy test by writing like 10GiB of /dev/urandom to a file and then timeing the execution of b3sum, but I'm honestly super not trusting this method:
$ du test
10929668
$ time ./target/release/b3sum test
6edc4eb802feb666e4ee9fc388eab08c39906bc5d455ed14739ec6742017a47a  test
./target/release/b3sum test  2.18s user 4.83s system 187% cpu 3.735 total
$ c clean
$ c b --release
$ time ./target/release/b3sum test
6edc4eb802feb666e4ee9fc388eab08c39906bc5d455ed14739ec6742017a47a  test
./target/release/b3sum test  2.10s user 4.76s system 186% cpu 3.679 total

I also checked compile times, and they are staying very reasonable:
Before:
cargo b --release  51.84s user 3.73s system 562% cpu 9.883 total
After:
cargo b --release  36.13s user 3.18s system 300% cpu 13.088 total

Wait, why is it so much faster? I am- mildly confused...
Is there a reason this stuff hasn't been added yet?

Can we compare this to what some popular Rust binary crates are doing? In particular, it looks like ripgrep doesn't turn on these options. Maybe the idea is that individual packagers can turn on the options they prefer using environment variables? @burntsushi I'd be curious to get your advice about this. I don't see much when I search for "rust lto best practices" or similar.

Regarding performance testing, I don't expect any of these flags to have much impact in the default case either way. The most performance-critical parts are written in assembly, which won't be affected by these flags. However, it might be interesting to test the pure/portable Rust implementation, by measuring with --features pure.

From what I could see, compile times are largely unaffected here by LTO, but as you said so is performance. I think the things that I found more peculiar were stripping and optimization, especially the former, since it makes the file four times smaller, which I think is nice. For the other two I think I agree with »If it doesn't matter, why bother?«.

Should we maybe just remove LTO and Compiler Optimizations and only enable stripping? That part just seems like a free 75% reduction in file size, right?

How about we enable stripping in our internal CI build (the binaries that get hosted here on GitHub and attached to each release tag) but keep the defaults in Cargo.toml?

I think that actually sounds like a very good idea, Yes!
That can probably be easily automated, right? There is probably some option for enabling stripping on the command-line, something like cargo build --release --profile strip=true (that doesn't actually work, sadly) in the CI?

Looks like we might want to copy something like what ripgrep does here: https://github.com/BurntSushi/ripgrep/blob/4386b8e805e273a9795ad4e256c455c74407c949/.github/workflows/release.yml#L135-L146
And put it in between these two steps here: https://github.com/BLAKE3-team/BLAKE3/blob/7e15c5314ea0ca34c52fd39583b1aa7c07eac1ae/.github/workflows/tag.yml#L38-L45

Hmm, couldn't we just let Cargo take care of stripping, now that the feature is stabilized? I finally got to look up how, it seems to be cargo build --release --config strip=true, and that would need to be changed in build_b3sum.py


Projects page update

Description
#372 Projects Page EN/FR
I updated the experiment page to project page. The cards are updated as well.

Acceptance Criteria
Experiment cards should be 250px height for desktop and flexible height for mobile. Mobile cards should expand as needed based on content. The page should look like the new Figma design.
Test Instructions

Run the code and check the project page
Compare it with Figma design

Checklist

[ ] Strings use placeholders for translation (No hard coded strings)
[ ] Unit tests have been added/updated

Product and Sprint Backlog
Trello

@EphraimAssi any chance you could add a french translation value for this key into the french common translation file?
"footerSocialMedia": "Social media",

I added a french key for the Social media link in the footer

I also updated the report a problem size since the new french text doesn't fit in


Cleanup renderer code

Since we are now always redrawing the whole line if it was changed, we can remove all the overlapping code that was put in for the optimisations. This yields another very nice effect, because overlapping characters can now overlap to the next cell without us having to worry about a space character after them.

Coverage increased (+0.3%) to 70.523% when pulling 984173ca2dc12bba42e3f1d7b1910b26578ecc50 on mofux:render_cleanup into b06eb44c4552b46d1af3db4a0ff59d2ef1bfdc5f on sourcelair:v3.

Coverage increased (+0.3%) to 70.523% when pulling c3ab447f9161b277a76f21c03b97569a63101981 on mofux:render_cleanup into b06eb44c4552b46d1af3db4a0ff59d2ef1bfdc5f on sourcelair:v3.

I think we should hang onto this code for the time being, I'd like to reintroduce partial line clearing/redrawing by looking for words that are dirty. Will put a write up of the idea in an issue soon.

👍


fix(ci): branch protected

:tada: This PR is included in version 0.1.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


[CS] Allow ExprPatterns to be type-checked in the solver

Previously we would wait until CSApply, which would trigger their type-checking in coercePatternToType. This caused a number of bugs, and hampered solver-based completion, which does not run CSApply. Instead, form a conjunction of all the ExprPatterns present, which preserves some of the previous isolation behavior (though does not provide complete isolation). We can then modify coercePatternToType to accept a closure, which allows the solver to take over rewriting the ExprPatterns it has already solved.
This then sets the stage for the complete removal of coercePatternToType, and doing all pattern type-checking in the solver.
This PR also includes a couple of cleanups/fixes for getTypeForPattern, and some other pattern crasher fixes.
Resolves #61850
Resolves #63374
rdar://104954155
rdar://105782480
rdar://106598067
rdar://107709341
rdar://107420031
rdar://107724970

@swift-ci please test

@swift-ci please test source compatibility

@swift-ci please test

@swift-ci please test

@swift-ci please test

@swift-ci please test

@swift-ci please test

@swift-ci please test source compatibility

@swift-ci please test

Source compat failures match those on main

@swift-ci please test

@swift-ci please test source compatibility

@swift-ci please test

@swift-ci please test

@swift-ci please test

@swift-ci please test source compatibility

@swift-ci please test

@swift-ci please test

@swift-ci please test source compatibility

@swift-ci please test

@swift-ci please test

@swift-ci please test source compatibility

@swift-ci please test

@swift-ci please test Windows

@swift-ci please test

@swift-ci please SourceKit stress test

@xedin Mind taking a look at 406354935e93ebff5a9c08b7b9055e3560ee77e6? I believe that should be the only change since you last looked at this

@swift-ci please smoke test and merge

Going to stick to the conjunction implementation for now

@swift-ci please smoke test and merge

@swift-ci please smoke test and merge


 This resolves issues like that by using .*? instead of .* so that the closing +++ is matched as soon as possible.

Prior to making this modification attempting to build a Markdown page containing a unified diff would fail with an error like
[2:57:44] tucker@khanti:~/Projects/tuckersiemens.com git:(master*) $ gutenberg build
Building site
Failed to build the site
Error: Error when parsing front matter of file `/home/tucker/Projects/tuckersiemens.com/content/foobar.md`
Reason: expected a table key, found a plus at line 5

For reference, the unified diff contained in foobar.md was
--- foo.rs      2017-03-26 02:46:21.462163071 -0700
+++ bar.rs      2017-03-26 02:47:01.167966193 -0700
@@ -1,4 +1,4 @@
 fn main() {
-    let s = "Hello, Foo!";
+    let s = "Hello, Bar!";
     println!("{}", s);
 }

Thanks! Can you add a test for the case that was failing before so it doesn't happen again?

Sure! Would you like the tested content to be specific to unified diffs or just contain some extra +++?

The simplest test case that would have made it fail, so I guess some extra +++

I think that test does the trick. Let me know if the name doesn't cut it for you.

That works, thanks!


dupplicate resources line when décompiling apk

Hi,
When I try to decompile this app
https://play.google.com/store/apps/details?id=fr.leboncoin&hl=fr
I have got duplicate entries in res/*.xml files
I can't compile

Happens to me as well, with another apk.

+1 A lot of duplicate resources

Fixed


MultiTenant and NewDatabase prevent container start due to missing tenant id

Describe the issue
A new sandbox multitenant BC container cannot be created because the tenant ID in the SQL database is missing if the "useCleanDatabase " parameter is used at the same time. This is probably a rare unfortunate combination of parameters.
Flow:

Because of "useCleanDatabase" the container of type "sandbox" is created as a single tenant. => Result: The tenant id is missing in [dbo][$ndo$tenantproperty].

After creation Clean-Database  is executed => Remove-CompanyInBcContainer is called.

It tries to remove the company with Remove-NavCompany. But this does not work, because Tenant Id is not filled.

Parameter Set
BcContainerHelper version 1.0.19
Container: a34-gevis-c3 | Artifact: https://bcartifacts.azureedge.net/sandbox/17.0.17126.20616/de

Name                           Value
----                           -----
includeAL                      False
containerName                  a34-gevis-c3
licenseFile                    C:\Agents\Coral\_work\_temp\DefaultLicense.flf
shortcuts                      None
credential                     System.Management.Automation.PSCredential
updateHosts                    True
memoryLimit                    18G
alwaysPull                     True
artifactUrl                    https://bcartifacts.azureedge.net/sandbox/17.0.17126.20616/de
auth                           NavUserPassword
multitenant                    True
useTraefik                     False
accept_eula                    True
useCleanDatabase               True

Error
Initialization took 76 seconds
Ready for connections!
Reading CustomSettings.config from a34-gevis-c3
Removing company CRONUS DE from Default
The server "BC" was unable to process the request. The application will close.
at <ScriptBlock>, <No file>: line 3
The server "BC" was unable to process the request. The application will close.
at <ScriptBlock>, <No file>: line 3
##[error]> Error ####################################################
The server "BC" was unable to process the request. The application will close.
At C:\Program
Files\WindowsPowerShell\Modules\BcContainerHelper\1.0.19\ContainerHandling\Invoke-ScriptInNavContainer.ps1:39 char:13
+             Invoke-Command -Session $session -ScriptBlock $scriptbloc ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (0:Int32) [Remove-NAVCompany], FaultException`1
    + FullyQualifiedErrorId : MicrosoftDynamicsNavServer$BC/Default,Microsoft.Dynamics.Nav.Management.Cmdlets.RemoveNa
   vCompany
    + PSComputerName        : 84b840346be09d7a7a0392bebcd9f9188646c876d73723f7e3ecd09a6928a84b

##[error] Error: System.Management.Automation.RemoteException: The server "BC" was unable to process the request. The application will close.
##[error]< Error ####################################################
...

Screenshots
Container Output 1:

Content of the SQL Table:

Event Log:

Quite similar to: https://github.com/microsoft/navcontainerhelper/issues/1166

Quite similar to: https://github.com/microsoft/navcontainerhelper/issues/1166

Next version of the generic image will set the tenantid when creating a single tenant sandbox container.
You can add -myscripts @("https://raw.githubusercontent.com/microsoft/nav-docker/master/generic/Run/150-new/navinstall.ps1") to your new-bccontainer script in order to use the new installer now, then it should work.

Next version of the generic image will set the tenantid when creating a single tenant sandbox container.
You can add -myscripts @("https://raw.githubusercontent.com/microsoft/nav-docker/master/generic/Run/150-new/navinstall.ps1") to your new-bccontainer script in order to use the new installer now, then it should work.

Hi Freddy. Allright, thanks for the info. 👌 I will test that.
I already wanted to set a PR with the extension of "Remove-CompanyInBcContainer" to ensure that the Tenant Id is always filled before Remove-NAVCompany is executed. But if this will be filled directly in the future, this is not necessary anymore. 😊
Snippet:
Invoke-ScriptInBcContainer -containerName $containerName -ScriptBlock { Param($companyName, $tenantId)
    Write-Host "Removing company $companyName from $tenantId"

    $tenant = Get-NAVTenant -Tenant $tenantId -ServerInstance "BC"
    $result = Invoke-Sqlcmd -Query 'Select * From [$ndo$tenantproperty]' -Database $Tenant.DatabaseName
    if(!$result.tenantid) {
        Write-Host "Fill TenantId $tenantId in Tenant Property"
        $query = 'UPDATE [dbo].[$ndo$tenantproperty] SET [tenantid] = ''{0}'' WHERE [tenantid] = '''' ' -f $tenant.Id
        Invoke-Sqlcmd -Database $tenant.DatabaseName -Query $query
        Restart-NAVServerInstance "BC"
    }

    Remove-NavCompany -ServerInstance $ServerInstance -Tenant $tenant.Id -CompanyName $companyName -ForceImmediateDataDeletion -Force
} -ArgumentList $companyName, $tenant

Hi Freddy. Allright, thanks for the info. 👌 I will test that.
I already wanted to set a PR with the extension of "Remove-CompanyInBcContainer" to ensure that the Tenant Id is always filled before Remove-NAVCompany is executed. But if this will be filled directly in the future, this is not necessary anymore. 😊
Snippet:
Invoke-ScriptInBcContainer -containerName $containerName -ScriptBlock { Param($companyName, $tenantId)
    Write-Host "Removing company $companyName from $tenantId"

    $tenant = Get-NAVTenant -Tenant $tenantId -ServerInstance "BC"
    $result = Invoke-Sqlcmd -Query 'Select * From [$ndo$tenantproperty]' -Database $Tenant.DatabaseName
    if(!$result.tenantid) {
        Write-Host "Fill TenantId $tenantId in Tenant Property"
        $query = 'UPDATE [dbo].[$ndo$tenantproperty] SET [tenantid] = ''{0}'' WHERE [tenantid] = '''' ' -f $tenant.Id
        Invoke-Sqlcmd -Database $tenant.DatabaseName -Query $query
        Restart-NAVServerInstance "BC"
    }

    Remove-NavCompany -ServerInstance $ServerInstance -Tenant $tenant.Id -CompanyName $companyName -ForceImmediateDataDeletion -Force
} -ArgumentList $companyName, $tenant

Next version of the generic image will set the tenantid when creating a single tenant sandbox container.
You can add -myscripts @("https://raw.githubusercontent.com/microsoft/nav-docker/master/generic/Run/150-new/navinstall.ps1") to your new-bccontainer script in order to use the new installer now, then it should work.

Test ran through .🤗 That helped me. Thank you!

Next version of the generic image will set the tenantid when creating a single tenant sandbox container.
You can add -myscripts @("https://raw.githubusercontent.com/microsoft/nav-docker/master/generic/Run/150-new/navinstall.ps1") to your new-bccontainer script in order to use the new installer now, then it should work.

Test ran through .🤗 That helped me. Thank you!


speedup: isolate google translate widget

Publish new web component that contains the google translate widget code and can be used in the statewide site header. Keep track of whether the translate widget has been used so an active translate session can be maintained. Delay loading of the translate widget until click if it has not been activated before

Related PRs opened:
https://github.com/cagov/cannabis.ca.gov/pull/292
https://github.com/cagov/design-system/pull/37


nsfw commands if you want

be lucky i added it i almost died again.

Keep this open, but I won't accept it now because of these reasons:

I haven't decided whether NSFW is a good choice for my bot or not. Most likely, yes.
Real (human) NSFW is way too much of an ache on my eyes. I'd rather do simpler stuff like hentai instead.

Reply with your say, plox.


Bug : Material-UI: the anchorEl prop provided to the component is invalid.

On Firefox:
The anchor element should be part of the document layout.
Make sure the element is present in the document or that it's not display none.
Error on Chrome:
checkPropTypes.js:20 Warning: Failed prop type: Material-UI: the anchorEl prop provided to the component is invalid.
The anchor element should be part of the document layout.
Make sure the element is present in the document or that it's not display none.
in ForwardRef(Popover) (created by WithStyles(ForwardRef(Popover)))
in WithStyles(ForwardRef(Popover)) (created by ColorPicker)
in div (created by ColorPicker)
in ColorPicker (created by Uncontrolled)
in Uncontrolled
in Unknown
in ThemeProvider (created by ThemeProvider)
in ThemeProvider (created by ThemeProvider)
in StylesProvider (created by ThemeProvider)

check this it will help you - https://codesandbox.io/s/use-ref-for-anchorel-forked-1pvh1

Thanks @sherinshaju but it should be fixed ;-)

Hello ANy on ehelp me out plx when I am logout my application thats show me above error and display menu or popover

check this it will help you - https://codesandbox.io/s/use-ref-for-anchorel-forked-1pvh1

I cant get the code, facing the same issue.

facing the same issue , anyone got the code

check this it will help you - https://codesandbox.io/s/use-ref-for-anchorel-forked-1pvh1

facing the same issue, sandbox is not opening

facing the same issue, is there any way to fix it?

facing the same issue, how did you guys fix it ?


Is "c:\work\ca.pem" the right path for the SSL certificates included on App Service platform?

Section 4 of the FAQ states:

What is the impact if using App Service with Azure Database for MySQL?
For Azure app services, connecting to Azure Database for MySQL, we can have two possible scenarios and it depends on how on you are using SSL with your application.

This new certificate has been added to App Service at platform level. If you are using the SSL certificates included on App Service platform in your application, then no action is needed.
If you are explicitly including the path to SSL cert file in your code, then you would need to download the new cert and update the code to use the new cert.

I can't find any information on how the check I'm using, by default, the right certificate. Based on the documentation and wording it seems that if a SSL connection is currently being used, it will indeed use the App Service platform certificates. But its implied, not directly stated, and there are no instructions in the docs to check which scenario we are in.
We are running a Azure VM with Ubuntu 18.04. We are not setting any path to the CA cert at the code level (PHP) and using default PDO connection settings. However, when connecting directly to the database using mysql -u command on bash (no ssl option set) from the same Azure VM running the app, the connection is shown as SSL enabled when running mysql> status.
When running SHOW VARIABLES LIKE '%ssl%'; on the same connection and VM, the output is:
mysql> SHOW VARIABLES LIKE '%ssl%';
+----------------------+------------------+
| Variable_name        | Value            |
+----------------------+------------------+
| azure_ssl_early_init | OFF              |
| have_openssl         | YES              |
| have_ssl             | YES              |
| ssl_ca               | c:\work\ca.pem   |
| ssl_capath           |                  |
| ssl_cert             | c:\work\cert.pem |
| ssl_cipher           |                  |
| ssl_crl              |                  |
| ssl_crlpath          |                  |
| ssl_key              | c:\work\key.pem  |
+----------------------+------------------+
10 rows in set (0.01 sec)

Is this the right path for the "SSL certificates included on App Service platform" mentioned in the docs?

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: f658e3b9-7022-ba3f-2ee5-001425fab562
Version Independent ID: 20f7b87a-3aa6-c326-8cc7-2cab9238a369
Content: Certificate rotation for Azure Database for MySQL
Content Source: articles/mysql/concepts-certificate-rotation.md
Service: mysql
GitHub Login: @kummanish
Microsoft Alias: manishku

@Letsan Thank you for the feedback. We are actively investigating and will get back to you soon.

@Letsan You can find the appropriate location of certificates as mentioned in below screenshot depending on operating system:

For more details please refer to the article:
https://docs.microsoft.com/en-us/azure/app-service/configure-ssl-certificate-in-code

@Letsan We will now proceed to close this thread. If there are further questions regarding this matter, please comment and we will gladly continue the discussion.

Hello @AnuragSharma-MSFT thanks for your reply. It seems this information only applies to App Service containers and virtual machines, and not for Linux Virtual Machines running on Azure. I checked and the /var/ssl directory doesnt exist.
After all this I assume "normal" Linux VMs do not include the aforementioned CA certificate. It's weird that Mysql reports c:\work\ca.pem as the CA certificate in use, although the connection string and config files do not set a CA path explicitly and the c:\/work\ca.pem location doesn't exist on the filesystem.
I'll just make sure sslmode is set to preferred.


Update Creator.php

return content stub

Thanks, looks completely valid to me! (I wonder why this slipped through the tests, I'll add some more functional tests soon)


brew install - neither as root nor as user, so how

Hi,
Sorry for this lame question, but
I would like ot install brew on debian 9.

If I run the comand you suggest in the repo brew-install as root, it returns that I shouldn't do it as root.

Ok

If I run it as an other ssh user, is says that i'll need a password to install it in /home/linuxbrew/.linuxbrew, but if I press enter, linuxbrew is installed in a diferent directory /var/www/some/IPSConfig/folders/.linuxbrew
if I run su, before install, I logically end up as root, and
if I run sudo sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)" ; I'm asked for a password but neither my ssh user password nor my root password works.

So how ? As you suggest to install brew in /home/linuxbrew/.linuxbrew
Thank's in advance

Use su to create a user named linuxbrew, and give the linuxbrew user password-less access to sudo. See for example:
https://github.com/Linuxbrew/docker/blob/ae70717907c35770fc7b5b78050f63c37a049548/debian/Dockerfile#L22-L23
Even easier if you like is to use su to create an empty directory named /home/linuxbrew/.linuxbrew owned by the current user.

Thank you very much !
may I suggest an upadate to the install page.
I
Remove your second sentence from where it is and
II
Slightly edit the "Install Linuxbrew" section" as such :
Linuxbrew can be installed in your home directory and does not require root access.
The installation script installs Linuxbrew to /home/linuxbrew/.linuxbrew if possible and in your home directory at ~/.linuxbrew otherwise.
You may thus create a new user named linuxbrew with password-less access to sudo, but It' not mandatory.
useradd -m -s /bin/bash linuxbrew \
&& echo 'linuxbrew ALL=(ALL) NOPASSWD:ALL' >>/etc/sudoers

Paste a ...
Follow the Next steps instructions to add Linuxbrew to your PATH and to your bash shell profile script, either
on Debian/Ubuntu
test -d ~/.linuxbrew && PATH="$HOME/.linuxbrew/bin:$HOME/.linuxbrew/sbin:$PATH"
echo "export PATH='$(brew --prefix)/bin:$(brew --prefix)/sbin'":'"$PATH"' >>~/.profile

On CentOS/Fedora/RedHat
test -r ~/.bash_profile && echo "export PATH='$(brew --prefix)/bin:$(brew --prefix)/sbin'":'"$PATH"' >>~/.bash_profile
echo "export PATH='$(brew --prefix)/bin:$(brew --prefix)/sbin'":'"$PATH"' >>~/.profile

You're done, check the dependencies and Try installing a package.

Any how thank's again.

Good suggestion. I have my hands full this week. Feel free to ping me again next week if it slips my mind.

I agree, installing is very confusing...

The intention is that the one-line installation at http://linuxbrew.sh/#install-linuxbrew works. Please report a bug if it doesn't work for you.

I was already logged in as root, and then i ran the one-line installation. It only installed ruby (i think), but i thought that the installation that run was the complete Linuxbrew install. After the installation i got the warning "don't run this as root". It created /home/linuxbrew/ with some stuff inside, but not the linuxbrew binaries.
Perhaps it would be useful to display the "don't install as root" before anything happens at all, so you don't end up with a partly installed folder?
Anyways, in the end the one-line installation worked, after i removed the half-installed-folder.

Perhaps it would be useful to display the "don't install as root" before anything happens at all, so you don't end up with a partly installed folder?

That's a good suggestion. An alternative would be that when the install script is run as root it could create a user named linuxbrew if one doesn't already exist. This feature would be particularly useful for installing Linuxbrew in a Docker container. Alternatively, it could print the commands to the console to create the linxubrew user. I think the latter is probably the least surprise. Or it could prompt the user to hit Enter to create a linuxbrew user or Control-C to cancel installation. I like this last idea the best.
@iMichka @maxim-belkin Which is your preference?

I think it is totally reasonable to expect system admins to be installing Linuxbrew for their users. So, I think it should ask admin if he really wants to create linuxbrew user (y/n) and proceed based on response. I'm not a fan of just pressing Enter but it will work too.

Forgot to add that we should explicitly say which commands we're going to execute as root.


Correcting Rstudio-server Installation

Do not change the location of installation and use gdebi instead.

thx for the reminder - the bug has already been fixed in #49


Doc Updates

🛠 Description
Doc updates for 0.0.2
Fixes #(issue)
📷 Screenshots
🔬 How has this been tested?

[x] 🫰 PS -WhatIf / az validate
[x] 👍 Manually deployed + verified
[ ] 💪 Unit tests

Incorporated these changes with feedback into #315


firewall_nat_edit.php display bug fix

If interface is not set, it will throw warning in POST page, because $pconfig['ipprotocol'] is not predefined as array like GET.
PHP Warning:  in_array() expects parameter 2 to be array, null given in /usr/local/www/firewall_nat_edit.php on line 542

@safly  can you provide the exact steps needed to replicate this? $pconfig['interface'] should contain an array, due to the initialisation. (it doesn't fail on my end, using latest master)

@AdSchellevis Sure :)
As I mentioned, it will throw warning in POST page if you leave 'Interface' empty.

As you said, it was set to an array during initialization, but only for GET.

When it comes to POST, it only does verification. Personally the best solution is to avoid errors in the UI display so as not to make the code look complicated (than adding another judgement for it).

@safly I'm not sure why I couldn't reproduce it the first time, but we should indeed prevent warnings from happening. As of php 7 we seem to be able to use the ?? operator (https://www.php.net/manual/en/migration70.new-features.php#migration70.new-features.null-coalesce-op).   Thanks for reporting.


Re-adjust histogram buckets

This PR re-adjusts histogram buckets, as a follow-up to #1545.
Re-adjust smaller low latency buckets and limits maximum bucket size to default query timeout limit for read path.
Signed-off-by: Kemal Akkoyun<EMAIL_ADDRESS>
[ ] I added CHANGELOG entry for this change.
[ ] Change is not relevant to the end user.

Changes

Refactor histogram buckets.

Verification

make test-local
MINIO_ENABLED=1 ./scripts/quickstart.sh and curl /metrics.

cc @bwplotka


issue running openai.File.create

search_file = openai.File.create(
  file=open("olympics-data/olympics_search.jsonl"),
  purpose='search'
)

openai.error.InvalidRequestError: 'search' is not one of ['fine-tune'] - 'purpose'

The error message you are encountering is indicating that the purpose argument you are passing to the openai.File.create method is not valid. The purpose argument must be either 'fine-tune' or 'test'.
If you're looking to use the file for searching, it seems like you might have the wrong API. It looks like you're using the OpenAI API, but the purpose argument only applies to the GPT-3 fine-tuning API, which is used to train a language model on specific tasks.
If you're looking to search within a file, you'll need to write some code that reads the file and performs the search. You can start by opening the file with the open function, and then reading its contents line by line, searching for the desired information as you go.
Here's an example in Python that demonstrates how to search for a specific string within a file:
Open the file
with open("olympics-data/olympics_search.jsonl") as file:
# Read each line of the file
for line in file:
# Check if the desired string is in the line
if "desired string" in line:
# If the string is found, print the line
print(line)

Exactly, the only place you can pass in purpose is for fine tuning. Some API endpoints like: https://platform.openai.com/docs/api-reference/files/list do return the search parameter, but you cannot pass it in.

Then why was it not stated in their documentations, this is just the same with not having a documentation at all because it's misleading. I have spent weeks going all round that specific line of code with the same error, read their api documentations countless times and even upgraded my account just for this. How disappointing😞

This might help https://github.com/openai/openai-cookbook/tree/main/transition_guides_for_deprecated_API_endpoints