uploads – Organizing uploaded media in a permalink-based folder structure?

WordPress seems to like storing files by year / month. This is nice, but not good enough for busy websites with a lot of content. It's much nicer if the folders have exactly the same structure as the permalinks for them:


And so on. Is it possible to do this with a simple custom function in? functions.phpor via a plugin?

Thanks for all the hints.

Customization – How can a custom permalink structure be used to specify a custom contribution type?

url does something like that
http: // domain / test / testing-web002 /

here test = custom_taxonomy (we can say custom category snail)
testing-web002 = Custom post-slug

It shows 404 errors on the frontend.

What is the problem here and what is the template structure for retrieving mail at the frontend.
Please help me.

c ++ 11 – Container of the data structure: a better solution for an interview task

A shipping company has a warehouse for containers. Basically, a container is a data structure with the following fields:

  • price
  • ID of the commercial campaign
  • a list of possible shipping countries (empty list allows all districts)
  • internal ID

The task is to implement a function with the following parameters:

  • a list of containers
  • a number of containers needed
  • a country of destination

The function must return a selection of containers with the following criteria:

  • The ID of the commercial campaign should be clear in the result
  • Return container only for the country of destination
  • The total cost should be maximum for a particular destination country

A bonus for the solution would be:

  • Add option to add a selection filter (not only by country)
  • a way to add additional fields to prioritize containers

I found the solution, which unfortunately was unsatisfactory for unknown reasons. How can I improve it?


typedef std::map CountryList; // int country_code, country_name
typedef std::tuple Container; // long price, long compain_id, CountryList, long id
typedef std::multimap> ContainerList;
typedef std::pair ContainerValue;
typedef ContainerList::const_iterator Iterator;
typedef std::map ResultList;

struct SearchCriteria
    typedef std::vector< std::function> Filters;

    SearchCriteria() {}

    bool operator()(const ContainerValue & container) const
        bool result = false;
        for (auto & filter : filters)
            result |= filter(container);
            if (!result)
        return result;

    Filters filters;

