Move frontpage default code to cookiecutter

Having the frontpage's html, less and assets in this repo, means it is always part of the webpack build process making it slower and generating bigger assets that are eventually unused anyway. Placing the frontpage related things in the cookiecutter gives an immediate customization point to installers and is more efficient.

@fenekku I am closing this and maybe we could open a more specific issue if it's still needed for improving customization :)

Log ideas to https://github.com/inveniosoftware/product-rdm/issues/14

Oh I thought this was quite specific: move the frontpage html/js/less from app-rdm into the cookiecutter project, so that the frontpage. which will always be overwritten, doesn't stay in app-rdm. Otherwise, more configuration needed / webpack still builds its assets (pretty sure) and app-rdm is laden with dead code. I will put that in the product one.


Update Settings Description false

Describe the bug
Comparing the Update tweaks description on your GitHub-Page and the description in the winutil itself, they are not the same and I think the one on GitHub here is the correct one and the one in the winutil is outdated.
That's because I still get cumulative updates in Windows Update even with 'Security (Recommended) Settings' applied.
To Reproduce
Steps to reproduce the behavior:

Go to 'Updates'
Read the 'Security (Recommended) Settings' description

chris waits until he make a huge change then he update the website version so you should use the github one,

Reminder, that this issue is still present.


Adding XADD/XRANGE/XREAD stream commands

@antirez is in the process of adding streams to Redis. This PR adds initial support for the XADD/XRANGE/XREAD commands in aioredis.
Tests
I've written tests and added the streams Redis branch to the travis config. In theory, the tests will only be run when the streams branch is available. The logic is a bit hacky, but I figured it will only be until streams makes it into 4.0 (now improved as the hacky version didn't actually work).
Style
I'm very open to feedback on my implementation style for the new commands. I've tried to stick to the aioredis style, but I think I will have probably wandered here or there. Happy to make any corrections or alterations.
Reason
This is my first time using aioredis. I'm working on [another project] in(https://github.com/adamcharnock/lightbus) which I would like to experiment with Redis streams, plus I also need asyncio support. I therefore thought I'd contribute this here.
As I said, happy to make any changes etc.
Remaining work

[ ] Add support for the MAXLEN parameter in xadd()
[ ] There is a question regarding style in the source for xread()

It appears to me that the test_pool_idle_close test is being a little flakey on Windows. AFAIK this is not my fault... I hope.

Great @adamcharnock! Do you know where I can find the implementation details related to Redis?
Did you use this: https://github.com/redis/redis-rcp/blob/master/RCP11.md?

Hi @barrachri,
I think that is a different kind of stream, one more to do with how the redis protocol encodes data on the wire.
I used the following:
http://antirez.com/news/114
The branch can be found here:
https://github.com/antirez/redis/tree/streams

Thanks.
Is using OrderedDict really important?
I was trying to think about a use case where the order of the key=value might be important after you used fields_to_dict.

I used an OrderedDict simply because the ordering of the key/value pairs is explicitly respected and maintained by Redis Streams. I therefore wanted to respect this in the implementation. I expect someone will find a use for it, even if I'm not sure what it would be.
Perhaps one reads a stream record then writes it back to another stream. The new record has a different field order. As Redis guarantees order, other clients could legitimately decide that this copied record was different to the original, despite there being no intention to modify it during the copying process.
As a secondary reason, I've occasionally seen hard-to-diagnose bugs crop you due to the non-deterministic ordering of dictionaries. This normally occurs when the developer assumes a regular dict has a particular ordering, which then sporadically changes under different environments and python versions.  Given that the key/values do in fact have ordering in this case, it seemed like an easy way to avoid this issue.
Also, I suspect ignoring the ordering provided & documented by Redis would probably cause developers to walk right into this kind of bug.

Clarified, thanks!

Streams has been merged inside https://github.com/antirez/redis/tree/unstable.

Should we wait for redis stable with streaming feature?

@barrachri That is great to hear.
@asvetlov Not sure if that was directed at me – but I have no view on the matter.
I'll see about getting MAXLEN implemented soon.

My question is addressed mostly to @popravich

I've just added support for MAXLEN as well as the new XREVRANGE command.
I based my implementation of that of ZRANGE and ZREVRANGE, in which case it seemed the implementation was just copied. I therefore did the same and likewise duplicated the relevant test.

