text:
Use useEffect instead of useDeepCompareEffect in GroupChannelListProvider

Fixes

https://sendbird.atlassian.net/browse/CLNP-5966
https://sendbird.atlassian.net/browse/CLNP-5967
https://sendbird.atlassian.net/browse/CLNP-5969
https://sendbird.atlassian.net/browse/CLNP-5971
https://sendbird.atlassian.net/browse/CLNP-5973

When to use useDeepCompareEffect vs useEffect
useDeepCompareEffect is useful when:

Handling objects without guaranteed immutability

const complexObject = {
  settings: {
    theme: { ... },
    preferences: { ... }
  },
  data: [ ... ]
};

useDeepCompareEffect(() => {
  // When you want to detect actual value changes
}, [complexObject]);

Working with data from external libraries or APIs

When objects have new references but identical content

Dealing with deeply nested objects where memoization is impractical

When object structures are too complex for individual memoization

useEffect is better when:

Detecting changes in array items

const items = [{id: 1, value: 'a'}, {id: 2, value: 'b'}];
// Better for detecting changes within array items
useEffect(() => {
  // Detect changes in items array
}, [items]);

Performance is critical

Deep comparison is computationally expensive
Especially important for large arrays or frequently updating data

Example of proper useDeepCompareEffect usage:
useDeepCompareEffect(() => {
  updateState({
    ...configurations,
    ...scrollState,
    ...eventHandlers,
  });
}, [
  configurations,
  scrollState,
  eventHandlers,
]);

This works well here because:

Dependencies are mostly objects
Updates are needed only when internal structure changes
Objects are already memoized, reducing deep comparison cost

Key Takeaway:

Use useDeepCompareEffect when structural equality matters
Use useEffect for reference equality or primitive value changes
Consider the trade-off between performance and accuracy

위의 변경점이 어떻게 이슈들을 해결하는지 제가 이해를 못 한 것 같습니다. 혹시 간단한 설명 부탁드릴 수 있을까요?
또, useDeepCompareEffect()를 introduce했던 이유 중 하나는 groupChannels의 경우 useEffect()의 dependency list에 넣을 경우 state update 시 infinite loop가 발생했기 때문이었습니다. 현재 CI에서 발생하고 있는 에러가 해당 에러입니다. 혹시 테스트 케이스쪽에 문제가 있는 거면 수정하겠습니다.

authors: AhyoungRyu git-babel

repo: sendbird/sendbird-uikit-react


text:
Update symfony.md

Replace dead link
http://www.symfony-project.org/gentle-introduction/1_4/en/11-Emails
with correct link
https://symfony.com/doc/current/email.html
Description of the change:
Reason for the change:
Link to original source:

Closes #

Hello @dharmendra-lingaiah,Thanks again for the PR! It's HACKTOBERFEST! We want to show our appreciation by sending                                              you some special Hacktoberfest swag. If you have not already, could you please fill out                                              this form so we can send it to you? Thanks!                                             Team SendGrid DX

source: gharchive/pull-request

authors: dharmendra-lingaiah thinkingserious

repo: sendgrid/docs

license: MIT

license_type: permissive

license_source: github-api


text:
Update getting-started-with-automation.md

Description of the change:
Reason for the change:
Link to original source:

Closes #

Hello @mollyfriederich,Thanks again for the PR! We appreciate your contribution and look forward to                                              continued collaboration. Thanks!                                             Team SendGrid DX

authors: mollyfriederich thinkingserious


text:
Merging Develop into Master 12.16.2019 - Adding link unsub page to KC, fixing broken links

Description of the change:
Reason for the change:
Link to original source:

Closes #

Hello @Whatthefoxsays,Thanks again for the PR! We appreciate your contribution and look forward to                                              continued collaboration. Thanks!                                             Team SendGrid DX

authors: Whatthefoxsays thinkingserious


text:
Bleeding Out

Ok, about 10 hours in and I'm finally starting to get light headed.  I slit my wrists hours ago and its just now starting to pay dividends.
I'm having trouble determining if Seneca was an April fool's joke of some kind, or if its for real.  Hopefully you can clarify it for me, but nothing makes sense at all.  I mean, I understand everyone's time is limited, and I don't mind contributing.. but I can't get off the ground at all with Seneca.
Ok, well, looks like a clot is forming.. I might actually make it.. wow.  I guess I may as well keep explaining then...
I've tried approaching it from three or four different angles now.. but every time I get near to the end I hit a roadblock.  Sometimes its just wacky looking code, other times the documentation just stops.
This module, for example, has several references to Redis and the default Redis port.
      redis: {
        timeout:  so.timeout ? so.timeout-555 :  22222,
        type:     'redis',
        host:     'localhost',
        port:     6379,
      },

