[WTS] Providing 3000+ Words SEO Ready / Pillar Content

Hi there, first let me introduce myself, I am a native content writer and I am posting this thread only to provide SEO Ready Long Articles which are deep researched, well written and without silly mistakes.

So What Kind of Contents I Can Provide ?

Trademark Content : Articles will be about some new ways to solve a problem, which has been not discussed before, will enough research data that will keep the reader occupied with enthusiasm and faith that this type of method works. Best used for Landing Pages.
Go To Guidebook : All tips, tricks and methods at one place – like a super newbie friendly guidebook, detailed and step by step explanation based. This will come with lots of images, specially screenshots on how steps are being done. Best used for blogs.
Expanded List Post : Well, you all have came across this type of content which tells 50 or 100 ways how you can boost your instagram. That type falls into this category, this can be anything ranging from methods, products, services, recipe etc. This type of content is highly useful for creating bookmarks and shares by others.
The Hero Post : Best/Top/Most Popular products or websites or themes or literally anything which makes people drool. These are generally the longer, the better. This type of content is best for pillar content.
Yes, these are the most recognized Content Frameworks that works in whitehat SEO so I am offering my service to write them.

What you will be getting :

1. It goes without saying, all content is written by me, no plagiarism etc – you know the drill.
2. Contents will be well researched, to the point and explained to the tiniest detail.
3. I will provide unique graphs, infographics and images – created by me in PhotoShop and also some images taken from Shutterstock legally. Images will be provided inside article and in a separate folder with Citation / Keyword inserted into them.
4. Articles will contain sharetriggers so that it will be easier to read and share.
5. Can also create videos and animations if needed, but they will be charged extra.
6. Unique title, intro, body, conclusion and one brief summary for every article.
7. At least 3000 words article, at most 5000.
8. Keywords go inside the content, as always. I am a student of Brain Dean so generally follow his advice about placing them, but if you have some other ideas, I am all ears.

How long it will take ?

Most of the times, it will be delivered within 3-4 days but articles which require lots of work may take upto 7 days, I am looking to provide quality work here, not to grab quick cash.

How much it will cost you ?

1. Content rate is Fixed for now, \$29 each, paid in advance every time.
2. There will be no review copies, if you need to see my writing quality, read this post again, period.
3. I will talk with you, give you brief about the article, we both agree, you pay and I start writing, as simple as that.

So if you are interested, please get in touch through pm.
If you have any queries, feel free to post here.

Stay Safe.

.

Providing 3000+ Words SEO Ready / Pillar Content

Hi there, first let me introduce myself, I am a content writer from India and I am posting this thread only to provide SEO Ready Long Articles which are deep researched, well written and without silly mistakes.

So What Kind of Contents I Can Provide ?

1. Trademark Content : Articles will be about some new ways to solve a problem, which has been not discussed before, will enough research data that will keep the reader occupied with enthusiasm and faith that this type of method works. Best used for Landing Pages.
2. Go To Guidebook : All tips, tricks and methods at one place – like a super newbie friendly guidebook, detailed and step by step explanation based. This will come with lots of images, specially screenshots on how steps are being done. Best used for blogs.
3. Expanded List Post : Well, you all have came across this type of content which tells 50 or 100 ways how you can boost your instagram. That type falls into this category, this can be anything ranging from methods, products, services, recipe etc. This type of content is highly useful for creating bookmarks and shares by others.
4. The Hero Post : Best/Top/Most Popular products or websites or themes or literally anything which makes people drool. These are generally the longer, the better. This type of content is best for pillar content.

Yes, these are the most recognized Content Frameworks that works in whitehat SEO so I am offering my service to write them.

What you will be getting :

1. It goes without saying, all content is written by me, no plagiarism etc – you know the drill.
2. Contents will be well researched, to the point and explained to the tiniest detail.
3. I will provide unique graphs, infographics and images – created by me in PhotoShop and also some images taken from Shutterstock legally. Images will be provided inside article and in a separate folder with Citation / Keyword inserted into them.
4. Articles will contain sharetriggers so that it will be easier to read and share.
5. Can also create videos and animations if needed, but they will be charged extra.
6. Unique title, intro, body, conclusion and one brief summary for every article.
7. At least 3000 words article, at most 5000.
8. Keywords go inside the content, as always. I am a student of Brain Dean so generally follow his advice about placing them, but if you have some other ideas, I am all ears.