Ok, travis is happy again. I don't think the appveyor tests are to do with my changes (they failing tests seem unrelated).

Quick update - it sounds like Redis Streams will be released in Redis 5.0 within a couple of months (ref).
Some additional commands have been added. I expect to add these to this pull request once the available commands have been finalised.

I've now added support for the consumer group commands + tests.
However, the following are not yet implemented in Redis. I've therefore set the tests to skip for now:

XGROUP SETID
XGROUP DELGROUP
XGROUP DELCONSUMER

Also, some of the commands are not implemented entirely as documented. This'll probably require a little tweaking once streams is stable.

Update: Redis 5 RC3 is now out. What is the view on merging at this time?

Ok, travis is happy now. The code coverage diff seems to show lack of coverage on sentinel as the sticking point, but as I haven't touched that I'm going to assuming is not my fault.

Thank you for the comments @popravich, I'll take a look at making the changes now/shortly.

I've just pushed changes for everything bar the doc strings, which I'll take a look at now.

AFAIK I've now responded to all your change requests. Do let me know if there is anything else though 👍

Lets wait for CI tasks to complete.

Merged! Thanks

That's great to hear, thank you very much for taking the time to review this. I'll be happy to revisit this if this API changes before Redis 5.0 stable.
Once this sees a release I'll update lightbus to point to the particular aioredis version.


Remove excessive rights and fixed modman file

fixes #825
removed execute right on files

@rikterbeek could you take a look at this PR?
installation completely breaks in current version (2.9.3)

HI @JeroenBoersma,
Thanks for the PR! looks good for me @sandermangel did the mean this change in PR is breaking installation or the current modman file is the problem ?
Regards,
Rik
Adyen

@rikterbeek sorry, I mean this fixes it :)

Shall I create a new PR so we can also do a version bump ? @rikterbeek


Question regarding data layout of mint accounts

Thank you for the awesome work on this project. I have a simple question - I see that the query to find mint accounts for a given Candy Machine ID is a simple scan that does a memcmp at a particular offset of the 'data' contained in accounts:
let config = RpcProgramAccountsConfig {
        filters: Some(vec![RpcFilterType::Memcmp(Memcmp {
            offset: 1 + // key
            32 + // update auth
            32 + // mint
            4 + // name string length
            MAX_NAME_LENGTH + // name
            4 + // uri string length
            MAX_URI_LENGTH + // uri*
            4 + // symbol string length
            MAX_SYMBOL_LENGTH + // symbol
            2 + // seller fee basis points
            1 + // whether or not there is a creators vec
            4, // creators
            bytes: MemcmpEncodedBytes::Base58(candy_machine_id.to_string()),
            encoding: None,
        })]),
        account_config: RpcAccountInfoConfig {
            encoding: Some(UiAccountEncoding::Base64),
            data_slice: None,
            commitment: Some(CommitmentConfig {
                commitment: CommitmentLevel::Confirmed,
            }),
        },
        with_context: None,
    };

Could you please point me to the authoritative resource that specifies the data layout for Mint accounts? The closest thing I have found is this resource from Metaplex, but interestingly it does not mention that the Candy Machine ID is stored in the data of mint accounts.
That's all I need - I'm trying to get a grasp of Metaplex's internals, and if such a resource exists it would be very helpful.
Thank you!
-- A very frustrated engineer trying to develop in Solana

Oh, I just realized the first creator in the creators vector is the candy machine ID! At least, based on the single NFT I have looked up. I may have just answered my own question.

Yeah, my variable naming on this is not great so I can understand how it might be confusing. What's happening here is that get_program_accounts is querying the token-metadata program to find all the metadata accounts and then filtering by doing a memcmp with an offset that puts it into the creators array. You can see the Metadata and Data account layout here: https://github.com/metaplex-foundation/metaplex-program-library/blob/5c7a15d283776cc36c85456a0d0804ab79cdf02b/token-metadata/program/src/state.rs#L81

Thanks for the help! I really appreciate it.

Hey Samuel, I want to reopen this to ask a related question.
I'm trying to write a Solana program that will only process transactions coming from Token holders of a specific NFT collection. What I'm trying to figure out is how to validate that the transactions are in fact generated by holders of the NFT collection. This is how I'm planning to do that:

Have the transaction contain the associated Token Account of the user which holds the NFT (i.e the account that has balance = 1 for some particular Mint account)
Have the user sign the transaction using the wallet that owns the associated Token Account that holds the NFT
Then the Solana program verifies the signature of the transaction using the public key in the 'owner' field of the associated Token Account and it also verifies that the balance of the Token Account = 1.

The crucial piece of validation I'm missing is verifying that the Mint Account linked to the associated Token Account is a part of the NFT collection I'm targeting.
This is where the candy machine ID comes in. I think that by simply verifying that the Mint account has the candy machine ID in its creators array then that proves that the associated token Account does belong to the NFT collection I'm targeting.
Does this sound like a good approach to this problem? Or am I totally off and opening myself to all kinds of security risks?
Thanks again for your time!

@macadev this seems like an interesting use-case and problem but unfortunately I can't expand Metaboss issues to broader Solana support otherwise I would be completely inundated with issues and I want this repo to focus on Metaboss itself. There are a number of Solana Discords you can join where you can collaborate with developers and ask questions like this, here's one of them: https://discord.gg/solana.
Thanks for you understanding on this and let me know if you run into any more Metaboss issues.


/stats result is too verbose

Result from /stats polluting UI logs. Need to define different log levels and mute results from /stats by default

By "logs" do you mean likes like the following (generated every second) or something else?

Now fixed in that PR.


Add contextual parsing support for Clojure?

This may apply to other Lisp-like languages as well, but Clojure has two types of comments:
; This is a single-line comment, which is
; marked by a ";"

#_(
    This is a multi-line comment, which is denoted
    by "#_", then a pair of brackets. Everything between
    the brackets is ignored.
)

Hello
I pushed basic support for the single line comments, but currently my comment/string parser is very simple, and it will break if a clojure multiline comment contains a bracket.
e.g.
(comment

(defn hey []
  ("Hey there!"))

Check me out!
)

I may have another look at improving my parser to support bracket counting to support these type of comments, but this is the current situation.

I think the inside brackets in a multiline comment have to match as well, otherwise the comment thing will get confused.

Can you also add support for strings?
"This is a string"
"This is also a string"

Also, some things need to be ignored, such as escape sequences:
\( \) \[ \] \{ \}

I added the strings, I meant to do that last time but forgot. Oops.
Could you give a real world example of how escaped brackets might be used in clojure?

This is now waiting for: https://github.com/PrismJS/prism/pull/1214

I just posted #1311 which implements the updates requested for #1214.

Fixed in 1.0.19


Any request beyond simple POJO in body fails with java.lang.ClassCastException: class org.eclipse.jetty.server.Request$1 cannot be cast ...

Describe the bug
When trying to send something else than a body, or trying to do anything more than simply getting a POJO from a request body, deployment on GCP using GcfJarLauncher fails with ClassCastException: class org.eclipse.jetty.server.Request$1.
Sample
Starting from the example on the website:
@SpringBootApplication
class Application {

    @Bean
    fun uppercase(): Function<String, String> {
        return Function { value -> value.uppercase() }
    }
}

fun main(args: Array<String>) {
    SpringApplication.run(Application::class.java, *args)
}

For purposes of getting this up-and-running in GCP I used the Shadow plugin and set this up in my gradle build file:
cloudFunctionRun {
    target = "org.springframework.cloud.function.adapter.gcp.GcfJarLauncher"
    port = 8080
}

tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> {
    mergeServiceFiles()
    manifest {
        attributes(
            "Main-Class" to "org.springframework.cloud.function.adapter.gcp.GcfJarLauncher",
            "Start-Class" to "com.example.Application",
        )
    }
}

and deployed via gcloud without issues. The function gets deployed and responds correctly. This is a function that only accepts a body and performs just that. However if I want to build on top of this example and build something else, for example adding URL parameters, suddenly the serialization fails.
ClassCastException: class org.eclipse.jetty.server.Request$1 cannot be cast to class java.lang.String

OK, so I tried exchanging the String to org.eclipse.jetty.server.Request. But that fails too, with:
java.lang.ClassCastException: class org.eclipse.jetty.server.Request$1 cannot be cast to class org.eclipse.jetty.server.Request