I can't tell if you did that on purpose, or not.. and I cannot tell what arguments I need to pass in to listen({}) to get it to connect to my server.  Like, what happened here?:
amqp.connect('amqp://localhost', function (error, connection) {

I'm trying to understand what I could be missing, because to me it looks like a hard coded address and it doesn't matter what options I pass?
Ok, maybe you did that by mistake, no problem.. mistakes happen.  But... then I see this...

Tested on: Node 0.10.31, Seneca 0.5.21

Oh?  This is tested?  So, maybe its not a mistake... I mean, heck, if its passing tests.. I must be looking at this wrong.  I'd love to cross-reference my code with your example, but when I pasted your example into my IDE...

.. it didn't do anything.  Ok, so, I start investigating your tests to see how you did that ...
var test = require('seneca-transport-test')
...
it('happy-any', function( fin ) {
   test.foo_test( 'rabbitmq-transport', require, fin, 'rabbitmq', -6379 )

What the?  What is a transport test?  What does "happy-any" mean?!  ... and there's that Redis port again... but negative!  Uh, ugh... I don't know what's going on here...
Of course, I'd be fine using Redis, so, I start down that road... until ...

NOTE: This is broadcast transport. All subscribed micro-services receive all messages.

Hold on... why would anyone want to do that?  Doesn't that sort of defeat the whole idea?  If I have a "send-email" service, and something compels me to add a second instance, I'd then be sending two emails instead of one?

ALSO READ: The seneca-transport readme has lots of introductory material about message transports. Start there if you have not used a message transport before.

No it doesn't .. it focuses on one type of transport, but nothing it says there lends itself to Redis or RabbitMQ... as best as I can tell anyway.  HTTP is entirely unlike Redis and RabbitMQ... in function and in implementation.. so, seneca-transport doesn't help at all...

For a gentle introduction to Seneca itself, see the senecajs.org site.

Gentle is an understatement.. I ran through that and am still here not knowing anything.

If you're using this plugin module, feel free to contact me on twitter if you have any questions! :) @rjrodger

yo rj, cn u tel me wts up with #seneca bro? im tryn to cfg it 4 dist prc on or ntwk, plz h.... (character limit exceeded) arrgghhggg

"Embrace the technical debt"

Sure!  I'll buy a box of that.. I love this idea of small parts!  But http transports aren't going to let me scale up very efficiently at all...

"Fire up a few math.product servers, put them behind a load balancer, and now you have a scalable system too."

Wait... load balancers?  ... for math.product?  A bit granular eh?  How many load balancers am I going to need on each VM?

"Scale later.."

Yeah, but our site already gets 2M visitors each month, I kinda need to scale a little bit.... like... right now... nothing crazy, but ... I can't build this for 6 users...
Ok, wait dude.. am I missing the point entirely or something?  I must be.. there's no other explanation.  Surely this microservices thing is an extreme approach to SOA, I get it, I love it... but one of the whole points of SOA is disproportionate scaling, right? So... this library keeps multi-server apps as first-class, right?  Like AWS Lambda, which says ...

Each event is processed individually so thousands of functions can run in parallel and performance remains consistently high regardless of the frequency of events.

But Seneca sure doesn't seem that way... as far as I can tell its just providing a way to organize your code on a single server, maybe multi-threaded, simple app.  Please tell me where I'm going wrong.
I followed you down this path with resilience because of the number of NPM modules you have.  To me it looks like you've got all of the bases covered, and I like that sort of thing.  Then I notice you've been asked to speak at several conferences... I like that sort of thing too.. so, sure, "I'll give this thing a few days.. its gotta be good!", I thought to myself.
Then I dive in and its blowing my mind.
Any help would be much appreciated, I'm sure that I'm just being ignorant.  My comments were not meant to be dickish, I'm just trying to convey my thought processes and my journey to where I'm at so that we can get on the same page.   Any smart ass remarks were just meant to lighten the mood :)  -- thanks again.

@vmadman any luck? or have you abandoned seneca?
i'm trying it out on my app. i'm finding this code confusing as well.

@boxxxie dropped it soon after writing the above.
Check out "Harmonia", we've had success with it.  https://github.com/colonyamerican/harmonia

@vmadman Thanks for sharing "Harmonia". It is more easy and making sense. I am new to micro services. I needed to use micro services and event sourcing, i started searching and at last i reached here passing by "seneca", and faced same issues as you stated above.  I just needed to know that, is  "Harmonia" like "Seneca" for micro services ? or it is something else ?. Your reply and a bit explanation on this will really be appreciated. Thanks

Its hard for me to know if its like Seneca because I never got close to a Seneca proof-of-concept.  I also want to leave room for the idea that I may have a error somewhere in my own understanding of micro-services and micro-service architectures (though I, at least, have no reason to think that such an error exists, for what its worth).  Most of what I personally know about micro-services is based on Martin Fowler's writings: http://martinfowler.com/articles/microservices.html
With that said, we are using Harmonia to create small applications (service providers) that attach to a RabbitMQ queue and wait for a single type of job on the queue to come around.  Once a job is received it will begin processing it and stop listening for new jobs until the job is complete.  After the job has executed, it will return a result back onto the queue and resume listening.
This configuration gives us an easy way to scale our systems by individual service and to offload our distributed processing concerns onto RabbitMQ almost entirely.
I hope this helps.

concurrency - This is the AMQP prefetch (how many messages will be delivered from the queue at once).
I think we can add concurrent jobs onto the queue.

Concurrency is a non-issue for us, or it is rather a systems level concern.
Each worker is a process and each worker has a concurrency of one.  They will all work until there is no more work to do.  If one type of job is consistently being created faster than it can be processed, we increase the number of workers of that type.  We can measure this easily because each job type has its own queue, so by averaging the queue size we can see a summary of the loads by job.
.. but there are dozens of ways to accomplish the same thing and the differences between each method are usually negligible.

any ideas how to consume the services (created by "harmonia") through HTTP i.e. GET request, specifically on which port ?

@vmadman I'm going to close this. There are some big updates coming to this module and Seneca in general. Appologies for nobody getting in touch.

source: gharchive/issue

authors: boxxxie mcdonnelldean suhailamir vmadman

repo: senecajs/seneca-rabbitmq-transport

license: mit

license_source: bigquery


text:
Purchase tools

Tools to get

[ ] mitre saw
[ ] planer
[ ] nail gun
[ ] new circular saw?
[x] new drill set?
[ ] multi-tool thingy
[x] tent

Was planning to do this over the weekend, I think I will do this while I'm in Tokyo instead. Have them delivered the Sunday I get back.

also need hand tools

[ ] saws

I'm suddenly feeling like I shouldn't spend too much money on tools, so I'm probably not buying any of these tools unless necessary.
I bought a new drill because my old one burnt old. It's a Makita something, uses the same 18V battery as my lawn mower. I might get the matching impact driver to match in future, once the Ryobi one burns out as well.

repo: senhongo/shed


text:
Feature Request: Impliment state file functionality in SDK

Rationale
Some check patterns require a small amount of state for correct operation. Lets bake that functionality into the SDK.
Check State Use Cases

log checking -> to keep up with file seek location to optimize log file reading
rate threshold checks -> many existing check threshold patterns currently require checks to internally wait and call an operation twice in order to calculate a rate. This behavior could be better optimized if the sdk kept a state file to be used.

Implementation requirements derived from current sensu-log-check implementation
Operational requirements/assumptions

Must assume the same plugin executable may be run with different settings on the same agent as different checks or check hooks, and each will need a different state file.
State file is a single access at a time.
State file contents must be able to represent a json-like golang struct with nested maps and slices.

Basic functionality needed

Function to read state filepath into corresponding golang struct pointer

return nil if state file is missing or empty
return error if read permission error or similar

Function to write golang struct pointer into state file

silently create file if missing.
return error if write permission error or similar

Advanced Functionality
If possible, implement state file with client access locking aware so that check can hold a lock on the file while the check is operating preventing a second check from access the file.   This will prevent operators from accidentally using the same state file for multiple independently running checks or check hooks.
Hypothetical plugin check operation with locking

Pass state filepath as cmdline argument and save into plugin level attribute
Establish state file session enabling file access lock automatically at start of check execution function, defer session close  as part of check execution function as part of normal SDK operation.
Read state filepath contents and hold in golang struct pointer as part of check execution business logic.
Perform additional check operation business logic
Write golang state struct pointer into state filepath as part of check execution business logic
Perform remaining chec operation business logic
run deferred close state file session dropping the client access lock at check execution end

This looks good, thanks @jspaleta 👍
Just a few comments:

State should be check-based, not plugin-based. Check names must be unique (even if they share a given asset/plugin), and agent already guards against multiple concurrent executions of a given check. This should eliminate the need for locking / guarding against concurrent reads/writes.

"Must assume the same plugin executable may be run with different settings on the same agent as different checks or check hooks, and each will need a different state file."
State file is a single access at a time.

It would be good to standardize on JSON for all statefiles

State file contents must be able to represent a json-like golang struct with nested maps and slices.

Should this be a sensu/sensu-go issue? We already have a type for this which already has JSON serialization/deserialization support: the Sensu Event. What if the agent just kept a copy of the previous event payload (in memory, or written to an actual statefile), and then made the previous event state available in a deterministic way (e.g. set a SENSU_PREVIOUS_EVENT environment variable with the event contents, or a SENSU_PREVIOUS_EVENT_STATEFILE path to the statefile)? This could provide access to the previous event entity configuration, labels, annotations, and even metrics.

I'm not sure I'm happy replacing sensu-check-log's state file with a sensu event and encoding all the file path names as arbitrarily long annotation keys and all the integer type seek offsets as strings values in the annotations.
For log check, being able to have an arbitrary golang struct instead of Sensu event is probably the better fit because the state needed there is never exposed in a sensu event.
So could you encode a sensu event as the state contnet in this implemtnation.. sure. Would it make sense to default to that in the template plugin repos that other plugins are derived from ? Sure.  But I do not think Sensu event as structured right now is expressive enough for what log check functionality needs.  If the SDK only implemented sensu event as state, I don't think check log would be able to use it.

I think I have to -1 this one? This is scope overreach and won't save much code in SDK consumers, if they even want the semantics we prescribe.

authors: calebhailey echlebek jspaleta

repo: sensu/sensu-plugin-sdk


text:
Added hooks support #836

Pull Request Checklist
Introduces support for hooks
Description
Commit addes the hooks parameter to the sensu::check define
Related Issue
Fixes #836
Motivation and Context
How Has This Been Tested?
Spec tested.
Integration test on PSICK setup.
General

[ ] Update README.md with any necessary configuration snippets

[x] New parameters are documented

[x] New parameters have tests

[x] Tests pass - bundle exec rake validate lint spec

Can you please add a test for us to verify this works in vagrant.

@dzeleski Could you please test that this works for you before we release it. Thanks!!!

Yep will do, working on that now. Might have to get back to you first thing in the morning though as I have to leave around 6pm EST tonight.

Inputs and outputs below, let me know if you need anything else tested. @ghoneycutt
Input:
sensu::check{ 'cl-pup-healthcheck-puppet_pemaster':
    command     => '/opt/sensu/embedded/bin/ruby /opt/sensu/embedded/bin/check-puppet-healthcheck.rb',
    handlers    => 'linux_handler',
    interval    => 300,
    subscribers => 'puppet_pemaster',
    standalone  => false,
    occurrences => 1,
    notify      => Service['sensu-enterprise'],
    hooks       => {
      critical => {
        command => 'test command',
        },
    },
  }

Output:
{
    "checks": {
        "cl-pup-healthcheck-puppet_pemaster": {
            "command": "/opt/sensu/embedded/bin/ruby /opt/sensu/embedded/bin/check-puppet-healthcheck.rb",
            "handlers": [
                "linux_handler"
            ],
            "hooks": {
                "critical": {
                    "command": "test command"
                }
            },
            "interval": 300,
            "occurrences": 1,
            "standalone": false,
            "subscribers": [
                "puppet_pemaster"
            ]
        }
    }
}

@ghoneycutt Added vagrant test manifests and check on the name of the hooks (I didn't realise that only some specific values are accepted) with relevant spec test.
Rebased and ready to merge (if travis won't surprise me).

Thank you everyone for your help getting this implemented!!
Released in v2.39.0

authors: alvagante dzeleski ghoneycutt

repo: sensu/sensu-puppet


text:
[HELP] AWSProductRequest to download SAFE files no longer in the codebase?

I have not used SentinelHub for a while, and so the code I have (version 3.3.1) for downloading Sentinel-2 level-1C SAFE files is:
from sentinelhub import AwsProductRequest

def download_sentinel_2_imagery(s2_1c_dir: Path, product_id: str):
    """Download Sentinel-2 Level-1C .SAFE products from Amazon Web Services."""

    product_request = AwsProductRequest(product_id=product_id, safe_format=True,
                                        data_folder=s2_1c_dir)
    product_request.save_data()

Where the product_id is in this format S2A_MSIL1C_2023T**_N****_R***_T****_2023T**  (asterisks in place of actual values)
What function has sentinelhub replaced AwsProductRequest with in the most recent version 3.10?
Many thanks in advance for help.

There was an example for download of Sentinel-2 SAFE files:
https://github.com/sentinel-hub/sentinelhub-py/blob/4753c158b84855b2727de6eb391208f299f28c96/examples/aws_request.ipynb
But this was removed in November 2023 (so quite recently): https://github.com/sentinel-hub/sentinelhub-py/commit/29737dcc854c40f75f1ee073e48485542cbd72c4
Is there anything to replace the data_request AWSProductRequest function?

Hi @datalass1,
the aws module is no longer actively maintained, hence the removal of the example.
However the code is still there, but i cannot guarantee for how long (currently there are no plans to remove it in the near future, but that could change). But now you need to import things more directly via from sentinelhub.aws import AWSProductRequest.
You will also get some deprecation warnings, but you can ignore those if this is what you need

You can also check out how to access the data through the Copernicus Data Space Ecosystem

hello @zigaLuksic, I have amended all my code now to use CDSE, the blog was perfect with python code examples to use. Many thanks!

repo: sentinel-hub/sentinelhub-py


text:
Translate lvalues to Z3 properly.

Currently, lvalues are flattened down to a string representation (the name preceded by n *s, where n is the number of LVPtr qualifiers are on the LVIdent), and then turned into a Z3 constant.
This almost certainly won't be correct when we actually want to prove properties of pointer-ful programs, so this needs to have a more robust Z3 translation later on.  As MJP suggests, this will probably pull in a theory of memory models, and is thus not something to deal with right now!

Closed for now: lvalues have changed a lot since I wrote this.

repo: septract/starling-tool


text:
CLOUD-43946 Sometimes the IPs of VMs are not returned: implement alte…

…rnative method for extracting IPs

Jenkins build finished, all tests passed.
Refer to this link for build results: http://ci.sequenceiq.com/job/cloudbreak-pull-request/1789/

authors: bbihari jenkins-sequenceiq

repo: sequenceiq/cloudbreak


text:
createDiffEditor throws exception when old editor's models are disposed of

I've run into an issue while using StandaloneDiffEditor when it's underlying text models have been disposed.
In my case, I've got a tab system where the editor is shared between tabs with text models being swapped in and out. When a tab is closed, I dispose of the text model. For diff editors, I dispose of the orginal and modified text models individually (some times I only want to dispose of the original model since the modified one is shared with another tab). However, this causes an issue when the diff editor is reused for a different tab. createDiffEditor is called again, it retrieves the oldEditor by id, then fetches the old editor's model which returns an object like { original: null, modified: null } which makes sense since I've disposed of both the original and modified models. At the end of createDiffEditor, it attempts to set the model for the new editor, but since original (and modified) are null it throws an exception.
I think the solution is probably as simple as improving the null check on oldModel to include a check on the original and modified fields as well:
if (oldModel !== null && oldModel?.original !== null && oldModel?.modified !== null)
    editor.setModel(oldModel);

Stack trace of the error:
Error: Microsoft.JSInterop.JSException: DiffEditorWidget.setModel: Original model is null
Error: DiffEditorWidget.setModel: Original model is null
    at M.setModel (http://localhost:5000/_content/BlazorMonaco/lib/monaco-editor/min/vs/editor/editor.main.js:700:49890)
    at Object.createDiffEditor (http://localhost:5000/_content/BlazorMonaco/jsInterop.js:122:20)
    at http://localhost:5000/_framework/blazor.server.js:1:3506
    at new Promise (<anonymous>)
    at Ft.beginInvokeJSFromDotNet (http://localhost:5000/_framework/blazor.server.js:1:3480)
    at Ft._invokeClientMethod (http://localhost:5000/_framework/blazor.server.js:1:75072)
    at Ft._processIncomingData (http://localhost:5000/_framework/blazor.server.js:1:72696)
    at Ft.connection.onreceive (http://localhost:5000/_framework/blazor.server.js:1:67009)
    at i.onmessage (http://localhost:5000/_framework/blazor.server.js:1:51322)
   at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
   at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
   at BlazorMonaco.Helpers.JsRuntimeExt.SafeInvokeAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
   at BlazorMonaco.Editor.Global.CreateDiffEditor(IJSRuntime jsRuntime, String domElementId, StandaloneDiffEditorConstructionOptions options, EditorOverrideServices overrideServices, DotNetObjectReference`1 dotnetObjectRef, DotNetObjectReference`1 dotnetObjectRefOriginal, DotNetObjectReference`1 dotnetObjectRefModified)
   at BlazorMonaco.Editor.StandaloneDiffEditor.OnAfterRenderAsync(Boolean firstRender)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

Added this in #120 with other small fixes. It will be released in BlazorMonaco v3.2.0

authors: j-schwar serdarciplak

repo: serdarciplak/BlazorMonaco


text:
Target net9.0 for improved caching

To make the new MapStaticAssets feature work properly, assemblies with embedded assets need to be targeting net9.0. By referencing the JS files like this, fingerprinting will ensure aggressive caching and cache busting:
<script src="@Assets["_content/BlazorMonaco/jsInterop.js"]"></script>
<script src="@Assets["_content/BlazorMonaco/lib/monaco-editor/min/vs/loader.js"]"></script>
<script src="@Assets["_content/BlazorMonaco/lib/monaco-editor/min/vs/editor/editor.main.js"]"></script>

Docs: https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/static-files?view=aspnetcore-9.0#deliver-assets-with-map-static-assets-routing-endpoint-conventions

The fix is in the develop branch. It will be released in the next version.

authors: meenzen serdarciplak


text:
json! macro reverses order

I have this:
pub fn http_response_from_json(body: Value) -> HttpResponse {
	HttpResponse::Ok().json(json!({"status": "ok", "description": body}))
}

The http request returns the reverse:
{
    "description": {
        "deleted": {
            "email": "hello3@world.com"
        }
    },
    "status": "ok"
}

which is in reverse order. I dont know if this is an issue with the macro or the framework that sends this data over the network.

Consider enabling features = ["preserve_order"] if you care about the order of map keys. Normally maps are not sensitive to order.

not sure how to add the feature in cargo.toml
[features]
features = ["preserve_order"]

this does not work

[dependencies.serde_json]
features = ["preserve_order"]

this gives
error: failed to parse manifest at `/Users/johnkarasev/capstone-backend/Cargo.toml`

Caused by:
  could not parse input as TOML

Caused by:
  duplicate key: `serde_json` for key `dependencies`

It should be covered in the Cargo documentation, either
 https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html
or
 https://doc.rust-lang.org/cargo/reference/manifest.html.

works!
serde_json = {version = "1.0.32", features = ["preserve_order"]}

{
    "status": "ok",
    "description": {
        "deleted": {
            "email": "bob@world.com"
        }
    }
}

Sorry for re-opening this issue, but - as convinced I was it would work - this doesn't work for me.
My struct:
#[skip_serializing_none]
#[derive(Default, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct Status {
    pub version: Option<String>,
    pub site_id: Option<String>,
    pub device_id: Option<String>,
    pub state: Option<isize>,
    pub is_started: Option<bool>,
    pub map_point_count: Option<isize>,
    pub marker_count: Option<isize>,
    pub loop_count: Option<isize>,
    pub fps: Option<f64>,
    pub fixed_at: Option<isize>,
    pub latitude: Option<f64>,
    pub longitude: Option<f64>,
    pub altitude: Option<f64>,
    pub level_id: Option<isize>,
    pub pitch: Option<f64>,
    pub yaw: Option<f64>,
    pub roll: Option<f64>,
    pub rotation_matrix: Option<[[f64;3];3]>,
    pub current_map_name: Option<String>,
    pub x: Option<f64>,
    pub y: Option<f64>,
    pub z: Option<f64>
}

My Config.toml:
serde_json = { version = "1.0.59", features = ["preserve_order"] }

The JSON is rendered by an actix-web based service:
async fn svc_utils_get_status() -> std::io::Result<web::Json<Status>> {
    Ok(web::Json(handle_get_status()))
}

The handle_get_status function returns an instance of Status above.
The result looks like so (prettyfied and None elements not rendered):
{
    "deviceId": "DF1IVJVV5R7I",
    "fps": 0.0,
    "isStarted": false,
    "loopCount": 7,
    "mapPointCount": 5,
    "markerCount": 6,
    "siteId": "1000",
    "state": 0,
    "version": "0.1.12/2.1.9"
}

So, it is alphabetically ordered, but not as defined.

Sorry, this must be an actix-web issue (or a different configuration). The serialization is OK, if I call serde_json directly in order to serialize.
Please ignore.

authors: dtolnay karasjoh000 neilyoung

repo: serde-rs/json


text:
Migrate the codebase to edition = "2018" ?

I wonder what is the main blocker for migrating the main codebase of serde crates to edition = "2018"?
IIRC it is not a breaking change to switch the edition:
https://doc.rust-lang.org/book/appendix-05-editions.html

All Rust compiler versions support any edition that existed prior to that compiler’s release, and they can link crates of any supported editions together. Edition changes only affect the way the compiler initially parses code. Therefore, if you’re using Rust 2015 and one of your dependencies uses Rust 2018, your project will compile and be able to use that dependency. The opposite situation, where your project uses Rust 2018 and a dependency uses Rust 2015, works as well.

I don't think we need to wait for 2.0 (if it is really going to happen at all, isn't it?) to update the edition the implementation of serde uses.

AFAIK serde supports Rust v1.13, which does not implement Rust 2018.

Might it make sense to update the msrv in a minor release?
For example this issue proposes to update the msrv in minor releases in tokio: https://github.com/tokio-rs/tokio/issues/2718#MSRV

I don't think we need an issue open for this. There isn't any rush since I don't know of anything from 2018 edition that this crate needs, like new keywords or whatnot.

authors: MikailBag Veetaha dtolnay

repo: serde-rs/serde


text:
Memory usage grow after call DeepFace.represent() method, gc.collect() won't help

I used memory_profiler by from memory_profiler import profile in my code, and found that memory grows after call DeepFace.represent() method.The increment is about 15~25MB per call.
Even I del its returns and use gc.collect() still don't work. Besides, it seems that it is unrelated to models and backends.
Is there any way or improvement I can do?

Resolved!
model.predict() from keras caused this mem leak problem. It generates a loader or something else everytime when called.
catastrophic in loop
Use
from keras import backend

# after a period call and before the next call
backend.clear_session()

can temporary resolve for this time.

Maybe change model.predict() to model.call() or model() form can help?  @serengil

duplicated - https://github.com/serengil/deepface/issues/697

authors: Villyli serengil

repo: serengil/deepface


text:
Fix UnboundLocalError in alignment_procedure, closes #94

See issue 94 for details.

LGTM

authors: Dobiasd serengil

repo: serengil/retinaface


text:
Connect to database using serenity JS (postgres)

Hi,
I'm trying to connect to a postgresql database, by following the instructions in this post
https://github.com/serenity-js/serenity-js/issues/94
However, when I execute the question, I keep getting undefined.
Any ideas what can be wrong?
Here is the Ability
const { Client } = require('pg');

const sql = new Client({
    // config
});

export class InteractWithDatabase implements Ability {

  static using() {
    return new InteractWithDatabase();
  }

  static as(actor: UsesAbilities): InteractWithDatabase {
    return actor.abilityTo(InteractWithDatabase);
  }

  constructor() {
  }

  execute(query: string): PromiseLike<any> {
    return sql.connect().then(() => {
      return sql.query${query}
    }).then((result: any) => {
      console.dir(result)
    }).catch((err: any) => {
      // ... error checks
    })
  }
}

Here is the Interaction
export class ExecuteSqlQuery implements Interaction {

  static using(query: string) {
    return new ExecuteSqlQuery(query);

  }

  performAs(actor: UsesAbilities): PromiseLike<any> {
    return InteractWithDatabase.as(actor).execute(this.query);
  }

  constructor(private query: string) {
  }
}

Here is the Question
export const UserData = (query) => Question.about(`user data stored in the database`,
    actor => InteractWithDatabase.as(actor).execute(query)
);

Here is the usage of the question
actorInTheSpotlight().answer(UserData('select * from TABLE  limit 1')).then(result => console.log(result))

Any ideas on what can be wrong?

Hey @rodrigo-costa-sofist,
The general structure looks OK, but have a look at the ability:
export class InteractWithDatabase implements Ability {

  static using() {
    return new InteractWithDatabase();
  }

  static as(actor: UsesAbilities): InteractWithDatabase {
    return actor.abilityTo(InteractWithDatabase);
  }

  constructor() {
  }

  execute(query: string): PromiseLike<any> {
    return sql.connect().then(() => {
      return sql.query${query}
    }).then((result: any) => {
        // this statement doesn't return the `result`,
        // only prints it to the console and then returns void
      console.dir(result)
    }).catch((err: any) => {
      // ... error checks                  // <- if an error is caught, what does this statement return?
    })
  }
}

I have a feeling that either there's an error somewhere with the connection/statement execution and it's swallowed by InteractWithDatabase, or the result is not returned in then
Does this help?
Jan

Hello mr @jan-molak , you were totally right!
I had to return the result, and I also console.log() the err statement, so I could see that I was actually not being able to authenticate on the postgres database, due to a wrong parameter.
So, now my connection with the database is working totally right!
I realized that I was using the parameter 'username' when it is 'user' actually.
This is how the ability is now.
`import { Ability, UsesAbilities } from "@serenity-js/core/lib/screenplay";
// const sql = require('pg')
const { Client } = require('pg');
const sql = new Client({
// type: "postgress",
host: 'myhost.com',
port: 0000,
user: 'user-to-authenticate',
password: 'my-password',
database: 'mydatabase',
});
export class InteractWithDatabase implements Ability {
static using() {
return new InteractWithDatabase();
}
static as(actor: UsesAbilities): InteractWithDatabase {
return actor.abilityTo(InteractWithDatabase);
}
constructor() {
}
execute(query: string): PromiseLike {
return sql.connect().then(() => {
return sql.query(query)
}).then((result: any) => {
return result
}).catch((err: any) => {
console.log(err)
})
}
}
`
Thank you very much!

Hi @jan-molak , just one more question... what would be the correct way to end the connection pooling?
Due to, as it is an Ability, when I have to execute more than one sql query, I get this error "Cannot use a pool after calling end on the pool" when I try to end the connection pooling this way:
typescript   execute(query: string): PromiseLike<any> {     return sql.connect().then(() => {       return sql.query(query)     }).then((result: any) => {       return result     }).catch((err: any) => {       console.log(err)     })   }

Hey @ghost! Serenity/JS v 2.19 introduced support for automatically initialisable/discardable abilities.
import { Ability, actorCalled, configure, Discardable, Initialisable, Question, UsesAbilities } from '@serenity-js/core';
import { ConsoleReporter } from '@serenity-js/console-reporter';
import { Ensure, equals } from '@serenity-js/assertions';

const { Client } = require('pg');                                               // Node.js client for PostgreSQL

configure({
    crew: [
        ConsoleReporter.forDarkTerminals(),
    ],
});

class QueryPostgresDB implements Initialisable, Discardable, Ability {      // New interfaces: Initialisable and Discardable
    static as = (actor: UsesAbilities) => actor.abilityTo(QueryPostgresDB); // retrieve actor's ability to QueryPostgresDB

    constructor(private readonly client) { }

    initialise      = () => this.client.connect();                          // connect to DB when actor starts
    isInitialised   = () => this.client._connected;                         // ensure we only connect once

    discard = () => this.client.end();                                      // disconnect when the actor is dismissed

    query = (query: string) => this.client.query(query);                    // custom integration APIs, i.e. "query"
}

const CurrentDBUser = () =>                                                 // Custom Question using QueryPostgresDB
    Question.about('current db user', actor =>
        QueryPostgresDB.as(actor).query('SELECT current_user')
            .then(result => result.rows[0].current_user)
    );

describe('Serenity/JS 2.19.0', () => {
    it('can initialise and discard abilities automatically', () =>
        actorCalled('Debbie')
            .whoCan(new QueryPostgresDB(new Client()))
            .attemptsTo(
                Ensure.that(CurrentDBUser(), equals('jan'))
            ));
});

Hope this helps!

authors: jan-molak rodrigo-costa-sofist

repo: serenity-js/serenity-js


text:
Sprint01

About e contato

MErge


text:
Could this package be merged with atomic-primops?

Hey! I just thought I'd float the idea of merging this package with atomic-primops, which also exposes a similar counter type.
It seems this package has a default cmm implementation, whereas atomic-primops does not. Perhaps that code could be contributed to atomic-primops as well?
Having two atomic counter packages is of course not the end of the world, but it would be (slightly) better for ecosystem discoverability and cohesion to have just one.

The point of atomic-counter is pretty silly: I wanted an atomic counter myself, tried to search for it on the Internet/Hackage and failed miserably. Stated simply, the idea is discoverability so that obvious search term will lead one to the package that does it. Maybe I'm just bad at searching on the Internet.
On a different note, some, perhaps questionable, design decisions were made in this package that will likely not feel at home in atomic-primops: the distinction between API in IO, ST and a raw one on Unlifted kind for guaranteed absence of any overheads. I can totally see why someone would not want to provide all 3 in their package, but I at least did use the Unlifted-kind-based one myself.
If anyone wants to contribute cmm to atomic-primops I'm all for it. Although this whole this is a bit experimental overall (i.e. could potentially be retracted, altough the results so far confirm that it works OK so most likely wouldn't).

I'm cleaning up stale issues, please reopen if you feel it's still relevant.

authors: mitchellwrosen sergv

repo: sergv/atomic-counter


text:
Add strongname to assembly

Can we add a strong name signing key to this assembly.  I can't include it in my project that has a strong name.

Currently we are blocked on this by Referenced assembly 'Splunk.Logging.Common, Version=1.5.0.0, Culture=neutral

https://ci.appveyor.com/project/serilog/serilog-sinks-splunk/build/207

Perhaps after TCP/UDP is addressed in #65

Initial dev signed packages are at https://www.nuget.org/packages/Serilog.Sinks.Splunk/3.0.0-dev-00212

@merbla Are there any plans for further follow-up on this?  I'm seeing this error when I try to reference 3.0.0-dev-00223 from a signed assembly.
Could not load file or assembly 'Serilog.Sinks.Splunk' or one of its dependencies. Strong name signature could not be verified.  The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key.

Sorry @jgbright I have dropped the ball on this one.
Staged a PR to get 3.0 out the door.

https://github.com/serilog/serilog-sinks-splunk/pull/103

Outstanding!  Thank you.

@merbla  I am still seeing this error with the 3.0.0 nuget.
Could not load file or assembly 'Serilog.Sinks.Splunk' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key.

@jwcurnalia can you provide a reference sample app illustrating the issue.
Thanks!

@merbla I am also getting this error when accessing from a web service running .net 4.6.2.  I don't have a ready made example or fix, but what I'm noticing is that the version number of the assembly that is loaded shows up as version 0.0.0.0.  I am able to replicate this in a simple console app referencing the latest stable version of the splunk sink....
using Serilog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Serilog.Sinks.Splunk;

namespace SplunkSinkTest
{
    class Program
    {
        static void Main(string[] args)
        {
            var myLog = new LoggerConfiguration().WriteTo.EventCollector("example.com","token").CreateLogger();

            Serilog.Log.Logger = myLog;

            Log.Error("Test splunk load");
            Log.CloseAndFlush();
            var test = 1;
        }
    }
}

Here is what the reference looks like with v2.5 of the nuget pacakge:

And here it is with v3.1:

Pretty sure this is because of the missing AssemblyVersion number.  Full name of loaded assembly under .net core or .net framework is:
Serilog.Sinks.Splunk, Version=0.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10
This doesn't seem to effect my library that extends serilog-sinks-splunk because I'm not signing it, but I'm guessing it would be a problem if I was.  Looks like @merbla removed the AssemblyVersionAttribute with the pull request associated to this issue #86.  Hopefully he can provide more insight.

Re-opening this issue.
Along with that changes was this update.
My assumption was that GenerateAssemblyVersionAttribute would apply the correct version.

Opps wrong PR #90 is what was merged.  #90 is missing the GenerateAssemblyVersionAttribute set to true.  I'll add a PR quick.

Hi, I was attempting to use the 3.2 version of the Splunk sink in a project and ran into an issue inside IIS where I get the following message on startup:

Could not load file or assembly 'Serilog.Sinks.Splunk' or one of its dependencies. Strong name signature could not be verified.  The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key.

I checked the assembly with the verification option in sn.exe and got the following:
>sn.exe -v Serilog.Sinks.Splunk.dll

Microsoft (R) .NET Framework Strong Name Utility  Version 4.0.30319.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Failed to verify assembly -- Strong name validation failed.

sn.exe -v Serilog.Sinks.Splunk.dll

I'm getting this same issue on my .Net Framework app using this package. Are there any workarounds @cxt240 @merbla ???

@cxt240 @mk-mrshll can you confirm if this behavior also exists in v3.1?

@merbla I pulled down 3.1.0 and ran sn -v against all 3 frameworks and can confirm that the same behavior exists for all 3.

@merbla It looks like the failure is explicitly because there's no signature. Snooping around with snremove on 3.2.0 shows:
>snremove.exe -d Serilog.Sinks.Splunk.dll
Strong name signature in Serilog.Sinks.Splunk.dll:
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Oh man that looks suspicious ... Let's see what Serilog.dll itself says:
>snremove.exe -d Serilog.dll
Strong name signature in Serilog.dll:
CF 3C A1 05 B3 2E 8F 46 ED 92 B1 77 28 94 82 60
84 21 55 23 50 77 10 9F 46 0F AD EE 62 67 69 35
4A 80 50 F0 92 DA A1 6B 2C 30 CD 53 F0 85 C4 0E
64 CF C0 60 64 96 11 74 F3 C9 21 7B FD 3C 37 B3
EB 0B A8 6B 81 B4 8B B8 F3 D7 10 F7 CC 75 C0 80
32 2E 83 16 CA 07 5E DF 21 52 E6 46 0E 20 3D C2
8C 3A A6 6A 93 31 2E 7F 4A 6C 62 BF 40 27 F7 7B
BC 81 13 77 E5 23 FA 76 C7 80 15 73 42 FB 92 BC

For laughs, here's the other dependency, Serilog.Sinks.PeriodicBatching.dll:
>snremove.exe -d Serilog.Sinks.PeriodicBatching.dll
Strong name signature in Serilog.Sinks.PeriodicBatching.dll:
AC 31 61 BB 55 A9 DB CE 19 EC 0D DB 5F 18 8A 7D
38 F5 C6 44 C6 8B 90 AE AA 55 37 79 11 E2 0C AF
92 38 46 8F 4C B3 E7 A6 4D 5F 41 06 BC E6 AC A5
D3 D1 B2 C0 2C 02 67 D3 7F 07 C3 30 32 60 D3 98
3D 78 46 D8 2E BA 08 8B 37 2C D5 5C 37 D5 2E A8
74 EB 5D 36 CE FB DC C9 26 8F 87 70 0C 4C DE B5
A0 69 7A 05 94 B0 7C 62 E9 B9 5E 6F B2 16 FA 27
6A DE 97 7A 11 E2 4E 02 20 75 DF 20 EC DC AF 54

Both of these pass the dreaded sn -v test just fine.
For what it's worth, I'm only encountering this when I'm forced into a full framework 461 project. In Core and NetStandard, things work great. Hope this helps!

Yup, my research shows the same issue as @msmeby and @cxt240 . This is only a problem on .Net Framework apps.

If I remove the <PublicSign> attribute from Serilog.Sinks.Splunk.csproj, the assembly is signed correctly passing the sn.exe -v Serilog.Sinks.Splunk.dll test.  Looks like the public sign flag is used to fake sign the assembly when a private key is not available.  The Serilog.snk seems to be a private/public key pair tho.
@merbla do you think we are safe to remove the <PublicSign> attribute?
The core Serilog library conditionally applies this attribute like so
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
Could Window_NT be set by the build server?

I'm seeing the same thing that @BrettJaner is seeing. Removing the PublicSign from the csproj does cause it to pass the sn.exe -v Serilog.Sinks.Splunk.dll test for me as well. Adding that back causes it to fail again.

Dev package now available at https://www.nuget.org/packages/Serilog.Sinks.Splunk

@merbla I can confirm that the latest dev package (3.3.0-dev-00258) is properly signed (sn -V test). Using a local IIS application also works now.

@cxt240 @magico13 @BrettJaner @mk-mrshll @msmeby a new release 3.3 is up on NuGet from this PR.
Apologies for the delay.

https://www.nuget.org/packages/Serilog.Sinks.Splunk/3.3.0

Closing as a part of larger Serilog contrib reorg
Checkout https://github.com/serilog/serilog/issues/1627

authors: BrettJaner LamarLugli cxt240 jgbright jmiddour jwcurnalia magico13 merbla mk-mrshll msmeby

repo: serilog/serilog-sinks-splunk


text:
Exercise does not update solution

What is wrong?
After getting a solution  reviewed and checked out, the corresponding exercise continues to be an old one.
query investigateSolutionBug {
  solution: uuid(id:265954)  {
    __typename
    ... on Solution {
      currentRevision {
        id
      }
      exercise {
        id
        currentRevision {
          id
        }
      }
      revisions {
        nodes {
          id
        }
      }
    }
  }
  currentSolutionRevision: uuid(id:265955)  {
    ... on SolutionRevision {
      content
      repository {
        id
      }
    }
  }
  exercise: uuid(id:90208) {
    ... on Exercise {
      currentRevision {
        id
      }
      solution {
        id
        currentRevision {
          id
          content
        }
      }
    }
  }
  currentExerciseRevision: uuid(id:265953) {
    __typename
  }
}

{
  "data": {
    "solution": {
      "__typename": "Solution",
      "currentRevision": {
        "id": 265955
      },
      "exercise": {
        "id": 90208,
        "currentRevision": {
          "id": 265953
        }
      },
      "revisions": {
        "nodes": [
          {
            "id": 265955
          }
        ]
      }
    },
    "currentSolutionRevision": {
      "content": "{\"plugin\":\"solution\",\"state\":{\"prerequisite\":{\"id\":\"1337\",\"title\":\"Vierecke\"},\"strategy\":{\"plugin\":\"text\",\"state\":[{\"type\":\"p\",\"children\":[{\"text\":\"\"}]}]},\"steps\":{\"plugin\":\"rows\",\"state\":[{\"plugin\":\"text\",\"state\":[{\"type\":\"p\",\"children\":[{\"text\":\"Raute, Quadrat\"}]}]}]}}}",
      "repository": {
        "id": 265954
      }
    },
    "exercise": {
      "currentRevision": {
        "id": 265953
      },
      "solution": {
        "id": 154856,
        "currentRevision": {
          "id": 158963,
          "content": "{\"plugin\":\"solution\",\"state\":{\"prerequisite\":{\"id\":\"1705\",\"title\":\"Vierecke\"},\"strategy\":{\"plugin\":\"text\",\"state\":[{\"type\":\"p\",\"children\":[{}]}]},\"steps\":{\"plugin\":\"rows\",\"state\":[{\"plugin\":\"text\",\"state\":[{\"type\":\"p\",\"children\":[{\"text\":\"Füge hier gerne eine Lösung hinzu!\"}]}]}]}}}"
        }
      }
    },
    "currentExerciseRevision": {
      "__typename": "ExerciseRevision"
    }
  }
}

Notice that the exercise.solution.currentRevision.id is not the same as solution.currentRevision
Steps to reproduce
Unfortunately it is not reproducible so far. But anyway the problem remains: how to make this exercise to get its correct solution
Worths investigating
At the same time the exercise was edited, maybe it is hanging on the old exercise revision.
Reported by @AndreasHuber

For documentation:
The fix made in this ticket so far makes sure that from now on no new solution is created if there is already a solution.
When the user creates a new solution, there is a small chance that they get a "solution already exists" error if someone already made a solution but it is waiting for review and therefore not yet displayed under the exercise. The frontend may present this error case to the user in an understandable way or create a new revision instead of a new solution.
To fix the existing cases of several solutions per exercise in the database, there is https://github.com/serlo/db-migrations/issues/7.
In general, saving solutions and exercises separately has a number of drawbacks without a known advantage compared to saving the solution as part of the exercise. It is a plan already made before to change this at some point, though I cannot find an issue for it at the moment.

authors: AndreasHuber hugotiburtino

repo: serlo/database-layer


text:
Fixed app/settings.yaml template to include default models

This PR addresses a few problems emerged while investigating https://github.com/sermas-eu/sermas-toolkit-api/issues/5
When using ollama without an OpenAPI key, application could silently fallback to OpenAPI calls.
Changes in multiple repos are needed. See first comment.
PRs include:

Improved logs and some code refactoring
Reviewed documentation
Reviewed configuration (changed variable names and defaults)

Related PRs:
https://github.com/sermas-eu/sermas-cli/pull/3
https://github.com/sermas-eu/sermas-api/pull/8
https://github.com/sermas-eu/sermas-eu.github.io/pull/4

repo: sermas-eu/sermas-cli


text:
SDK:  serverless.setTag implementation

Relies on #383

This would also need to be include in the typescript file and documented in the readme, or is the coming in a follow up PR?

Good call, forgot about that! Added

The types look good 😎 Would we also want to add a description for this function in the sdk docs?

Not sure where my head was :) great you've pointed that. Added

repo: serverless/console


text:
instance of '_PgDatabaseQueryException'

Hi, in the latest version of serverpod 2.3.0 i have the issue when i query many rows from my database:
instance of '_PgDatabaseQueryException'
#0      DatabaseConnection._query (package:serverpod/src/database/adapters/postgres/database_connection.dart:429:7)

#1      DatabaseConnection._mappedResultsQuery (package:serverpod/src/database/adapters/postgres/database_connection.dart:482:18)

#2      DatabaseConnection._deserializedMappedQuery (package:serverpod/src/database/adapters/postgres/database_connection.dart:505:18)

#3      ScheduleService.listAttendances (package:eva_erp_server/src/endpoints/hr/schedule_service.dart:30:18)

#4      Server._handleUriCall (package:serverpod/src/server/server.dart:508:20)

#5      Server._handleRequest (package:serverpod/src/server/server.dart:296:18)

#6      Server._handleRequestWithErrorBoundary (package:serverpod/src/server/server.dart:185:5)

when i run locally in my laptop i have no issue, but when i run on my VPS server i get that error. Maybe there is some configuration i have to do ? but just for your information, in other serverpod versions i didnt have this error.
many thanks.

I downgraded from 2.3.0 to 2.2.2 and the error description is more accurated:
DatabaseException: Socket error: Bad state: Message parser consumed more bytes than expected. type=68 expectedLength=493

repo: serverpod/serverpod


text:
🛑 ukgrpc.serverip.my.id is down

In 2559fbf, ukgrpc.serverip.my.id (ukgrpc.serverip.my.id) was down:

HTTP code: 0
Response time: 0 ms

Resolved: ukgrpc.serverip.my.id is back up in 9002155 after 15 minutes.

repo: serversshnet/server-status


text:
🛑 sg1grpc.serverip.my.id is down

In 626d4c3, sg1grpc.serverip.my.id (sg1grpc.serverip.my.id) was down:

HTTP code: 0
Response time: 0 ms

Resolved: sg1grpc.serverip.my.id is back up in e4875d3 after 22 minutes.


text:
🛑 sg1wg.ipservers.xyz is down

In eef4686, sg1wg.ipservers.xyz (sg1wg.ipservers.xyz) was down:

HTTP code: 0
Response time: 0 ms

Resolved: sg1wg.ipservers.xyz is back up in 3d623e6 after 1 hour.

repo: serversshnet/uptime


text:
🛑 id2go.ipservers.xyz is down

In 36f81cb, id2go.ipservers.xyz (id2go.ipservers.xyz) was down:

HTTP code: 0
Response time: 0 ms

Resolved: id2go.ipservers.xyz is back up in f6c7041.


text:
Update rds.md

翻译的文档的 Issue 编号是：#15

中文和英文之间请增加空格。

repo: servicemesher/envoy


text:
🛑 Typeform (Cookers) is down

In d5633f5, Typeform (Cookers) (https://servicesite.typeform.com/to/wnhhHH) was down:

HTTP code: 403
Response time: 57 ms

Resolved: Typeform (Cookers) is back up in f453577.

repo: servicesite/upptime


text:
🛑 Typeform (Cookers) is down

In 0ce766d, Typeform (Cookers) (https://servicesite.typeform.com/to/wnhhHH) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Typeform (Cookers) is back up in 2f5ace7.


text:
Fluent method to add sibling node to parent node

The switchContext parameter allows a node to add a sibling node to the current node or a child node to the current node.
Is it possible to use the fluent method to add a sibling node to the parent node?
For example, I would like to produce the following
<food>
  <menu>
      <pasta>
        <name>Spaghetti</name>
      </pasta>
      <pasta>
        <name>Fusilli</name>
      </pasta>
    </menu>
</food>

Case where switchContext is false for Spaghetti node:
$xml = new FluidXml('food');
$xml->addChild('menu', true)
    ->addChild('pasta', true)
        ->addChild('name', 'Spaghetti', false)
    ->addChild('pasta', true)
        ->addChild('name', 'Fettuccine');

would produce the following:
<food>
  <menu>
    <pasta>
      <name>Spaghetti</name>
      <pasta>
        <name>Fettuccine</name>
      </pasta>
    </pasta>
  </menu>
</food>

Case where switchContext is true for Spaghetti node:
$xml = new FluidXml('food');
$xml->addChild('menu', true)
    ->addChild('pasta', true)
        ->addChild('name', 'Spaghetti', true)
    ->addChild('pasta', true)
        ->addChild('name', 'Fettuccine');

would produce the following:
<food>
  <menu>
    <pasta>
      <name>Spaghetti
        <pasta>
          <name>Fettuccine</name>
        </pasta>
      </name>
    </pasta>
  </menu>
</food>

As you can see, neither produces the correct XML.
Question: Is there a way to do this using add/Child() alone? Or do I need to chain xpath queries prior to adding the nodes?

Hi dear @denormalizer.
What you want to do can be easily done using relative XPath queries; I've implemented them especially for this reason. addChild() alone can't help you in this.
$xml = new FluidXml('food');
$xml->addChild('menu', true)
    ->addChild('pasta', true)
        ->addChild('name', 'Spaghetti', false)
    ->query('..')
    ->addChild('pasta', true)
        ->addChild('name', 'Fettuccine');

which produces exactly what you want
<food>
  <menu>
      <pasta>
        <name>Spaghetti</name>
      </pasta>
      <pasta>
        <name>Fusilli</name>
      </pasta>
    </menu>
</food>

If I can give you a suggestion, when you have a predictable data structure which you want to convert to XML, prefer the array input format.
$xml = new FluidXml('food');

$data = [ 'menu' => [
    [ 'pasta' => [ 'name' => 'spaghetti' ]  ],
    [ 'pasta' => [ 'name' => 'fettuccine' ] ],

]];
$xml->addChild($data)

which is more readable, easier to generalise and to refactor.

Hi Daniele,
Thanks for your suggestion. I've been umming and ahhing over which method to go with.
I originally went with the array method then I switched over to the fluid method.
I have a predictable (but configurable) data structure. I also have dynamic data. That means I want to be able to easily replace spaghetti with bolognese
How would you do it with the array method?

I would generate a dynamic array.

authors: daniele-orlando denormalizer

repo: servo-php/fluidxml


text:
For Issue #413 - WIP for configuring failed build notification

I hope this is the direction people were hoping for.
Obviously not complete, the emails are just dummy ones.
Going off of the suggestion made by @aneeshusa , I added a list of builders which this configuration applies for. This would allow for someone to disable notifications for certain builds.

This change is

Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @aneeshusa (or someone else) soon.

Changes so far LGTM, but I'll hand this review off since I don't know what SMTP settings would be appropriate here. r? @edunham

:umbrella: The latest upstream changes (presumably #620) made this pull request unmergeable. Please resolve the merge conflicts.

@edunham Could you respond to the last comment please?

authors: aneeshusa bors-servo highfive jdm matt-duell

repo: servo/saltfs


text:
Remove my (aneeshusa's) SSH key

I haven't used this in a long time
and unfortunately don't have time to contribute to Servo these days;
remove my key per principle of least privilege.
Follow-up to https://github.com/servo/highfive/pull/201, https://github.com/servo/highfive/pull/205.

This change is

@bors-servo r+
Thanks!

:pushpin: Commit 1234eea has been approved by jdm

:hourglass: Testing commit 1234eeab18b043c7bd876806c1b41edd207331d3 with merge 49987c3006343ef37d536f1430a3aa780a9db2c7...

:broken_heart: Test failed - checks-travis

:sunny: Test successful - checks-travis
Approved by: jdm
Pushing 49987c3006343ef37d536f1430a3aa780a9db2c7 to master...

authors: aneeshusa bors-servo jdm


text:
How to use create_unattended_installer()

ENVIRONMENT

Operating System: Windows 10 - 1903
Python version: 3.7
VirtualBox version: 6.0.10
VirtualBox SDK version: 6.0.10
Location where VirtualBox SDK is installed:
virtualbox-python / pyvbox version: latest
[x] Happens in latest master branch?

SUMMARY
Hello, I am currently using your library to create a virtual machine automatically, until then everything works. I want to use the automatic ISO installation, but that does not work, can you explain to me how this is supposed to work?
Here is the code snippet that I tried:
__iso_file = os.getcwd() + "/data/isos/" + cfg['machine']['iso']
__installer = self.vbox.create_unattended_installer()
__installer.iso_path = __iso_file
__installer.machine = IMachine(machine)
__installer.prepare()
__installer.construct_media()
__installer.reconfigure_vm()

And here is what it returns to me:
TypeError: Objects of type 'IMachine' can not be converted to a COM VARIANT (but obtaining the buffer() of this object could)
If someone can help me, thank you!

Have you tried substituting IMachine(machine) for self.vbox.find_machine(machine)?

Hello, thank you for your answer.
The variable "machine" here is the return of the creation of my machine that I do just before:
machine = self.vbox.create_machine

I tried directly with a find_machine but the return is the same as in my previous question. Nevertheless I checked the variable "machine" is well considered as an object "IMachine", otherwise I will have like return "value is not an instance of IMachine".
I have the impression that the problem is located further, here are more logs:
Traceback (most recent call last):
  File "C:/Users/Node/Desktop/git/auto-manage-machine/automanagemachine/run.py", line 30, in <module>
    machine.run_install(vm)
  File "C:\Users\Node\Desktop\git\auto-manage-machine\automanagemachine\components\machine\machine_vbox.py", line 59, in run_install
    __installer.machine = IMachine(machine)
  File "C:\Users\Node\Desktop\git\auto-manage-machine\venv\lib\site-packages\virtualbox\library.py", line 9710, in machine
    return self._set_attr("machine", value)
  File "C:\Users\Node\Desktop\git\auto-manage-machine\venv\lib\site-packages\virtualbox\library_base.py", line 184, in _set_attr
    return setattr(self._i, name, value)
  File "C:\Users\Node\Desktop\git\auto-manage-machine\automanagemachine\vboxapi\__init__.py", line 193, in _CustomSetAttr
    return _g_dCOMForward['setattr'](self, ComifyName(sAttr), oValue)
  File "C:\Users\Node\Desktop\git\auto-manage-machine\venv\lib\site-packages\win32com\client\__init__.py", line 482, in __setattr__
    self._oleobj_.Invoke(*(args + (value,) + defArgs))
TypeError: Objects of type 'IMachine' can not be converted to a COM VARIANT (but obtaining the buffer() of this object could)

Hello, I raise,
did you already use this function? Is this a bad use or is this function not implemented?
On my side I still have not managed to use it after several tests...
thank you

I no longer have time to maintain this library, so am closing this issue.

authors: frnode sethmlarson

repo: sethmlarson/virtualbox-python


text:
Missing confirma values?

This is more of a doubt, but we declare configmap vault to have values
    --from-literal "load_balancer_address=${LB_IP}" \
    --from-literal "gcs_bucket_name=${GCS_BUCKET}" \
    --from-literal "kms_key_id=${KMS_KEY}"

but on vault deployment file we use many other values
env:
        - name: GCS_BUCKET_NAME
          valueFrom:
            configMapKeyRef:
              name: vault
              key: gcs_bucket_name
        - name: KMS_PROJECT
          valueFrom:
            configMapKeyRef:
              name: vault
              key: kms_project
        - name: KMS_REGION
          valueFrom:
            configMapKeyRef:
              name: vault
              key: kms_region
        - name: KMS_KEY_RING
          valueFrom:
            configMapKeyRef:
              name: vault
              key: kms_key_ring
        - name: KMS_CRYPTO_KEY
          valueFrom:
            configMapKeyRef:
              name: vault
              key: kms_crypto_key
        - name: LOAD_BALANCER_ADDR
          valueFrom:
            configMapKeyRef:
              name: vault
              key: load_balancer_address

Aren't we missing some values here? I'm asking this because my pods are failing to deploy because of this:

The config map looks like this:
kubectl create configmap vault \
  --cluster="$(gke-cluster-name "vault")" \
  --from-literal="load_balancer_address=$(vault-lb-ip)" \
  --from-literal="gcs_bucket_name=$(google-project)-vault-storage" \
  --from-literal="kms_project=$(google-project)" \
  --from-literal="kms_region=$(google-region)" \
  --from-literal="kms_key_ring=vault" \
  --from-literal="kms_crypto_key=vault-init" \
  --from-literal="kms_key_id=projects/$(google-project)/locations/$(google-region)/keyRings/vault/cryptoKeys/vault-init"

Are you sure you're on the correct repo? Between this and your earlier issue, I'm wondering if you're using an out-of-date fork?

@sethvargo Hey Seth, thank you for your reply! As I linked on the other issue, I'm looking at https://codelabs.developers.google.com/codelabs/vault-on-gke/index.html#9. Hum... I don't quite understand what is going on. The code lab seems pretty different from what you just pasted here. Am I looking at the wrong spot, maybe?

The codelab content isn't pulled directly from here. I've updated it and it should match now.

@sethvargo thank you!

authors: Streppel sethvargo

repo: sethvargo/vault-kubernetes-workshop


text:
Problem with new version

Hello,
I've just downloaded the new version of ulozto downloader and right after the program drops many errors.
First error I met is this:

Previous version worked well for me, just didn't support the password arguments, but now I can't download anything. I've updated all required modules to make sure that everything is up to date, but it didnt solve the issues.
Next error:
C:\Windows\System32>ulozto-downloader "https://ulozto.cz/file/TKvQVDFBEhtL/debia
n-9-6-0-amd64-netinst-iso"
[Autodetect] tflite_runtime available, using --auto-captcha
Starting downloading for url 'https://ulozto.cz/file/TKvQVDFBEhtL/debian-9-6-0-a
md64-netinst-iso'
Getting info (filename, filesize, )
←[34m[TOR]      ←[0mTOR started
Downloading into: './debian-9.6.0-amd64-netinst.iso'
CAPTCHA protected download - CAPTCHA challenges will be displayed
←[33mTerminating download. Please wait for stopping all threads.←[0m
←[33mDownload terminated.←[0m
Traceback (most recent call last):
File "C:\Users\XXX\AppData\Local\Programs\Python\Python38\lib\runpy.py", lin
e 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\XXX\AppData\Local\Programs\Python\Python38\lib\runpy.py", lin
e 87, in run_code
exec(code, run_globals)
File "C:\Users\XXX\AppData\Local\Programs\Python\Python38\Scripts\ulozto-dow
nloader.exe_main.py", line 7, in
File "C:\Users\XXX\AppData\Local\Programs\Python\Python38\lib\site-packages
uldlib\cmd.py", line 135, in run
d.download(url, args.parts, args.password, args.output, args.temp, args.yes,
args.conn_timeout)
File "C:\Users\XXX\AppData\Local\Programs\Python\Python38\lib\site-packages
uldlib\downloader.py", line 276, in download
download_url = next(self.captcha_download_links_generator)
File "C:\Users\XXX\AppData\Local\Programs\Python\Python38\lib\site-packages
uldlib\page.py", line 230, in captcha_download_links_generator
cached = self.linkCache.get_all_valid_links()
File "C:\Users\XXX\AppData\Local\Programs\Python\Python38\lib\site-packages
uldlib\linkcache.py", line 56, in get_all_valid_links
return [link for link in cache_content if self._is_link_valid(link)]
File "C:\Users\XXX\AppData\Local\Programs\Python\Python38\lib\site-packages
uldlib\linkcache.py", line 56, in
return [link for link in cache_content if self._is_link_valid(link)]
File "C:\Users\XXX\AppData\Local\Programs\Python\Python38\lib\site-packages
uldlib\linkcache.py", line 62, in _is_link_valid
query_string = parse_qs(link, separator=';')
TypeError: parse_qs() got an unexpected keyword argument 'separator'
Used command: ulozto-downloader "https://ulozto.cz/file/TKvQVDFBEhtL/debian-9-6-0-amd64-netinst-iso"

Just guessing here, but Ulozto recently changed the design of their website slightly, if parsing relies on the old design, it may be broken in both old and new version of the downloader until it's fixed on the downloader's side.

I confirmed this behaviour on Ubuntu too.
The url is usually loaded only the second time, downloading working, but:
Too many "net errors" (approx. 150 on 30 parts)
Download takes twice as long compared to version 3.3.1.
I rolled back to version 3.3.1 which works fine...

repo: setnicka/ulozto-downloader


text:
Implement Exec

Try to implement the exec functionality if it is possible to do that under the AppPool identity.

Ok, after some research it's not that easy to run another app as the AppPool's identity because it's a gMSA account :/

An idea would be to co-host a separate web app in the same AppPool which acts as a proxy, runs the command and forwards stdio/stderr to the task driver.

repo: sevensolutions/nomad-iis


text:
🛑 Severn Bronies website is down

In d8a88db, Severn Bronies website (https://severnbronies.co.uk) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Severn Bronies website is back up in f5c8743 after 9 minutes.

repo: severnbronies/status


text:
Fixed for problem 2: Post tags shown as object

Problem 2:
https://github.com/sf-wdi-40/publify-debugging-lab/issues/2
Root Cause:
When saving the tags in save_article_tags(), the value saved into $('#article_keywords') element is:
$('#article_form').find('input[name="hidden-article[keywords]"]'
which is a jQuery object. It never fetches the actual value(tag names) from the object.
Solution:
Modifed the value to be saved into $('#article_keywords')
from:   $('#article_form').find('input[name="hidden-article[keywords]"]'
to:       $('#article_form').find('input[name="hidden-article[keywords]"]').val()

Very descriptive PR body – one suggestion is that you do not need to actually include code in your explanation (that is what the "Files changed" tab at the top of this PR would be for).
Keep your PR body language in human-readable language, so I as a fellow engineer can quickly see what it is your PR fixed and then go to the code to ensure it accomplished that.

authors: achentha esthersweon


text:
Support RFC 5077 TLS session ticket reuse

Adds an option to enable RFC 5077 TLS session ticket reuse, and implementations for all backends.

The OpenSSL implementation uses set_session_cache_mode, set_new_session_callback, set_remove_session_callback, and set_session to store just the previous session that was negotiated. It doesn't look like there's a way to store any more than that, as OpenSSL doesn't pass any information about domain/host to the callbacks.
The Schannel implementation implements a small (10 entry) LRU cache of SchannelCred, with an expiration of 10 minutes.
The Security Framework implementation just calls a system API, see implementation and tests in https://github.com/kornelski/rust-security-framework/pull/95

Also added implementation-specific unit tests for OpenSSL and Schannel. A platform-agnostic one isn't really possible because macOS doesn't expose any way of determining of the stream was successfully resumed, and we're not at a low enough abstraction level to look at the handshake process itself.

See https://github.com/sfackler/hyper-openssl/blob/master/src/lib.rs for how to have a more robust cache with OpenSSL.

Using the domain provided for hostname verification seems like it's not a fully accurate identifier - it doesn't account for multiple servers running on the same host, for example.

RFC 5077 presents an approach to stateless resumption though, so it should be possible to resume a TLS session initiated on a different server as long as both machines have access to the same session key used to encrypt the session.
Thanks for the pointer for OpenSSL. I'll take a look and make some changes.

Not sure what's going on here with the Windows CI, it works for me locally on Windows 10. Maybe the OS version is too old? According to the Appveyor docs on the build environment,

If the build configuration does not specify build worker image then Visual Studio 2015 image is used.
Which should correspond to Windows Server 2012 R2.

Microsoft docs indicate that RFC 5077 was implemented starting in Windows 8, which should include Windows Server 2012 R2 as well.

I am talking about the standard case where the servers would not share a cache.

RFC 5077 only requires that servers share a secret that they can all use to encrypt/decrypt the tickets. For example, Cloudflare wrote up how they do this in a portion of this tangentially related blog post.
Arguably, implementations of RFC 5077 that do not share a secret across servers are incorrect, as they would not satisfy the usecases described in that RFC:

This mechanism is useful in the following situations:

servers that handle a large number of transactions from different
users
servers that desire to cache sessions for a long time
ability to load balance requests across servers
embedded servers with little memory

Yes, I am aware that is is possible for servers to share cached sessions. I am saying that if foobar.com:443 and foobar.com:1234 do not, in fact, share cached sessions, this implementation will cause their sessions to collide.

I agree that that is a possible failure case, but it seems relatively unlikely in standard usage, and IMO, the failure mode would be rather harmless:

From a secrecy perspective, the server would be presented with and reject a nonsensical session ticket, nothing is leaked since the ticket is encrypted.
From a user experience perspective, it would just silently fall back to a full TLS handshake.

Given that this is a bit of an edge case and the failure mode is reasonable, I think it should be fine to leave the behavior as is. Open to suggestions on how to resolve it as well, but AFAIK we don't have the relevant information at this abstraction level, since port is only really relevant at TCP connection time.

Updated the OpenSSL implementation (mostly just inlining the logic from hyper-openssl).
Also pinned the Appveyor image used to Visual Studio 2017, which should use Windows Server 2016. Looks like that still failed though. In hindsight, OS version probably wasn't the issue since only one of the tests was failing (connect_session_ticket_resumption_two_sites), and the basic test passed (connect_session_ticket_resumption).
Not sure why it's failing still. I'll try to run the tests on Windows 8.1 locally and see if that can repro.

I think I'd be more comfortable if we separated the domain used for hostname verification from the ID used to cache sessions. I'm imagining a new API that let you configure individual connection attempts like the SslConnector::configure method in rust-openssl: https://docs.rs/openssl/0.10.29/openssl/ssl/struct.SslConnector.html#method.configure. For now it would just have set_peer_id used for session caching and connect which would still take the socket and domain for hostname verification.

Also, I'm not sure the naming here should specifically refer to "tickets", since that would refer specifically to one of the two methods TLS provides for session resumption.

I think I'd be more comfortable if we separated the domain used for hostname verification from the ID used to cache sessions. I'm imagining a new API that let you configure individual connection attempts like the SslConnector::configure method in rust-openssl: https://docs.rs/openssl/0.10.29/openssl/ssl/struct.SslConnector.html#method.configure. For now it would just have set_peer_id used for session caching and connect which would still take the socket and domain for hostname verification.

That's fair. I believe Security Framework's set_peer_id has further side-effects apart from enabling TLS session tickets though, but I haven't looked into it too closely.

Also, I'm not sure the naming here should specifically refer to "tickets", since that would refer specifically to one of the two methods TLS provides for session resumption.

The changes here are only meant to support client-side stateless TLS resumption. I haven't looked into server-side TLS resumption much, but I had thought that it was implicitly taken care of by each TLS implementation.

I haven't looked into server-side TLS resumption much, but I had thought that it was implicitly taken care of by each TLS implementation.

At least in OpenSSL, the mode of session resumption doesn't affect the API in any significant way. In both cases, the client needs to send something it has saved to the server in the ClientHello.

Rebased onto current master. Also added a fix for caching the session on Windows, where the session wasn't properly stored if there were underlying async connection abstractions being used.
What can I do to get this across the finish line? For your comment about set_peer_id, I don't think there's any way to make that kind of change in kornelski/rust-security-framework without it being a large API change. I'm also not sure what that change would look like -- given that the macOS SSLSetSessionTicketsEnabled has no effect without SSLSetPeerID, it would require tying the session ticket API in kornelski/rust-security-framework to each domain you want to connect to, rather than the connection itself, which seems worse for usability purposes.

repo: sfackler/rust-native-tls


text:
fix wasm build

This change is

why the main workflow got errors ...

Seems this part. https://github.com/sfc-aqua/quisp/blob/b98bfef606ab7ebf6264f398d4de68a1f5da7245/.github/workflows/main.yml#L10
Credential has been expired?

yeah, that part. also, I suspected and replaced the token, but it won't work.
maybe there's some change about the secrets handling in GitHub Actions?

finally, I set the secret GHCR_PAT on my repo's setting and it works.

authors: Chibikuri zigen

repo: sfc-aqua/quisp


text:
Question: Retrieve User Email

Is it possible to retrieve a user email address from the user model? I see the screen_name and uri but no mention of the email. This is all assumed that the consumer has permission to get the user email.
Thanks

You'd need to call the account/verify_credentials endpoint with the include_email=true option on the API.

Thanks! Just got back with this so sorry for the late reply.

authors: SylarRuby andypiper

repo: sferik/twitter


text:
AAC Playback - Recording

Hello!
This application is awesome. You should provide some way so we can donate to this project.
I just wish to know if there is technical challenges to allow playback for AAC streams, or if this is not present due to some kind of license problem.
Would love to hear what's the status of AAC streams playback and recording, since my favorite stations are currently streaming on AAC.  :)
Thanks!

AAC recording should work fine at the moment.
AAC playback is lacking a good AAC Java library to decode  at the moment.
There are some AAC decoding libraries, but they are AFAIK not yet production-ready:

The JAAD decoder seems to be the best pick, but with current streams it is not decoding. Code is no longer maintained. I have debugged a bit of the code and it looks like there decoder is hanging when it tries to find the beginning of a AAC frame. Either it is a simple bug (?) or the whole concept is broken.
An updated (?) fork of JAAD is JAADec, I think I reproduced the bug mentioned above also there.
There are some other solutions needing native libraries or applications, this would break the platform independence of radiorecorder.

AAC recording should work fine at the moment.
AAC playback is lacking a good AAC Java library to decode at the moment.
There are some AAC decoding libraries, but they are AFAIK not yet production-ready:

The JAAD decoder seems to be the best pick, but with current streams it is not decoding. Code is no longer maintained. I have debugged a bit of the code and it looks like there decoder is hanging when it tries to find the beginning of a AAC frame. Either it is a simple bug (?) or the whole concept is broken.
An updated (?) fork of JAAD is JAADec, I think I reproduced the bug mentioned above also there.
There are some other solutions needing native libraries or applications, this would break the platform independence of radiorecorder.

That's good to know.
Thanks for the feedback @sfuhrm.
Let hope that a good and open source decoder arises!

Hi @snibles
I had another look into the AAC decoder problem today and found out that the decoder is failing when it mis-interprets a MP3 stream as a AAC stream. I have replaced a certain audio format recognition and now we're not running into this bug anymore.
There's now also a test for all the supported sound formats.
I'll release the new version first as a alpha release in case you want to play around.
Best wishes,
Stephan

Please check v1.10.0 (pre-release)

Test stream replay works.
Real station stream does not work.

Rework in 1.10.1 works for now in testing.

Current situation is like this:
The AAC plugin works, but whenever it gets presented other data than AAC it easily ends in an endless loop.
My preference here is to include a manipulated version of the JAR that does not register as a plugin, but is used explicitly when radiorecorder sees an AAC stream.

I have reworked the code a bit to make the AAC plugin to not auto-detect streams.
This is now in release version https://github.com/sfuhrm/radiorecorder/releases/tag/v1.11.0
I'm closing the ticket. In case of problems, please open new issues.

authors: sfuhrm snibles

repo: sfuhrm/radiorecorder


text:
🛑 CatamarcaCapital is down

In 90c7e4c, CatamarcaCapital (https://www.catamarcaciudad.gob.ar) was down:

HTTP code: 0
Response time: 0 ms

Resolved: CatamarcaCapital is back up in 7e09667 after 552 days, 22 hours, 48 minutes.

repo: sfvc/upptime


text:
Set pitch opcode as tune alias

Merged the pitch opcode page with tune one and made the former as symbolic link of the latter
Restored modulation pages as symlinks of the tune page

Other pages that needs the same procedure:

cutoff -> cutoff2
resonance -> resonance2

Mostly seems OK, but now I'm wondering about a couple more details. Like, is it actually integer or float? I'm not sure if it's possible to tune things by fractions of a cent or not. And what's the true min/max? I would guess it might be thousands of cents.

authors: DSmolken redtide


text:
Add pypy3 to travis.

(Apply after PR to bump pytest version)
Attempt to add pypy3 to travis.

Coverage remained the same at 100.0% when pulling 871ea5c5dd8ffe461d6d1f0d0f454224f1fc9e0e on stuaxo:patch-1 into 1aec93e7627bc99ec4321f1fbc53b20f2602bab1 on sgillies:master.

@stuaxo thank you!

Oh, heh - I was actually going to withdraw this once I realised that Affine doesn't have the native code tha Planar used to have :D  !!

authors: coveralls sgillies stuaxo

repo: sgillies/affine


text:
for llava， how to send image rather than image_path?

current example(srt_example_llava.py) request like this:
state = image_qa.run(
image_path="./images/cat.jpeg",
question="What is this?",
max_new_tokens=64
)
but, if i want to send request like below, what should I do?
request = {
"text": ["What is this?".encode()],
"images": [open("./images/cat.jpeg", "rb").read()]
}

According to sglang.utils.encode_image_base64, image_path is interpreted in one of three ways:

A str instance is interpreted as the path to an image
bytes can be used to inject arbitrary data (e.g. from a Path(IMAGE_PATH).read_bytes() call)
Any other instance type is interpreted as a Pillow image and will be first converted to PNG before dumping its bytes.

This means that any of these calls should work:
image_qa.run(image_path="./path/to/image.jpg", ...)
image_qa.run(image_path=open("./path/to/image.jpg", "rb").read(), ...)
image_qa.run(image_path=Image.open("./path/to/image.jpg"), ...)

I recommend to set a breakpoint in sglang.lang.interpreter.StreamExecutor._execute_image to understand what is happening under the covers.

In case you want to send directly the request you need to encode the image in base64 due to is Json serializable. For example you create a function to encode the image that you want:
def encode_image(image_path):
    with open(image_path, 'rb') as image_file:
        # Read the file
        image_data = image_file.read()
        # Encode the image
        encoded_image = base64.b64encode(image_data)
        # Convert to a UTF-8 string
        encoded_string = encoded_image.decode('utf-8')
        return encoded_string

And then you can create the payload and send it to the sglang server like this:
json_data = {
        "text": '<|im_start|>system\nAnswer the questions.<|im_end|><|im_start|>user\n<image>\nWhat is this?<|im_end|><|im_start|>assistant\n',
        "image_data": encode_image("./images/cat.jpeg"),
        "sampling_params": {
            "temperature": 0,
            "max_new_tokens": 256,
       },
 }
response = requests.post(
        url + "/generate",
        json=json_data
)

Remeber that LLaVa used chatml template for messages. With this you can send directly the request.

@matallanas This solution isn't working for me. The processing works just fine when I use a path that is available on the remote server. However, when I try to run your code above, I get this as a response:
"I'm sorry, but I am unable to view images. Can you please provide me with the text or description of the image..."

authors: ddemillard lss15151161 matallanas mostlyuseful

repo: sgl-project/sglang


text:
Issue-#2---Clean-up-solution

#2 Cleaning up solution, remove of Azure blob storage and other connection references which are no longer required. Also removed the environment variable.

Going to merge


text:
Mockup Hukamanama View

Some things to think about when making this:
How they user can access this: Will this be a home screen option?  Something in navigation drawer?
Options to show in settings menu?
Related to #74

Nothing to mock here...
Dynamic Hukamnamas will show up in bookmarks, they can be subscribed to in a separate area (resolution of which can be made as a new issue, but we're not there anyways, no need yet)
No need for separate stylings

authors: bhajneet saihaj

repo: shabados/mobile


text:
Update to latest scalatest

As far as I understand, scalatest abandoned the 3.2 branch and is working on the 3.1 branch. The lastest crossplatform artifact on maven is 3.1.0-SNAP8 (from 13/03/2019).

Thanks! Looks good to me!

authors: lolgab shadaj

repo: shadaj/scalapy


text:
Issue with PopoverTrigger

Hi,
The example on https://ui.shadcn.com/docs/components/popover says we can use the <PopoverTrigger> component with the asChild prop as such:
<PopoverTrigger asChild>         <Button variant="outline">Open popover</Button>       </PopoverTrigger>
However, when I do so, I get the following error:

Hello, I also applied the Popover Trigger in my codes and no issues encountered, can you upload how you applied your code?
Here is how I applied:

@ddacot Can you share the code please?

@shadcn and @quyettranvu apologize for the delay.
What I am trying to achieve is to wrap a <ContentEditable> component with the <PopoverTrigger> component. Something like this:
<PopoverTrigger asChild>
    <ContentEditable>
</PopoverTrigger>

My ContentEditable Component is implemented as such:
export function ContentEditable({
  className,
  id,
  style,
  tabIndex,
  ...rest
}: Props): JSX.Element {

   ...

  const ref = useCallback(
    (rootDiv: null | HTMLElement) => {
      setRootDiv(rootDiv);
    },
    [...],
  );

  return (
    <div
      {...rest}
      className={className}
      contentEditable={isEditable}
      id={id}
      ref={ref}  < ------- (1)
      style={style}
      tabIndex={tabIndex}
    />
  );
}

Perhaps my issue is that I'm overriding the ref in (1) and I am trying to figure out a way to fix that. However, in another instance, where I tried to use the Tabs component, this code was working just fine: TabsTrigger would pass down all the props to ContentEditable AND the somehow got a hold of the ref of the div in ContentEditable, since I was able to switch tabs with no issue (perhaps walking thru the dom with a query selector or something):
<TabsTrigger asChild>
    <ContentEditable>
</TabsTrigger>

What I've tried since posting the initial comment is modifying the PopoverTrigger component as such:
const PopoverTrigger = React.forwardRef<
  React.ElementRef<typeof PopoverPrimitive.Trigger>,
  React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Trigger>
>(({ className, ...props }, ref) => (
  <PopoverPrimitive.Trigger
    ref={ref}
    className={cn("", className)}
    {...props}
  />
))
PopoverTrigger.displayName = PopoverPrimitive.Trigger.displayName

This got rid of the error message in my initial post, however the content doesn't pop up when I click on the Trigger. Perhaps this is an issue with my implementation, and now with how shadcn abstracts the radix components.
fyi, I am a newbie in React, so I might have no clue what I am doing. And thanks for putting together this great library of components btw. Looks sick.

authors: ddacot quyettranvu shadcn

repo: shadcn-ui/ui


text:
[bug]: Problem While Installing SHADCN on NextJS 15

Describe the bug
Problem While Installing SHADCN on NextJS 15
Affected component/components
Installation
How to reproduce

Install NextJS with v 15
Try to install shadcn

Codesandbox/StackBlitz link
https://github.com/SH20RAJ/article
Logs
shaswatraj@Sh article % npx shadcn-ui init
Need to install the following packages:
shadcn-ui@0.8.0
Ok to proceed? (y) y

✔ Which style would you like to use? › Default
✔ Which color would you like to use as base color? › Slate
✔ Would you like to use CSS variables for colors? … no / yes

✔ Writing components.json...
✔ Initializing project...
⠦ Installing dependencies...Command failed with exit code 1: npm install tailwindcss-animate class-variance-authority clsx tailwind-merge lucide-react
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: article@0.1.0
npm error Found: react@19.0.0-rc-f994737d14-20240522
npm error node_modules/react
npm error   react@"19.0.0-rc-f994737d14-20240522" from the root project
npm error
npm error Could not resolve dependency:
npm error peer react@"^16.5.1 || ^17.0.0 || ^18.0.0" from lucide-react@0.395.0
npm error node_modules/lucide-react
npm error   lucide-react@"*" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /Users/shaswatraj/.npm/_logs/2024-06-20T01_13_53_671Z-eresolve-report.txt
npm error A complete log of this run can be found in: /Users/shaswatraj/.npm/_logs/2024-06-20T01_13_53_671Z-debug-0.log
shaswatraj@Sh article %

System Info
Mac,Chrome

Before submitting

[X] I've made research efforts and searched the documentation
[X] I've searched for existing issues

as the error says lucide-react peer dependency mismatch with react 19
downgrading to 18 could be a solution or
use --force --legacy-peer-deps flags to npm install

lucide-react now supports "react":^19.0.0 but not rc(release candidate)
https://github.com/lucide-icons/lucide/issues/2134#event-13293674013

check the blog solve this problem
https://tutorialsmaterial.com/post/ShadCn-Nextjs-15


text:
[bug]: Sidebar has extra space at bottom when framed

Describe the bug
When the sidebar on the main site, and possibly all sidebar blocks, are framed, there is extra space at the bottom that is unnecessary.
Screenshot:

Screen recording:
https://github.com/user-attachments/assets/95e3ccb4-0fc2-4976-b2ab-212836ecc8d7
Affected component/components
Sidebar
How to reproduce
Go to the homepage on mobile, open the sidebar, and look at the extra space at the bottom. Note that this is most apparent in an iframe.
Codesandbox/StackBlitz link
https://ui.shadcn.com/
Logs
No response
System Info
iPhone 16 Pro Max. Running chrome @ latest

Before submitting

[X] I've made research efforts and searched the documentation
[X] I've searched for existing issues

not a bug

authors: NoHaxito brandonmcconnell


text:
Working with more than one projects

I have more than one project open in my workspace.
When I try to use Git Merger it's always pointed at the first project in the list.
Is there a way to switch between projects?

Thanks for opening the issue!
Currently, this isn't supported, but I'm adding this to the features list and start developing some infra work that I have I will work on it 👍

I have started using Git Merger, and find it very handy for working with Git in VSCode.  I would love to see this feature to allow me to work with multiple projects/repositories.

First of all, thank you for the positive feedback!
I will try to get to that I was very busy lately and didn't get the chance to continue developing awesome features for you guys.

authors: bradycharron minotaurrr shaharkazaz

repo: shaharkazaz/vscode-git-merger


text:
Guide on how to use this library with Kubernetes nodes discovery

Hello @shaj13 @aderouineau and @fredpetersen
I would like you to help provide guides on how to use this library on kubernetes where one can make use of the k8 api to discover pods and start a cluster.
Thanks

Never mind. I will not ask again.