How long it will take ?

Most of the times, it will be delivered within 3-4 days but articles which require lots of work may take upto 7 days, I am looking to provide quality work here, not to grab quick cash.

How much it will cost you ?

• Content rate is Fixed for now, \$29 each, paid in advance every time.
• There will be no review copies, if you need to see my writing quality, read this post again, period.
• I will talk with you, give you brief about the article, we both agree, you pay and I start writing, as simple as that.

So if you are interested, please get in touch through pm.
If you have any queries, feel free to post here.

Stay Safe.

Looking for feedback! Am I ready to take photography to the next level?

As Philip and Tetsujin have noted, running a photography business is more about the business than the photography. My quick reaction to your images: They’re salable. And that’s essentially all you need out of your photography.

Start working on growing my client base, as of now just posting my work on Instagram, working now on creating my own portfolio and keep going out to shoot and meet new people.

Do make sure you are charging for these shoots. If this is your first business, you have a lot to learn about selling, negotiating, closing deals, and confidently charging for your time and work. Best start practicing now.

Another thing is creating my home studio, not posible at the moment due to lack of space but with a plan of moving within the next year.

Slow your role, mate. Every business takes some investment to get running, but if studio will not be your primary source than I’ll challenge you this: only set up the studio when the business itself (the money you’ve made from it) can outfit the studio. Start thinking about everything in these terms. You only get to spend what you’ve made. Otherwise, your still funding this business from other work that you do.

as of now just posting my work on Instagram

That’s all good and fine, but have you thought how you’re going to convert an instagram follower to a paying customer?

There are a plethora of business plan templates out there online and in book form. I highly recommend you find one and run through it as an exercise. Before starting this venture, you should have an idea, at a bare minimum:

• what your unique value proposition is (why should someone hire you)
• who your target market is (marketing 101)
• how you’re going to grow your client list (marketing 101)
• what your investment strategy needs to be (gear, space, etc)
• what you need to charge and how many clients you need to stay alive (plan plan plan)
• what you’ll do if you do not get the clients you need to stay alive (contingency plan plan plan)

There is quite a bit more but I’ll leave that for your business plan guide. Do note that the best businesses are not necessarily the best photographers. But, they are the best businesses.

Selling – Buy Subreddits With Huge Traffic And Subscribers Ready… | NewProxyLists

Hi,

If you want to get instant traffic to your websites and projects then you can now able to buy our readymade aged subreddits with subscribers and huge daily traffic ready. You just need to start maintaining those subreddits to start getting instant traffic from day 1.

Subreddit 1:

Niche: Vibrators (Awesome for sex toys website owners)
Subscribers: 2k+ and growing daily
Daily Traffic: 9k-10k+
Age: 5 years old
Price: \$xxxx

Subreddit 2:

Niche: Cumshot
Subscribers: 31k+ and growing daily
Daily Traffic: 4k-6k+
Age: 10 years old
Price: \$xxxx

Subreddit 3:

Niche: Quiver (shaking Orgasm)
Subscribers: 7k+ and growing daily
Daily Traffic: 1k-2k+
Age: 4 months old
Price: \$xxx

Email: (email protected)

Diabetic Recipes Site Ready to Make Money Keep 100% Profit

Make Money From The Mega Health Opportunity With Premium Quality Product, Keep 100% profit, Newbie friendly, No Maintenance Required, 100% Automated

Hello, I am selling my new beautiful diabetic recipe blog https://diabeticrecipeshub.com/ that offers eBook.

Domain name are chosen carefully so I only choose the best domain name and high value, this is great domain name so that it has the potential to become a large and profitable business and has high value investments. Godaddy domain value \$755, click here to check.

Site is running on WordPress which is a very easy to manage and update. I have already installed a nice responsive theme so you don’t have to worry about mobile or tablet visitors. All plugins and settings necessary are already been installed.