And this is the place where I get lost and no other forums seem to have an answer. I found a StackOverflow question and its corresponding GitHub issue where the OP claims it worked with a BufferedReader (goodness me), but surely, there should be a more straightforward way, where I declare that I'll handle the entire Request object and either use BiFunction with both Request and Response, or just handle the Request and return a String. If my digging is correct than the case with Request$1 means that there is some inheritance going on and the object is private, which is the reason why the cast fails. So now - is this something that can be done, or is this an accepted technical debt, nobody knows how to solve this and thus Spring Cloud Functions do not support and will not support anything else beyond body handling?
Thanks a lot, hope my description was clear enough.

Happy to help if possible...


python312Packages.httpsig: propagate setuptools

and convert to PEP517 build and lingo, convert hash to SRI format and configure and explicit check hook.
Closes: #303483
Description of changes

Things done

Built on platform(s)

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

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

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

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

[x] Fits CONTRIBUTING.md.

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

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

11 packages built:

dpt-rp1-py
dpt-rp1-py.dist
home-assistant-component-tests.smartthings
python311Packages.httpsig
python311Packages.httpsig.dist
python311Packages.pysmartapp
python311Packages.pysmartapp.dist
python312Packages.httpsig
python312Packages.httpsig.dist
python312Packages.pysmartapp
python312Packages.pysmartapp.dist


App.use(path, ...) Does Not Mount at '//'

Router instance mounted explicitly at '//' exposes routes when path begins only with a single /:
const TestRoutes = express.Router();

TestRoutes.get('/drop/table/:table', (req, res) => {
  // drop table
  res.send(`Dropped table '${req.params.table}'`);
})

TestRoutes.get('/', sendListOfTestRoutes);

if (TEST) app.use('//', TestRoutes);

app.listen();

Expected behavior is that navigating to http://hostname/ would bypass this Router and go to the main app, but instead Express serves the list of test routes mounted within the router at //.

Mounting at /// seems to provide the same result. I've currently implemented a workaround like:
Router.get(`/`, sendListOfTestAdminRoutes);
Router.get(`/adminRoute1`, adminRoute1);

app.use(`///`, Router); // mount at '//'

This mounts the routes at:

http://host// for the 'list'
http://host///adminRoute1 for the specific route

This is acceptable as a workaround for now, because in sendListOf... the links are generated programmatically and the third / can be coded in, but the behavior is not intuitive and could confuse me again if I need to come back to it later.
Admittedly, this is an obscure use case.  Once I saw that // is a legal route, though, it seemed like a clean choice for this type of application.

Hi @gebbber thanks for the report. I was able to reproduce the issue. I think this is similar to #3798 ; ideally your app should work like you expect when enabling strict routing, but in Express 4.x the strictness does not affect app.use statements. It may not be possible to fix this within 4.x due to breakages, but I think we could probably fix it within the 5.x series before it releases. I am currently back to work on getting the deps released to spin out the 5.x release I think within a few weeks or something. So if someone wants to take a stab at it, the sooner the better to land 👍


TE-3.3 increase the traffic distribution deviation