void SelectContainers(const ContainerList & container_list, size_t places_num, int country_code)
    SearchCriteria s;
    // *) add a possibility to add a selection filter (not only by country)
    s.filters.push_back((country_code)(const ContainerValue & container) { 
        const CountryList & cl = std::get<2>(container.second);
        // 2) should return containers only intended for the country of destination
        return !cl.size() || cl.find(country_code) != cl.end();

    ResultList result;

    for (Iterator i = container_list.begin(); i != container_list.end() && result.size() < places_num; ++i )
        i = std::find_if(i, container_list.end(), s);
        if (i != container_list.end())
            // 1) commercial campaign id should be unique with in the result
            result.insert(std::make_pair( std::get<1>((*i).second), i));

    long totalSum = 0;
    auto printout = (&totalSum)(const std::pair & pair) { 
        std::cout << "Compain id=" << std::get<1>(pair.second->second)
                  << " Container id=" << std::get<3>(pair.second->second)
                  << " Price="     << std::get<0>(pair.second->second) << std::endl;
        totalSum += std::get<0>(pair.second->second); 
    // 3) a total cost should be the maximum for a given destination country
    std::for_each(result.begin(), result.end(), printout);
    std::cout << "Total max sum=" << totalSum << std::endl;

int main()
    //                              price,compain_id, CountryList,   id
    Container baner  = std::make_tuple(1000, 1,       CountryList{ { 643,"US" }, { 804,"UK" },{ 440,"Lithuania" } }, 100);
    Container baner2 = std::make_tuple(2000, 1,       CountryList{ { 643,"US" }, { 804,"UK" } },                     101);
    Container baner3 = std::make_tuple(3000, 2,          CountryList{ { 643,"US" }, { 112,"Mexico" } },                   102);
    Container baner4 = std::make_tuple(6000, 3,          CountryList{},                                                                       103);
    Container baner5 = std::make_tuple(4000, 4,          CountryList{ { 804,"UK" } },                                                     104);
    Container baner6 = std::make_tuple(3000, 5,          CountryList{ { 643,"US" } },                                         105);
    Container baner7 = std::make_tuple(5000, 3,          CountryList{ { 643,"US" } },                                         106);
    Container baner8 = std::make_tuple(9000, 6,          CountryList{ { 804,"UK" } },                                                   107);
    Container baner9 = std::make_tuple(5000, 7,          CountryList{},                                                                   108);

    ContainerList container_list;
    container_list.insert(std::make_pair(std::get<0>(baner), baner));
    container_list.insert(std::make_pair(std::get<0>(baner2), baner2));
    container_list.insert(std::make_pair(std::get<0>(baner3), baner3));
    container_list.insert(std::make_pair(std::get<0>(baner4), baner4));
    container_list.insert(std::make_pair(std::get<0>(baner5), baner5));
    container_list.insert(std::make_pair(std::get<0>(baner6), baner6));
    container_list.insert(std::make_pair(std::get<0>(baner7), baner7));
    container_list.insert(std::make_pair(std::get<0>(baner8), baner8));
    container_list.insert(std::make_pair(std::get<0>(baner9), baner9));

    SelectContainers(container_list, 4, 804);

    return 0;

Compain ID = 3 Container ID = 103 Price = 6000
Compain ID = 4 Container ID = 104 Price = 4000
Compain ID = 6 Container ID = 107 Price = 9000
Compain ID = 7 Container ID = 108 Price = 5000
Maximum total = 24000

Which tree or diagram structure to solve this problem?

I have the following interface, it defines a loadable resource that depends on other resources that should be loaded first, so it can load itself:

Enter image description here

It does its job, the Find Method to search for a specific dependency Load Method.

Now I have another problem for which I have not found an elegant solution.

Here is an example of what I would like to model using explanations:

(click to enlarge)

Enter image description here

Legend of the elements, starting from the top:

  • Level represents a game level, it has an arbitrary amount of content
  • Sky. Scene and Track are some of the contents
    • These can consist of several contents, eg. to the Scene it is Scene 1 and Scene N
  • The next elements represent different file types that each content needs
  • the last level, Storagefrom where they are to be loaded

Note: The direction of the arrows indicates what an object depends on so that it can load itself

Here's the implementation I'm currently using:

using System;
using System.Collections.Generic;
using System.Linq;
using JetBrains.Annotations;
using Random = UnityEngine.Random;

namespace ZeroAG.WorkInProgress.Resources
    public interface IResource
        ///     Gets direct dependencies of this instance.
        IEnumerable Dependencies { get; }

        ///     Gets the name of this instance.
        string Name { get; }

        ///     Gets any dependencies of this instance that matches a predicate.
        IEnumerable Find((NotNull) Predicate predicate) where T : IResource;

        ///     Loads this instance.
        void Load(IResourceProgress progress) where T : IResourceProgressInfo, new();

    public abstract class Resource : IResource
        protected Resource((NotNull) string name, (NotNull) params IResource() dependencies)
            Name = name ?? throw new ArgumentNullException(nameof(name));
            Dependencies = dependencies ?? throw new ArgumentNullException(nameof(dependencies));

        public IEnumerable Dependencies { get; }

        public string Name { get; }

        public IEnumerable Find(Predicate predicate) where T : IResource
            if (predicate == null)
                throw new ArgumentNullException(nameof(predicate));

            var queue = new Queue(new() {this});

            while (queue.Any())
                var dequeue = queue.Dequeue();

                foreach (var dependency in dequeue.Dependencies)

                if (dequeue is T item && predicate(item))
                    yield return item;

        public virtual void Load(IResourceProgress progress) where T : IResourceProgressInfo, new()
            // just a demo for all derived types

            var count = Random.Range(3, 5);

            for (var i = 0; i < count; i++)
                var value = new T
                    Sender = this,
                    Percentage = 1.0f / (count - 1) * i,
                    Message = $"{GetType().Name}: {i + 1} of {count}"



While IResource.Find Allows me to find a child dependency. Does not allow me to ask for a dependency IResource at the same hierarchical level or above, e.g. At some point, I have to be able to ask questions like the one shown in red, d. H. ask for anything from anywhere,

Well, while it is very tempting, a IResource Parent Property IResource It does not really make sense, as there could be multiple parents, such as for Scene Atlas,

It seems that I'm drifting from a typical tree structure What ever but I can not identify this structure.


What am I looking for and / or how could I IResource be refactored to solve this problem?

Design database without knowing the structure

I'm looking for some advice on designing a database if I'm not sure what data is needed. I use mySQL. To provide a small context, I set up a reporting system. At the beginning I have a report table (I show my migration used in Laravel)

Schema::create('reports', function (Blueprint $table) {


That's pretty easy. A report is associated with a user and has a report name and status. Now, a report can be one of three different report types I offer. As such, I've created a report_types table

Schema::create('report_type', function (Blueprint $table) {


A report type is linked to a report. Here I am a bit confused. Again a little context. A user selects his report type and uploads some data. This data is then sent to an external system and I get an answer, which is the data I want to capture. For the first report, the data is structured. I know what I get back, so I might be able to do that if I know what data I'm getting

Schema::create('report_one_data', function (Blueprint $table) {


First of all, I am not sure if this is the best approach. Use a different table for each report type. My bigger problem is this. If you select the second report, the response I receive from this external system will include data from the file that the user uploaded. So I'm not sure which columns I'll need.

What would be the best way to deal with such a situation?

Many thanks

The new pricing structure of DirectAdmin | Web Hosting Talk

Quote Quote by frill
Show contribution

DirectAdmin has released its new pricing structure for so-called "retail licenses". Very fair prices, in my opinion. However, was the lifetime license removed? What does that mean? No more life? Personally, I made the decision to switch to DirectAdmin to make a lifetime license decision after a few months of habituation to the entire user interface and setup.

Since the fiasco with the cPanel account limit, many hosts have already switched to DirectAdmin. With that, Directadmin wants to be the new "industry standard" control panel.
For them, it would not be beneficial in the long run to sell licenses for life as they are seeing an increase in their license purchases. Here you have the new pricing.

Beware!! Steal knowledge

How is that best? Question about the structure of graduated links.

Every day I create level 1 backlinks for the money side. I want GSA to create 50 Tier 2 backlinks per day for every Tier 1 backlink. Every day I create new projects, but I think this is a bad way, it's too time-consuming, and there's probably a better way to do it. It's important that I create the same number of Tier 2 backlinks to Tier 1 backlinks every day. Can I just create a project and add URLs to this project every day? Is there an option to create a specific number of Tier 2 backlinks per day for each backlink without creating new projects?

Large Organizations IT Structure – Software Engineering Stack Exchange

I have worked for the same employer throughout my career (13 years). We are big and deal with sensitive data. Technology is not our product, but it supports our main product.

I want to know how other big organizations are structured. Here we have silos of functional areas within the IT. We have separate units responsible for Cloud Engineering, Identity Management, Application Lifecycle Management, Database Administrators, and Information Security. These separate areas all have their own priorities and marching orders.

I am sitting in a Development Scrum Team. We represent the horizontal bar below. We carry out project works that cover all the above functional areas. This means for us that if we want to run a project, we will set up service inquiry tickets for all these areas. Typically, a new project starts with the request for services over ~ 50 tickets. That drives us developers crazy.

Do such big business things? Is this more likely to happen in companies where Tech is not the main business? What alternative structures have you seen in your roles?

Enter image description here

How should I structure the layout and storage system of my game concept?

I'm a big fan of Minecraft and (to some extent) Terraria. I've always wanted to create my own version of this kind of creative sandbox game. Lately, I've been thinking about so many things that I could add.

The game I imagine is a completely different style than these two games. It's 3D and cartoony to some point, but not too cartoony, to be unrealistic. I speak more realistically than Fortnite's style, but I definitely do not want to try to make a photorealistic game.

I want my game world to be more fluid than Minecraft and Terraria. I do not want the player necessarily limited to a grid of blocks. However, this should be implemented in some places, for example when the player places parts of a structure down (blocks).

Generated structures such as trees, rocks and terrain do not necessarily want to be blocked or bound to a fixed grid.

The things that I think players can put into the world are wooden pillars that form the basis of a house, wall blocks for a house, tables and chairs, doors and various blocks needed to make different objects.

I like how the worlds Minecraft and Terraria are created and saved. It's simple: Each coordinate is a block that can be stored very easily. I still have not figured out how to save the kind of world I want in my game.

So my question is: how should I structure the layout / storage system for terrain, structures, and player-placed blocks so I can save it efficiently and write relatively easily?

Something I've been thinking about: There's a mod for Minecraft, the no-cubes mod, that essentially removes all cubes from the game and seamlessly blends blocks together. This could be a good way to make this game because the blocks are still stored in the same way but are not actual blocks and the terrain can be made more realistic by this method.

DreamProxies - Cheapest USA Elite Private Proxies 100 Private Proxies 200 Private Proxies 400 Private Proxies 1000 Private Proxies 2000 Private Proxies ExtraProxies.com - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive Proxies-free.com New Proxy Lists Every Day Proxies123
Proxy Sites Proxy Tunnels Proxy List Working Proxy Sites Hotproxysite Proxy Sites Proxy Sites Anonymous Proxy Anonymous Proxies Top-Proxies.co.uk http://www.proxysitesnow.com Proxy Servers Free Proxies Free Proxy List Proxy List Zoxy Proxy List PR liste all proxy sites More Proxies netgofree netgofree Hide-MyIp - The Best Proxy List American Proxy List www.proxylisty.com/proxylist Web Proxy Submit Proxies Updated Proxy List Updated Proxy List aproxy.org Bypass Proxy Sites Free Proxies List Evolving Critic Business Web Directory Free Proxy List iShortIt MyProxyList Online Proxies Go Proxies Need Proxies PrivateProxies Proxies4MySchool Proxies4Work Free Proxy List Free Proxy Sites ProxyInside Wiksa Proxy ProxyLister.org Free Proxy List ProxyNoid Proxy List Free Proxy List Proxy Sites Proxy TopList ProxyVille UK Proxy WebProxy List RatedProxy.com - Listing the best Web Proxies Free Proxy List SchoolProxiesList Stay Anonymous Proxy List The Power Of Ninja Proxy List UNubstruct Free proxy sites Free proxy sites