Website is 100% automated, the customer gets their ebook immediately after purchase. Products are digital, no postage or shipping. All you have to do is send targeted traffic, make a sale and keep 100% profit.

To increase traffic you can do SEO Services which shouldn’t cost more than \$100 but with more traffic revenue will be double or triple so it will still be profitable.

• diabeticrecipeshub.com domain pushed to buyer’s namecheap account
• eBook diabetic recipes contains 500 recipes
• All site contents, theme files and resources
• Free transfer to your hosting server

FAQ

What is the best hosting package to run websites?
I highly recommended use Linux cPanel Hosting Package. The annual cost is only \$36/year. The standard package is enough to run everything. You can also upgrade higher in the future if needed

What is required to keep the business operational?

pay domain and hosting

How does the business generate revenue?

Are there any expenses for the business? If so, what are they?

domain and hosting

What marketing initiatives have been used for this business?

Shared on social media

How can the future owner improve the business?

I am looking for some serious buyer who is ready to take over this site to the next level. If you have any questions, let me know and I will try to explain everything.

Thank you for watching and let me know if you have questions

dnd 5e – Is this homebrew Holy Archer class ready for playtest?

So, after lots of thought I decided to present my homebrew class for review. The background on why I made it is here, but, in short, one of my players wanted to play a paladin-like ranged class. By the time, I did not consider the War Cleric or the Celestial Warlock, which were very good options for it, and instead I homebrew this Holy Archer class. Even with the options presented, I do feel like there is a place for a ranged paladin class, with similar features (divine smite and auras, for example) but more fit for ranged combat. At the very least, I like the concept of this class and I would like to make it playable, and I hope this is enough of a reason to create it.

As I shared in the meta, I was concerned that a whole class review would be hard, so I will structure the question in the following way:

• I will present the feature and explain why I think it fits well for that level (i.e., is balanced) and why it fits well for the concept.
• By the end of the question, I will share the comparisons I have made against other classes, and why so far I think the class is fairly balanced.

The reasons I need help are:

• Spellcasting classes are fairly harder to balance, IMO, since the utility of spells is not easy to quantify.
• I might have missed some obvious broken iterations or (as per the previous bullet) overestimated the usefulness of spells.

No more delays, I present you the Holy Archer. If you prefer to read it in a nicely edited PDF, this is an external link to my OneDrive with it.

For the question, I will highlight features that I am more concerned about. I will super highlight what I feel really needs a second opinion. In particular, these are the features at 3rd, 6th, 9th and 10th level.

As a final comment, this class was initially considered for Curse of Strahd, which runs from 1st to 10th level. For that reason, I have put more thought and effort on the 1st to 10th levels, and these are the ones I would like a review on. Once these levels are playtested and fairly balanced, I will move on to the next tiers. The PDF has a sketch on the higher levels but please ignore it.

I used the Paladin as a base-line. You will notice many features are changes to Paladin features, and/or features I felt fit in the class concept (e.g. slightly modified Improved Crit from Champion or Guided Strike from War Cleric). The reason I have preferred to use modified (or even as is) features from other classes is that they have obviously been playtested already, and I felt they were fitting as they were.

The class gets d8 as their hit dice, which seems appropriate for a ranged class (same as the rogue, specifically). They have proficiency in Light and medium armor, in simple weapons and in martial ranged weapons. The saving throws are Dex and Cha, following the concept of “one good and one bad ST”, and they get 2 proficiencies, chosen from Acrobatics, Insight, Medicine, Persuasion, Religion, Stealth. So far, I think these are fair additions that need little explanation and hardly will make it imbalanced in any way.

They are half-casters (as Paladins), so they get their spellcasting at 2nd level and get up to 5th level spell slots. Their spellcasting ability is Charisma. The reason I chose Charisma over Wisdom is that I did not want to give them two “more useful” primary abilities. Allowing them to focus on Dex, Wisdom and Con would allow them to focus on the 3 major Saving Throws, and Wisdom is also useful for Perception. With Cha, the player has to choose between better saving throws and perception or better spellcasting, from my point of view.