This pull increases the traffic distribution deviation from 0.5 to 1 same as TE-3.2 (https://github.com/openconfig/featureprofiles/blob/b03a56fd2537b160aa8f25c7e06adadb59e7a053/feature/gribi/ate_tests/weighted_balancing_test/weighted_balancing_test.go#L106).

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 45.603%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
586

Relevant Lines:
1285

💛  - Coveralls

Looks like deviation value is used as the absolute margin when comparing traffic weight distribution. If the weight values are close to 1 like below, an absolute margin as 1 seems indicating a large deviation which may not be desired....
wantWeights := map[string]float64{
        "1": 1.25,
        "2": 1.875,
    }

In addition, should we consider comparing the traffic ratio instead? e.g. got below should be considered matching the want.
wantWeights := map[string]float64{
        "1": 1.25,
        "2": 1.875,
    }
got := map[string]float64{
        "1": 2.5,
        "2": 3.75,
    }

I think wantWeights is a misleading variable name, otherwise wantWeights contains the ratio percentage as you suggest. So the comparison is based on the percentage (ratio) and 1 means 1% which is not a big deviation and are used in other tests. to clarify the test compare the distribution in two places:
1- L465 in which the ratio (wantWeights) are [6.25, 18.75, 30.45]=100%
2- L552 as you referred in the comment which ratio (wantWeights) are [1.25, 1.875, 6.05,..... , 6.05 ] (16 *6.05 + 1.25 + 1.875)~= 100%
I can rename wantWeights to wantRatio if you agree.

Looks like deviation value is used as the absolute margin when comparing traffic weight distribution. If the weight values are close to 1 like below, an absolute margin as 1 seems indicating a large deviation which may not be desired....
wantWeights := map[string]float64{
        "1": 1.25,
        "2": 1.875,
    }

In addition, should we consider comparing the traffic ratio instead? e.g. got below should be considered matching the want.
wantWeights := map[string]float64{
        "1": 1.25,
        "2": 1.875,
    }
got := map[string]float64{
        "1": 2.5,
        "2": 3.75,
    }

concerning the deviation value, larger than .05% is needed based on the values that are set as the weights. To clarify this, devices often support different levels of granularity (2^n bucket) for traffic distribution.  If the sum of weights for a certain next-hop group is set to values other than (2^n) the distribution ratio will be rounded inevitably which will lead to deviation. To give u an example, let us assume a device supports a granularity of 64 buckets, and the weights for the next hops nh1 and nh2 are set to 2 and 3 (as it is done in the test). In this case, the expectation is to have the traffic distribution of 40% and 60% for the nh1 and nh2. However, since the 5 is not devisable by 64, the values will be rounded up as shown below which results in a deviation of around.

Similarly, the deviation will be 0.62, 0.15, 0.39 for devices with 32, 128, and 512 buckets.
Thus, we either need to increase the deviation to 1 or change the test and make sure the sum of the weights for all nhgs is divisible by 2^n.  Please let me know which one you agree with. It is also possible to get the granularity as the test argument and calculate the expected deviation based on the granularity and the weights which I personally this will make the test complex unnecessarily.
Also. I do not follow your second comments. the wantWeights includes the ratio and its value at the comparison point (line 552) is  [1.25 1.875 6.05 6.05 6.05 6.05 6.05 6.05 6.05 6.05 6.05 6.05 6.05 6.05 6.05 6.05 6.05 6.05].

/gcbrun

ok, the wantWeights is the traffic distribution ratio in percentage instead of the weight values. So, deviation as 1 below means the max deviation in  absolute margin is 1. In other words, we consider test fail if the actual traffic ratio in percentage has >1% different from the expected ones.
cmp.Diff(wantWeights, got, cmpopts.EquateApprox(0, deviation))

This looks good to me. @vosipchu @sachendras @xw-g to comment on the acceptable deviation.

/gcbrun


#627 ensure logical cookie name is translated when retrieving cookies

#627

Hey @acgray - can you provide some background on this one?

Ignore me @acgray, I should have read the associated ticket.

This was fixed in 2.9.0, closing PR.


Cannot delete some message

I create middleware to delete any message, works fine. But not with sticker, GIF, file, photos, videos. Anyway, its on private message.
b.Use(func(hf telebot.HandlerFunc) telebot.HandlerFunc {
	return func(ctx telebot.Context) error {
		log.Println(ctx.Delete())

		return hf(ctx)
	}
})

You need to register these media handlers to be able to process them in middleware.
b.Handle(tele.OnMedia, func(c tele.Context) error { return nil })


Source code is not fresh within npm or bower installation

While installing angular-spinner within bower or npm, the setTheme() method is unavailable though it is  0.7.0 version but the source code in not actual.

+1
On Wed, Oct 28, 2015, 7:27 AM astarykov<EMAIL_ADDRESS>wrote:

While installing angular-spinner within bower or npm, the setTheme()
method is unavailable though it is 0.7.0 version but the source code in not
actual.
—
Reply to this email directly or view it on GitHub
https://github.com/urish/angular-spinner/issues/74.

I'll release a new version soon

Released as 0.8.0


Use GH workflows for tests and linter

Nice. We should do this for go-client and maybe node-client too

Guess I should have consulted the org before doing this, but glad you approve 😅