As for equipment, they start with a Longbow or a Light Crossbow, a dagger, Leather or Hide armor and a Holy Symbol. Usually my campaigns don’t have a problem with gold, so starting with a longbow rather than a shortbow seemed fine. I usually allow rogues to start with light crossbow as well. And I do not keep track of ammo.

As per @Molot suggestion, this is a table of the features in the class up to 10th level, compared to Paladin’s features (both get the same spellcasting slots).

$$begin{array}{cll} textbf{Level} & textbf{Holy Archer} & textbf{Paladin} \ hline 1 & text{Divine Sense, Archery} & text{Divine Sense, Lay on Hands}\ 2 & text{Spellcasting, Holy Arrow} & text{Spellcasting, Divine Smite, Fighting Style}\ 3 & text{Sacred Oath} & text{Sacred Oath}\ 4 & text{ASI} & text{ASI}\ 5 & text{Extra Attack} & text{Extra Attack}\ 6 & text{Modified Aura of Protection} & text{Aura of Protection}\ 7 & text{Purifier of Evil (extra damage} & text{Oath Feature}\ 8 & text{ASI} & text{ASI} \ 9 & text{Retreat} & text{Nothing} \ 10 & text{Aura of Encouragement} & text{Aura of Courage} end{array}$$

1st

At first level, I gave them Archery and Divine Sense. Since it is more of a damage-dealing class than a tank-utility (Paladin), I chose to take away Lay on Hands. With the Fighting Style at 2nd level, I felt the class was too bad for 1st level, so I moved it to 1st level (which Fighters already get too, so I don’t think it is a problem).

2nd

At this level, they get Spellcasting and Holy Arrow, which is simply the Paladin’s Divine Smite, but for ranged weapon attacks. Usually that’s what half-casters get (and the fighting stlye already given at 1st level), so far so good for me.

3rd

They get their Sacred Oath. So far I have only made one choice for it, and I think presenting more than one would be bad either way. The Oath gives the following two options of Channel Divinity (similar to a Paladin having 2 choices):

• +10 to hit after rolling (same as Guided Strike from Cleric)
• Choice to make a 18 or 19 a critical hit.

Note that this can only be done once per short rest. I particularly like the second option because Critical hits + Divine smites are one of the funniest moments for Paladin players. I am a little concerned that it might be too much, but with one use per short rest I don’t see it as game breaking. Some other subclasses of the Paladin, such as the Vengeance, can use their CD to get advantage on every attack, which will arguably lead to a critical hit eventually, as well. Anyway, this is the first feature that makes me not too sure.

For the spell list of the Oath, they are as follows:

• 3rd: hunter’s mark, sanctuary. One good spell and one thematic/situational/decent spell. I may reflavor hunter’s mark for something more… Divine.
• 5th: Misty step, magic weapon. Again, one good spell and one thematic/situational spell.
• 9th: Haste, Dispel Magic. I am concerned about Haste here. It is a very good concentration option for a ranged class (which should not be attacked too often), and Dispel Magic is also a very decent spell (although situational).

4th level

They get ASI at 4th, 8th, 12th, 16th and 19th level, as usual. I will skip these.

5th level

Extra attack. Not much to say, this is mainly a martial class and they should get more attacks at 5th level.

6th level

Aura of Protection – but different from the Paladin one.

Beginning at 6th level, you can release an aura of protection against evil spells. Using an action, you create a 10 ft. aura that protects you and your allies from area of effect spells. When you or your allies are subjected to an area of effect that allows you to make a saving throw to take only half damage, you instead take no damage if you succeed on the saving throw, and only half damage if you fail.

You can use this feature once per long rest.

At 18th level, the range increases to 30 ft and you restore the feature once per short rest.

At 20th level, the range increases to 60 ft. and the aura is permanent.

Obviously, this is based on Evasion from Rogue, but also an aura-like from the Paladin. Giving an AoE permanent Evasion would obviously shadow the Rogue feature heavily, so I decided to make it cost an action to “activate” and only usable once per long rest. At the level they get it, it’s quite counter-intuitive, as it’s useful against AoE spells (say Fireball), but the range is so small they force their allies to be close (thus being more susceptible to Fireball).

In terms of Flavor, rather than an “evasion”, the aura makes the spell itself weaker (be it divine intervention or what else), which is the reason it works for any AoE, not only Dex-based saves.

The auras (this one and others that will follow) are my major concern on this class. Once per long rest may be too few uses for a 6th level feature, while a permanent aura would be obviously broken, and I am not sure how the middle behaves. Maybe “Charisma modifier” times per long rest would fit better?

7th level

This one is straight forward: extra 1d8 against Undead and Fiend. This is a nice feature against these enemies and so far I think they have been gaining very useful features for any combat, so I wanted to give them something more situational and thematic. At 7th level they get an extra spell slot as well (half-caster), so I don’t feel bad about giving them “only this”.

9th level

Originally, I was not going to give them anything, as they already get 3rd level spell slots and oath spells. But so far they have not gained any use for their reaction. They don’t get opportunity attacks because they are ranged, they don’t get Uncanny Dodge to halve damage, and if I am not mistaken, absolutely no spell in the Paladin list has a reaction casting time. So I gave them the ability to retreat

Beginning at 9th level, when an enemy gets within 10 ft. of you, you can use your reaction to move away from it up to half your speed. If the enemy is an Undead, you can move up to your full speed.

This is similar to a feature from a Rogue subclass in Xanathar.

So far, I am concerned that I might be giving them too many useful features, but I will talk about it in the comparison with other classes later.

10th level

Aura of Encouragement.

Beginning at 10th level, you can release an aura of encouragement towards your allies. Whenever an ally within 10 ft. (does not include you) fails an attack roll, ability check or saving throw, they may choose to re-roll. This feature can only be used once per short rest (for each ally using the feature).

At 18th level, the range of this aura increases to 30 ft. and the feature can be used twice per short rest.

At 20th level, the range of this aura increases to 60 ft. and the feature can be used once per minute.

I really like this feature. It’s a full support feature (note that it does not apply to yourself), and my hopes with this feature is to make the party go “THANK TYR WE HAVE THIS GUY HERE IN OUR PARTY”. It’s essentially a free reroll to each member of the party, which may save them in crucial times.

Again, I am concerned about this because it’s quite a new mechanic. Players will be rolling lots of dice and rerolling one of these rolls doesn’t seem concerning, but maybe I am missing some feat or other feature that this completely overshadows, or maybe this is not enough for a 10th level feature.

Compared to Aura of Courage, it certainly feels more generally useful.

I was also thinking about adding something along the lines of “Against undead or fiends, the first reroll is free”, going back to the theme of undead/fiend slayer, but I thought it may be too much.

So, the classes I feel should be considered for comparison are Paladin (duh), Fighter, Ranger and Rogue. I don’t see much point in comparing against full spellcasters, and I don’t think there is really much to compare between this and Barbarian, Monk or Warlock, as they fit completely different concepts, even though they are “martial” classes. These comparisons are my main notion of “balance”, as per How can I check to make sure my homebrew class is balanced compared to pre-existing classes? and especially this answer.

Well, the whole idea is that they are conceptually different. While the Paladin is a melee tank frontliner, the Holy Archer is a ranged damage dealer with some utility. If the player wants the tank version, they pick paladin. If they want the ranged DDer, they pick the holy archer.

Fighter

Usually Ranged Fighters are not exactly optimal, but are certainly an option. Still, I would choose the Fighter if I want to make a feat-based character (let’s put Sharpshooter and Lucky in this build, shall we?), which is something the Holy Archer would struggle to do, as it requires a fair amount of attributes and gets the standard amount of ASIs. They also can be very competitive with Battle Maneuvers as a Battle Master.

On the other hand, the Holy Acher has nice spells, utility for the party and probably can outdamage a standard Fighter build (i.e. without Sharpshooter at least) with some uses of the Holy Arrow (which is stronger than battle maneuvers).

Overall, I think the Holy Archer is better than a ranged Fighter, but the latter still has its niche with feat-based builds and, even then, the Fighter class as a whole still has their use as melee fighters.

Rogue

So, here, I started by computing the damage output. So, basically, I compared a Rogue that is consistently getting Advantage (through his use of Bonus Action for Hiding) against the Holy Archer in a few uses of his spells:

• For consistent damage against high AC monsters and helping the party, Bless.
• For consistent damage alone, Hunter’s Mark.
• For burst damage, Holy Arrow (Divine Smite).
• Not using any spell slot.

In all levels, except for levels 5 and 6, the Rogue can deal more consistent damage than the Holy Archer, while obviously the Holy Archer can output a higher burst damage (especially by using his Channel Divinity to force a critical hit more often). At 5th and 6th, the Holy Archer outdamages the rogue due to the extra attack being considerably better than just +1d6 for the Sneak attack, however, at 7th level the Rogue comes back on top again.

However, in combat, the holy archer provides more utility to the party (either by bless, healing or the auras), which, in my opinion, make them on par. However, this utility is hard to quantify, which is one of the reasons I am asking for a review here.

Outside combat, the Rogue has more proficiencies and expertise, while the Holy Archer has Charisma as a primary stat and, well, spells. Again, I believe both are on par here.

But since spells are hard to quantify, this is the main comparison I would like to hear a review on.

Ranger

I will be fair: I would pick the holy archer above the ranger most of the time. But I don’t believe this is reason to say the archer is overpowered, rather, I believe the ranger to be underpowered in 5e. None of my groups would pick ranger to begin with (most of them tried at least once, and felt really bad and disappointed about it). In particular, I feel like giving this class Hunter’s Mark completely makes the Ranger useless, except if you go for Dual Wielding ranger, which then is conceptually different than the archer version.

Nonetheless, the Ranger has higher hit dice, can go for a dual wielding option (thus not being completely wasted) which is superior in lower levels, and can focus on Wisdom, thus arguably being more resilient in saving throws, more useful against surprise attacks and still has the ranger flavor which does not overlap with my homebrew in any way.

So, although I believe mechanically the Holy Archer outshines the Ranger, I would say the same for the Rogue and even for a Fighter.

As expected, this became a large question. I hope I could convey my line of thought and concerns and show that I have put some thought on it and, to the best of my abilities, ran through the number crunching of damage dealing in order to balance it. If the answers say that the class is ready for playtest, or that small changes are required in order to playtest it, I will be providing it as an option for a group that is starting CoS soon, otherwise, I will carefully try to understand the criticisms and may post a new version with the feedback I receive.

My site was showing ads all fine, but then I decided to rebrand and change the domain name of my site.
So my new domain is uncutacademy.com

I did make changes to the webmaster’s console (search console) and have added the site as my property, also I have moved the site as well. see image below

I have now added the domain to my AdSense and applied for monetization of the new domain and removed ads from my previous domain.

I was till now getting the COVID error as the staff was low at Google HQ. Now I am getting policy violation as shown below

This feels so bizarre as I had an active account and was generating revenue and now it says I have a policy violation.

Kindly let me know what is to be done here.

Thanks

url routing – Is this URL router production ready c++ code?

So I’ve written a URL router which also allows for wildcards aka path parameters.

A URL like /users/{uuid} can be added and then, when a user sends a request to the server with the following target /users/955b2a88-ae80-11ea-b3de-0242ac130004, the uuid will then equal 955b2a88-ae80-11ea-b3de-0242ac130004.

Example:

```PathMatcher<int> matcher(-1);

Parameters parameters;
assert(matcher.match("/users/9c4ceec8-f929-434e-8ff1-837dd54b7b56", parameters) == 1);
assert(parameters.find("uuid", "") == "9c4ceec8-f929-434e-8ff1-837dd54b7b56");

```

I have learnt c++ through stackoverflow, therefore I dont really have an idea how production ready code should look like.

Id like to know what should be written differently and would could be improved.

If youd like to run the code, it is hosted on github with an example `main.cpp`.

```    typedef std::string string_t;

class Parameters {
std::vector<std::pair<string_t, string_t>> parameters_;

public:

void add(string_t& name, string_t& value) {
parameters_.emplace_back(name, value);
}

string_t find(string_t name, string_t default_="") {
for(auto & parameter : parameters_) {
if(parameter.first == name) return parameter.second;
}
return default_;
}

void clear() {
parameters_.clear();
}
};

template<typename Result>
class PathMatcher {

struct Path {
char character;
std::vector<Path *> children;
std::optional<Result> result;

Path(char character, std::optional<Result> result) : character(character), result(result) {}

~Path() {
for(size_t i = 0; i < children.size(); i++) {
delete children(i);
}
}
};

Path *
find_child(char character, std::vector<Path *> &parent, bool findWildcard = false, Path **wildcard = nullptr) {
Path *child = nullptr;
for (size_t i = 0; i < parent.size(); i++) {
if (parent(i)->character == character) {
child = parent(i);
// If wildcards are not wanted, there is no need to continue
if (!findWildcard) break;
} else if (findWildcard && parent(i)->character == wildcard_open_) {
(*wildcard) = parent(i);
// If child has already been found, there is no need to continue
if (child != nullptr) break;
}
}
return child;
}

Path *create_path(std::vector<Path *> &parent, char character, std::optional<Result> value) {
Path *route = new Path(character, value);
parent.push_back(route);
return route;
}

void insert_path(string_t &path, Result &result, Path *step = nullptr, int path_pos = 0) {
/*
* Recursively creates path. A path contains a vector with child paths.
* These linked paths create a chain which can be walked down.
* If we input /users/a and /users/b the following chain would be created.
* / -> u -> s -> e -> r -> s -> / -> a
*                                 -> b
*
* Now if you want to match against an input, this chain can be walked down until a path no longer contains the matching character.
* If the input would equal /users/c, the chain would be walked until the last "https://codereview.stackexchange.com/" and then failing because it only contains the children a & b, not c.
*
* The last two paths (a & b) will contains a value. This value states that the path has reached its end.
*/
assert(path.size() > 1);
if (path_pos == path.size() - 1) {
// last insertion accompanied by ending value
Path *child = find_child(path(path_pos), step->children);

if (child != nullptr) {
assert(!child->result); // Cant already have a value
child->result = result;
} else {
create_path(step->children, path(path_pos), result);
}
} else {

Path *child;
if (path_pos == 0) {
child = find_child(path(path_pos), paths_);
} else {
child = find_child(path(path_pos), step->children);
}

if (child == nullptr && path_pos == 0) {
child = create_path(paths_, path(path_pos), std::nullopt);
} else if (child == nullptr) {
child = create_path(step->children, path(path_pos), std::nullopt);
}

return insert_path(path, result, child, path_pos + 1);
}
}

void get_wildcard_name(Path **wildcard, string_t &wildcard_name) {
/*
* /users/{uuid} and users/{uuid}/friends is allowed
* /users/{uuid} and users/{id}/friends is not allowed, because wildcards at the same positions must match
*
* This method walks down the chain until the wildcard_close_ character has been found. Everything between start and end is appended to the value.
*/
assert((*wildcard)->children.size() == 1);
if ((*wildcard)->children(0)->character != wildcard_close_) {
wildcard_name.append(1, (*wildcard)->children(0)->character);
*wildcard = (*wildcard)->children(0);
get_wildcard_name(wildcard, wildcard_name);
} else {
*wildcard = (*wildcard)->children(0);
}
}

string_t get_wildcard_value(string_t &path, size_t &pos) {
// Walks down the input until the trailing_wildcard_ is found or the end is reached, everything between equals the wildcard value
int begin = pos;
for (; pos < path.size() - 1; pos++) {
if (path(pos + 1) == trailing_wildcard_) {
return path.substr(begin, pos - begin + 1);
}
}
return path.substr(begin);
}

std::vector<Path *> paths_;
Result default_;
char wildcard_open_;
char wildcard_close_;
char trailing_wildcard_;

public:

PathMatcher(Result default_, char wildcard_open='{', char wildcard_close='}', char trailing_wildcard="https://codereview.stackexchange.com/")
: default_(default_), wildcard_open_(wildcard_open), wildcard_close_(wildcard_close), trailing_wildcard_(
trailing_wildcard) {}

virtual ~PathMatcher() {
for(size_t i = 0; i < paths_.size(); i++) {
delete paths_(i);
}
}

void add_path(string_t path, Result value) {
insert_path(path, value);
}

Result match(string_t path, Parameters &variables) {
/*
* Starts at paths_ and continues trying to find children matching the next characters in input path.
* If there is no child which matches the next character, but there was a wildcard_open_ as a child,
* the code jumps back to it and sets a Parameters value for the wildcard with its value and then continues normally.
*/
Path *step = find_child(path(0), paths_);
if (step == nullptr) return default_;

Path *lastWildcard = nullptr;
size_t lastWildcardPos;
size_t i = 1;
for (; i < path.size() - 1 && step != nullptr; i++) {

Path *nextWildcard = nullptr;
step = find_child(path(i), step->children, true, &nextWildcard);

if (nextWildcard != nullptr && nextWildcard != lastWildcard) {
lastWildcardPos = i;
lastWildcard = nextWildcard;
}
if (path(i) == trailing_wildcard_) {
lastWildcard = nullptr;
}

if (step == nullptr && lastWildcard != nullptr) {
i = lastWildcardPos;

string_t wildcard_name;
get_wildcard_name(&lastWildcard, wildcard_name);
string_t wildcard_value = get_wildcard_value(path, i);

if (i == path.size() - 1) {
// Wildcard value reaches end
if (!lastWildcard->result) return default_;
return lastWildcard->result.value();
} else {
step = lastWildcard;
}
}
}

if (step == nullptr) return default_;

Path *wildcard = nullptr;
Path *result = find_child(path(path.size() - 1), step->children, true, &wildcard);

if(result != nullptr && result->result) return result->result.value();
else if(wildcard != nullptr) {
// find wildcard ending and check if it contains a value
string_t wildcardName;
get_wildcard_name(&wildcard, wildcardName);

if(!wildcard->result) return default_;

string_t value = path.substr(path.size() - 1);
return wildcard->result.value();
}

return default_;
}
};
```

Dedicated Servers in US/EU/IN ✅ Ready Stock – 24 Hour Deployment ✅ Free 5 IPv4 ✅ Premium Network

Cenchu is one of the rapidly growing website hosting company based in India. We offer high-quality dedicated servers with unparalleled support around the clock. Our servers are hosting in TIER 3 and TIER 4 datacenter facilities ensuring greater uptime, and reliability.

Our Plans: (Note: Coupon will be automatically added on checkout  These plans are managed, when you choose unmanaged, you get 10\$ additional off for lifetime)

Xeon Quad Core  16GB RAM  2TB HDD  20TB Bandwidth  \$99/mo.  Buy Now

Xeon Hexa Core  24GB RAM  2TB HDD  20TB Bandwidth  \$139/mo.  Buy Now

Xeon Octa Core  32GB RAM  2TB HDD  20TB Bandwidth  \$179/mo.  Buy Now

NOTE: We can offer custom configuration servers at any of our Datacenter facilities. All servers in Kansas include 5 IPv4 and all other locations come with only 1 IPv4. You can get more IP addresses with any of our servers at any location for a small additional cost with or without IP justification. If you need servers with multiple IPs, you can feel free to contact us.

Datacenter Locations:

• Seattle, USA
• Chicago, USA
• Kansas, USA
• Dallas, USA
• Los Angeles, USA
• Miami, USA
• New York City, USA
• Phoenix, USA
• San Francisco, USA
• Frankfurt, Germany
• Mumbai, India
• Pune, India
• Chennai, India
• Delhi, India

Why our Dedicated Servers?

• Hosted in TIER 3 and 4 DC Facilities
• FREE Full-Management
• Around the clock support from experts
• 99.99% Uptime SLA
• 24×7 Monitored Network
• Free uptime monitoring

Payment Methods Accepted:

– PayPal

– Bitcoin

– UPI, Net-Banking, Indian Wallets, Visa, and MasterCard